bars Module

Inheritance diagram of pyNastran.bdf.cards.properties.bars
All bar properties are defined in this file. This includes:
  • PBAR

  • PBARL

  • PBEAM3

  • PBEND

  • PBRSECT

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

pyNastran.bdf.cards.properties.bars.A_I1_I2_I12(prop, beam_type: str, dim: List[float]) → Tuple[float, float, float, float][source]
BAR
    2
    ^
    |
*---|--*
|   |  |
|   |  |
|h  *-----------> 1
|      |
|   b  |
*------*
\[I_1 = \frac{1}{12} b h^3\]
\[I_2 = \frac{1}{12} h b^3\]
class pyNastran.bdf.cards.properties.bars.IntegratedLineProperty[source]

Bases: pyNastran.bdf.cards.properties.bars.LineProperty

dummy init

Area() → float[source]

gets area

I11() → float[source]

gets I11

I12() → float[source]
I22() → float[source]

gets I22

J() → float[source]

gets J

Nsm() → float[source]

gets nonstructural mass per unit length

pyNastran.bdf.cards.properties.bars.Iyy_beam(b, h)[source]

gets the Iyy for a solid beam

class pyNastran.bdf.cards.properties.bars.LineProperty[source]

Bases: pyNastran.bdf.cards.base_card.Property

dummy init

Area() → float[source]

gets area

E() → float[source]

gets the material Young’s ratio

G() → float[source]

gets the material Shear ratio

I11() → float[source]

gets I11

I22() → float[source]

gets I22

J() → float[source]

gets J

Nsm() → float[source]

gets nonstructural mass per unit length

Nu() → float[source]

gets the material Poisson’s ratio

Rho() → float[source]

gets the material density

class pyNastran.bdf.cards.properties.bars.PBAR(pid, mid, A=0.0, i1=0.0, i2=0.0, i12=0.0, j=0.0, nsm=0.0, c1=0.0, c2=0.0, d1=0.0, d2=0.0, e1=0.0, e2=0.0, f1=0.0, f2=0.0, k1=100000000.0, k2=100000000.0, comment='')[source]

Bases: pyNastran.bdf.cards.properties.bars.LineProperty

Defines the properties of a simple beam element (CBAR entry).

1

2

3

4

5

6

7

8

9

PBAR

PID

MID

A

I1

I2

J

NSM

C1

C2

D1

D2

E1

E2

F1

F2

K1

K2

I12

Todo

support solution 600 default do a check for mid -> MAT1 for structural do a check for mid -> MAT4/MAT5 for thermal

Creates a PBAR card

Parameters
pidint

property id

midint

material id

areafloat

area

i1, i2, i12, jfloat

moments of inertia

nsmfloat; default=0.

nonstructural mass per unit length

c1/c2, d1/d2, e1/e2, f1/f2float

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

k1 / k2float; default=1.e8

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

commentstr; default=’’

a comment for the card

A = None

Area -> use Area()

Area() → float[source]

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

I11() → float[source]

gets the section I11 moment of inertia

I12() → float[source]

gets the section I12 moment of inertia

I22() → float[source]

gets the section I22 moment of inertia

MassPerLength() → float[source]

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

\[\frac{m}{L} = \rho A + nsm\]
classmethod add_card(card, comment='')[source]

Adds a PBAR 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, pids)[source]

exports the properties in a vectorized way

get_cdef()[source]
i1 = None

I1 -> use I1()

i12 = None

I12 -> use I12()

i2 = None

I2 -> use I2()

j = None

Polar Moment of Inertia J -> use J() default=1/2(I1+I2) for SOL=600, otherwise 0.0 .. todo:: support SOL 600 default

k1 = None

default=infinite; assume 1e8

k2 = None

default=infinite; assume 1e8

mid = None

material ID -> use Mid()

nsm = None

nonstructral mass -> use Nsm()

pid = None

property ID -> use Pid()

pname_fid_map = {4: 'A', 'A': 'A', 5: 'i1', 'I1': 'i1', 6: 'i2', 'I2': 'i2', 7: 'j', 'J': 'j', 10: 'c1', 11: 'c2', 12: 'd1', 13: 'd2', 14: 'e1', 15: 'e2', 16: 'f1', 17: 'f2', 18: 'k1', 19: 'k1', 20: 'i12', 'I12': 'i12'}
raw_fields()[source]
repr_fields()[source]

