shell Module

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

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

  • CTRIA3
  • CTRIA6
  • CSHEAR
  • CQUAD
  • CQUAD4
  • CQUAD8
  • CQUADR
  • CPLTSN3
  • CPLSTN4
  • CPLSTN6
  • CPLSTN8
  • SNORM

All tris are TriShell, ShellElement, and Element objects. All quads are QuadShell, ShellElement, and Element objects.

class pyNastran.bdf.cards.elements.shell.CTRIA3(eid, pid, nids, zoffset=0.0, theta_mcid=0.0, tflag=0, T1=None, T2=None, T3=None, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.TriShell

1 2 3 4 | 5 6 7 8
CTRIA3 EID PID N1 | N2 N3 THETA/MCID ZOFFSET
    TFLAG T1 T2 T3    

Creates a CTRIA3 card

Parameters:
eid : int

element id

pid : int

property id (PSHELL/PCOMP/PCOMPG)

nids : List[int, int, int]

node ids

zoffset : float; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcid : float; default=0.0
float : material coordinate system angle (theta) is defined

relative to the element coordinate system

int : x-axis from material coordinate system angle defined by

mcid is projected onto the element

tflag : int; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3 : float; default=None

If it is not supplied, then T1 through T3 will be set equal to the value of T on the PSHELL entry.

comment : str; default=’‘

a comment for the card

_get_repr_defaults(self)[source]
_properties = ['cp_name_map', '_field_map']
classmethod add_card(card, comment='')[source]

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cp_name_map = {'T1': 'T1', 'T2': 'T2', 'T3': 'T3'}
cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

classmethod export_to_hdf5(h5_file, model, eids)[source]

exports the elements in a vectorized way

flip_normal(self)[source]

Flips normal of element.

   1           1
  * *   -->   * *
 *   *       *   *
2-----3     3-----2
get_thickness_scale(self)[source]
node_ids
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

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 = 'CTRIA3'
uncross_reference(self)[source]

Removes cross-reference links

validate(self)[source]

card checking method that should be overwritten

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

class pyNastran.bdf.cards.elements.shell.CTRIA6(eid, pid, nids, theta_mcid=0.0, zoffset=0.0, tflag=0, T1=None, T2=None, T3=None, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.TriShell

1 2 3 4 | 5 6 7 8 9
CTRIA3 EID PID N1 | N2 N3 N4 N5 N6
  THETA/MCID ZOFFSET T1 T2 T3      

Creates a CTRIA6 card

Parameters:
eid : int

element id

pid : int

property id (PSHELL/PCOMP/PCOMPG)

nids : List[int, int, int, int/None, int/None, int/None]

node ids

zoffset : float; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcid : float; default=0.0
float : material coordinate system angle (theta) is defined

relative to the element coordinate system

int : x-axis from material coordinate system angle defined by

mcid is projected onto the element

tflag : int; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3 : float; default=None

If it is not supplied, then T1 through T3 will be set equal to the value of T on the PSHELL entry.

comment : str; default=’‘

a comment for the card

Area(self)[source]

Get the area, \(A\).

\[A = \frac{1}{2} (n_0-n_1) \times (n_0-n_2)\]
AreaCentroidNormal(self)[source]

Returns area, centroid, normal as it’s more efficient to do them together

Centroid(self)[source]

Get the centroid.

\[CG = \frac{1}{3} (n_1+n_2+n_3)\]
Normal(self)[source]

Get the normal vector, \(n\).

\[n = \frac{(n_0-n_1) \times (n_0-n_2)}{\lvert (n_0-n_1) \times (n_0-n_2) \lvert}\]
Thickness(self)[source]

Returns the thickness, \(t\)

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

center_of_mass(self)[source]
cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

classmethod export_to_hdf5(h5_file, model, eids)[source]

exports the elements in a vectorized way

flip_normal(self)[source]

Flips normal of element.

    1                1
    **               **
   *  *             *  *
  4    6   -->     6    4
 *      *         *      *
2----5---3       3----5---2
get_thickness_scale(self)[source]
node_ids
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

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 = 'CTRIA6'
uncross_reference(self)[source]

Removes cross-reference links

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

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

Bases: pyNastran.bdf.cards.elements.shell.QuadShell

1 2 3 4 | 5 6 7
CSHEAR EID PID N1 | N2 N3 N4

Creates a CSHEAR card

Parameters:
eid : int

element id

pid : int

property id (PSHEAR)

nids : List[int, int, int, int]

node ids

comment : str; default=’‘

a comment for the card

Area(self)[source]
\[A = \frac{1}{2} \lvert (n_1-n_3) \times (n_2-n_4) \rvert\]

where a and b are the quad’s cross node point vectors

AreaCentroid(self)[source]
::
1—–2 | /| | A1/ | | / | |/ A2 | 4—–3
AreaCentroidNormal(self)[source]
Centroid(self)[source]
G(self)[source]
Mass(self)[source]
\[m = \frac{m}{A} A \f]\]
Normal(self)[source]
Thickness(self)[source]

Returns the thickness

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

center_of_mass(self)[source]
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

classmethod export_to_hdf5(h5_file, model, eids)[source]

exports the elements in a vectorized way

flip_normal(self)[source]
1---2       1---4
|   |  -->  |   |
|   |       |   |
4---3       2---3
node_ids
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

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 = 'CSHEAR'
uncross_reference(self)[source]

Removes cross-reference links

validate(self)[source]

card checking method that should be overwritten

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

class pyNastran.bdf.cards.elements.shell.CQUAD(eid, pid, nids, theta_mcid=0.0, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.QuadShell

1 2 3 4 5 6 7 8 9
CQUAD EID PID G1 G2 G3 G4 G5 G6
  G7 G8 G9 THETA/MCID        

theta_mcid is an MSC specific variable

Creates a CQUAD card

Parameters:
eid : int

element id

pid : int

property id (PSHELL/PCOMP/PCOMPG)

nids : List[int, int, int, int, int/None, int/None,

int/None, int/None, int/None]

node ids

theta_mcid : float; default=0.0
float : material coordinate system angle (theta) is defined

relative to the element coordinate system

int : x-axis from material coordinate system angle defined by

mcid is projected onto the element

comment : str; default=’‘

a comment for the card

Area(self)[source]
\[A = \frac{1}{2} \lvert (n_1-n_3) \times (n_2-n_4) \rvert\]

where a and b are the quad’s cross node point vectors

Mass(self)[source]
\[m = \frac{m}{A} A \f]\]
Thickness(self)[source]

Returns the thickness

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

Adds a CQUAD 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

classmethod export_to_hdf5(h5_file, model, eids)[source]

exports the elements in a vectorized way

flip_normal(self)[source]
1--5--2       1--8--4
|     |  -->  |     |
8  9  6       5  9  7
|     |       |     |
4--7--3       2--6--3
node_ids
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

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 = 'CQUAD'
uncross_reference(self)[source]

Removes cross-reference links

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

class pyNastran.bdf.cards.elements.shell.CQUAD4(eid, pid, nids, theta_mcid=0.0, zoffset=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.QuadShell

1 2 3 4 | 5 6 7 8 9
CQUAD4 EID PID N1 | N2 N3 N4 THETA/MCID ZOFFSET
    TFLAG T1 T2 T3 T4    

Creates a CQUAD4 card

Parameters:
eid : int

element id

pid : int

property id (PSHELL/PCOMP/PCOMPG)

nids : List[int, int, int, int]

node ids

zoffset : float; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcid : float; default=0.0
float : material coordinate system angle (theta) is defined

relative to the element coordinate system

int : x-axis from material coordinate system angle defined by

mcid is projected onto the element

tflag : int; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3 / T4 : float; default=None

If it is not supplied, then T1 through T4 will be set equal to the value of T on the PSHELL entry.

comment : str; default=’‘

a comment for the card

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cp_name_map = {'T1': 'T1', 'T2': 'T2', 'T3': 'T3', 'T4': 'T4'}
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

classmethod export_to_hdf5(h5_file, model, eids)[source]

exports the elements in a vectorized way

flip_normal(self)[source]
1---2       1---4
|   |  -->  |   |
|   |       |   |
4---3       2---3
get_thickness_scale(self)[source]
node_ids
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

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

split_to_ctria3(self, eida, eidb)[source]

Splits a CQUAD4 into two CTRIA3s

Todo

doesn’t consider theta_mcid if a float correctly (use an integer)

Todo

doesn’t optimize the orientation of the nodes yet…

type = 'CQUAD4'
uncross_reference(self)[source]

Removes cross-reference links

validate(self)[source]

card checking method that should be overwritten

write_as_ctria3(self, new_eid)[source]

triangle - 012 triangle - 023

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

class pyNastran.bdf.cards.elements.shell.CQUAD8(eid, pid, nids, theta_mcid=0.0, zoffset=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.QuadShell

1 2 3 4 5 6 7 8 9
CQUAD8 EID PID G1 G2 G3 G4 G5 G6
  G7 G8 T1 T2 T3 T4 THETA/MCID ZOFFS
  TFLAG              

Creates a CQUAD8 card

Parameters:
eid : int

element id

pid : int

property id (PSHELL/PCOMP/PCOMPG)

nids : List[int, int, int, int, int/None, int/None, int/None, int/None]

node ids

zoffset : float; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcid : float; default=0.0
float : material coordinate system angle (theta) is defined

relative to the element coordinate system

int : x-axis from material coordinate system angle defined by

mcid is projected onto the element

tflag : int; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3 / T4 : float; default=None

If it is not supplied, then T1 through T4 will be set equal to the value of T on the PSHELL entry.

comment : str; default=’‘

a comment for the card

Area(self)[source]
\[A = \frac{1}{2} \lvert (n_1-n_3) \times (n_2-n_4) \rvert\]

where a and b are the quad’s cross node point vectors

AreaCentroid(self)[source]
1-----2
|    /|
| A1/ |
|  /  |
|/ A2 |
4-----3

centroid
   c = sum(ci*Ai)/sum(A)
   where:
     c=centroid
     A=area
Normal(self)[source]
Thickness(self)[source]

Returns the thickness

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

Adds a CQUAD8 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

classmethod export_to_hdf5(h5_file, model, eids)[source]

exports the elements in a vectorized way

flip_normal(self)[source]
1--5--2       1--8--4
|     |  -->  |     |
8     6       5     7
|     |       |     |
4--7--3       2--6--3
get_thickness_scale(self)[source]
node_ids
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

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 = 'CQUAD8'
uncross_reference(self)[source]

Removes cross-reference links

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

class pyNastran.bdf.cards.elements.shell.CQUADR(eid, pid, nids, theta_mcid=0.0, zoffset=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.QuadShell

1 2 3 4 | 5 6 7 8 9
CQUADR EID PID N1 | N2 N3 N4 THETA/MCID ZOFFSET
    TFLAG T1 T2 T3 T4    

Creates a CQUADR card

Parameters:
eid : int

element id

pid : int

property id (PSHELL/PCOMP/PCOMPG)

nids : List[int, int, int, int]

node ids

zoffset : float; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcid : float; default=0.0
float : material coordinate system angle (theta) is defined

relative to the element coordinate system

int : x-axis from material coordinate system angle defined by

mcid is projected onto the element

tflag : int; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3 / T4 : float; default=None

If it is not supplied, then T1 through T4 will be set equal to the value of T on the PSHELL entry.

comment : str; default=’‘

a comment for the card

Thickness(self)[source]

Returns the thickness

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

Adds a CQUADR 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

classmethod export_to_hdf5(h5_file, model, eids)[source]

exports the elements in a vectorized way

flip_normal(self)[source]
1---2       1---4
|   |  -->  |   |
|   |       |   |
4---3       2---3
get_thickness_scale(self)[source]
node_ids
raw_fields(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

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 = 'CQUADR'
uncross_reference(self)[source]

Removes cross-reference links

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

class pyNastran.bdf.cards.elements.shell.CPLSTN3(eid, pid, nids, theta=0.0, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.CPLSTx3

NX specific card

type = 'CPLSTN3'
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

class pyNastran.bdf.cards.elements.shell.CPLSTN4(eid, pid, nids, theta=0.0, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.CPLSTx4

type = 'CPLSTN4'
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

class pyNastran.bdf.cards.elements.shell.CPLSTN6(eid, pid, nids, theta=0.0, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.CPLSTx6

type = 'CPLSTN6'
class pyNastran.bdf.cards.elements.shell.CPLSTN8(eid, pid, nids, theta=0.0, comment='')[source]

Bases: pyNastran.bdf.cards.elements.shell.CPLSTx8

type = 'CPLSTN8'
pyNastran.bdf.cards.elements.shell._triangle_area_centroid_normal(nodes, card)[source]

Gets the area, centroid and normal for a triangle.

Parameters:
nodes : List[np.ndarray]

List of three triangle vertices.

Returns:
area : float

Area of triangle.

centroid : ndarray

Centroid of triangle.

unit_normal : ndarray

Unit normal of triangles.

card : CTRIA3(), CTRIA6()

the self parameter

::

n = Normal = a x b Area = 1/2 * |a x b| V = <v1,v2,v3> |V| = sqrt(v1^0.5+v2^0.5+v3^0.5) = norm(V)

Area = 0.5 * |n| unit_normal = n/|n|

pyNastran.bdf.cards.elements.shell._normal(a, b)[source]

Finds the unit normal vector of 2 vectors