solid Module

Inheritance diagram of pyNastran.bdf.cards.elements.solid

All solid elements are defined in this file. This includes:

  • CHEXA8

  • CHEXA20

  • CPENTA6

  • CPENTA15

  • CTETRA4

  • CTETRA10

  • CIHEX1

  • CIHEX2

All solid elements are SolidElement and Element objects.

class pyNastran.bdf.cards.elements.solid.CHEXA20(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.SolidElement

1

2

3

4

5

6

7

8

9

CHEXA

EID

PID

G1

G2

G3

G4

G5

G6

G7

G8

G9

G10

G11

G12

G13

G14

G15

G16

G17

G18

G19

G20

Creates a CHEXA20

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=20

Centroid()[source]

See also

CHEXA8.Centroid

Volume()[source]

See also

CHEXA8.Volume

classmethod add_card(card, comment='')[source]

Adds a CHEXA20 card from BDF.add_card(...)

Parameters
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

eid = None

Element ID

property faces

Gets the faces of the element

Returns
facesDict[int] = [face1, face2, …]

key = face number value = a list of nodes (integer pointers) as the values.

Note

The order of the nodes are consistent with normals that point outwards The face numbering is meaningless

Note

The order of the nodes are consistent with ANSYS numbering; is this current? ..

Warning

higher order element ids not verified with ANSYS; is this current? ..

Examples

>>> print(element.faces)
get_edge_ids()[source]

Return the edge IDs

get_face(nid_opposite, nid)[source]
get_face_area_centroid_normal(nid, nid_opposite)[source]
Parameters
nidint

G1 - a grid point on the corner of a face

nid_oppositeint

G3 - the grid point diagonally opposite of G1

property node_ids
safe_cross_reference(model: BDF, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

type = 'CHEXA'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.CHEXA8(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.SolidElement

1

2

3

4

5

6

7

8

9

CHEXA

EID

PID

G1

G2

G3

G4

G5

G6

G7

G8

Creates a CHEXA8

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=8

Centroid()[source]

Averages the centroids at the two faces

Volume()[source]

Calculate the volume of the hex

classmethod add_card(card, comment='')[source]

Adds a CHEXA8 card from BDF.add_card(...)

Parameters
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

eid = None

Element ID

property faces

Gets the faces of the element

Returns
facesDict[int] = [face1, face2, …]

key = face number value = a list of nodes (integer pointers) as the values.

Note

The order of the nodes are consistent with normals that point outwards The face numbering is meaningless

Note

The order of the nodes are consistent with ANSYS numbering; is this current? ..

Warning

higher order element ids not verified with ANSYS; is this current? ..

Examples

>>> print(element.faces)
flip_normal()[source]

flips the element inside out

get_edge_ids()[source]

Return the edge IDs # top (5-6-7-8) # btm (1-2-3-4) # left (1-2-3-4) # right (5-6-7-8) # front (1-5-8-4) # back (2-6-7-3)

get_face(nid_opposite, nid)[source]
get_face_area_centroid_normal(nid, nid_opposite)[source]
Parameters
nidint

G1 - a grid point on the corner of a face

nid_oppositeint

G3 - the grid point diagonally opposite of G1

material_coordinate_system(xyz=None)[source]

http://www.ipes.dk/Files/Ipes/Filer/nastran_2016_doc_release.pdf

property node_ids
safe_cross_reference(model: BDF, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

type = 'CHEXA'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.CIHEX1(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.CHEXA8

Creates a CHEXA8

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=8

type = 'CIHEX1'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.CIHEX2(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.CHEXA20

Creates a CHEXA20

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=20

type = 'CIHEX2'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.CPENTA15(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.SolidElement

1

2

3

4

5

6

7

8

9

CPENTA

EID

PID

G1

G2

G3

G4

G5

G6

G7

G8

G9

G10

G11

G12

G13

G14

G15

Creates a CPENTA15

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=15

Centroid()[source]

See also

CPENTA6.Centroid

Volume()[source]

See also

CPENTA6.Volume

classmethod add_card(card, comment='')[source]

Adds a CPENTA15 card from BDF.add_card(...)

Parameters
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

eid = None

Element ID

property faces

Gets the faces of the element

Returns
facesDict[int] = [face1, face2, …]

key = face number value = a list of nodes (integer pointers) as the values.

Note

The order of the nodes are consistent with normals that point outwards The face numbering is meaningless

Note

The order of the nodes are consistent with ANSYS numbering; is this current? ..

Warning

higher order element ids not verified with ANSYS; is this current? ..

Examples

>>> print(element.faces)
get_edge_ids()[source]

Return the edge IDs

get_face(nid, nid_opposite)[source]
get_face_area_centroid_normal(nid, nid_opposite=None)[source]
property node_ids
safe_cross_reference(model: BDF, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

type = 'CPENTA'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.CPENTA6(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.SolidElement

1

2

3

4

5

6

7

8

9

CPENTA

EID

PID

G1

G2

G3

G4

G5

G6

::

3 6

———-

/ /

/ A / c —–—– 1 2 4 5 V = (A1+A2)/2 * norm(c1-c2) C = (c1-c2)/2

Creates a CPENTA6

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=6

Centroid()[source]
Volume()[source]

Calculate the volume of the penta

classmethod add_card(card, comment='')[source]

Adds a CPENTA6 card from BDF.add_card(...)

Parameters
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

eid = None

Element ID

property faces

Gets the faces of the element

Returns
facesDict[int] = [face1, face2, …]

key = face number value = a list of nodes (integer pointers) as the values.

Note

The order of the nodes are consistent with normals that point outwards The face numbering is meaningless

Note

The order of the nodes are consistent with ANSYS numbering; is this current? ..

Warning

higher order element ids not verified with ANSYS; is this current? ..

Examples

>>> print(element.faces)
get_edge_ids()[source]

Return the edge IDs

get_face(nid, nid_opposite=None)[source]
get_face_area_centroid_normal(nid, nid_opposite=None)[source]
get_face_nodes_and_area(nid, nid_opposite)[source]
material_coordinate_system(xyz=None)[source]

http://www.ipes.dk/Files/Ipes/Filer/nastran_2016_doc_release.pdf

property node_ids
raw_fields()[source]
safe_cross_reference(model: BDF, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

type = 'CPENTA'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.CPYRAM13(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.SolidElement

1

2

3

4

5

6

7

8

9

CPYRAM

EID

PID

G1

G2

G3

G4

G5

G6

G7

G8

G9

G10

G11

G12

dummy init

Centroid()[source]

See also

CPYRAM5.Centroid

Volume() → float[source]

See also

CPYRAM5.Volume

V = (l * w) * h / 3 V = A * h / 3

classmethod add_card(card, comment='')[source]

Adds a CPYRAM13 card from BDF.add_card(...)

Parameters
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

eid = None

Element ID

property faces

Gets the faces of the element

Returns
facesDict[int] = [face1, face2, …]

key = face number value = a list of nodes (integer pointers) as the values.

Note

The order of the nodes are consistent with normals that point outwards The face numbering is meaningless

Note

The order of the nodes are consistent with ANSYS numbering; is this current? ..

Warning

higher order element ids not verified with ANSYS; is this current? ..

Examples

>>> print(element.faces)
get_edge_ids()[source]

Return the edge IDs

property node_ids
safe_cross_reference(model: BDF, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

type = 'CPYRAM'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.CPYRAM5(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.SolidElement

1

2

3

4

5

6

7

8

CPYRAM

EID

PID

G1

G2

G3

G4

G5

dummy init

Centroid()[source]

See also

CPYRAM5.Centroid

Volume()[source]

See also

CPYRAM5.Volume

V = (l * w) * h / 3 V = A * h / 3

classmethod add_card(card, comment='')[source]

Adds a CPYRAM5 card from BDF.add_card(...)

Parameters
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

eid = None

Element ID

property faces

Gets the faces of the element

Returns
facesDict[int] = [face1, face2, …]

key = face number value = a list of nodes (integer pointers) as the values.

Note

The order of the nodes are consistent with normals that point outwards The face numbering is meaningless

Note

The order of the nodes are consistent with ANSYS numbering; is this current? ..

Warning

higher order element ids not verified with ANSYS; is this current? ..

Examples

>>> print(element.faces)
get_edge_ids()[source]

Return the edge IDs

property node_ids
safe_cross_reference(model: BDF, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

type = 'CPYRAM'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.CTETRA10(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.SolidElement

1

2

3

4

5

6

7

8

9

CTETRA

EID

PID

G1

G2

G3

G4

G5

G6

G7

G8

G9

G10

CTETRA

1

1

239

229

516

99

335

103

265

334

101

102

Creates a CTETRA10

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=10

Centroid()[source]

Gets the cenroid of the primary tetrahedron.

See also

CTETRA4.Centroid

Volume()[source]

Gets the volume, \(V\), of the primary tetrahedron.

See also

CTETRA4.Volume

classmethod add_card(card, comment='')[source]

Adds a CTETRA10 card from BDF.add_card(...)

Parameters
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

cross_reference(model: BDF) → None[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

eid = None

Element ID

property faces

Gets the faces of the element

Returns
facesDict[int] = [face1, face2, …]

key = face number value = a list of nodes (integer pointers) as the values.

Note

The order of the nodes are consistent with normals that point outwards The face numbering is meaningless

Note

The order of the nodes are consistent with ANSYS numbering; is this current? ..

Warning

higher order element ids not verified with ANSYS; is this current? ..

Examples

>>> print(element.faces)
get_edge_ids()[source]

Return the edge IDs

get_face_area_centroid_normal(nid_opposite, nid=None)[source]
get_face_nodes(nid_opposite, nid=None)[source]
material_coordinate_system(xyz=None)[source]
Returns
centroid: (3,) float ndarray

the centoid

xe, ye, ze: (3,) float ndarray

the element coordinate system

property node_ids
safe_cross_reference(model: BDF, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

type = 'CTETRA'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.CTETRA4(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.solid.SolidElement

1

2

3

4

5

6

7

CTETRA

EID

PID

G1

G2

G3

G4

Creates a CTETRA4

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=4

commentstr; default=’’

a comment for the card

Centroid()[source]
Volume()[source]

Calculate the volume of the tet

classmethod add_card(card, comment='')[source]

Adds a CTETRA4 card from BDF.add_card(...)

Parameters
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

property ansys_faces

Gets the faces of the element

Returns
facesDict[int] = [face1, face2, …]

key = face number value = a list of nodes (integer pointers) as the values.

Note

The order of the nodes are consistent with ANSYS numbering. ..

Warning

higher order element ids not verified with ANSYS. ..

Examples

>>> print(element.faces)
cross_reference(model: BDF) → None[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

eid = None

Element ID

property faces

Gets the faces of the element

Returns
facesDict[int] = [face1, face2, …]

key = face number value = a list of nodes (integer pointers) as the values.

Note

The order of the nodes are consistent with normals that point outwards The face numbering is meaningless

Examples

>>> print(element.faces)
flip_normal()[source]

flips the element inside out

get_edge_ids()[source]

Return the edge IDs

get_face(nid_opposite, nid)[source]
get_face_area_centroid_normal(nid, nid_opposite)[source]
get_face_nodes(nid_opposite, nid=None)[source]
material_coordinate_system(xyz=None)[source]
Returns
centroid: (3,) float ndarray

the centoid

xe, ye, ze: (3,) float ndarray

the element coordinate system

property node_ids
safe_cross_reference(model: BDF, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters
modelBDF()

the BDF object

type = 'CTETRA'
write_card(size: int = 8, is_double: bool = False) → str[source]

Writes the card with the specified width and precision

Parameters
sizeint (default=8)

size of the field; {8, 16}

is_doublebool (default=False)

is this card double precision

Returns
msgstr

the string representation of the card

write_card_16(is_double=False)[source]
class pyNastran.bdf.cards.elements.solid.SolidElement[source]

Bases: pyNastran.bdf.cards.base_card.Element

dummy init

E() → float[source]
G() → float[source]
Mass() → float[source]

Calculates the mass of the solid element Mass = Rho * Volume

Mid() → int[source]

Returns the material ID as an integer

Nu() → float[source]
Rho() → float[source]

Returns the density

Volume() → float[source]

Base volume method that should be overwritten

_properties = ['faces']
center_of_mass()[source]
cross_reference(model: BDF) → None[source]
classmethod export_to_hdf5(h5_file, model, eids)[source]

exports the elements in a vectorized way

get_face_area_centroid_normal(nid_opposite, nid=None)[source]
raw_fields()[source]
uncross_reference() → None[source]

Removes cross-reference links

pyNastran.bdf.cards.elements.solid._ctetra_element_coordinate_system(element: Union[pyNastran.bdf.cards.elements.solid.CTETRA4, pyNastran.bdf.cards.elements.solid.CTETRA10], xyz=None)[source]
Returns
centroid: (3,) float ndarray

the centoid

xe, ye, ze: (3,) float ndarray

the element coordinate system

http://www.ipes.dk/Files/Ipes/Filer/nastran_2016_doc_release.pdf
pyNastran.bdf.cards.elements.solid.area_centroid(n1: Any, n2: Any, n3: Any, n4: Any) → Tuple[float, float][source]

Gets the area, \(A\), and centroid of a quad.:

1-----2
|   / |
| /   |
4-----3
pyNastran.bdf.cards.elements.solid.chexa_face(nid_opposite, nid, nids)[source]
pyNastran.bdf.cards.elements.solid.chexa_face_area_centroid_normal(nid, nid_opposite, nids, nodes_ref)[source]
Parameters
nidint

G1 - a grid point on the corner of a face

nid_oppositeint

G3 - the grid point diagonally opposite of G1

nodes_refList[GRID]

the GRID objects

# top (7-6-5-4)
# btm (0-1-2-3)
# left (0-3-7-4)
# right (5-6-2-1)
# front (4-5-1-0)
# back (2-6-7-3)
pyNastran.bdf.cards.elements.solid.cpenta_face(nid, nid_opposite, nids)[source]
pyNastran.bdf.cards.elements.solid.cpenta_face_area_centroid_normal(nid, nid_opposite, nids, nodes_ref)[source]
Parameters
nidint

G1 - a grid point on the corner of a face

nid_oppositeint / None

G3 - the grid point diagonally opposite of G1

pyNastran.bdf.cards.elements.solid.ctetra_face(nid, nid_opposite, nids)[source]
pyNastran.bdf.cards.elements.solid.ctetra_face_area_centroid_normal(nid, nid_opposite, nids, nodes_ref)[source]
Parameters
nidint

G1 - a grid point on the corner of a face

nid_oppositeint

G4 - a grid point not being loaded

pyNastran.bdf.cards.elements.solid.volume4(n1: Any, n2: Any, n3: Any, n4: Any) → float[source]

Gets the volume, \(V\), of the tetrahedron.

\[V = \frac{(a-d) \cdot \left( (b-d) \times (c-d) \right) }{6}\]