Gets the fields in their simplified form

Returns
fieldsList[varies]

the fields that define the card

type = 'PBAR'
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.bars.PBARL(pid, mid, Type, dim, group='MSCBML0', nsm=0.0, comment='')[source]

Bases: pyNastran.bdf.cards.properties.bars.LineProperty

Todo

doesnt support user-defined types

1

2

3

4

5

6

7

8

9

PBARL

PID

MID

GROUP

TYPE

DIM1

DIM2

DIM3

DIM4

DIM5

DIM6

DIM7

DIM8

DIM9

etc.

NSM

Creates a PBARL card, which defines A, I1, I2, I12, and J using dimensions rather than explicit values.

Parameters
pidint

property id

midint

material id

Typestr

type of the bar {ROD, TUBE, TUBE2, I, CHAN, T, BOX, BAR, CROSS, H, T1, I1, CHAN1, Z, CHAN2, T2, BOX1, HEXA, HAT, HAT1, DBOX}

dimList[float]

dimensions for cross-section corresponding to Type; the length varies

groupstr; default=’MSCBML0’

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

nsmfloat; default=0.

non-structural mass

commentstr; default=’’

a comment for the card

The shear center and neutral axis do not coincide when:
  • Type = I and dim2 != dim3

  • Type = CHAN, CHAN1, CHAN2

  • Type = T

  • Type = T1, T2

  • Type = BOX1

  • Type = HAT, HAT1

  • Type = DBOX

Area() → float[source]

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

I1() → float[source]

gets the section I1 moment of inertia

I11() → float[source]

gets I11

I12() → float[source]

gets the section I12 moment of inertia

I2() → float[source]

gets the section I2 moment of inertia

I22() → float[source]

gets I22

J() → float[source]

gets J

MassPerLength() → float[source]

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

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

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

property Type

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

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

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

get_cdef()[source]

these axes are backwards…

^ y

+—|—+ | | | | +——> z | | +——-+

mid = None

Material ID

nsm = None

non-structural mass

pid = None

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

Removes cross-reference links

