beam Module

digraph inheritance9198df919a { 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.Property" [URL="../pyNastran.bdf.cards.base_card.html#pyNastran.bdf.cards.base_card.Property",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="Base Property Class"]; "pyNastran.bdf.cards.base_card.BaseCard" -> "pyNastran.bdf.cards.base_card.Property" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.bars.IntegratedLineProperty" [URL="pyNastran.bdf.cards.properties.bars.html#pyNastran.bdf.cards.properties.bars.IntegratedLineProperty",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.properties.bars.LineProperty" -> "pyNastran.bdf.cards.properties.bars.IntegratedLineProperty" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.bars.LineProperty" [URL="pyNastran.bdf.cards.properties.bars.html#pyNastran.bdf.cards.properties.bars.LineProperty",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.Property" -> "pyNastran.bdf.cards.properties.bars.LineProperty" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.beam.PBCOMP" [URL="#pyNastran.bdf.cards.properties.beam.PBCOMP",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.properties.bars.LineProperty" -> "pyNastran.bdf.cards.properties.beam.PBCOMP" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.beam.PBEAM" [URL="#pyNastran.bdf.cards.properties.beam.PBEAM",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 properties of a beam element (CBEAM entry). This element may be"]; "pyNastran.bdf.cards.properties.bars.IntegratedLineProperty" -> "pyNastran.bdf.cards.properties.beam.PBEAM" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.beam.PBEAML" [URL="#pyNastran.bdf.cards.properties.beam.PBEAML",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.properties.bars.IntegratedLineProperty" -> "pyNastran.bdf.cards.properties.beam.PBEAML" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.cards.properties.beam.PBMSECT" [URL="#pyNastran.bdf.cards.properties.beam.PBMSECT",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="not done"]; "pyNastran.bdf.cards.properties.bars.LineProperty" -> "pyNastran.bdf.cards.properties.beam.PBMSECT" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
All beam properties are defined in this file. This includes:
  • PBEAM

  • PBEAML

  • PBCOMP

  • PBRSECT

All beams are LineProperty objects. Multi-segment beams are IntegratedLineProperty objects.

class pyNastran.bdf.cards.properties.beam.PBCOMP(pid, mid, y, z, c, mids, area=0.0, i1=0.0, i2=0.0, i12=0.0, j=0.0, nsm=0.0, k1=1.0, k2=1.0, m1=0.0, m2=0.0, n1=0.0, n2=0.0, symopt=0, comment='')[source]

Bases: LineProperty

1

2

3

4

5

6

7

8

9

PBCOMP

PID

MID

A

I1

I2

I12

J

NSM

K1

K2

M1

M2

N1

N2

SYMOPT

Y1

Z1

C1

MID1

Y2

Z2

C2

MID2

Creates a PBCOMP card

Parameters:
pidint

Property ID

midint

Material ID

midslist[int]

Material ID for the i-th integration point

y / zlist[float]

The (y,z) coordinates of the lumped areas in the element coordinate system

clist[float]; default=0.0

Fraction of the total area for the i-th lumped area default not supported…

areafloat

Area of beam cross section

i1 / i2float; default=0.0

Area moment of inertia about plane 1/2 about the neutral axis

i12float; default=0.0

area product of inertia

jfloat; default=0.0

Torsional moment of interia

nsmfloat; default=0.0

Nonstructural mass per unit length

k1 / k2float; default=1.0

Shear stiffness factor K in K*A*G for plane 1/2

m1 / m2float; default=0.0

The (y,z) coordinates of center of gravity of nonstructural mass

n1 / n2float; default=0.0

The (y,z) coordinates of neutral axis

symoptint; default=0

Symmetry option to input lumped areas for the beam cross section 0 < Integer < 5

commentstr; default=’’

a comment for the card

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

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

j

Polar Moment of Inertia \(J\)

mid

Material ID

nsm

Non-structural mass per unit length \(\frac{m}{L}\)

pid

Property ID

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

Gets the fields in their simplified form

Returns:
fieldslist[varies]

the fields that define the card

type = 'PBCOMP'
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.properties.beam.PBEAM(pid, mid, xxb, so, area, i1, i2, i12, j, nsm=None, c1=None, c2=None, d1=None, d2=None, e1=None, e2=None, f1=None, f2=None, k1=1.0, k2=1.0, s1=0.0, s2=0.0, nsia=0.0, nsib=None, cwa=0.0, cwb=None, m1a=0.0, m2a=0.0, m1b=None, m2b=None, n1a=0.0, n2a=0.0, n1b=None, n2b=None, comment='')[source]

Bases: IntegratedLineProperty

Defines the properties of a beam element (CBEAM entry). This element may be used to model tapered beams.

PBEAM

PID

MID

A(A)

I1(A)

I2(A)

I12(A)

J(A)

NSM(A)

C1(A)

C2(A)

D1(A)

D2(A)

E1(A)

E2(A)

F1(A)

F2(A)

The next two continuations are repeated for each intermediate station as described in Remark 5. and SO and X/XB must be specified.

SO

X/XB

A

I1

I2

I12

J

NSM

C1

C2

D1

D2

E1

E2

F1

F2

The last two continuations are: +——-+——-+——-+——-+——–+——–+——-+——-+ | K1 | K2 | S1 | S2 | NSI(A) | NSI(B) | CW(A) | CW(B) | +——-+——-+——-+——-+——–+——–+——-+——-+ | M1(A) | M2(A) | M1(B) | M2(B) | N1(A) | N2(A) | N1(B) | N2(B) | +——-+——-+——-+——-+——–+——–+——-+——-+

Todo

fix 0th entry of self.so, self.xxb

Creates a PBEAM card

Parameters:
pidint

property id

midint

material id

xxblist[float]

The percentage locations along the beam [0., …, 1.]

solist[str]

YES, YESA, NO

arealist[float]

area

i1, i2, i12, jlist[float]

moments of inertia

nsmlist[float]

nonstructural mass per unit length

c1/c2, d1/d2, e1/e2, f1/f2list[float]; default=None -> [0.]*nxxb

the y/z locations of the stress recovery points c1 - point C.y c2 - point C.z

k1 / k2float; default=1.

Shear stiffness factor K in K*A*G for plane 1/2.

s1 / s2float; default=0.

Shear relief coefficient due to taper for plane 1/2.

nsia / nsiafloat; default=0. / nsia

non structural mass moment of inertia per unit length about nsm center of gravity at Point A/B.

cwa / cwbfloat; default=0. / cwa

warping coefficient for end A/B.

m1a / m2afloat; default=0. / 0.

y/z coordinate of center of gravity of nonstructural mass for end A.

m1b / m2bfloat; default=m1a / m2a

y/z coordinate of center of gravity of nonstructural mass for end B.

n1a / n2afloat; default=0. / 0.

y/z coordinate of neutral axis for end A.

n1b / n2bfloat; default=n1a / n2a

y/z coordinate of neutral axis for end B.

commentstr; default=’’

a comment for the card

I1_I2_I12() tuple[float, float, float][source]
MassPerLength() float[source]

mass = L*(Area*rho+nsm) mass/L = Area*rho+nsm

classmethod _init_from_empty()[source]
_interpolate_sections()[source]

now we interpolate to fix up missing data from arrays that were potentially out of order (they’re sorted now)

we’ve also already checked xxb=0.0 and xxb=1.0 for I1, I2, I12, J

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

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

cwa

warping coefficient for end A.

cwb

warping coefficient for end B.

get_optimization_value(name_str: str) float[source]
k1

Shear stiffness factor K in K*A*G for plane 1.

k2

Shear stiffness factor K in K*A*G for plane 2.

m1a

y coordinate of center of gravity of nonstructural mass for end A.

m1b

y coordinate of center of gravity of nonstructural mass for end B.

m2a

z coordinate of center of gravity of nonstructural mass for end A.

m2b

z coordinate of center of gravity of nonstructural mass for end B.

mid

Material ID

n1a

y coordinate of neutral axis for end A.

n1b

y coordinate of neutral axis for end B.

n2a

z coordinate of neutral axis for end A.

n2b

z coordinate of neutral axis for end B.

nsia

non structural mass moment of inertia per unit length about nsm center of gravity at Point A.

nsib

non structural mass moment of inertia per unit length about nsm center of gravity at Point B.

pid

Property ID

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

Gets the fields in their simplified form

Returns:
fieldslist[varies]

the fields that define the card

s1

Shear relief coefficient due to taper for plane 1.

s2

Shear relief coefficient due to taper for plane 2.

set_optimization_value(name_str: str, value: float) None[source]
type = 'PBEAM'
uncross_reference() None[source]

Removes cross-reference links

update_by_pname_fid(pname_fid, value)[source]
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]
class pyNastran.bdf.cards.properties.beam.PBEAML(pid: int, mid: int, beam_type: str, xxb, dims, so=None, nsm=None, group: str = 'MSCBML0', comment: str = '')[source]

