beam Module

digraph inheritance5f8fec6ebd { 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.bars.LineElement" [URL="pyNastran.bdf.cards.elements.bars.html#pyNastran.bdf.cards.elements.bars.LineElement",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.bars.LineElement" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.elements.beam.BEAMOR" [URL="#pyNastran.bdf.cards.elements.beam.BEAMOR",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.beam.BEAMOR" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.elements.beam.CBEAM" [URL="#pyNastran.bdf.cards.elements.beam.CBEAM",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.elements.bars.LineElement" -> "pyNastran.bdf.cards.elements.beam.CBEAM" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
defines:
  • CBEAM

  • BEAMOR

class pyNastran.bdf.cards.elements.beam.BEAMOR(pid, is_g0, g0, x, offt='GGG', comment='')[source]

Bases: BaseCard

1

2

3

4

5

6

7

8

9

BEAMOR

PID

G0/X1

X2

X3

OFFT

BEAMOR

39

0.6

2.9

-5.87

GOG

classmethod _init_from_empty()[source]
classmethod add_card(card: BDFCard, comment: str = '')[source]
raw_fields()[source]
type = 'BEAMOR'
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.beam.CBEAM(eid: int, pid: int, nids: list[int], x: list[float] | None, g0: int | None, offt: str = 'GGG', bit: int | None = None, pa: int = 0, pb: int = 0, wa=None, wb=None, sa: int = 0, sb: int = 0, comment='')[source]

Bases: LineElement

1

2

3

4

5

6

7

8

9

CBEAM

EID

PID

GA

GB

X1

X2

X3

OFFT/BIT

PA

PB

W1A

W2A

W3A

W1B

W2B

W3B

SA

SB

or

1

2

3

4

5

6

7

8

9

CBEAM

EID

PID

GA

GB

G0

OFFT/BIT

PA

PB

W1A

W2A

W3A

W1B

W2B

W3B

SA

SB

bit is an MSC specific field NX 2020 added offt

Adds a CBEAM card

Parameters:
pidint

property id

nidslist[int]

2 node ids; connected grid points at ends A and B

xlist[float] | None

Components of orientation vector, from GA, in the displacement coordinate system at GA (default), or in the basic coordinate system; (3,) vector

g0int

Alternate method to supply the orientation vector using grid point G0. Direction of is from GA to G0. is then transferred to End A

offtstr; default=’GGG’

Offset vector interpretation flag None : bit is active

bitfloat; default=None

Built-in twist of the cross-sectional axes about the beam axis at end B relative to end A. For beam p-elements ONLY! None : offt is active

pa / pbint; default=0

Pin Flag at End A/B. Releases the specified DOFs

wa / wblist[float, float, float]

Components of offset vectors from the grid points to the end points of the axis of the shear center

sa / sbint; default=0

Scalar or grid point identification numbers for the ends A and B, respectively. The degrees-of-freedom at these points are the warping variables . SA and SB cannot be specified for beam p-elements

commentstr; default=’’

a comment for the card

offt/bit are MSC specific fields
Area() float[source]

returns the area of the element face

Centroid() ndarray[source]
G0() int[source]

gets G0

Ga() int[source]

gets Ga/G1

Gb() int[source]

gets Gb/G2

Mid() int[source]
Nodes() list[int][source]
Nsm() float[source]

Placeholder method for the non-structural mass, \(nsm\)

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

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

Parameters:
cardBDFCard()

a BDFCard object

beamorBEAMOR() or None

defines the defaults

commentstr; default=’’

a comment for the card

center_of_mass() ndarray[source]

the centroid formuala is way more complicated if you consider the nonstructural mass axis

center_of_mass_xform()[source]

A B ———- ^ ^ | wa | wb | | 1———-2

1-2 are the nodes of the bar A-B defines the axis of the shear center

^ z

+–+ | | | | | | 2—> y | +–+ | | +—–+

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

property ga: int
property ga_ref: GRID
property gb: int
property gb_ref: GRID
get_axes(model: BDF) tuple[bool, tuple[Any, Any, Any, Any, Any, Any]][source]

Gets the axes of a CBAR/CBEAM, while respecting the OFFT flag.

Returns:
is_passed: bool

flag

out: (v, ihat, jhat, khat, wa, wb)

data

Notes

pyNastran.bdf.cards.elements.bars.rotate_v_wa_wb() for a description of the OFFT flag.

get_axes_by_nodes(model: BDF, node1: GRID, node2: GRID, xyz1: np.ndarray, xyz2: np.ndarray, log: SimpleLogger) tuple[bool, Any][source]

Gets the axes of a CBAR/CBEAM, while respecting the OFFT flag.

Notes

pyNastran.bdf.cards.elements.bars.rotate_v_wa_wb() for a description of the OFFT flag.

get_edge_ids() list[int, int][source]

Return the edge IDs

get_offt_bit_defaults() int | str[source]

offt doesn’t exist in NX nastran

get_orientation_vector(model: BDF)[source]

Gets the axes of a CBAR/CBEAM, while respecting the OFFT flag.

Notes

pyNastran.bdf.cards.elements.bars.rotate_v_wa_wb() for a description of the OFFT flag.

get_x_g0_defaults()[source]

X and G0 compete for the same fields, so the method exists to make it easier to write the card

Returns:
x_g0varies

g0 : list[int, None, None] x : list[float, float, float]

Notes

Used by CBAR and CBEAM

property is_bit: bool

is the bit flag active?

property is_offt: bool

is the offt flag active?

property node_ids: list[int]
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]
type = 'CBEAM'
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

write_card_16(is_double=False)[source]
pyNastran.bdf.cards.elements.beam._init_offt_bit(card, unused_eid: int, offt_default)[source]

offt doesn’t exist in NX nastran