springs Module

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

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

  • CELAS1
  • CELAS2
  • CELAS3
  • CELAS4

All spring elements are SpringElement and Element objects.

class pyNastran.bdf.cards.elements.springs.CELAS1(eid, pid, nids, c1=0, c2=0, comment='')[source]

Bases: pyNastran.bdf.cards.elements.springs.SpringElement

1 2 3 4 5 6 7
CELAS1 EID PID G1 C1 G2 C2

Creates a CELAS1 card

Parameters:
eid : int

element id

pid : int

property id (PELAS)

nids : List[int, int]

node ids

c1 / c2 : int; default=0

DOF for nid1 / nid2

comment : str; default=’‘

a comment for the card

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

c1 = None

component number

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
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 = 'CELAS1'
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.springs.CELAS2(eid, k, nids, c1=0, c2=0, ge=0.0, s=0.0, comment='')[source]

Bases: pyNastran.bdf.cards.elements.springs.SpringElement

1 2 3 4 5 6 7 8 9
CELAS2 EID K G1 C1 G2 C2 GE S

Creates a CELAS2 card

Parameters:
eid : int

element id

k : float

spring stiffness

nids : List[int, int]

SPOINT ids node ids

c1 / c2 : int; default=0

DOF for nid1 / nid2

ge : int; default=0.0

damping coefficient

s : float; default=0.0

stress coefficient

comment : str; default=’‘

a comment for the card

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

c1 = None

component number

cp_name_map = {'GE': 'ge', 'K': 'k', 'S': 's'}
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

ge = None

damping coefficient

get_edge_ids(self)[source]
k = None

stiffness of the scalar spring

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

s = None

stress coefficient

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 = 'CELAS2'
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.springs.CELAS3(eid, pid, nodes, comment='')[source]

Bases: pyNastran.bdf.cards.elements.springs.SpringElement

1 2 3 4 5
CELAS3 EID PID S1 S2

Creates a CELAS3 card

Parameters:
eid : int

element id

pid : int

property id (PELAS)

nids : List[int, int]

SPOINT ids

comment : str; default=’‘

a comment for the card

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

Adds a CELAS3 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 = None

Scalar point identification numbers

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 = 'CELAS3'
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.springs.CELAS4(eid, k, nodes, comment='')[source]

Bases: pyNastran.bdf.cards.elements.springs.SpringElement

1 2 3 4 5
CELAS4 EID K S1 S2

Creates a CELAS4 card

Parameters:
eid : int

element id

k : float

spring stiffness

nids : List[int, int]

SPOINT ids

comment : str; default=’‘

a comment for the card

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

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

Parameters:
card : BDFCard()

a BDFCard object

comment : str; default=’‘

a comment for the card

cp_name_map = {'K': 'k'}
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]
k = None

stiffness of the scalar spring

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 = 'CELAS4'
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.springs.SpringElement[source]

Bases: pyNastran.bdf.cards.base_card.Element

Mass(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

write_card_16(self, is_double=False)[source]