Bases: IntegratedLineProperty

1

2

3

4

5

6

7

8

9

PBEAML

PID

MID

GROUP

TYPE

DIM1(A)

DIM2(A)

etc.

DIMn(A)

NSM(A)

SO(1)

X(1)/XB

DIM1(1)

DIM2(1)

etc.

DIMn(1)

NSM(1)

SO(2)

X(2)/XB

DIM1(2)

DIM2(2)

etc.

DIMn(2)

NSM(m)

etc.

SO(m)

X(m)/XB

DIM1(m)

etc.

DIMn(m)

NSM(m)

SO(B)

1.0

DIM1(B)

DIM2(B)

etc.

DIMn(B)

NSM(B)

Creates a PBEAML card

Parameters:
pidint

property id

midint

material id

beam_typestr

the section profile

xxblist[float]

The percentage locations along the beam [0., …, 1.]

dimslist[dim]
dimlist[float]

The dimensions for each section

solist[str]; default=None

YES, YESA, NO None : [0.] * len(xxb)

nsmlist[float]; default=None

nonstructural mass per unit length None : [0.] * len(xxb)

groupstr; default=’MSCBML0’

this parameter can lead to a very broken deck with a very bad error message; don’t touch it!

commentstr; default=’’

a comment for the card

Area()[source]

