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, dim)[source]
BAR
    2
    ^
    |
*---|--*
|   |  |
|   |  |
|h  *-----------> 1
|      |
|   b  |
*------*
\[I_1 = \frac{1}{12} b h^3\]
\[I_2 = \frac{1}{12} h b^3\]
pyNastran.bdf.cards.properties.bars.I1_I2_I12(prop)[source]
class pyNastran.bdf.cards.properties.bars.IntegratedLineProperty[source]

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

Area(self)[source]

gets area

I11(self)[source]

gets I11

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

gets I22

J(self)[source]

gets J

Nsm(self)[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

Area(self)[source]

gets area

E(self)[source]

gets the material Young’s ratio

G(self)[source]

gets the material Shear ratio

I11(self)[source]

gets I11

I22(self)[source]

gets I22

J(self)[source]

gets J

Nsm(self)[source]

gets nonstructural mass per unit length

Nu(self)[source]

gets the material Poisson’s ratio

Rho(self)[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:
pid : int

property id

mid : int

material id

area : float

area

i1, i2, i12, j : float

moments of inertia

nsm : float; default=0.

nonstructural mass per unit length

c1/c2, d1/d2, e1/e2, f1/f2 : float

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

k1 / k2 : float; default=1.e8

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

comment : str; default=’‘

a comment for the card

A = None

Area -> use Area()

Area(self)[source]

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

I11(self)[source]

gets the section I11 moment of inertia

I12(self)[source]

gets the section I12 moment of inertia

I22(self)[source]

gets the section I22 moment of inertia

MassPerLength(self)[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:
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, pids)[source]

exports the properties in a vectorized way

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(self)[source]
repr_fields(self)[source]

Gets the fields in their simplified form

Returns:
fields : List[varies]

the fields that define the card

type = 'PBAR'
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.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:
pid : int

property id

mid : int

material id

Type : str

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}

dim : List[float]

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

group : str; default=’MSCBML0’

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

nsm : float; default=0.

non-structural mass

comment : str; 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(self)[source]

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

I1(self)[source]

gets the section I1 moment of inertia

I11(self)[source]

gets I11

I12(self)[source]

gets the section I12 moment of inertia

I1_I2_I12(self)[source]
I2(self)[source]

gets the section I2 moment of inertia

I22(self)[source]

gets I22

J(self)[source]

gets J

MassPerLength(self)[source]

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

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

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

Type

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

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

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

mid = None

Material ID

nsm = None

non-structural mass

pid = None

Property ID

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

type = 'PBARL'
uncross_reference(self)[source]

Removes cross-reference links

update_by_pname_fid(self, 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(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.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:
pid : int

property id

mid : int

material id

A : List[float]

areas for ABC

iz / iy / iyz : List[float]

area moment of inertias for ABC

iyz : List[float]; default=None -> [0., 0., 0.]

area moment of inertias for ABC

j : List[float]; default=None

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

so : List[str]; default=None

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

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

stress recovery loctions for ABC

ny / nz : List[float]

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

my / mz : List[float]

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

nsiy / nsiz / nsiyz : List[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

cw : List[float]

warping coefficients for ABC

stress : str; 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(self)[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:
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

raw_fields(self)[source]
type = 'PBEAM3'
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.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    
MassPerLength(self)[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:
A : float

cross-sectional area

i1, i2 : float

area moments of inertia for plane 1/2

j : float

torsional stiffness

rb : float; default=None

bend radius of the line of centroids

theta_b : float; default=None

arc angle of element (degrees)

c1, c2, d1, d2, e1, e2, f1, f2 : float; default=0.0

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

k1, k2 : float; default=None

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

nsm : float; default=0.

nonstructural mass per unit length???

zc : float; default=None

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

delta_n : float; 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:
fsi : int

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

rm : float

Mean cross-sectional radius of the curved pipe

t : float

Wall thickness of the curved pipe

p : float; default=None

Internal pressure

rb : float; default=None

bend radius of the line of centroids

theta_b : float; default=None

arc angle of element (degrees)

nsm : float; default=0.

nonstructural mass per unit length???

rc : float; default=None

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

zc : float; 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:
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

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

type = 'PBEND'
uncross_reference(self)[source]

Removes cross-reference links

validate(self)[source]

card checking method

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

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

not done

Area(self)[source]

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

I11(self)[source]

gets I11

I22(self)[source]

gets I22

J(self)[source]

gets J

MassPerLength(self)[source]

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

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

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

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

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

Parameters:
card : List[str]

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

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

mid = None

Material ID

pid = None

Property ID

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

Plots the beam section

Parameters:
model : BDF()

the BDF object

figure_id : int; default=1

the figure id

show : bool; default=False

show the figure when done

raw_fields(self)[source]

not done…

repr_fields(self)[source]

not done…

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

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:
dim : List[float]

a list of the dimensions associated with beam_type

Returns:
Area : float

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)[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_parameters : List[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, value)[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]