elements Module

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

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: pyNastran.bdf.cards.base_card.Element

defines the CFAST element

Ga(self)[source]

Gets the GA node

Gb(self)[source]

Gets the GB node

Gs(self)[source]

Gets the GS node

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cp_name_map = {}
cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

get_edge_ids(self)[source]
node_ids

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

nodes

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

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 = 'CFAST'
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.elements.CGAP(eid, pid, nids, x, g0, cid=None, comment='')[source]

Bases: pyNastran.bdf.cards.base_card.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:
eid : int

Element ID

pid : int

Property ID (PGAP)

nids : List[int, int]

node ids; connected grid points at ends A and B

x : List[float, float, float]

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

g0 : int

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

cid : int; default=None

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

comment : str; default=’‘

a comment for the card

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

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

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

exports the elements in a vectorized way

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

Removes cross-reference links

update_by_cp_name(self, cp_name, value)[source]
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.elements.CRAC2D(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.elements.CrackElement

_finalize_hdf5(self, 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:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

get_edge_ids(self)[source]
node_ids
raw_fields(self)[source]
type = 'CRAC2D'
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.elements.CRAC3D(eid, pid, nids, comment='')[source]

Bases: pyNastran.bdf.cards.elements.elements.CrackElement

_finalize_hdf5(self, 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:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

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

Bases: pyNastran.bdf.cards.base_card.Element

cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

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

Removes cross-reference links

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

Bases: pyNastran.bdf.cards.base_card.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(self, encoding)[source]
classmethod _init_from_empty()[source]
_properties = ['node_ids', 'ul_nodes', 'ud_nodes', 'nodes']
classmethod add_card(card, comment='')[source]
cross_reference(self, model)[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
model : BDF()

the BDF object

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

gets the {UD} nodes

ul_nodes

gets the {UL} nodes

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.elements.PLOTEL(eid, nodes, comment='')[source]

Bases: pyNastran.bdf.cards.base_card.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:
eid : int

Element ID

nodes : List[int, int]

Unique GRID point IDs

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

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

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

exports the elements in a vectorized way

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

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