Gets the Area \(A\) of the PBEAML.

\[A = \int \, A(x) dx\]

Notes

a spline is fit to \(A(x)\) and then integrated.

I11()[source]

gets I11

I12()[source]
I22()[source]

gets I22

J()[source]

gets J

MassPerLength()[source]

Gets the mass per length \(\frac{m}{L}\) of the PBEAML.

\[\frac{m}{L} = A(x) \rho + nsm\]
\[\frac{m}{L} = nsm L + \rho \int \, A(x) dx\]
property Type

gets Type

_finalize_hdf5(encoding)[source]

hdf5 helper function

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

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

Parameters:
cardBDFCard()

a BDFCard object

commentstr; default=’’

a comment for the card

beam_type

Section Type (e.g. ‘ROD’, ‘TUBE’, ‘I’, ‘H’)

cross_reference(model: BDF) None[source]

Cross links the card so referenced cards can be extracted directly

Parameters:
modelBDF()

the BDF object

.. warning:: For structural problems, PBEAML entries must

reference a MAT1 material entry

.. warning:: For heat-transfer problems, the MID must

reference a MAT4 or MAT5 material entry.

.. todo:: What happens when there are 2 subcases?
get_mass_per_lengths()[source]

helper method for MassPerLength a*rho + nsm

mid

Material ID

pid

Property ID

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

Gets the fields in their simplified form

Returns:
fieldslist[varies]

the fields that define the card

type = 'PBEAML'
uncross_reference() None[source]

Removes cross-reference links

update_by_pname_fid(pname_fid: str, value: float)[source]
valid_types = {'BAR': 2, 'BOX': 4, 'BOX1': 6, 'CHAN': 4, 'CHAN1': 4, 'CHAN2': 4, 'CROSS': 4, 'DBOX': 10, 'H': 4, 'HAT': 4, 'HAT1': 5, 'HEXA': 3, 'I': 6, 'I1': 4, 'L': 4, 'ROD': 1, 'T': 4, 'T1': 4, 'T2': 4, 'TUBE': 2, 'TUBE2': 2, 'Z': 4}
validate()[source]

card checking method that should be overwritten

verify(model, isubcase)[source]
write_card(size: int = 8, is_double: bool = False) str[source]

Todo

having bug with PBEAML

class pyNastran.bdf.cards.properties.beam.PBMSECT(pid, mid, form, options, comment='')[source]

Bases: LineProperty

not done

dummy init

Area()[source]

Gets the area \(A\) of the CBEAM.

I11()[source]

gets I11

I22()[source]

gets I22

J()[source]

gets J

MassPerLength()[source]

Gets the mass per length \(\frac{m}{L}\) of the CBEAM.

\[\frac{m}{L} = A \rho + nsm\]
Nsm()[source]

Gets the non-structural mass \(nsm\) of the CBEAM.

_finalize_hdf5(encoding)[source]
classmethod _init_from_empty()[source]
_properties = ['outp_id']
classmethod add_card(card, comment='')[source]

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

Parameters:
cardlist[str]

this card is special and is not a BDFCard like other cards

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

mid

Material ID

property outp_id
pid

Property ID

plot(model, figure_id=1, show=False)[source]

Plots the beam section

Parameters:
modelBDF()

the BDF object

figure_idint; default=1

the figure id

showbool; default=False

show the figure when done

raw_fields()[source]

not done…

repr_fields()[source]

not done…

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

pyNastran.bdf.cards.properties.beam._linearly_interpolate(i: int, x: ndarray, y: ndarray)[source]

For the continuations that have intermediate values of X/XB between 0.0 and 1.0 and use the default option (any of the fields 4 through 9 are blank), a linear interpolation between the values at ends A and B is performed to obtain the missing section properties.

pyNastran.bdf.cards.properties.beam._sort_pbeam(pid: int, xxb, so, area, i1, i2, i12, j, nsm, c1, c2, d1, d2, e1, e2, f1, f2, ensure_xxb_1_section: bool = True) tuple[ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray, ndarray][source]
pyNastran.bdf.cards.properties.beam.pbeam_op2_data_to_init(data)[source]
pyNastran.bdf.cards.properties.beam.pbeaml_op2_data_to_init(data, valid_types: dict[str, int])[source]
pyNastran.bdf.cards.properties.beam.update_pbeam_negative_integer(pname_fid)[source]

Converts the negative PBEAM value to a positive one

Parameters:
pname_fidint

for a PBEAM this should be between [-5, -167] the negative values correspond to the numbers in the MPT OP2 table

Returns:
pname_fidstr

a pname is of ‘J(3)’ is far more clear than -37

TODO: only handles istation=0 for now (e.g., ‘J(1)’)