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:
eid : int

element id

pid : int

property id (PSOLID, PLSOLID)

nids : List[int]

node ids; n=20

Centroid(self)[source]

See also

CHEXA8.Centroid

Volume(self)[source]

See also

CHEXA8.Volume

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

eid = None

Element ID

faces

Gets the faces of the element

Returns:
faces : Dict[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(self)[source]

Return the edge IDs

get_face(self, nid_opposite, nid)[source]
get_face_area_centroid_normal(self, nid, nid_opposite)[source]
Parameters:
nid : int

G1 - a grid point on the corner of a face

nid_opposite : int

G3 - the grid point diagonally opposite of G1

node_ids
safe_cross_reference(self, model, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

type = 'CHEXA'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

write_card_16(self, 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:
eid : int

element id

pid : int

property id (PSOLID, PLSOLID)

nids : List[int]

node ids; n=8

Centroid(self)[source]

Averages the centroids at the two faces

Volume(self)[source]

Calculate the volume of the hex

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

eid = None

Element ID

faces

Gets the faces of the element

Returns:
faces : Dict[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(self)[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(self, nid_opposite, nid)[source]
get_face_area_centroid_normal(self, nid, nid_opposite)[source]
Parameters:
nid : int

G1 - a grid point on the corner of a face

nid_opposite : int

G3 - the grid point diagonally opposite of G1

material_coordinate_system(self, xyz=None)[source]

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

node_ids
safe_cross_reference(self, model, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

type = 'CHEXA'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

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

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

type = 'CIHEX1'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

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

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

type = 'CIHEX2'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

write_card_16(self, 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:
eid : int

element id

pid : int

property id (PSOLID, PLSOLID)

nids : List[int]

node ids; n=15

Centroid(self)[source]

See also

CPENTA6.Centroid

Volume(self)[source]

See also

CPENTA6.Volume

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

eid = None

Element ID

faces

Gets the faces of the element

Returns:
faces : Dict[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(self)[source]

Return the edge IDs

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

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

type = 'CPENTA'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

write_card_16(self, 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:
eid : int

element id

pid : int

property id (PSOLID, PLSOLID)

nids : List[int]

node ids; n=6

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

Calculate the volume of the penta

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

eid = None

Element ID

faces

Gets the faces of the element

Returns:
faces : Dict[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(self)[source]

Return the edge IDs

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

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

node_ids
raw_fields(self)[source]
safe_cross_reference(self, model, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

type = 'CPENTA'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

write_card_16(self, 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    
Centroid(self)[source]

See also

CPYRAM5.Centroid

Volume(self)[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:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

eid = None

Element ID

faces

Gets the faces of the element

Returns:
faces : Dict[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(self)[source]

Return the edge IDs

node_ids
safe_cross_reference(self, model, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

type = 'CPYRAM'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

write_card_16(self, 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
Centroid(self)[source]

See also

CPYRAM5.Centroid

Volume(self)[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:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

eid = None

Element ID

faces

Gets the faces of the element

Returns:
faces : Dict[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(self)[source]

Return the edge IDs

node_ids
safe_cross_reference(self, model, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

type = 'CPYRAM'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

write_card_16(self, 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:
eid : int

element id

pid : int

property id (PSOLID, PLSOLID)

nids : List[int]

node ids; n=10

Centroid(self)[source]

Gets the cenroid of the primary tetrahedron.

See also

CTETRA4.Centroid

Volume(self)[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:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

eid = None

Element ID

faces

Gets the faces of the element

Returns:
faces : Dict[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(self)[source]

Return the edge IDs

get_face_area_centroid_normal(self, nid_opposite, nid=None)[source]
get_face_nodes(self, nid_opposite, nid=None)[source]
node_ids
safe_cross_reference(self, model, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

type = 'CTETRA'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

write_card_16(self, 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:
eid : int

element id

pid : int

property id (PSOLID, PLSOLID)

nids : List[int]

node ids; n=4

comment : str; default=’‘

a comment for the card

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

Calculate the volume of the tet

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

ansys_faces

Gets the faces of the element

Returns:
faces : Dict[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(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

eid = None

Element ID

faces

Gets the faces of the element

Returns:
faces : Dict[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)
get_edge_ids(self)[source]

Return the edge IDs

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

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

node_ids
safe_cross_reference(self, model, xref_errors)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

type = 'CTETRA'
write_card(self, size=8, is_double=False)[source]

Writes the card with the specified width and precision

Parameters:
size : int (default=8)

size of the field; {8, 16}

is_double : bool (default=False)

is this card double precision

Returns:
msg : str

the string representation of the card

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

Bases: pyNastran.bdf.cards.base_card.Element

E(self)[source]
G(self)[source]
Mass(self)[source]

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

Mid(self)[source]

Returns the material ID as an integer

Nu(self)[source]
Rho(self)[source]

Returns the density

Volume(self)[source]

Base volume method that should be overwritten

_properties = ['faces']
center_of_mass(self)[source]
cross_reference(self, model)[source]
classmethod export_to_hdf5(h5_file, model, eids)[source]

exports the elements in a vectorized way

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

Removes cross-reference links

pyNastran.bdf.cards.elements.solid.area_centroid(n1, n2, n3, n4)[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:
nid : int

G1 - a grid point on the corner of a face

nid_opposite : int

G3 - the grid point diagonally opposite of G1

nodes_ref : List[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:
nid : int

G1 - a grid point on the corner of a face

nid_opposite : int / 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:
nid : int

G1 - a grid point on the corner of a face

nid_opposite : int

G4 - a grid point not being loaded

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

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

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