update_by_pname_fid(pname_fid, value)[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

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.bars.PBEAM3(pid, mid, A, iz, iy, iyz=None, j=None, nsm=0.0, so=None, cy=None, cz=None, dy=None, dz=None, ey=None, ez=None, fy=None, fz=None, ky=1.0, kz=1.0, ny=None, nz=None, my=None, mz=None, nsiy=None, nsiz=None, nsiyz=None, cw=None, stress='GRID', w=None, wy=None, wz=None, comment='')[source]

Bases: pyNastran.bdf.cards.properties.bars.LineProperty

1

2

3

4

5

6

7

8

9

PBEAM3

PID

MID

A(A)

IZ(A)

IY(A)

IYZ(A)

J(A)

NSM(A)

CY(A)

CZ(A)

DY(A)

DZ(A)

EY(A)

EZ(A)

FY(A)

FZ(A)

SO(B)

A(B)

IZ(B)

IY(B)

IYZ(B)

J(B)

NSM(B)

CY(B)

CZ(B)

DY(B)

DZ(B)

EY(B)

EZ(B)

FY(B)

FZ(B)

SO(C)

A(C)

IZ(C)

IY(C)

IYZ(C)

J(C)

NSM(C)

CY(C)

CZ(C)

DY(C)

DZ(C)

EY(C)

EZ(C)

FY(C)

FZ(C)

KY

KZ

NY(A)

NZ(A)

NY(B)

NZ(B)

NY(C)

NZ(C)

MY(A)

MZ(A)

MY(B)

MZ(B)

MY(C)

MZ(C)

NSIY(A)

NSIZ(A)

NSIYZ(A)

NSIY(B)

NSIZ(B)

NSIYZ(B)

NSIY(C)

NSIZ(C)

NSIYZ(C)

CW(A)

CW(B)

CW(C)

STRESS

WC(A)

WYC(A)

WZC(A)

WD(A)

WYD(A)

WZD(A)

WE(A)

WYE(A)

WZE(A)

WF(A)

WYF(A)

WZF(A)

WC(B)

WYC(B)

WZC(B)

WD(B)

WYD(B)

WZD(B)

WE(B)

WYE(B)

WZE(B)

WF(B)

WYF(B)

WZF(B)

WC(C)

WYC(C)

WZC(C)

WD(C)

WYD(C)

WZD(C)

WE(C)

WYE(C)

WZE(C)

WF(C)

WYF(C)

WZF(C)

Creates a PBEAM3 card

Parameters
pidint

property id

midint

material id

AList[float]

areas for ABC

iz / iy / iyzList[float]

area moment of inertias for ABC

iyzList[float]; default=None -> [0., 0., 0.]

area moment of inertias for ABC

jList[float]; default=None

polar moment of inertias for ABC None -> iy + iz from section A for ABC

soList[str]; default=None

None -> [‘YES’, ‘YESA’, ‘YESA’]

cy / cz / dy / dz / ey / ez / fy / fzList[float]; default=[0., 0., 0.]

stress recovery loctions for ABC

ny / nzList[float]

Local (y, z) coordinates of neutral axis for ABC

my / mzList[float]

Local (y, z) coordinates of nonstructural mass center of gravity for ABC

nsiy / nsiz / nsiyzList[float]

Nonstructural mass moments of inertia per unit length about local y and z-axes, respectively, with regard to the nonstructural mass center of gravity for ABC

cwList[float]

warping coefficients for ABC

stressstr; default=’GRID’

Location selection for stress, strain and force output.

w(4, 3) float numpy array; default=None

Values of warping function at stress recovery points None : array of 0.0

wy / wz(4, 3) float numpy array; default=None

Gradients of warping function in the local (y, z) coordinate system at stress recovery points None : array of 0.0

Nsm() → List[float][source]

Gets the non-structural mass \(nsm\). .. warning:: nsm field not supported fully on PBEAM3 card

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

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

raw_fields()[source]
type = 'PBEAM3'
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.properties.bars.PBEND(pid, mid, beam_type, A, i1, i2, j, c1, c2, d1, d2, e1, e2, f1, f2, k1, k2, nsm, rc, zc, delta_n, fsi, rm, t, p, rb, theta_b, comment='')[source]

Bases: pyNastran.bdf.cards.properties.bars.LineProperty

MSC/NX Option A

1

2

3

4

5

6

7

7

8

PBEND

PID

MID

A

I1

I2

J

RB

THETAB

C1

C2

D1

D2

E1

E2

F1

F2

K1

K2

NSM

RC

ZC

DELTAN

MSC Option B

1

2

3

4

5

6

7

7

8

PBEND

PID

MID

FSI

RM

T

P

RB

THETAB

NSM

RC

ZC

NX Option B

1

2

3

4

5

6

7

7

8

PBEND

PID

MID

FSI

RM

T

P

RB

THETAB

SACL

ALPHA

NSM

RC

ZC

FLANGE

KX

KY

KZ

SY

SZ

dummy init

MassPerLength() → float[source]

m/L = rho*A + nsm

classmethod _init_from_empty()[source]
classmethod add_beam_type_1(pid, mid, A, i1, i2, j, rb=None, theta_b=None, c1=0.0, c2=0.0, d1=0.0, d2=0.0, e1=0.0, e2=0.0, f1=0.0, f2=0.0, k1=None, k2=None, nsm=0.0, rc=0.0, zc=0.0, delta_n=0.0, comment='')[source]

1

2

3

4

5

6

7

7

8

PBEND

PID

MID

A

I1

I2

J

RB

THETAB

C1

C2

D1

D2

E1

E2

F1

F2

K1

K2

NSM

RC

ZC

DELTAN

Parameters
Afloat

cross-sectional area

i1, i2float

area moments of inertia for plane 1/2

jfloat

torsional stiffness

rbfloat; default=None

bend radius of the line of centroids

theta_bfloat; default=None

arc angle of element (degrees)

c1, c2, d1, d2, e1, e2, f1, f2float; default=0.0

the r/z locations from the geometric centroid for stress recovery

k1, k2float; default=None

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

nsmfloat; default=0.

nonstructural mass per unit length???

zcfloat; default=None

Offset of the geometric centroid in a direction perpendicular to the plane of points GA and GB and vector v.

delta_nfloat; default=None

Radial offset of the neutral axis from the geometric centroid, positive is toward the center of curvature

classmethod add_beam_type_2(pid, mid, fsi, rm, t, p=None, rb=None, theta_b=None, nsm=0.0, rc=0.0, zc=0.0, comment='')[source]

1

2

3

4

5

6

7

7

8

PBEND

PID

MID

FSI

RM

T

P

RB

THETAB

NSM

RC

ZC

Parameters
fsiint

Flag selecting the flexibility and stress intensification factors. See Remark 3. (Integer = 1, 2, or 3)

rmfloat

Mean cross-sectional radius of the curved pipe

tfloat

Wall thickness of the curved pipe

pfloat; default=None

Internal pressure

rbfloat; default=None

bend radius of the line of centroids

theta_bfloat; default=None

arc angle of element (degrees)

nsmfloat; default=0.

nonstructural mass per unit length???

rcfloat; default=None

Radial offset of the geometric centroid from points GA and GB.

zcfloat; default=None

Offset of the geometric centroid in a direction perpendicular to the plane of points GA and GB and vector v

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

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

raw_fields() → List[Union[int, float, str, None]][source]
repr_fields()[source]

Gets the fields in their simplified form

Returns
fieldsList[varies]

the fields that define the card

type = 'PBEND'
uncross_reference() → None[source]

Removes cross-reference links

validate()[source]

card checking method

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.bars.PBRSECT(pid, mid, form, options, comment='')[source]

Bases: pyNastran.bdf.cards.properties.bars.LineProperty

not done

dummy init

Area() → float[source]

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

I11()[source]

gets I11

I22()[source]

gets I22

J()[source]

gets J

MassPerLength() → float[source]

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

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

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

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

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

Material ID

pid = None

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 = 'PBRSECT'
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.bars._IAreaL(prop, dim)[source]
pyNastran.bdf.cards.properties.bars._bar_areaL(x) method for the PBARL and PBEAML classes (pronounced **Area-L**)[source]

Area(x) method for the PBARL and PBEAML classes (pronounced Area-L)

Parameters
dimList[float]

a list of the dimensions associated with beam_type

Returns
Areafloat

Area of the given cross section defined by self.beam_type

Notes

internal method

pyNastran.bdf.cards.properties.bars.bar_section(class_type, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.box1_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.box_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.chan1_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.chan2_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.chan_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.cross_section(class_type, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.dbox_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.get_beam_sections(line: str) → List[str][source]

Splits a PBRSECT/PBMSECT line

>>> line = 'OUTP=10,BRP=20,T=1.0,T(11)=[1.2,PT=(123,204)], NSM=0.01'
>>> sections = get_beam_sections(line)
>>> sections
['OUTP=10', 'BRP=20', 'T=1.0', 'T(11)=[1.2,PT=(123,204)', 'NSM=0.01'], sections
pyNastran.bdf.cards.properties.bars.get_inertia_rectangular(sections)[source]

Calculates the moment of inertia for a section about the CG.

Parameters
sections[[b,h,y,z]_1,…]

[[b,h,y,z]_1,…] y,z is the centroid (x in the direction of the beam, y right, z up)

Returns
interia_parametersList[Area, Iyy, Izz, Iyz]

the inertia parameters

pyNastran.bdf.cards.properties.bars.h_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.hat1_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.hat_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.hexa_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.i1_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.i_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.l_section(class_type, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.plot_arbitrary_section(model, self, inps, ts, branch_paths, nsm, outp_ref, figure_id=1, title='', show=False)[source]

helper for PBRSECT/PBMSECT

pyNastran.bdf.cards.properties.bars.rod_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.split_arbitrary_thickness_section(key: str, value: Union[str, float, List[int]]) → Tuple[int, Union[float, List[int]]][source]

Helper method for PBRSECT/PBMSECT

>>> key = 'T(11)'
>>> value = '[1.2,PT=(123,204)]'
>>> index, out = split_arbitrary_thickness_section(key, value)
>>> index
11
>>> out
[1.2, [123, 204]]
pyNastran.bdf.cards.properties.bars.t1_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.t2_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.t_section(class_name, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.tube2_section(class_type, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.tube_section(class_type, beam_type, dim, prop)[source]
pyNastran.bdf.cards.properties.bars.write_arbitrary_beam_section(inps, ts, branch_paths, nsm, outp_id, core=None)[source]

writes the PBRSECT/PBMSECT card

pyNastran.bdf.cards.properties.bars.zee_section(class_name, beam_type, dim, prop)[source]