elements Module

digraph inheritance1782cf8b8d { bgcolor=transparent; rankdir=LR; size=""; "pyNastran.bdf.cards.base_card.BaseCard" [URL="../pyNastran.bdf.cards.base_card.html#pyNastran.bdf.cards.base_card.BaseCard",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Defines a series of base methods for every card class"]; "pyNastran.bdf.cards.base_card.Element" [URL="../pyNastran.bdf.cards.base_card.html#pyNastran.bdf.cards.base_card.Element",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="defines the Element class"]; "pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.base_card.Element" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.elements.elements.CFAST" [URL="#pyNastran.bdf.cards.elements.elements.CFAST",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="defines the CFAST element"]; "pyNastran.bdf.cards.base_card.Element" -> "pyNastran.bdf.cards.elements.elements.CFAST" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.elements.elements.CGAP" [URL="#pyNastran.bdf.cards.elements.elements.CGAP",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="+------+-----+-----+-----+-----+-----+-----+------+-----+"]; "pyNastran.bdf.cards.base_card.Element" -> "pyNastran.bdf.cards.elements.elements.CGAP" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.elements.elements.CRAC2D" [URL="#pyNastran.bdf.cards.elements.elements.CRAC2D",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.cards.elements.elements.CrackElement" -> "pyNastran.bdf.cards.elements.elements.CRAC2D" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.elements.elements.CRAC3D" [URL="#pyNastran.bdf.cards.elements.elements.CRAC3D",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.cards.elements.elements.CrackElement" -> "pyNastran.bdf.cards.elements.elements.CRAC3D" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.elements.elements.CrackElement" [URL="#pyNastran.bdf.cards.elements.elements.CrackElement",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.cards.base_card.Element" -> "pyNastran.bdf.cards.elements.elements.CrackElement" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.elements.elements.GENEL" [URL="#pyNastran.bdf.cards.elements.elements.GENEL",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="+-------+------+-----+------+------+------+------+-------+------+"]; "pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.elements.elements.GENEL" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.elements.elements.PLOTEL" [URL="#pyNastran.bdf.cards.elements.elements.PLOTEL",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Defines a 1D dummy element used for plotting."]; "pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.elements.elements.PLOTEL" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

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

  • CFAST

  • CGAP

  • CRAC2D

  • CRAC3D

  • PLOTEL

  • GENEL

All ungrouped elements are Element objects.

class pyNastran.bdf.cards.elements.elements.CFAST(eid, pid, Type, ida, idb, gs=None, ga=None, gb=None, xs=None, ys=None, zs=None, comment='')[source]

Bases: Element

defines the CFAST element

dummy init

Ga()[source]

Gets the GA node

Gb()[source]

Gets the GB node

Gs()[source]

Gets the GS node

_gs_xyz() tuple[int | None, float | None, float | None, float | None][source]
classmethod _init_from_empty()[source]
_properties = ['node_ids', 'nodes']
classmethod add_card(card, comment='')[source]

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

Parameters:
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

cp_name_map = {}
cross_reference(model: BDF) None[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
modelBDF()

the BDF object

get_edge_ids()[source]
property node_ids

gets all the node ids used on the CFAST (Gs, Ga, Gb)

property nodes

gets all the nodes used on the CFAST (Gs, Ga, Gb)

raw_fields()[source]
repr_fields()[source]

Gets the fields in their simplified form

Returns:
fieldslist[varies]

the fields that define the card

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

Removes cross-reference links

validate()[source]

card checking method that should be overwritten

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

class pyNastran.bdf.cards.elements.elements.CGAP(eid, pid, nids, x, g0, cid=None, comment='')[source]

Bases: Element

1

2

3

4

5

6

7

8

9

CGAP

EID

PID

GA

GB

X1

X2

X3

CID

CGAP

17

2

110

112

5.2

0.3

-6.1

or

1

2

3

4

5

6

7

8

9

CGAP

EID

PID

GA

GB

GO

CID

CGAP

17

2

110

112

13

Creates a CGAP card

Parameters:
eidint

Element ID

pidint

Property ID (PGAP)

nidslist[int, int]

node ids; connected grid points at ends A and B

xlist[float, float, float]

Components of the orientation vector, from GA, in the displacement coordinate system at GA

g0int

GO Alternate method to supply the orientation vector using grid point GO. Direction of is from GA to GO

cidint; default=None

Element coordinate system identification number. CID must be specified if GA and GB are coincident (distance from GA to GB < 10^-4)

commentstr; default=’’

a comment for the card

Cid()[source]
G0()[source]
Ga()[source]
Gb()[source]
classmethod add_card(card, comment='')[source]

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

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

exports the elements in a vectorized way

get_edge_ids()[source]
property node_ids
property nodes
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 = 'CGAP'
uncross_reference() None[source]

Removes cross-reference links

update_by_cp_name(cp_name, value)[source]
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

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

Bases: CrackElement

dummy init

_finalize_hdf5(encoding)[source]

hdf5 helper function

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

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

Parameters:
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

get_edge_ids()[source]
property node_ids
raw_fields()[source]
type = 'CRAC2D'
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

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

Bases: CrackElement

dummy init

_finalize_hdf5(encoding)[source]

hdf5 helper function

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

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

Parameters:
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

get_edge_ids()[source]
property node_ids
raw_fields()[source]
type = 'CRAC3D'
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

class pyNastran.bdf.cards.elements.elements.CrackElement[source]

Bases: Element

dummy init

cross_reference(model: BDF) None[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
modelBDF()

the BDF object

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

Removes cross-reference links

class pyNastran.bdf.cards.elements.elements.GENEL(eid, ul, ud, k, z, s=None, comment='')[source]

Bases: BaseCard

1

2

3

4

5

6

7

8

9

GENEL

EID

UI1

CI1

UI2

CI2

UI3

CI3

UI4

CI4

UI5

CI5

etc.

UD

UD1

CD1

UD2

CD2

etc.

K/Z

KZ11

KZ21

KZ31

etc.

KZ22

KZ32

etc.

KZ33

KZ43

etc.

S

S11

S12

etc.

S21

etc.

GENEL

629

1

1

13

4

42

0

24

2

UD

6

2

33

0

Z

1.0

2.0

3.0

4.0

5.0

6.0

7.0

8.0

9.0

10.0

S

1.5

2.5

3.5

4.5

5.5

6.5

7.5

8.5

creates a GENEL card

The required input is the {UL} list and the lower triangular portion of [K] or [Z]. Additional input may include the {UD} list and [S]. If [S] is input, must also be input. If {UD} is input but [S] is omitted, [S] is internally calculated. In this case, {UD} must contain six and only six degrees-of freedom.

_finalize_hdf5(encoding)[source]
classmethod _init_from_empty()[source]
_properties = ['node_ids', 'ul_nodes', 'ud_nodes', 'nodes']
classmethod add_card(card, comment='')[source]
cross_reference(model: BDF) None[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
modelBDF()

the BDF object

property node_ids
property nodes
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 = 'GENEL'
property ud_nodes

gets the {UD} nodes

property ul_nodes

gets the {UL} nodes

uncross_reference() None[source]

Removes cross-reference links

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

class pyNastran.bdf.cards.elements.elements.PLOTEL(eid, nodes, comment='')[source]

Bases: BaseCard

Defines a 1D dummy element used for plotting.

This element is not used in the model during any of the solution phases of a problem. It is used to simplify plotting of structures with large numbers of colinear grid points, where the plotting of each grid point along with the elements connecting them would result in a confusing plot.

1

2

3

4

PLOTEL

EID

G1

G2

Adds a PLOTEL card

Parameters:
eidint

Element ID

nodeslist[int, int]

Unique GRID point IDs

classmethod _init_from_empty()[source]
_properties = ['node_ids']
classmethod add_card(card, icard: int, comment='')[source]

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

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

exports the elements in a vectorized way

get_edge_ids()[source]
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 = 'PLOTEL'
uncross_reference() None[source]

Removes cross-reference links

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

pyNastran.bdf.cards.elements.elements._get_genel_offset(n_ul)[source]

we add to to represent the GENEL,eid fields

pyNastran.bdf.cards.elements.elements._read_genel_fields_until_char_blank(card_fields, istart)[source]

somewhat loose parser helper function for GENEL