bdf Module

Inheritance diagram of pyNastran.bdf.bdf
Main BDF class. Defines:
  • BDF

class pyNastran.bdf.bdf.BDF(debug: Optional[bool] = True, log: Optional[Any] = None, mode: str = 'msc')[source]

Bases: pyNastran.bdf.bdf.BDF_

NASTRAN BDF Reader/Writer/Editor class.

Initializes the BDF object

Parameters
debugbool/None; default=True
used to set the logger if no logger is passed in

True: logs debug/info/warning/error messages False: logs info/warning/error messages None: logs warning/error messages

loglogging module object / None

if log is set, debug is ignored and uses the settings the logging object has

modestr; default=’msc’

the type of Nastran valid_modes = {‘msc’, ‘nx’, ‘nasa95’, ‘mystran’, ‘zona’}

AEFact(aefact: int, msg: str = '') → AEFACT

gets an AEFACT

AELIST(aid: int, msg: str = '') → AELIST

gets an AELIST

gets an AELINK

AEList(aelist: int, msg: str = '') → AELIST

gets an AELIST

AEParam(aid: int, msg: str = '') → AEPARM

gets an AEPARM

AEStat(aid: int, msg: str = '') → AESTAT

gets an AESTAT

AESurf(aesurf_id: int, msg: str = '') → AESURF

gets an AESURF

Acsid(msg: str = '') → Coord

gets the aerodynamic coordinate system

Aero(msg: str = '') → AERO

gets the AERO

Aeros(msg: str = '') → AEROS

gets the AEROS

CAero(eid: int, msg: str = '') → Union[CAERO1, CAERO2, CAERO3, CAERO4, CAERO5]

gets an CAEROx

CMethod(sid: int, msg: str = '') → EIGC

gets a METHOD (EIGC)

Coord(cid: int, msg: str = '') → Coord

gets an COORDx

DAREA(darea_id: int, msg: str = '') → DAREA

gets a DAREA

DConstr(oid: int, msg: str = '') → List[Union[DCONSTR, DCONADD]]

gets a DCONSTR

DDVal(oid: int, msg: str = '') → DDVAL

gets a DDVAL

DELAY(delay_id: int, msg: str = '') → DELAY

gets a DELAY

DEQATN(equation_id: int, msg: str = '') → DEQATN

gets a DEQATN

DLoad(sid: int, consider_dload_combinations: bool = True, msg: str = '') → DLOAD

Gets a DLOAD, TLOAD1, TLOAD2, etc. associated with the Case Control DLOAD entry

DMIG(dname: str, msg: str = '') → DMIG

gets a DMIG

DPHASE(dphase_id: int, msg: str = '') → DPHASE

gets a DPHASE

DResp(dresp_id: int, msg: str = '') → Union[DRESP1, DRESP2, DRESP3]

gets a DRESPx

DVcrel(dv_id: int, msg: str = '') → Union[DVCREL1, DVCREL2]

gets a DVCREL1/DVCREL2

DVmrel(dv_id: int, msg: str = '') → Union[DVMREL1, DVMREL2]

gets a DVMREL1/DVMREL2

DVprel(dv_id: int, msg: str = '') → Union[DVPREL1, DVPREL2]

gets a DVPREL1/DVPREL2

Desvar(desvar_id: int, msg: int = '') → DESVAR

gets a DESVAR

Element(eid: int, msg: str = '') → Any

Gets an element

Doesn’t get rigid (RROD, RBAR, RBE2, RBE3, RBAR, RBAR1, RSPLINE, RSSCON) or mass (CMASS1, CONM2)

Elements(eids: List[int], msg: str = '') → List[Any]

Gets an series of elements

Doesn’t get rigid (RROD, RBAR, RBE2, RBE3, RBAR, RBAR1, RSPLINE, RSSCON) or mass (CMASS1, CONM2)

EmptyNode(nid: int, msg: str = '') → Optional[Union[GRID, SPOINT, EPOINT]]

Gets a GRID/SPOINT/EPOINT object, but allows for empty nodes (i.e., the CTETRA10 supports empty nodes, but the CTETRA4 does not).

Parameters
nidint / None

the node id 0, None : indicate blank

msgstr; default=’’

a debugging message

EmptyNodes(nids: list[int], msg: str = '') → List[Optional[Union[GRID, SPOINT, EPOINT]]]

Returns a series of node objects given a list of IDs

FLFACT(sid: int, msg: str = '') → FLFACT

gets an FLFACT

Flutter(fid: int, msg: str = '') → FLUTTER

gets a FLUTTER

Gust(sid: int, msg: str = '') → GUST

gets a GUST

HyperelasticMaterial(mid: int, msg: str = '') → Union[MATHE, MATHP]

gets a hyperelastic material

Load(sid: int, consider_load_combinations: bool = True, msg: str = '') → List[Union[LOAD, GRAV, ACCEL, ACCEL1, SLOAD, FORCE, FORCE1, FORCE2, MOMENT, MOMENT1, MOMENT2, PLOAD, PLOAD1, PLOAD2, PLOAD4]]

Gets an LOAD or FORCE/PLOAD4/etc.

Parameters
sidint

the LOAD id

consider_load_combinationsbool; default=True

LOADs should not be considered when referenced from an LOAD card from a case control, True should be used.

msgstr

additional message to print when failing

MPC(mpc_id: int, consider_mpcadd: bool = True, msg: str = '') → Union[MPC, MPCADD]

Gets an MPCADD or MPC

Parameters
mpc_idint

the MPC id

consider_mpcaddbool; default=True

MPCADDs should not be considered when referenced from an MPCADD from a case control, True should be used.

msgstr

additional message to print when failing

Mass(eid: int, msg: str = '') → Union[CMASS1, CMASS2, CMASS3, CMASS4, CONM1, CONM2]

gets a mass element (CMASS1, CONM2)

Material(mid: int, msg: str = '') → Union[MAT1, MAT2, MAT3, MAT4, MAT5, MAT8, MAT9, MAT10, MAT11, MAT3D, EQUIV, MATG]

gets a structural or thermal material

Materials(mids, msg='') → List[Union[MAT1, MAT2, MAT3, MAT8, MAT9, MAT10, MAT11, MAT3D, EQUIV, MATG]]

gets one or more Materials

Method(sid: int, msg: str = '') → Union[EIGR, EIGRL]

gets a METHOD (EIGR, EIGRL)

NLParm(nid: int, msg: str = '') → NLPARM

gets an NLPARM

NSM(nsm_id: int, consider_nsmadd: bool = True, msg: str = '') → Union[NSM, NSM1, NSML, NSML1, NSDADD]

Gets an LOAD or FORCE/PLOAD4/etc.

Parameters
nsm_idint

the LOAD id

consider_nsmaddbool; default=True

NSMADDs should not be considered when referenced from an NSM card from a case control, True should be used.

msgstr

additional message to print when failing

Node(nid: int, msg: str = '') → Union[GRID, SPOINT, EPOINT]

Gets a GRID/SPOINT/EPOINT object. This method does not allow for empty nodes (i.e., the CTETRA10 supports empty nodes, but the CTETRA4 does not).

Parameters
nidint

the node id

msgstr; default=’’

a debugging message

Nodes(nids: List[int], msg: str = '') → List[Union[GRID, SPOINT, EPOINT]]

Returns a series of node objects given a list of IDs

PAero(pid: int, msg: str = '') → Union[PAERO1, PAERO2, PAERO3, PAERO4, PAERO5]

gets a PAEROx

Phbdy(pid: int, msg: str = '') → PHBDY

gets a PHBDY

Point(nid: int, msg: str = '') → POINT

Returns a POINT card

Points(nids: List[int], msg: str = '') → List[POINT]

Returns a series of POINT objects given a list of IDs

Properties(pids: List[int], msg: str = '') → List[Any]

gets one or more elemental property (e.g. PSOLID, PLSOLID, PCOMP, PSHELL, PSHEAR); not mass property (PMASS)

Property(pid: int, msg: str = '') → Any

gets an elemental property (e.g. PSOLID, PLSOLID, PCOMP, PSHELL, PSHEAR); not mass property (PMASS)

PropertyMass(pid: int, msg: str = '') → PMASS

gets a mass property (PMASS)

RandomTable(tid: int, msg: str = '') → Union[TABRND1, TABRNDG]

gets a TABRND1 / TABRNDG

RigidElement(eid: int, msg: str = '') → Union[RBAR, RBE2, RBE3, RBAR, RBAR1, RROD, RSPLINE, RSSCON]

gets a rigid element (RBAR, RBE2, RBE3, RBAR, RBAR1, RROD, RSPLINE, RSSCON)

SET1(set_id: int, msg: str = '') → SET1

gets a SET1

SPC(spc_id: int, consider_spcadd: bool = True, msg: str = '') → Union[SPC, SPC1, SPCADD]

Gets an SPCADD or SPC

Parameters
spc_idint

the SPC id

consider_spcaddbool; default=True

SPCADDs should not be considered when referenced from an SPCADD from a case control, True should be used.

msgstr

additional message to print when failing

Set(sid: int, msg: str = '') → Union[SET1, SET3]

gets a SET, SET1, SET2, or SET3 card

Spline(eid: int, msg: str = '') → Union[SPLINE1, SPLINE2, SPLINE3, SPLINE4, SPLINE5]

gets a SPLINEx

StructuralMaterial(mid, msg='') → Union[MAT1, MAT2, MAT3, MAT8, MAT9, MAT10, MAT11, MAT3D, EQUIV, MATG]

gets a structural material

Table(tid, msg='') → Union[TABLES1, TABLEST, TABLEH1, TABLEHT]

gets a TABLES1, TABLEST, TABLEH1, TABLEHT

TableD(tid: int, msg: str = '') → Union[TABLED1, TABLED2, TABLED3, TABLED4]

gets a TABLEDx (TABLED1, TABLED2, TABLED3, TABLED4)

TableM(tid: int, msg: str = '') → Union[TABLEM1, TABLEM2, TABLEM3, TABLEM4]

gets a TABLEx (TABLEM1, TABLEM2, TABLEM3, TABLEM4)

ThermalMaterial(mid: int, msg: str = '') → Union[MAT4, MAT5]

gets a thermal material

add_accel(sid, N, direction, locs, vals, cid=0, comment='') → pyNastran.bdf.cards.loads.static_loads.ACCEL

Creates an ACCEL card

Parameters
sidint

load id

N(3, ) float ndarray

the acceleration vector in the cid frame

directionstr

Component direction of acceleration variation {X, Y, Z}

locsList[float]

Location along direction DIR in coordinate system CID for specification of a load scale factor.

valsList[float]

The load scale factor associated with location LOCi

cidint; default=0

the coordinate system for the load

commentstr; default=’’

a comment for the card

add_accel1(sid, scale, N, nodes, cid=0, comment='') → pyNastran.bdf.cards.loads.static_loads.ACCEL1

Creates an ACCEL1 card

Parameters
sidint

load id

scalefloat

scale factor for load

N(3, ) float ndarray

the acceleration vector in the cid frame

directionstr

Component direction of acceleration variation {X, Y, Z}

nodesList[int]

the nodes to apply acceleration to

cidint; default=0

the coordinate system for the load

commentstr; default=’’

a comment for the card

add_acmodl(infor, fset, sset, normal=0.5, olvpang=60.0, search_unit='REL', intol=0.2, area_op=0, ctype='STRONG', method='BW', sk_neps=0.5, dsk_neps=0.75, all_set='NO', inter='DIFF', nastran_version='nx', comment='') → pyNastran.bdf.cards.elements.acoustic.ACMODL
add_acsrce(sid, excite_id, rho, b, delay=0, dphase=0, power=0, comment='') → pyNastran.bdf.cards.loads.dloads.ACSRCE

Creates an ACSRCE card

Parameters
sidint

load set id number (referenced by DLOAD)

excite_idint

Identification number of a DAREA or SLOAD entry that lists each degree of freedom to apply the excitation and the corresponding scale factor, A, for the excitation

rhofloat

Density of the fluid

bfloat

Bulk modulus of the fluid

delayint; default=0

Time delay, τ.

dphaseint / float; default=0

the dphase; if it’s 0/blank there is no phase lag float : delay in units of time int : delay id

powerint; default=0

Power as a function of frequency, P(f). float : value of P(f) used over all frequencies for all

degrees of freedom in EXCITEID entry.

intTABLEDi entry that defines P(f) for all degrees of

freedom in EXCITEID entry.

commentstr; default=’’

a comment for the card

add_aecomp(name: str, list_type: List[str], lists: Union[int, List[int]], comment: str = '') → pyNastran.bdf.cards.aero.aero.AECOMP

Creates an AECOMP card

Parameters
namestr

the name of the component

list_typestr

One of CAERO, AELIST or CMPID for aerodynamic components and SET1 for structural components. Aerodynamic components are defined on the aerodynamic ks-set mesh while the structural components are defined on the g-set mesh.

listsList[int, int, …]; int

The identification number of either SET1, AELIST or CAEROi entries that define the set of grid points that comprise the component

commentstr; default=’’

a comment for the card

add_aecompl(name: str, labels: List[str], comment: str = '') → pyNastran.bdf.cards.aero.aero.AECOMPL

Creates an AECOMPL card

Parameters
namestr

the name of the component

labelsList[str, str, …]; str

A string of 8 characters referring to the names of other components defined by either AECOMP or other AECOMPL entries.

commentstr; default=’’

a comment for the card

add_aefact(sid, fractions, comment='') → pyNastran.bdf.cards.aero.aero.AEFACT

Creates an AEFACT card, which is used by the CAEROx / PAEROx card to adjust the spacing of the sub-paneleing (and grid point paneling in the case of the CAERO3).

Parameters
sidint

unique id

fractionsList[float, …, float]

list of percentages

commentstr; default=’’

a comment for the card

add_aeforce(mach: float, sym_xz: str, sym_xy: str, ux_id: int, mesh: str, force: int, dmik: str, perq: str)

adds an AEPRESS card

Creates an AELINK card, which defines an equation linking AESTAT and AESURF cards

Parameters
aelink_idint

unique id

labelstr

name of the dependent AESURF card

independent_labelsList[str, …, str]

name for the independent variables (AESTATs)

linking_coefficientsList[float]

linking coefficients

commentstr; default=’’

a comment for the card

add_aelist(sid: int, elements: List[int], comment: str = '') → pyNastran.bdf.cards.aero.aero.AELIST

Creates an AELIST card, which defines the aero boxes for an AESURF/SPLINEx.

Parameters
sidint

unique id

elementsList[int, …, int]

list of box ids

commentstr; default=’’

a comment for the card

add_aeparm(aeparm_id, label, units, comment='') → pyNastran.bdf.cards.aero.aero.AEPARM

Creates an AEPARM card, which defines a new trim variable.

Parameters
aeparm_idint

the unique id

labelstr

the variable name

unitsstr

unused by Nastran

commentstr; default=’’

a comment for the card

add_aepress(mach, sym_xz: str, sym_xy: str, ux_id: int, dmij: str, dmiji: str)

adds an AEPRESS card

add_aero(velocity: float, cref: float, rho_ref: float, acsid: int = 0, sym_xz: int = 0, sym_xy: int = 0, comment: str = '') → pyNastran.bdf.cards.aero.dynamic_loads.AERO

Creates an AERO card

Parameters
velocityfloat

the airspeed

creffloat

the aerodynamic chord

rho_reffloat

FLFACT density scaling factor

acsidint; default=0

aerodyanmic coordinate system

sym_xzint; default=0

xz symmetry flag (+1=symmetry; -1=antisymmetric)

sym_xyint; default=0

xy symmetry flag (+1=symmetry; -1=antisymmetric)

commentstr; default=’’

a comment for the card

add_aeros(cref, bref, sref, acsid=0, rcsid=0, sym_xz=0, sym_xy=0, comment='') → pyNastran.bdf.cards.aero.static_loads.AEROS

Creates an AEROS card

Parameters
creffloat

the aerodynamic chord

breffloat

the wing span

sreffloat

the wing area

acsidint; default=0

aerodyanmic coordinate system

rcsidint; default=0

coordinate system for rigid body motions

sym_xzint; default=0

xz symmetry flag (+1=symmetry; -1=antisymmetric)

sym_xyint; default=0

xy symmetry flag (+1=symmetry; -1=antisymmetric)

commentstr; default=’’

a comment for the card

add_aestat(aestat_id: int, label: str, comment: str = '') → pyNastran.bdf.cards.aero.static_loads.AESTAT

Creates an AESTAT card, which is a variable to be used in a TRIM analysis

Parameters
aestat_idint

unique id

labelstr

name for the id

commentstr; default=’’

a comment for the card

add_aesurf(aesid, label, cid1, alid1, cid2=None, alid2=None, eff=1.0, ldw='LDW', crefc=1.0, crefs=1.0, pllim=-1.5707963267948966, pulim=1.5707963267948966, hmllim=None, hmulim=None, tqllim=None, tqulim=None, comment='') → pyNastran.bdf.cards.aero.aero.AESURF

Creates an AESURF card, which defines a control surface

Parameters
aesidint

controller number

labelstr

controller name

cid1 / cid2int / None

coordinate system id for primary/secondary control surface

alid1 / alid2int / None

AELIST id for primary/secondary control surface

efffloat; default=1.0

Control surface effectiveness

ldwstr; default=’LDW’

Linear downwash flag; [‘LDW’, ‘NODLW’]

crefcfloat; default=1.0

reference chord for the control surface

crefsfloat; default=1.0

reference area for the control surface

pllim / pulimfloat; default=-pi/2 / pi/2

Lower/Upper deflection limits for the control surface in radians

hmllim / hmulimfloat; default=None

Lower/Upper hinge moment limits for the control surface in force-length units

tqllim / tqulimint; default=None

Set identification numbers of TABLEDi entries that provide the lower/upper deflection limits for the control surface as a function of the dynamic pressure

commentstr; default=’’

a comment for the card

add_aesurfs(aesid, label, list1, list2, comment='') → pyNastran.bdf.cards.aero.aero.AESURFS

Creates an AESURFS card

Parameters
aesidint

the unique id

labelstr

the AESURF name

list1 / list2int / None

the list (SET1) of node ids for the primary/secondary control surface(s) on the AESURF card

commentstr; default=’’

a comment for the card

add_aset(ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.ASET, pyNastran.bdf.cards.bdf_sets.ASET1]

Creates an ASET/ASET1 card, which defines the degree of freedoms that will be retained during an ASET modal reduction.

Parameters
idsList[int]

the GRID/SPOINT ids

componentsList[str]; str

the degree of freedoms to be retained (e.g., ‘1’, ‘123’) if a list is passed in, a ASET is made if a str is passed in, a ASET1 is made

commentstr; default=’’

a comment for the card

Notes

the length of components and ids must be the same

add_aset1(ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.ASET, pyNastran.bdf.cards.bdf_sets.ASET1]
add_axic(nharmonics, comment='') → pyNastran.bdf.cards.axisymmetric.axisymmetric.AXIC

Creates a AXIC card

add_baror(pid, is_g0, g0, x, offt='GGG', comment: str = '') → pyNastran.bdf.cards.elements.bars.BAROR
add_bconp(contact_id, slave, master, sfac, fric_id, ptype, cid, comment='') → pyNastran.bdf.cards.contact.BCONP

Creates a BCONP card

add_bcrpara(crid, surf='TOP', offset=None, Type='FLEX', grid_point=0, comment='') → pyNastran.bdf.cards.contact.BCRPARA

Creates a BCRPARA card

Parameters
cridint

CRID Contact region ID.

offsetfloat; default=None

Offset distance for the contact region (Real > 0.0). None : OFFSET value in BCTPARA entry

surfstr; default=’TOP’

SURF Indicates the contact side. See Remark 1. {‘TOP’, ‘BOT’; )

Typestr; default=’FLEX’

Indicates whether a contact region is a rigid surface if it is used as a target region. {‘RIGID’, ‘FLEX’}. This is not supported for SOL 101.

grid_pointint; default=0

Control grid point for a target contact region with TYPE=RIGID or when the rigid-target algorithm is used. The grid point may be used to control the motion of a rigid surface. (Integer > 0). This is not supported for SOL 101.

commentstr; default=’’

a comment for the card

add_bctadd(csid, contact_sets, comment='') → pyNastran.bdf.cards.contact.BCTADD

Creates a BCTADD card

add_bctpara(csid, params, comment='') → pyNastran.bdf.cards.contact.BCTPARA

Creates a BCTPARA card

add_bctset(csid, sids, tids, frictions, min_distances, max_distances, comment='', sol=101) → pyNastran.bdf.cards.contact.BCTSET

Creates a BCTSET card

add_bfric(friction_id, mu1, fstiff=None, comment='')
add_blseg(line_id, nodes, comment='') → pyNastran.bdf.cards.contact.BLSEG

Creates a BLSEG card

add_bset(ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.BSET, pyNastran.bdf.cards.bdf_sets.BSET1]

Creates an BSET/BSET1 card, which defines the degree of freedoms that will be fixed during a generalized dynamic reduction or component model synthesis calculation.

Parameters
idsList[int]

the GRID/SPOINT ids

componentsList[str]; str

the degree of freedoms to be fixed (e.g., ‘1’, ‘123’) if a list is passed in, a ASET is made if a str is passed in, a ASET1 is made

commentstr; default=’’

a comment for the card

Notes

the length of components and ids must be the same

add_bset1(ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.BSET, pyNastran.bdf.cards.bdf_sets.BSET1]
add_bsurf(sid, eids, comment='') → pyNastran.bdf.cards.contact.BSURF

Creates a BSURF card

add_bsurfs(id, eids, g1s, g2s, g3s, comment='') → pyNastran.bdf.cards.contact.BSURFS

Creates a BSURFS card

add_caabsf(eid, pid, nodes, comment='') → pyNastran.bdf.cards.elements.acoustic.CHACAB
add_caero1(eid: int, pid: int, igroup: int, p1: Any, x12: float, p4: Any, x43: float, cp: int = 0, nspan: int = 0, lspan: int = 0, nchord: int = 0, lchord: int = 0, comment: str = '') → pyNastran.bdf.cards.aero.aero.CAERO1

Defines a CAERO1 card, which defines a simplified lifting surface (e.g., wing/tail).

Parameters
eidint

element id

pidint

int : PAERO1 ID

igroupint

Group number

p1(1, 3) ndarray float

xyz location of point 1 (leading edge; inboard)

p4(1, 3) ndarray float

xyz location of point 4 (leading edge; outboard)

x12float

distance along the flow direction from node 1 to node 2; (typically x, root chord)

x43float

distance along the flow direction from node 4 to node 3; (typically x, tip chord)

cpint; default=0

int : coordinate system

nspanint; default=0

int > 0 : N spanwise boxes distributed evenly int = 0 : use lchord

nchordint; default=0

int > 0 : N chordwise boxes distributed evenly int = 0 : use lchord

lspanint, AEFACT; default=0

int > 0 : AEFACT reference for non-uniform nspan int = 0 : use nspan

lchordint, AEFACT; default=0

int > 0 : AEFACT reference for non-uniform nchord int = 0 : use nchord

commentstr; default=’’

a comment for the card

add_caero2(eid: int, pid: int, igroup: int, p1: List[float], x12: float, cp: int = 0, nsb: int = 0, nint: int = 0, lsb: int = 0, lint: int = 0, comment: str = '') → pyNastran.bdf.cards.aero.aero.CAERO2

Defines a CAERO2 card, which defines a slender body (e.g., fuselage/wingtip tank).

Parameters
eidint

element id

pidint, PAERO2

int : PAERO2 ID

igroupint

Group number

p1(1, 3) ndarray float

xyz location of point 1 (forward position)

x12float

length of the CAERO2

cpint; default=0

int : coordinate system

nsbint; default=0

Number of slender body elements

lsbint; default=0

AEFACT id for defining the location of the slender body elements

nintint; default=0

Number of interference elements

lintint; default=0

AEFACT id for defining the location of interference elements

commentstr; default=’’

a comment for the card

add_caero3(eid, pid, list_w, p1, x12, p4, x43, cp=0, list_c1=None, list_c2=None, comment='') → pyNastran.bdf.cards.aero.aero.CAERO3

Creates a CAERO3 card

add_caero4(eid, pid, p1, x12, p4, x43, cp=0, nspan=0, lspan=0, comment='') → pyNastran.bdf.cards.aero.aero.CAERO4

Defines a CAERO4 card, which defines a strip theory surface.

Parameters
eidint

element id

pidint

int : PAERO4 ID

p1(1, 3) ndarray float

xyz location of point 1 (leading edge; inboard)

p4(1, 3) ndarray float

xyz location of point 4 (leading edge; outboard)

x12float

distance along the flow direction from node 1 to node 2 (typically x, root chord)

x43float

distance along the flow direction from node 4 to node 3 (typically x, tip chord)

cpint; default=0

int : coordinate system

nspanint; default=0

int > 0 : N spanwise boxes distributed evenly int = 0 : use lchord

lspanint; default=0

int > 0 : AEFACT reference for non-uniform nspan int = 0 : use nspan

commentstr; default=’’

a comment for the card

add_caero5(eid: int, pid: int, p1: List[float], x12: float, p4: List[float], x43: float, cp: int = 0, nspan: int = 0, lspan: int = 0, ntheory: int = 0, nthick: int = 0, comment: str = '') → pyNastran.bdf.cards.aero.aero.CAERO5

Creates a CAERO5 card

add_caero7(eid: int, label: str, p1: numpy.ndarray, x12: float, p4: numpy.ndarray, x43: float, cp: int = 0, nspan: int = 0, nchord: int = 0, lspan: int = 0, p_airfoil: Any = None, ztaic: Any = None, comment: str = '') → pyNastran.bdf.cards.aero.zona.CAERO7
add_card(card_lines: List[str], card_name: str, comment: str = '', ifile=None, is_list: bool = True, has_none: bool = True) → Any

Adds a card object to the BDF object.

Parameters
card_lines: list[str]

the list of the card fields

card_namestr

the card_name -> ‘GRID’

commentstr

an optional the comment for the card

is_listbool, optional

False : input is a list of card fields -> [‘GRID’, 1, None, 3.0, 4.0, 5.0] True : input is list of card_lines -> [‘GRID, 1,, 3.0, 4.0, 5.0’]

has_nonebool; default=True

can there be trailing Nones in the card data (e.g. [‘GRID’, 1, 2, 3.0, 4.0, 5.0, None]) can there be trailing Nones in the card data (e.g. [‘GRID, 1, 2, 3.0, 4.0, 5.0, ‘])

Returns
card_objectBDFCard()

the card object representation of card

Note

this is a very useful method for interfacing with the code ..

Note

the card_object is not a card-type object…so not a GRID card or CQUAD4 object. It’s a BDFCard Object. However, you know the type (assuming a GRID), so just call the mesh.Node(nid) to get the Node object that was just created.

add_card_fields(card_lines, card_name, comment='', has_none=True)

Adds a card object to the BDF object.

Parameters
card_lines: list[str]

the list of the card fields input is a list of card fields -> [‘GRID’, 1, 2, 3.0, 4.0, 5.0]

card_namestr

the card_name -> ‘GRID’

commentstr

an optional the comment for the card

has_nonebool; default=True

can there be trailing Nones in the card data (e.g. [‘GRID’, 1, 2, 3.0, 4.0, 5.0, None])

Returns
card_objectBDFCard()

the card object representation of card

add_card_ifile(ifile: int, card_lines: List[str], card_name: str, comment: str = '', is_list: bool = True, has_none: bool = True) → Any

Same as add_card except it has an ifile parameter

add_card_lax(card_lines: List[str], card_name: str, comment: str = '', ifile=None, is_list: bool = True, has_none: bool = True) → Any

see add_card

add_card_lines(card_lines, card_name, comment='', has_none=True)

Adds a card object to the BDF object.

Parameters
card_lines: list[str]

the list of the card fields input is list of card_lines -> [‘GRID, 1, 2, 3.0, 4.0, 5.0’]

card_namestr

the card_name -> ‘GRID’

commentstr; default=’’

an optional the comment for the card

has_nonebool; default=True

can there be trailing Nones in the card data (e.g. [‘GRID, 1, 2, 3.0, 4.0, 5.0, ‘])

add_cbar(eid: int, pid: int, nids: List[int], x: Optional[List[float]], g0: Optional[int], offt: str = 'GGG', pa: int = 0, pb: int = 0, wa: Optional[List[float]] = None, wb: Optional[List[float]] = None, comment: str = '') → pyNastran.bdf.cards.elements.bars.CBAR

Adds a CBAR card

Parameters
pidint

property id

midint

material id

nidsList[int, int]

node ids; connected grid points at ends A and B

xList[float, float, float]

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

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

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

commentstr; default=’’

a comment for the card

add_cbarao(eid: int, scale: str, x: List[float], comment: str = '') → pyNastran.bdf.cards.elements.bars.CBARAO

Creates a CBARAO card, which defines additional output locations for the CBAR card.

It also changes the OP2 element type from a CBAR-34 to a CBAR-100. However, it is ignored if there are no PLOAD1s in the model. Furthermore, the type is changed for the whole deck, regardless of whether there are PLOAD1s in the other load cases.

Parameters
eidint

element id

scalestr

defines what x means LE : x is in absolute coordinates along the bar FR : x is in fractional

xList[float]

the additional output locations len(x) <= 6

commentstr; default=’’

a comment for the card

Notes

MSC only

add_cbeam(eid, pid, nids, x, g0, offt='GGG', bit=None, pa=0, pb=0, wa=None, wb=None, sa=0, sb=0, comment='') → pyNastran.bdf.cards.elements.beam.CBEAM

Adds a CBEAM card

Parameters
pidint

property id

midint

material id

nidsList[int, int]

node ids; connected grid points at ends A and B

xList[float, float, float]

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

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

Notes

offt/bit are MSC specific fields

add_cbeam3(eid, pid, nids, x, g0, wa, wb, wc, tw, s, comment='') → pyNastran.bdf.cards.elements.bars.CBEAM3

Creates a CBEAM3 card

add_cbend(eid, pid, nids, g0, x, geom, comment='') → pyNastran.bdf.cards.elements.bars.CBEND

Creates a CBEND card

add_cbush(eid: int, pid: int, nids, x: Optional[List[float]], g0: Optional[int], cid=None, s: float = 0.5, ocid: int = -1, si: Optional[List[float]] = None, comment='') → pyNastran.bdf.cards.elements.bush.CBUSH

Creates a CBUSH card

Parameters
eidint

Element id

pidint

Property id (PBUSH)

nidsList[int, int]

node ids; connected grid points at ends A and B The nodes may be coincident, but then cid is required.

xList[float, float, float]; None
Listthe directional vector used to define the stiffnesses

or damping from the PBUSH card

None : use g0

g0int/None
intthe directional vector used to define the stiffnesses

or damping from the PBUSH card

None : use x

cidint; default=None

Element coordinate system identification. A 0 means the basic coordinate system. If CID is blank, then the element coordinate system is determined from GO or Xi.

s: float; default=0.5

Location of spring damper (0 <= s <= 1.0)

ocidint; default=-1

Coordinate system identification of spring-damper offset. (Integer > -1; Default = -1, which means the offset point lies on the line between GA and GB)

siList[float, float, float]; default=None

Components of spring-damper offset in the OCID coordinate system if OCID > 0. None : [None, None, None]

commentstr; default=’’

a comment for the card

add_cbush1d(eid: int, pid: int, nids: List[int], cid: Optional[int] = None, comment: str = '') → pyNastran.bdf.cards.elements.bush.CBUSH1D

Creates a CBUSH1D card

add_cbush2d(eid: int, pid: int, nids: List[int], cid: int = 0, plane: str = 'XY', sptid: Optional[int] = None, comment: str = '') → pyNastran.bdf.cards.elements.bush.CBUSH2D

Creates a CBUSH2D card

add_cconeax(eid, pid, rings, comment='') → pyNastran.bdf.cards.axisymmetric.axisymmetric.CCONEAX

Creates a CCONEAX card

add_cdamp1(eid: int, pid: int, nids: List[int], c1: int = 0, c2: int = 0, comment: str = '') → pyNastran.bdf.cards.elements.damper.CDAMP1

Creates a CDAMP1 card

Parameters
eidint

element id

pidint

property id (PDAMP)

nidsList[int, int]

node ids

c1 / c2int; default=0

DOF for nid1 / nid2

commentstr; default=’’

a comment for the card

add_cdamp2(eid: int, b: float, nids: List[int], c1: int = 0, c2: int = 0, comment: str = '') → pyNastran.bdf.cards.elements.damper.CDAMP2

Creates a CDAMP2 card

Parameters
eidint

element id

bfloat

damping

nidsList[int, int]

SPOINT ids node ids

c1 / c2int; default=0

DOF for nid1 / nid2

commentstr; default=’’

a comment for the card

add_cdamp3(eid: int, pid: int, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.damper.CDAMP3

Creates a CDAMP3 card

Parameters
eidint

element id

pidint

property id (PDAMP)

nidsList[int, int]

SPOINT ids

commentstr; default=’’

a comment for the card

add_cdamp4(eid: int, b: float, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.damper.CDAMP4

Creates a CDAMP4 card

Parameters
eidint

element id

bfloat

damping

nidsList[int, int]

SPOINT ids

commentstr; default=’’

a comment for the card

add_cdamp5(eid: int, pid: int, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.damper.CDAMP5

Creates a CDAMP5 card

Parameters
eidint

element id

pidint

property id (PDAMP5)

nidsList[int, int]

GRID/SPOINT ids

commentstr; default=’’

a comment for the card

add_celas1(eid: int, pid: int, nids: List[int], c1: int = 0, c2: int = 0, comment: str = '') → pyNastran.bdf.cards.elements.springs.CELAS1

Creates a CELAS1 card

Parameters
eidint

element id

pidint

property id (PELAS)

nidsList[int, int]

node ids

c1 / c2int; default=0

DOF for nid1 / nid2

commentstr; default=’’

a comment for the card

add_celas2(eid: int, k: float, nids: List[int], c1: int = 0, c2: int = 0, ge: float = 0.0, s: float = 0.0, comment: str = '') → pyNastran.bdf.cards.elements.springs.CELAS2

Creates a CELAS2 card

Parameters
eidint

element id

kfloat

spring stiffness

nidsList[int, int]

SPOINT ids node ids

c1 / c2int; default=0

DOF for nid1 / nid2

geint; default=0.0

damping coefficient

sfloat; default=0.0

stress coefficient

commentstr; default=’’

a comment for the card

add_celas3(eid: int, pid: int, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.springs.CELAS3

Creates a CELAS3 card

Parameters
eidint

element id

pidint

property id (PELAS)

nidsList[int, int]

SPOINT ids

commentstr; default=’’

a comment for the card

add_celas4(eid: int, k: float, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.springs.CELAS4

Creates a CELAS4 card

Parameters
eidint

element id

kfloat

spring stiffness

nidsList[int, int]

SPOINT ids

commentstr; default=’’

a comment for the card

add_cfast(eid: int, pid: int, Type: str, ida: int, idb: int, gs=None, ga=None, gb=None, xs=None, ys=None, zs=None, comment: str = '') → pyNastran.bdf.cards.elements.elements.CFAST

Creates a CFAST card

add_cfluid2(eid, ringfls, rho, b, harmonic) → None
add_cfluid3(eid, ringfls, rho, b, harmonic) → None
add_cfluid4(eid, ringfls, rho, b, harmonic) → None
add_cgap(eid: int, pid: int, nids: List[int], x: Optional[List[int]], g0: Optional[int], cid: Optional[int] = None, comment: str = '') → pyNastran.bdf.cards.elements.elements.CGAP

Creates a CGAP card

Parameters
eidint

Element ID

pidint

Property ID (PGAP)

nidsList[int, int]

node ids; connected grid points at ends A and B

xList[float, float, float]

Components of the orientation vector, from GA, in the displacement coordinate system at GA

g0int

GO Alternate method to supply the orientation vector using grid point GO. Direction of is from GA to GO

cidint; default=None

Element coordinate system identification number. CID must be specified if GA and GB are coincident (distance from GA to GB < 10^-4)

commentstr; default=’’

a comment for the card

add_chacab(eid, pid, nodes, comment='') → pyNastran.bdf.cards.elements.acoustic.CHACAB
add_chacbr(eid, pid, nodes, comment='') → pyNastran.bdf.cards.elements.acoustic.CHACBR
add_chbdye(eid, eid2, side, iview_front=0, iview_back=0, rad_mid_front=0, rad_mid_back=0, comment='') → pyNastran.bdf.cards.thermal.thermal.CHBDYE

Creates a CHBDYE card

Parameters
eidint

surface element ID number for a side of an element

eid2: int

a heat conduction element identification

side: int

a consistent element side identification number (1-6)

iview_front: int; default=0

a VIEW entry identification number for the front face

iview_back: int; default=0

a VIEW entry identification number for the back face

rad_mid_front: int; default=0

RADM identification number for front face of surface element

rad_mid_back: int; default=0

RADM identification number for back face of surface element

commentstr; default=’’

a comment for the card

add_chbdyg(eid, surface_type, nodes, iview_front=0, iview_back=0, rad_mid_front=0, rad_mid_back=0, comment='') → pyNastran.bdf.cards.thermal.thermal.CHBDYG

Creates a CHBDYG card

add_chbdyp(eid, pid, surface_type, g1, g2, g0=0, gmid=None, ce=0, iview_front=0, iview_back=0, rad_mid_front=0, rad_mid_back=0, e1=None, e2=None, e3=None, comment='') → pyNastran.bdf.cards.thermal.thermal.CHBDYP

Creates a CHBDYP card

Parameters
eidint

Surface element ID

pidint

PHBDY property entry identification numbers. (Integer > 0)

surface_typestr

Surface type Must be {POINT, LINE, ELCYL, FTUBE, TUBE}

iview_frontint; default=0

A VIEW entry identification number for the front face.

iview_backint; default=0

A VIEW entry identification number for the back face.

g1 / g2int

Grid point identification numbers of grids bounding the surface

g0int; default=0

Orientation grid point

rad_mid_frontint

RADM identification number for front face of surface element

rad_mid_backint

RADM identification number for back face of surface element.

gmidint

Grid point identification number of a midside node if it is used with the line type surface element.

ceint; default=0

Coordinate system for defining orientation vector

e1 / e2 / e3float; default=None

Components of the orientation vector in coordinate system CE. The origin of the orientation vector is grid point G1.

commentstr; default=’’

a comment for the card

add_chexa(eid, pid, nids, comment='') → Union[pyNastran.bdf.cards.elements.solid.CHEXA8, pyNastran.bdf.cards.elements.solid.CHEXA20]

Creates a CHEXA8/CHEXA20

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=8 or 20

commentstr; default=’’

a comment for the card

add_chexa1(eid, mid, nids, comment='') → pyNastran.bdf.cards.elements.solid.CHEXA1

see CHEXA

add_chexa2(eid, mid, nids, comment='') → pyNastran.bdf.cards.elements.solid.CHEXA2

see CHEXA

add_cihex1(eid, pid, nids, comment='') → pyNastran.bdf.cards.elements.solid.CIHEX1

see CHEXA

add_cihex2(eid, pid, nids, comment='') → pyNastran.bdf.cards.elements.solid.CIHEX2

see CHEXA

add_cload(sid, scale, scale_factors, load_ids, comment='') → pyNastran.bdf.cards.loads.static_loads.CLOAD

Creates a CLOAD card

Parameters
sidint

load id

scalefloat

overall scale factor

scale_factorsList[float]

individual scale factors (corresponds to load_ids)

load_idsList[int]

individual load_ids (corresponds to scale_factors)

commentstr; default=’’

a comment for the card

add_cmass1(eid: int, pid: int, nids: List[int], c1: int = 0, c2: int = 0, comment: str = '') → pyNastran.bdf.cards.elements.mass.CMASS1

Creates a CMASS1 card

Parameters
eidint

element id

pidint

property id (PMASS)

nidsList[int, int]

node ids

c1 / c2int; default=None

DOF for nid1 / nid2

commentstr; default=’’

a comment for the card

add_cmass2(eid: int, mass: float, nids: List[int], c1: int, c2: int, comment: str = '') → pyNastran.bdf.cards.elements.mass.CMASS2

Creates a CMASS2 card

Parameters
eidint

element id

massfloat

mass

nidsList[int, int]

node ids

c1 / c2int; default=None

DOF for nid1 / nid2

commentstr; default=’’

a comment for the card

add_cmass3(eid: int, pid: int, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.mass.CMASS3

Creates a CMASS3 card

Parameters
eidint

element id

pidint

property id (PMASS)

nidsList[int, int]

SPOINT ids

commentstr; default=’’

a comment for the card

add_cmass4(eid: int, mass: float, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.mass.CMASS4

Creates a CMASS4 card

Parameters
eidint

element id

massfloat

SPOINT mass

nidsList[int, int]

SPOINT ids

commentstr; default=’’

a comment for the card

add_cmfree(eid, s, s2, y, n) → None
add_conm1(eid: int, nid: int, mass_matrix: Any, cid=0, comment='') → pyNastran.bdf.cards.elements.mass.CONM1

Creates a CONM1 card

Parameters
eidint

element id

nidint

the node to put the mass matrix

mass_matrix(6, 6) float ndarray

the 6x6 mass matrix, M

cidint; default=0

the coordinate system for the mass matrix

commentstr; default=’’

a comment for the card

::
[M] = [M11 M21 M31 M41 M51 M61]

[ M22 M32 M42 M52 M62] [ M33 M43 M53 M63] [ M44 M54 M64] [ Sym M55 M65] [ M66]

add_conm2(eid: int, nid: int, mass: float, cid: int = 0, X: Optional[List[float]] = None, I: Optional[List[float]] = None, comment: str = '') → pyNastran.bdf.cards.elements.mass.CONM2

Creates a CONM2 card

Parameters
eidint

element id

nidint

node id

massfloat

the mass of the CONM2

cidint; default=0

coordinate frame of the offset (-1=absolute coordinates)

X(3, ) List[float]; default=None -> [0., 0., 0.]

xyz offset vector relative to nid

I(6, ) List[float]; default=None -> [0., 0., 0., 0., 0., 0.]

mass moment of inertia matrix about the CG I11, I21, I22, I31, I32, I33 = I

commentstr; default=’’

a comment for the card

add_conrod(eid: int, mid: int, nids: List[int], A: float = 0.0, j: float = 0.0, c: float = 0.0, nsm: float = 0.0, comment: str = '') → pyNastran.bdf.cards.elements.rods.CONROD

Creates a CONROD card

Parameters
eidint

element id

midint

material id

nidsList[int, int]

node ids

Afloat; default=0.

area

jfloat; default=0.

polar moment of inertia

cfloat; default=0.

stress factor

nsmfloat; default=0.

non-structural mass per unit length

commentstr; default=’’

a comment for the card

add_conv(eid, pconid, ta, film_node=0, cntrlnd=0, comment='') → pyNastran.bdf.cards.thermal.thermal.CONV

Creates a CONV card

Parameters
eidint

element id

pconidint

Convection property ID

midint

Material ID

taList[int]

Ambient points used for convection 0’s are allowed for TA2 and higher

film_nodeint; default=0

Point for film convection fluid property temperature

cntrlndint; default=0

Control point for free convection boundary condition

commentstr; default=’’

a comment for the card

add_convm(eid, pconvm, ta1, film_node=0, cntmdot=0, ta2=None, mdot=1.0, comment='') → pyNastran.bdf.cards.thermal.thermal.CONVM

Creates a CONVM card

Parameters
eidint

element id (CHBDYP)

pconidint

property ID (PCONVM)

midint

Material ID

ta1int

ambient point for convection

ta2int; default=None

None : ta1 ambient point for convection

film_nodeint; default=0
cntmdotint; default=0

control point used for controlling mass flow 0/blank is only allowed when mdot > 0

mdotfloat; default=1.0

a multiplier for the mass flow rate in case there is no point associated with the CNTRLND field required if cntmdot = 0

commentstr; default=’’

a comment for the card

add_cord1c(cid: int, g1: int, g2: int, g3: int, comment: str = '') → pyNastran.bdf.cards.coordinate_systems.CORD1C

Creates the CORD1C card, which defines a cylindrical coordinate system using 3 GRID points.

Parameters
cidint

the coordinate id

g1int

grid point 1

g2int

grid point 2

g3int

grid point 3

commentstr; default=’’

a comment for the card

add_cord1r(cid: int, g1: int, g2: int, g3: int, comment: str = '') → pyNastran.bdf.cards.coordinate_systems.CORD1R

Creates the CORD1R card, which defines a rectangular coordinate system using 3 GRID points.

Parameters
cidint

the coordinate id

g1int

grid point 1

g2int

grid point 2

g3int

grid point 3

commentstr; default=’’

a comment for the card

add_cord1s(cid: int, g1: int, g2: int, g3: int, comment: str = '') → pyNastran.bdf.cards.coordinate_systems.CORD1S

Creates the CORD1S card, which defines a spherical coordinate system using 3 GRID points.

Parameters
cidint

the coordinate id

g1int

grid point 1

g2int

grid point 2

g3int

grid point 3

commentstr; default=’’

a comment for the card

add_cord2c(cid: int, origin: Union[List[float], Any, None], zaxis: Union[List[float], Any, None], xzplane: Union[List[float], Any, None], rid: int = 0, setup: bool = True, comment: str = '') → pyNastran.bdf.cards.coordinate_systems.CORD2C

Creates the CORD2C card, which defines a cylindrical coordinate system using 3 vectors.

Parameters
cidint

coordinate system id

ridint; default=0

the referenced coordinate system that defines the system the vectors

originList[float, float, float]

the origin of the coordinate system

zaxisList[float, float, float]

the z-axis of the coordinate system

xzplaneList[float, float, float]

a point on the xz plane

commentstr; default=’’

a comment for the card

add_cord2r(cid: int, origin: Union[List[float], Any, None], zaxis: Union[List[float], Any, None], xzplane: Union[List[float], Any, None], rid: int = 0, setup: bool = True, comment: str = '') → pyNastran.bdf.cards.coordinate_systems.CORD2R

Creates the CORD2R card, which defines a rectangular coordinate system using 3 vectors.

Parameters
cidint

coordinate system id

ridint; default=0

the referenced coordinate system that defines the system the vectors

originList[float, float, float]

the origin of the coordinate system

zaxisList[float, float, float]

the z-axis of the coordinate system

xzplaneList[float, float, float]

a point on the xz plane

commentstr; default=’’

a comment for the card

add_cord2s(cid: int, origin: Union[List[float], Any, None], zaxis: Union[List[float], Any, None], xzplane: Union[List[float], Any, None], rid: int = 0, setup: bool = True, comment: str = '') → pyNastran.bdf.cards.coordinate_systems.CORD2S

Creates the CORD2C card, which defines a spherical coordinate system using 3 vectors.

Parameters
cidint

coordinate system id

originList[float, float, float]

the origin of the coordinate system

zaxisList[float, float, float]

the z-axis of the coordinate system

xzplaneList[float, float, float]

a point on the xz plane

ridint; default=0

the referenced coordinate system that defines the system the vectors

commentstr; default=’’

a comment for the card

add_cord3g(cid: int, method_es, method_int, form, thetas: List[int], rid: int, comment: str = '') → pyNastran.bdf.cards.coordinate_systems.CORD3G

Creates a CORD3G card

add_cpenta(eid, pid, nids, comment='') → Union[pyNastran.bdf.cards.elements.solid.CPENTA6, pyNastran.bdf.cards.elements.solid.CPENTA15]

Creates a CPENTA6/CPENTA15

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=6 or 15

commentstr; default=’’

a comment for the card

add_cplstn3(eid, pid, nids, theta=0.0, comment='') → pyNastran.bdf.cards.elements.shell.CPLSTN3

Creates a CPLSTN4 card

add_cplstn4(eid, pid, nids, theta=0.0, comment='') → pyNastran.bdf.cards.elements.shell.CPLSTN4

Creates a CPLSTN4 card

add_cplstn6(eid, pid, nids, theta=0.0, comment='') → pyNastran.bdf.cards.elements.shell.CPLSTN6

Creates a CPLSTN6 card

add_cplstn8(eid, pid, nids, theta=0.0, comment='') → pyNastran.bdf.cards.elements.shell.CPLSTN8

Creates a CPLSTN8 card

add_cplsts3(eid, pid, nids, theta=0.0, tflag=0, T1=None, T2=None, T3=None, comment='') → pyNastran.bdf.cards.elements.shell.CPLSTS3

Creates a CPLSTS3 card

add_cplsts4(eid, pid, nids, theta=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, comment='') → pyNastran.bdf.cards.elements.shell.CPLSTS4

Creates a CPLSTS4 card

add_cplsts6(eid, pid, nids, theta=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, T5=None, T6=None, comment='') → pyNastran.bdf.cards.elements.shell.CPLSTS6

Creates a CPLSTS6 card

add_cplsts8(eid, pid, nids, theta=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, T5=None, T6=None, T7=None, T8=None, comment='') → pyNastran.bdf.cards.elements.shell.CPLSTS8

Creates a CPLSTS8 card

add_cpyram(eid, pid, nids, comment='') → Union[pyNastran.bdf.cards.elements.solid.CPYRAM5, pyNastran.bdf.cards.elements.solid.CPYRAM13]

Creates a CPYRAM5/CPYRAM13

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=5 or 13

commentstr; default=’’

a comment for the card

add_cquad(eid, pid, nids, theta_mcid=0.0, comment='') → pyNastran.bdf.cards.elements.shell.CQUAD

Creates a CQUAD card

Parameters
eidint

element id

pidint

property id (PSHELL/PCOMP/PCOMPG)

nidsList[int, int, int, int, int/None, int/None,

int/None, int/None, int/None]

node ids

theta_mcidfloat; default=0.0
floatmaterial coordinate system angle (theta) is defined

relative to the element coordinate system

intx-axis from material coordinate system angle defined by

mcid is projected onto the element

commentstr; default=’’

a comment for the card

add_cquad4(eid, pid, nids, theta_mcid=0.0, zoffset=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, comment='') → pyNastran.bdf.cards.elements.shell.CQUAD4

Creates a CQUAD4 card

Parameters
eidint

element id

pidint

property id (PSHELL/PCOMP/PCOMPG)

nidsList[int, int, int, int]

node ids

zoffsetfloat; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcidfloat; default=0.0
floatmaterial coordinate system angle (theta) is defined

relative to the element coordinate system

intx-axis from material coordinate system angle defined by

mcid is projected onto the element

tflagint; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3 / T4float; default=None

If it is not supplied, then T1 through T4 will be set equal to the value of T on the PSHELL entry.

commentstr; default=’’

a comment for the card

add_cquad8(eid, pid, nids, theta_mcid=0.0, zoffset=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, comment='') → pyNastran.bdf.cards.elements.shell.CQUAD8

Creates a CQUAD8 card

Parameters
eidint

element id

pidint

property id (PSHELL/PCOMP/PCOMPG)

nidsList[int, int, int, int, int/None, int/None, int/None, int/None]

node ids

zoffsetfloat; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcidfloat; default=0.0
floatmaterial coordinate system angle (theta) is defined

relative to the element coordinate system

intx-axis from material coordinate system angle defined by

mcid is projected onto the element

tflagint; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3 / T4float; default=None

If it is not supplied, then T1 through T4 will be set equal to the value of T on the PSHELL entry.

commentstr; default=’’

a comment for the card

add_cquadr(eid, pid, nids, theta_mcid=0.0, zoffset=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, comment='') → pyNastran.bdf.cards.elements.shell.CQUADR

Creates a CQUADR card

Parameters
eidint

element id

pidint

property id (PSHELL/PCOMP/PCOMPG)

nidsList[int, int, int, int]

node ids

zoffsetfloat; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcidfloat; default=0.0
floatmaterial coordinate system angle (theta) is defined

relative to the element coordinate system

intx-axis from material coordinate system angle defined by

mcid is projected onto the element

tflagint; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3 / T4float; default=None

If it is not supplied, then T1 through T4 will be set equal to the value of T on the PSHELL entry.

commentstr; default=’’

a comment for the card

add_cquadx(eid, pid, nids, theta_mcid=0.0, comment='') → pyNastran.bdf.cards.elements.axisymmetric_shells.CQUADX

Creates a CQUADX card

add_cquadx4(eid, pid, nids, theta=0.0, comment='') → pyNastran.bdf.cards.elements.axisymmetric_shells.CQUADX4

Creates a CQUADX4 card

add_cquadx8(eid, pid, nids, theta=0.0, comment='') → pyNastran.bdf.cards.elements.axisymmetric_shells.CQUADX8

Creates a CQUADX8 card

add_crac2d(eid, pid, nids, comment='') → pyNastran.bdf.cards.elements.elements.CRAC2D

Creates a PRAC2D card

add_crac3d(eid, pid, nids, comment='') → pyNastran.bdf.cards.elements.elements.CRAC3D

Creates a CRAC3D card

add_creep(mid, T0, exp, form, tidkp, tidcp, tidcs, thresh, Type, a, b, c, d, e, f, g, comment='') → pyNastran.bdf.cards.materials.CREEP

Creates a CREEP card

add_crod(eid: int, pid: int, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.rods.CROD

Creates a CROD card

Parameters
eidint

element id

pidint

property id (PROD)

nidsList[int, int]

node ids

commentstr; default=’’

a comment for the card

add_cset(ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.CSET, pyNastran.bdf.cards.bdf_sets.CSET1]

Creates an CSET/CSET1 card, which defines the degree of freedoms that will be free during a generalized dynamic reduction or component model synthesis calculation.

Parameters
idsList[int]

the GRID/SPOINT ids

componentsList[str]; str

the degree of freedoms to be free (e.g., ‘1’, ‘123’) if a list is passed in, a CSET is made if a str is passed in, a CSET1 is made

commentstr; default=’’

a comment for the card

Notes

the length of components and ids must be the same

add_cset1(ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.CSET, pyNastran.bdf.cards.bdf_sets.CSET1]

See also

add_cset

add_cshear(eid, pid, nids, comment='') → pyNastran.bdf.cards.elements.shell.CSHEAR

Creates a CSHEAR card

Parameters
eidint

element id

pidint

property id (PSHEAR)

nidsList[int, int, int, int]

node ids

commentstr; default=’’

a comment for the card

add_csschd(sid, aesid, lschd, lalpha=None, lmach=None, comment='') → pyNastran.bdf.cards.aero.static_loads.CSSCHD

Creates an CSSCHD card, which defines a specified control surface deflection as a function of Mach and alpha (used in SOL 144/146).

Parameters
sidint

the unique id

aesidint

the control surface (AESURF) id

lalphaint; default=None

the angle of attack profile (AEFACT) id

lmachint; default=None

the mach profile (AEFACT) id

lschdint; default=None

the control surface deflection profile (AEFACT) id

commentstr; default=’’

a comment for the card

add_csuper(seid, psid, nodes, comment='') → pyNastran.bdf.cards.superelements.CSUPER
add_csupext(seid, nodes, comment='') → pyNastran.bdf.cards.superelements.CSUPEXT
add_ctetra(eid, pid, nids, comment='') → Union[pyNastran.bdf.cards.elements.solid.CTETRA4, pyNastran.bdf.cards.elements.solid.CTETRA10]

Creates a CTETRA4/CTETRA10

Parameters
eidint

element id

pidint

property id (PSOLID, PLSOLID)

nidsList[int]

node ids; n=4 or 10

commentstr; default=’’

a comment for the card

add_ctrax3(eid, pid, nids, theta=0.0, comment='') → pyNastran.bdf.cards.elements.axisymmetric_shells.CTRAX3

Creates a CTRAX3 card

add_ctrax6(eid, pid, nids, theta=0.0, comment='') → pyNastran.bdf.cards.elements.axisymmetric_shells.CTRAX6

Creates a CTRAX6 card

add_ctria3(eid, pid, nids, zoffset=0.0, theta_mcid=0.0, tflag=0, T1=None, T2=None, T3=None, comment='') → pyNastran.bdf.cards.elements.shell.CTRIA3

Creates a CTRIA3 card

Parameters
eidint

element id

pidint

property id (PSHELL/PCOMP/PCOMPG)

nidsList[int, int, int]

node ids

zoffsetfloat; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcidfloat; default=0.0
floatmaterial coordinate system angle (theta) is defined

relative to the element coordinate system

intx-axis from material coordinate system angle defined by

mcid is projected onto the element

tflagint; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3float; default=None

If it is not supplied, then T1 through T3 will be set equal to the value of T on the PSHELL entry.

commentstr; default=’’

a comment for the card

add_ctria6(eid, pid, nids, theta_mcid=0.0, zoffset=0.0, tflag=0, T1=None, T2=None, T3=None, comment='') → pyNastran.bdf.cards.elements.shell.CTRIA6

Creates a CTRIA6 card

Parameters
eidint

element id

pidint

property id (PSHELL/PCOMP/PCOMPG)

nidsList[int, int, int, int/None, int/None, int/None]

node ids

zoffsetfloat; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcidfloat; default=0.0
floatmaterial coordinate system angle (theta) is defined

relative to the element coordinate system

intx-axis from material coordinate system angle defined by

mcid is projected onto the element

tflagint; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3float; default=None

If it is not supplied, then T1 through T3 will be set equal to the value of T on the PSHELL entry.

commentstr; default=’’

a comment for the card

add_ctriar(eid, pid, nids, theta_mcid=0.0, zoffset=0.0, tflag=0, T1=None, T2=None, T3=None, comment='') → pyNastran.bdf.cards.elements.shell.CTRIAR

Creates a CTRIAR card

Parameters
eidint

element id

pidint

property id (PSHELL/PCOMP/PCOMPG)

nidsList[int, int, int]

node ids

zoffsetfloat; default=0.0

Offset from the surface of grid points to the element reference plane. Requires MID1 and MID2.

theta_mcidfloat; default=0.0
floatmaterial coordinate system angle (theta) is defined

relative to the element coordinate system

intx-axis from material coordinate system angle defined by

mcid is projected onto the element

tflagint; default=0

0 : Ti are actual user specified thicknesses 1 : Ti are fractions relative to the T value of the PSHELL

T1 / T2 / T3float; default=None

If it is not supplied, then T1 through T3 will be set equal to the value of T on the PSHELL entry.

commentstr; default=’’

a comment for the card

add_ctriax(eid, pid, nids, theta_mcid=0.0, comment='') → pyNastran.bdf.cards.elements.axisymmetric_shells.CTRIAX

Creates a CTRIAX card

add_ctriax6(eid, mid, nids, theta=0.0, comment='') → pyNastran.bdf.cards.elements.axisymmetric_shells.CTRIAX

Creates a CTRIAX6 card

add_ctube(eid: int, pid: int, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.rods.CTUBE

Creates a CTUBE card

Parameters
eidint

element id

pidint

property id

nidsList[int, int]

node ids

commentstr; default=’’

a comment for the card

add_cvisc(eid: int, pid: int, nids: List[int], comment: str = '') → pyNastran.bdf.cards.elements.damper.CVISC

Creates a CVISC card

Parameters
eidint

element id

pidint

property id (PVISC)

nidsList[int, int]

GRID ids

commentstr; default=’’

a comment for the card

add_cyax(nids, comment='') → pyNastran.bdf.cards.cyclic.CYAX
add_cyjoin(side, coord, nids, comment='') → pyNastran.bdf.cards.cyclic.CYJOIN
add_darea(sid, nid, component, scale, comment='') → pyNastran.bdf.cards.loads.loads.DAREA

Creates a DAREA card

Parameters
sidint

darea id

nidint

GRID, EPOINT, SPOINT id

componentstr

Component number. (0-6; 0-EPOINT/SPOINT; 1-6 GRID)

scalefloat

Scale (area) factor

add_dconadd(oid, dconstrs, comment='') → pyNastran.bdf.cards.optimization.DCONADD

Creates a DCONADD card

add_dconstr(oid: int, dresp_id: int, lid: float = -1e+20, uid: float = 1e+20, lowfq: float = 0.0, highfq: float = 1e+20, comment: str = '') → pyNastran.bdf.cards.optimization.DCONSTR

Creates a DCONSTR card

Parameters
oidint

unique optimization id

dresp_idint

DRESP1/2 id

lid / uid=-1.e20 / 1.e20

lower/upper bound

lowfq / highfqfloat; default=0. / 1.e20

lower/upper end of the frequency range

commentstr; default=’’

a comment for the card

add_ddval(oid, ddvals, comment='') → pyNastran.bdf.cards.optimization.DDVAL

Creates a DDVAL card

add_deform(sid: int, eid: int, deformation: float, comment='') → pyNastran.bdf.cards.loads.loads.DEFORM

Creates an DEFORM card, which defines applied deformation on a 1D elemment. Links to the DEFORM card in the case control deck.

Parameters
sidint

load id

eidint

CTUBE/CROD/CONROD/CBAR/CBEAM element id

deformationfloat

the applied deformation

commentstr; default=’’

a comment for the card

add_delay(sid, nodes, components, delays, comment='') → pyNastran.bdf.cards.dynamic.DELAY

Creates a DELAY card

Parameters
sidint

DELAY id that is referenced by a TLOADx, RLOADx or ACSRCE card

nodesList[int]

list of nodes that see the delay len(nodes) = 1 or 2

componentsList[int]

the components corresponding to the nodes that see the delay len(nodes) = len(components)

delaysList[float]

Time delay (tau) for designated point Pi and component Ci len(nodes) = len(delays)

commentstr; default=’’

a comment for the card

add_deqatn(equation_id: int, eqs: List[str], comment: str = '') → pyNastran.bdf.cards.deqatn.DEQATN

Creates a DEQATN card

Parameters
equation_idint

the id of the equation

eqsList[str]

the equations, which may overbound the field split them by a semicolon (;)

commentstr; default=’’

a comment for the card

DEQATN 41 F1(A,B,C,D,R) = A+B *C-(D**3 + 10.0) + sin(PI(1) * R)
  • A**2 / (B - C); F = A + B - F1 * D

def F1(A, B, C, D, R):

F1 = A+B *C-(D**3 + 10.0) + sin(PI(1) * R) + A**2 / (B - C) F = A + B - F1 * D return F

eqs = [

‘F1(A,B,C,D,R) = A+B *C-(D**3 + 10.0) + sin(PI(1) * R) + A**2 / (B - C)’, ‘F = A + B - F1 * D’,

]
>>> deqatn = model.add_deqatn(41, eqs, comment=’’)
add_desvar(desvar_id, label, xinit, xlb=-1e+20, xub=1e+20, delx=None, ddval=None, comment='') → pyNastran.bdf.cards.optimization.DESVAR

Creates a DESVAR card

Parameters
desvar_idint

design variable id

labelstr

name of the design variable

xinitfloat

the starting point value for the variable

xlbfloat; default=-1.e20

the lower bound

xubfloat; default=1.e20

the lower bound

delxfloat; default=1.e20

fractional change allowed for design variables during approximate optimization NX if blank : take from DOPTPRM; otherwise 1.0 MSC if blank : take from DOPTPRM; otherwise 0.5

ddvalint; default=None
intDDVAL id

allows you to set discrete values

None : continuous

commentstr; default=’’

a comment for the card

add_diverg(sid: int, nroots: int, machs: List[float], comment: str = '') → pyNastran.bdf.cards.aero.static_loads.DIVERG

Creates an DIVERG card, which is used in divergence analysis (SOL 144).

Parameters
sidint

The name

nrootsint

the number of roots

machsList[float, …, float]

list of Mach numbers

commentstr; default=’’

a comment for the card

Creates a DLINK card, which creates a variable that is a lienar ccombination of other design variables

Parameters
oidint

optimization id

dependent_desvarint

the DESVAR to link

independent_desvarsList[int]

the DESVARs to combine

coeffsList[int]

the linear combination coefficients

c0float; default=0.0

an offset

cmultfloat; default=1.0

an scale factor

commentstr; default=’’

a comment for the card

add_dload(sid, scale, scale_factors, load_ids, comment='') → pyNastran.bdf.cards.loads.dloads.DLOAD

Creates a DLOAD card

Parameters
sidint

Load set identification number. See Remarks 1. and 4. (Integer > 0)

scalefloat

Scale factor. See Remarks 2. and 8. (Real)

SiList[float]

Scale factors. See Remarks 2., 7. and 8. (Real)

load_idsList[int]

Load set identification numbers of RLOAD1, RLOAD2, TLOAD1, TLOAD2, and ACSRCE entries. See Remarks 3. and 7. (Integer > 0)

commentstr; default=’’

a comment for the card

add_dmi(name, form, tin, tout, nrows, ncols, GCj, GCi, Real, Complex=None, comment='') → pyNastran.bdf.cards.dmig.DMI

Creates a DMI card

add_dmiax(name, matrix_form, tin, tout, ncols, GCNj, GCNi, Real, Complex=None, comment='') → pyNastran.bdf.cards.dmig.DMIAX

Creates a DMIAX card

add_dmig(name, ifo, tin, tout, polar, ncols, GCj, GCi, Real, Complex=None, comment='') → pyNastran.bdf.cards.dmig.DMIG

Creates a DMIG card

Parameters
namestr

the name of the matrix

ifoint

matrix shape 4=Lower Triangular 5=Upper Triangular 6=Symmetric 8=Identity (m=nRows, n=m)

tinint

matrix input precision 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision

toutint

matrix output precision 0=same as tin 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision

polarint; default=0

Input format of Ai, Bi Integer=blank or 0 indicates real, imaginary format Integer > 0 indicates amplitude, phase format

ncolsint

???

GCjList[(node, dof)]

the [jnode, jDOFs]

GCiList[(node, dof)]

the inode, iDOFs

RealList[float]

The real values

ComplexList[float]; default=None

The complex values (if the matrix is complex)

commentstr; default=’’

a comment for the card

add_dmig_uaccel(tin, ncol, load_sequences, comment='') → pyNastran.bdf.cards.dmig.DMIG_UACCEL

Creates a DMIG,UACCEL card

add_dmij(name, form, tin, tout, nrows, ncols, GCj, GCi, Real, Complex=None, comment='') → pyNastran.bdf.cards.dmig.DMIJ

Creates a DMIJ card

add_dmiji(name, ifo, tin, tout, nrows, ncols, GCj, GCi, Real, Complex=None, comment='') → pyNastran.bdf.cards.dmig.DMIJI
DMIJI | NAME | 0 | IFO | TIN | TOUT POLAR | | NCOL |
add_dmik(name, ifo, tin, tout, polar, ncols, GCj, GCi, Real, Complex=None, comment='') → pyNastran.bdf.cards.dmig.DMIK

Creates a DMIK card

Parameters
namestr

the name of the matrix

ifoint

matrix shape 4=Lower Triangular 5=Upper Triangular 6=Symmetric 8=Identity (m=nRows, n=m)

tinint

matrix input precision 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision

toutint

matrix output precision 0=same as tin 1=Real, Single Precision 2=Real, Double Precision 3=Complex, Single Precision 4=Complex, Double Precision

polarint; default=0

Input format of Ai, Bi Integer=blank or 0 indicates real, imaginary format Integer > 0 indicates amplitude, phase format

ncolsint

???

GCjList[(node, dof)]

the jnode, jDOFs

GCiList[(node, dof)]

the inode, iDOFs

RealList[float]

The real values

ComplexList[float]; default=None

The complex values (if the matrix is complex)

commentstr; default=’’

a comment for the card

add_dmncon(constraint_id: int, constraint_type: str, xyz=None, normal=None, size=None, m=None, d=None, nsections=None, angle=None, mind=None, off_flag=None, comment: str = '') → pyNastran.bdf.cards.optimization_nx.DMNCON
add_doptprm(params: Dict[str, Union[int, float]], comment='') → pyNastran.bdf.cards.optimization.DOPTPRM

Creates a DOPTPRM card

add_dphase(sid, nodes, components, phase_leads, comment='') → pyNastran.bdf.cards.dynamic.DPHASE

Creates a DPHASE card

Parameters
sidint

DPHASE id that is referenced by a RLOADx or ACSRCE card

nodesList[int]

list of nodes that see the delay len(nodes) = 1 or 2

componentsList[int]

the components corresponding to the nodes that see the delay len(nodes) = len(components)

phase_leadsList[float]

Phase lead θ in degrees. len(nodes) = len(delays)

commentstr; default=’’

a comment for the card

add_dresp1(dresp_id: int, label: str, response_type: str, property_type: str, region: str, atta: Union[int, float, str, None], attb: Union[int, float, str, None], atti: List[Union[int, float, str]], validate: bool = True, comment: str = '') → pyNastran.bdf.cards.optimization.DRESP1

Creates a DRESP1 card.

A DRESP1 is used to define a “simple” output result that may be optimized on. A simple result is a result like stress, strain, force, displacement, eigenvalue, etc. for a node/element that may be found in a non-optimization case.

Parameters
dresp_idint

response id

labelstr

Name of the response

response_typestr

Response type

property_typestr

Element flag (PTYPE = ‘ELEM’), or property entry name, or panel flag for ERP responses (PTYPE = ‘PANEL’ - See Remark 34), or RANDPS ID. Blank for grid point responses. ‘ELEM’ or property name used only with element type responses (stress, strain, force, etc.) to identify the relevant element IDs, or the property type and relevant property IDs.

Must be {ELEM, PBAR, PSHELL, PCOMP, PANEL, etc.) PTYPE = RANDPS ID when RTYPE=PSDDISP, PSDVELO, or PSDACCL.

regionstr

Region identifier for constraint screening

attaint / float / str / blank

Response attribute

attbint / float / str / blank

Response attribute

attiList[int / float / str]

the response values to pull from List[int]:

list of grid ids list of property ids

List[str]

‘ALL’

commentstr; default=’’

a comment for the card

validatebool; default=True

should the card be validated when it’s created

Examples

Stress/PSHELL

>>> dresp_id = 103
>>> label = 'resp1'
>>> response_type = 'STRESS'
>>> property_type = 'PSHELL'
>>> pid = 3
>>> atta = 9 # von mises upper surface stress
>>> region = None
>>> attb = None
>>> atti = [pid]
>>> DRESP1(dresp_id, label, response_type, property_type, region, atta, attb, atti)

Stress/PCOMP

>>> dresp_id = 104
>>> label = 'resp2'
>>> response_type = 'STRESS'
>>> property_type = 'PCOMP'
>>> pid = 3
>>> layer = 4
>>> atta = 9 # von mises upper surface stress
>>> region = None
>>> attb = layer
>>> atti = [pid]
>>> DRESP1(dresp_id, label, response_type, property_type, region, atta, attb, atti)
add_dresp2(dresp_id, label, dequation, region, params, method='MIN', c1=1.0, c2=0.005, c3=10.0, validate=True, comment='') → pyNastran.bdf.cards.optimization.DRESP2

Creates a DRESP2 card.

A DRESP2 is used to define a “complex” output result that may be optimized on. A complex result is a result that uses:

  • simple (DRESP1) results

  • complex (DRESP2) results

  • default values (DTABLE)

  • DVCRELx values

  • DVMRELx values

  • DVPRELx values

  • DESVAR values

Then, an equation (DEQATN) is used to formulate an output response.

Parameters
dresp_idint

response id

labelstr

Name of the response

dequationint

DEQATN id

regionstr

Region identifier for constraint screening

paramsdict[(index, card_type)] = values

the storage table for the response function index : int

a counter

card_typestr

the type of card to pull from DESVAR, DVPREL1, DRESP2, etc.

valuesList[int]

the values for this response

methodstr; default=MIN

flag used for FUNC=BETA/MATCH FUNC = BETA

valid options are {MIN, MAX}

FUNC = MATCH

valid options are {LS, BETA}

c1 / c2 / c3float; default=1. / 0.005 / 10.0

constants for FUNC=BETA or FUNC=MATCH

commentstr; default=’’

a comment for the card

validatebool; default=False

should the card be validated when it’s created

params = {

(0, ‘DRESP1’) = [10, 20], (1, ‘DESVAR’) = [30], (2, ‘DRESP1’) = [40],

}
add_dresp3(dresp_id, label, group, Type, region, params, validate=True, comment='') → pyNastran.bdf.cards.optimization.DRESP3

Creates a DRESP3 card

add_dscons(dscid: int, label: str, constraint_type: str, nid_eid: int, comp: int, limit: float = 0.0, opt: str = 'MAX', layer_id: int = 1)

Design Constraint Defines a design constraint in design sensitivity analysis (original DSA). See the MSC.Nastran Reference Manual, Chapter 15.

DSCONS | DSCID | LABEL | TYPE | ID | COMP | LIMIT | OPT | LAMNO |
DSCONS | 21 | G101DX | DISP | 4 | 1 | 0.06 | MAX | 6 |
add_dscreen(rtype: str, trs=-0.5, nstr=20, comment='') → pyNastran.bdf.cards.optimization.DSCREEN

Creates a DSCREEN object

Parameters
rtypestr

Response type for which the screening criteria apply

trsfloat

Truncation threshold

nstrint

Maximum number of constraints to be retained per region per load case

commentstr; default=’’

a comment for the card

add_dtable(default_values: Dict[str, float], comment='') → pyNastran.bdf.cards.bdf_tables.DTABLE

Creates a DTABLE card

Parameters
default_valuesdict
keystr

the parameter name

valuefloat

the value

commentstr; default=’’

a comment for the card

add_dti(name, fields, comment='') → Union[pyNastran.bdf.cards.dmig.DTI, pyNastran.bdf.cards.dmig.DTI_UNITS]

Creates a DTI card

add_dvar(bid: int, label: str, vids: List[float], deltab: float = 0.02)

Design Variable

Defines a design variable for design sensitivity analysis (original DSA) described in the MSC.Nastran Reference Manual, Chapter 15.

DVAR | BID | LABEL | DELTAB | VID1 | VID2 | VID3 | VID4 | VID5 |
| VID6 | etc. | | | | | | |
DVAR | 10 | LFDOOR | 0.01 | 2 | 4 | 5 | 6 | 9 |
| 10 | | | | | | | |

MSC 2001

Parameters
BIDint

Design variable identification number. Must be unique for all DVAR.

LABELstr

Label used to describe variable in output.

DELTABfloat; default=0.02

The change in the dimensionless design variable B to be used in the calculation of the design sensitivity coefficients.

VIDiList[int]

Identification number of DVSET entry.

add_dvcrel1(oid, Type, eid, cp_name, dvids, coeffs, cp_min=None, cp_max=1e+20, c0=0.0, validate=True, comment='') → pyNastran.bdf.cards.optimization.DVCREL1

Creates a DVCREL1 card

Parameters
oidint

optimization id

prop_typestr

property card name (e.g., PSHELL)

EIDint

element id

cp_namestr/int

optimization parameter as an element connectivity name (e.g., X1)

dvidsList[int]

DESVAR ids

coeffsList[float]

scale factors for DESVAR ids

cp_minfloat; default=None

minimum value

cp_maxfloat; default=1e20

maximum value

c0float; default=0.

offset factor for the variable

validatebool; default=False

should the variable be validated

commentstr; default=’’

a comment for the card

add_dvcrel2(oid, Type, eid, cp_name, deqation, dvids, labels, cp_min=None, cp_max=1e+20, validate=True, comment='') → pyNastran.bdf.cards.optimization.DVCREL2

Creates a DVCREL2 card

add_dvgrid(dvid: int, nid: int, dxyz: Any, cid: int = 0, coeff: float = 1.0, comment: str = '') → pyNastran.bdf.cards.optimization.DVGRID

Creates a DVGRID card

Parameters
dvidint

DESVAR id

nidint

GRID/POINT id

dxyz(3, ) float ndarray

the amount to move the grid point

cidint; default=0

Coordinate system for dxyz

coefffloat; default=1.0

the dxyz scale factor

commentstr; default=’’

a comment for the card

add_dvmrel1(oid: int, mat_type: str, mid: int, mp_name: str, dvids: List[int], coeffs: List[float], mp_min: Optional[float] = None, mp_max: float = 1e+20, c0: float = 0.0, validate: bool = True, comment: str = '') → pyNastran.bdf.cards.optimization.DVMREL1

Creates a DVMREL1 card

Parameters
oidint

optimization id

prop_typestr

material card name (e.g., MAT1)

midint

material id

mp_namestr

optimization parameter as a pname (material name; E)

dvidsList[int]

DESVAR ids

coeffsList[float]

scale factors for DESVAR ids

mp_minfloat; default=None

minimum material property value

mp_maxfloat; default=1e20

maximum material property value

c0float; default=0.

offset factor for the variable

validatebool; default=False

should the variable be validated

commentstr; default=’’

a comment for the card

add_dvmrel2(oid: int, mat_type: str, mid: int, mp_name: str, deqation: int, dvids: List[int], labels: List[str], mp_min: Optional[float] = None, mp_max: float = 1e+20, validate: bool = True, comment: str = '') → pyNastran.bdf.cards.optimization.DVMREL2

Creates a DVMREL2 card

Parameters
oidint

optimization id

mat_typestr

material card name (e.g., MAT1)

midint

material id

mp_namestr

optimization parameter as a pname (material name; E)

deqationint

DEQATN id

dvidsList[int]; default=None

DESVAR ids

labelsList[str]; default=None

DTABLE names

mp_minfloat; default=None

minimum material property value

mp_maxfloat; default=1e20

maximum material property value

validatebool; default=False

should the variable be validated

commentstr; default=’’

a comment for the card

Notes

either dvids or labels is required

add_dvprel1(oid: int, prop_type: str, pid: int, pname_fid: Union[int, str], dvids: List[int], coeffs: List[float], p_min=None, p_max: float = 1e+20, c0: float = 0.0, validate: bool = True, comment: str = '') → pyNastran.bdf.cards.optimization.DVPREL1

Creates a DVPREL1 card

Parameters
oidint

optimization id

prop_typestr

property card name (e.g., PSHELL)

pidint

property id

pname_fidstr/int

optimization parameter as a pname (property name; T) or field number (fid)

dvidsList[int]

DESVAR ids

coeffsList[float]

scale factors for DESVAR ids

p_minfloat; default=None

minimum property value

p_maxfloat; default=1e20

maximum property value

c0float; default=0.

offset factor for the variable

validatebool; default=False

should the variable be validated

commentstr; default=’’

a comment for the card

add_dvprel2(oid: int, prop_type: str, pid: int, pname_fid: Union[int, str], deqation: int, dvids: List[int] = None, labels: List[str] = None, p_min: Optional[float] = None, p_max: float = 1e+20, validate: bool = True, comment: str = '') → pyNastran.bdf.cards.optimization.DVPREL2

Creates a DVPREL2 card

Parameters
oidint

optimization id

prop_typestr

property card name (e.g., PSHELL)

pidint

property id

pname_fidstr/int

optimization parameter as a pname (property name; T) or field number (fid)

deqationint

DEQATN id

dvidsList[int]; default=None

DESVAR ids

labelsList[str]; default=None

DTABLE names

p_minfloat; default=None

minimum property value

p_maxfloat; default=1e20

maximum property value

validatebool; default=False

should the variable be validated

commentstr; default=’’

a comment for the card

Notes

either dvids or labels is required

add_dvset(vid: int, dv_type: str, field: int, pref: float, pids: List[float], alpha: float = 1.0)

Design Variable Set Property

Defines a set of element properties that vary in a fixed relation to a design variable for design sensitivity analysis (original DSA). See the MSC.Nastran Reference Manual, Chapter 15.

DVSET | VID | TYPE | FIELD | PREF | ALPHA | PIDl | PID2 | PID3 |
| PID4 | PID5 | etc. | | | | | |
DVSET | 21 | PSHELL | 4 | 0.20 | 1.0 | 99 | 101 | 110 |
| 111 | 122 | | | | | | |
DVSET | VID | TYPE | FIELD | PREF | ALPHA | PID | THRU | PID2 |
DVSET | 21 | PSHELL | 4 | 0.20 | 1.0 | 101 | THRU | 105 |
DVSET | VID | TYPE | FIELD | MIDV | | PIDl | PID2 | PID3 |
DVSET | 21 | PSHELL | 3 | 134 | | 87 | 101 | |

MSC 2001

add_dvtrel1(dvtrel_id: int, label: str, group_id: int, state: str = 'ACTIVE', dsv_flag: int = 0, dvid1: int = 0, validate=False, comment: str = '') → pyNastran.bdf.cards.optimization_nx.DVTREL1
add_dynred(sid, fmax, nirv, nit, idir, nqdes) → None
add_eigb(sid, method, L1, L2, nep, ndp, ndn, norm, G, C, comment='') → pyNastran.bdf.cards.methods.EIGB

Creates an EIGB card

add_eigc(sid, method, grid, component, epsilon, neigenvalues, norm='MAX', mblkszs=None, iblkszs=None, ksteps=None, NJIs=None, alphaAjs=None, omegaAjs=None, alphaBjs=None, omegaBjs=None, LJs=None, NEJs=None, NDJs=None, shift_r1=None, shift_i1=None, isrr_flag=None, nd1=None, comment='') → pyNastran.bdf.cards.methods.EIGC

Creates an EIGC card

add_eigp(sid, alpha1, omega1, m1, alpha2, omega2, m2, comment='') → pyNastran.bdf.cards.methods.EIGP

Creates an EIGP card

add_eigr(sid, method='LAN', f1=None, f2=None, ne=None, nd=None, norm='MASS', G=None, C=None, comment='') → pyNastran.bdf.cards.methods.EIGR

Adds a EIGR card

Parameters
sidint

method id

methodstr; default=’LAN’

eigenvalue method recommended: {LAN, AHOU} obsolete : {INV, SINV, GIV, MGIV, HOU, MHOU, AGIV}

f1 / f2float; default=None

lower/upper bound eigenvalue

f2float; default=None

upper bound eigenvalue

neint; default=None

estimate of number of roots (used for INV)

ndint; default=None

desired number of roots

msglvlint; default=0

debug level; 0-4

maxsetint; default=None

Number of vectors in block or set

shfsclfloat; default=None

estimate of first flexible mode natural frequency

normstr; default=None

{MAX, MASS, AF, POINT} default=MASS (NX)

Gint; default=None

node id for normalization; only for POINT

Cint; default=None

component for normalization (1-6); only for POINT

commentstr; default=’’

a comment for the card

add_eigrl(sid, v1=None, v2=None, nd=None, msglvl=0, maxset=None, shfscl=None, norm=None, options=None, values=None, comment='') → pyNastran.bdf.cards.methods.EIGRL

Adds an EIGRL card

Parameters
sidint

method id

v1float; default=None

lower bound eigenvalue

v2float; default=None

upper bound eigenvalue

ndint

number of roots

msglvlint; default=0

debug level; 0-4

maxsetint; default=None

Number of vectors in block or set

shfsclfloat; default=None

estimate of first flexible mode natural frequency

normstr; default=None

{MAX, MASS}

options???; default=None -> []

???

values???; default=None -> []

???

commentstr; default=’’

a comment for the card

add_epoint(ids: Union[int, List[int]], comment: str = '') → pyNastran.bdf.cards.nodes.EPOINTs

Creates the EPOINTs card that contains many EPOINTs

Parameters
idsList[int]

EPOINT ids

commentstr; default=’’

a comment for the card

add_extrn(nids: List[int], comps: List[str])
add_feedge(edge_id, nids, cid, geom_ids, geomin='POINT', comment='') → pyNastran.bdf.cards.parametric.geometry.FEEDGE
add_feface(face_id, nids, cid, surf_ids, comment='') → pyNastran.bdf.cards.parametric.geometry.FEFACE
add_flfact(sid: int, factors: List[float], comment: str = '') → pyNastran.bdf.cards.aero.dynamic_loads.FLFACT

Creates an FLFACT card, which defines factors used for flutter analysis. These factors define either:

  • density

  • mach

  • velocity

  • reduced frequency

depending on the FLUTTER method chosen (e.g., PK, PKNL, PKNLS)

Parameters
sidint

the id of a density, reduced_frequency, mach, or velocity table the FLUTTER card defines the meaning

factorsvaries
valuesList[float, …, float]

list of factors

List[f1, THRU, fnf, nf, fmid]
f1float

first value

THRUstr

the word THRU

fnffloat

second value

nfint

number of values

fmidfloat; default=(f1 + fnf) / 2.

the mid point to bias the array

TODO: does f1 need be be greater than f2/fnf???

commentstr; default=’’

a comment for the card

add_flutter(sid: int, method: str, density: int, mach: int, reduced_freq_velocity: int, imethod: str = 'L', nvalue: Optional[int] = None, omax: Optional[float] = None, epsilon: float = 0.001, comment: str = '', validate: bool = False) → pyNastran.bdf.cards.aero.dynamic_loads.FLUTTER

Creates a FLUTTER card, which is required for a flutter (SOL 145) analysis.

Parameters
sidint

flutter id

methodstr
valid methods = [K, KE,

PKS, PKNLS, PKNL, PKE]

densityint

defines a series of air densities in units of mass/volume PARAM,WTMASS does not affect this AERO affects this references an FLFACT id

machint

defines a series of the mach numbers references an FLFACT id

reduced_freq_velocityint
Defines a series of either:
  1. reduced frequencies - K, KE

  2. velocities - PK, PKNL, PKS, PKNLS

depending on the method chosen. references an FLFACT id

imethodstr; default=’L’

Choice of interpolation method for aerodynamic matrix interpolation. imethods :

  1. L - linear

  2. S - surface

  3. TCUB - termwise cubic

nvalueint

Number of eigenvalues beginning with the first eigenvalue for output and plots

omaxfloat

For the PKS and PKNLS methods, OMAX specifies the maximum frequency, in Hz., to be used in he flutter sweep. MSC only.

epsilonfloat; default=1.0e-3

Convergence parameter for k. Used in the PK and PKNL methods only

commentstr; default=’’

a comment for the card

add_force(sid, node, mag, xyz, cid=0, comment='') → pyNastran.bdf.cards.loads.static_loads.FORCE

Creates a FORCE card

Parameters
sidint

load id

nodeint

the node to apply the load to

magfloat

the load’s magnitude

xyz(3, ) float ndarray

the load direction in the cid frame

cidint; default=0

the coordinate system for the load

commentstr; default=’’

a comment for the card

add_force1(sid, node, mag, g1, g2, comment='') → pyNastran.bdf.cards.loads.static_loads.FORCE1

Creates a FORCE1 card

Parameters
sidint

load id

nodeint

the node to apply the load to

magfloat

the load’s magnitude

n1 / n2int / int

defines the load direction n = n2 - n1

commentstr; default=’’

a comment for the card

add_force2(sid, node, mag, g1, g2, g3, g4, comment='') → pyNastran.bdf.cards.loads.static_loads.FORCE2

Creates a FORCE2 card

Parameters
sidint

load id

nodeint

the node to apply the load to

magfloat

the load’s magnitude

g1 / g2 / g3 / g4int / int / int / int

defines the load direction n = (g2 - g1) x (g4 - g3)

commentstr; default=’’

a comment for the card

add_forceax(sid, ring_id, hid, scale, f_rtz, comment='') → pyNastran.bdf.cards.axisymmetric.loads.FORCEAX
add_freq(sid, freqs, comment='') → pyNastran.bdf.cards.dynamic.FREQ

Creates a FREQ card

Parameters
sidint

set id referenced by case control FREQUENCY

freqsList[float]

the frequencies for a FREQx object

commentstr; default=’’

a comment for the card

add_freq1(sid, f1, df, ndf=1, comment='') → pyNastran.bdf.cards.dynamic.FREQ1

Creates a FREQ1 card

Parameters
sidint

set id referenced by case control FREQUENCY

f1float

first frequency

dffloat

frequency increment

ndfint; default=1

number of frequency increments

commentstr; default=’’

a comment for the card

add_freq2(sid, f1, f2, nf=1, comment='') → pyNastran.bdf.cards.dynamic.FREQ2

Creates a FREQ2 card

Parameters
sidint

set id referenced by case control FREQUENCY

f1float

first frequency

f2float

last frequency

nfint; default=1

number of logorithmic intervals

commentstr; default=’’

a comment for the card

add_freq3(sid, f1, f2=None, Type='LINEAR', nef=10, cluster=1.0, comment='') → pyNastran.bdf.cards.dynamic.FREQ3

Creates a FREQ3 card

add_freq4(sid, f1=0.0, f2=1e+20, fspread=0.1, nfm=3, comment='') → pyNastran.bdf.cards.dynamic.FREQ4

Creates a FREQ4 card

Parameters
sidint

set id referenced by case control FREQUENCY

f1float; default=0.0

Lower bound of frequency range in cycles per unit time.

f2float; default=1E20

Upper bound of frequency range in cycles per unit time.

nfmint; default=3

Number of evenly spaced frequencies per ‘spread’ mode.

commentstr; default=’’

a comment for the card

add_freq5(sid, fractions, f1=0.0, f2=1e+20, comment='') → pyNastran.bdf.cards.dynamic.FREQ5

Creates a FREQ5 card

Parameters
sidint

set id referenced by case control FREQUENCY

f1float; default=0.0

Lower bound of frequency range in cycles per unit time.

f2float; default=1e20

Upper bound of frequency range in cycles per unit time.

fractionsList[float]

Fractions of the natural frequencies in the range F1 to F2.

commentstr; default=’’

a comment for the card

Notes

FREQ5 is only valid in modal frequency-response solutions (SOLs 111, 146, and 200) and is ignored in direct frequency response solutions.

add_genel_flexibility(eid, ul, ud, z, s=None) → pyNastran.bdf.cards.elements.elements.GENEL

creates a GENEL card using the flexiblity (Z) approach

add_genel_stiffness(eid, ul, ud, k, s=None) → pyNastran.bdf.cards.elements.elements.GENEL

creates a GENEL card using the stiffness (K) approach

add_gmcurv(curve_id, group, data, cid_in=0, cid_bc=0, comment='') → pyNastran.bdf.cards.parametric.geometry.GMCURV
add_gmspc(conid, component, entity, entity_id, comment='') → pyNastran.bdf.cards.constraints.GMSPC

Creates a GMSPC card

add_gmsurf(curve_id, group, data, cid_in=0, cid_bc=0, comment='') → pyNastran.bdf.cards.parametric.geometry.GMSURF
add_grav(sid, scale, N, cid=0, mb=0, comment='') → pyNastran.bdf.cards.loads.static_loads.GRAV

Creates an GRAV card

Parameters
sidint

load id

scalefloat

scale factor for load

N(3, ) float ndarray

the acceleration vector in the cid frame

cidint; default=0

the coordinate system for the load

mbint; default=0

???

commentstr; default=’’

a comment for the card

add_grdset(cp: int, cd: int, ps: str, seid: int, comment: str = '') → pyNastran.bdf.cards.nodes.GRDSET

Creates the GRDSET card

Parameters
cpint; default=0

the xyz coordinate frame

cdint; default=0

the analysis coordinate frame

psstr; default=’’

Additional SPCs in the analysis coordinate frame (e.g. ‘123’). This corresponds to DOF set SG.

seidint; default=0

superelement id TODO: how is this used by Nastran???

commentstr; default=’’

a comment for the card

add_grid(nid: int, xyz: Union[None, List[float], Any], cp: int = 0, cd: int = 0, ps: str = '', seid: int = 0, comment: str = '') → pyNastran.bdf.cards.nodes.GRID

Creates the GRID card

Parameters
nidint

node id

cpint; default=0

the xyz coordinate frame

xyz(3, ) float ndarray; default=None -> [0., 0., 0.]

the xyz/r-theta-z/rho-theta-phi values

cdint; default=0

the analysis coordinate frame

psstr; default=’’

Additional SPCs in the analysis coordinate frame (e.g. ‘123’). This corresponds to DOF set SG.

seidint; default=0

superelement id TODO: how is this used by Nastran???

commentstr; default=’’

a comment for the card

add_group(group_id: int, nodes, elements, properties, comment: str = '') → pyNastran.bdf.cards.optimization_nx.GROUP
add_gust(sid, dload, wg, x0, V=None, comment='') → pyNastran.bdf.cards.aero.dynamic_loads.GUST

Creates a GUST card, which defines a stationary vertical gust for use in aeroelastic response analysis.

Parameters
sidint

gust load id

dloadint

TLOADx or RLOADx entry that defines the time/frequency dependence

wgfloat

Scale factor (gust velocity/forward velocity) for gust velocity

x0float

Streamwise location in the aerodynamic coordinate system of the gust reference point.

Vfloat; default=None
floatvelocity of the vehicle (must be the same as the

velocity on the AERO card)

None : ???

commentstr; default=’’

a comment for the card

add_load(sid, scale, scale_factors, load_ids, comment='') → pyNastran.bdf.cards.loads.static_loads.LOAD

Creates a LOAD card

Parameters
sidint

load id

scalefloat

overall scale factor

scale_factorsList[float]

individual scale factors (corresponds to load_ids)

load_idsList[int]

individual load_ids (corresponds to scale_factors)

commentstr; default=’’

a comment for the card

add_loadcyh(sid, scale, hid, htype, scales, load_ids, comment='') → pyNastran.bdf.cards.loads.loads.LOADCYH

Creates a LOADCYH card

add_loadcyn(sid, scale, segment_id, scales, load_ids, segment_type=None, comment='') → pyNastran.bdf.cards.loads.loads.LOADCYN

Creates a LOADCYN card

add_lseq(sid, excite_id, lid, tid=None, comment='') → pyNastran.bdf.cards.loads.loads.LSEQ

Creates a LSEQ card

Parameters
sidint

loadset id; LOADSET points to this

excite_idint

set id assigned to this static load vector

lidint

load set id of a set of static load entries; LOAD in the Case Control

tidint; default=None

temperature set id of a set of thermal load entries; TEMP(LOAD) in the Case Control

commentstr; default=’’

a comment for the card

add_mat1(mid, E, G, nu, rho=0.0, a=0.0, tref=0.0, ge=0.0, St=0.0, Sc=0.0, Ss=0.0, mcsid=0, comment='') → pyNastran.bdf.cards.materials.MAT1

Creates a MAT1 card

Parameters
midint

material id

Efloat / None

Young’s modulus

Gfloat / None

Shear modulus

nufloat / None

Poisson’s ratio

rhofloat; default=0.

density

afloat; default=0.

coefficient of thermal expansion

treffloat; default=0.

reference temperature

gefloat; default=0.

damping coefficient

St / Sc / Ssfloat; default=0.

tensile / compression / shear allowable

mcsidint; default=0

material coordinate system id used by PARAM,CURV

commentstr; default=’’

a comment for the card

If E, G, or nu is None (only 1), it will be calculated
add_mat10(mid, bulk, rho, c, ge=0.0, gamma=None, table_bulk=None, table_rho=None, table_ge=None, table_gamma=None, comment='') → pyNastran.bdf.cards.materials.MAT10

Creates a MAT10 card

Parameters
midint

material id

bulkfloat; default=None

Bulk modulus

rhofloat; default=None

Density

cfloat; default=None

Speed of sound

gefloat; default=0.

Damping

gammafloat; default=None

NX : ratio of imaginary bulk modulus to real bulk modulus; default=0.0 MSC : normalized admittance coefficient for porous material

table_bulkint; default=None

TABLEDx entry defining bulk modulus vs. frequency None for MSC Nastran

table_rhoint; default=None

TABLEDx entry defining rho vs. frequency None for MSC Nastran

table_geint; default=None

TABLEDx entry defining ge vs. frequency None for MSC Nastran

table_gammaint; default=None

TABLEDx entry defining gamma vs. frequency None for MSC Nastran

commentstr; default=’’

a comment for the card

add_mat11(mid, e1, e2, e3, nu12, nu13, nu23, g12, g13, g23, rho=0.0, a1=0.0, a2=0.0, a3=0.0, tref=0.0, ge=0.0, comment='') → pyNastran.bdf.cards.materials.MAT11

Creates a MAT11 card

add_mat2(mid, G11, G12, G13, G22, G23, G33, rho=0.0, a1=None, a2=None, a3=None, tref=0.0, ge=0.0, St=None, Sc=None, Ss=None, mcsid=None, comment='') → pyNastran.bdf.cards.materials.MAT2

Creates an MAT2 card

add_mat3(mid, ex, eth, ez, nuxth, nuthz, nuzx, rho=0.0, gzx=None, ax=0.0, ath=0.0, az=0.0, tref=0.0, ge=0.0, comment='') → pyNastran.bdf.cards.materials.MAT3

Creates a MAT3 card

add_mat3d(mid, e1, e2, e3, nu12, nu13, nu23, g12, g13, g23, rho=0.0, comment='') → pyNastran.bdf.cards.materials.MAT3D

This is a VABS specific card that is almost identical to the MAT11.

add_mat4(mid, k, cp=0.0, rho=1.0, H=None, mu=None, hgen=1.0, ref_enthalpy=None, tch=None, tdelta=None, qlat=None, comment='') → pyNastran.bdf.cards.materials.MAT4

Creates a MAT4 card

add_mat5(mid, kxx=0.0, kxy=0.0, kxz=0.0, kyy=0.0, kyz=0.0, kzz=0.0, cp=0.0, rho=1.0, hgen=1.0, comment='') → pyNastran.bdf.cards.materials.MAT5

Creates a MAT5 card

add_mat8(mid, e11, e22, nu12, g12=0.0, g1z=100000000.0, g2z=100000000.0, rho=0.0, a1=0.0, a2=0.0, tref=0.0, Xt=0.0, Xc=None, Yt=0.0, Yc=None, S=0.0, ge=0.0, F12=0.0, strn=0.0, comment='') → pyNastran.bdf.cards.materials.MAT8

Creates a MAT8 card

add_mat9(mid, G11=0.0, G12=0.0, G13=0.0, G14=0.0, G15=0.0, G16=0.0, G22=0.0, G23=0.0, G24=0.0, G25=0.0, G26=0.0, G33=0.0, G34=0.0, G35=0.0, G36=0.0, G44=0.0, G45=0.0, G46=0.0, G55=0.0, G56=0.0, G66=0.0, rho=0.0, A=None, tref=0.0, ge=0.0, comment='') → pyNastran.bdf.cards.materials.MAT9

Creates a MAT9 card

add_matg(mid, idmem, behav, tabld, tablu, yprs, epl, gpl, gap=0.0, tab_yprs=None, tab_epl=None, tab_gpl=None, tab_gap=None, comment='') → pyNastran.bdf.cards.materials.MATG

Creates a MATG card

add_mathe(mid, model, bulk, mus, alphas, betas, mooney, sussbat, aboyce, gent, rho=0.0, texp=0.0, tref=0.0, ge=0.0, comment='') → pyNastran.bdf.cards.materials.MATHE

Creates a MATHE card

add_mathp(mid, a10=0.0, a01=0.0, d1=None, rho=0.0, av=0.0, tref=0.0, ge=0.0, na=1, nd=1, a20=0.0, a11=0.0, a02=0.0, d2=0.0, a30=0.0, a21=0.0, a12=0.0, a03=0.0, d3=0.0, a40=0.0, a31=0.0, a22=0.0, a13=0.0, a04=0.0, d4=0.0, a50=0.0, a41=0.0, a32=0.0, a23=0.0, a14=0.0, a05=0.0, d5=0.0, tab1=None, tab2=None, tab3=None, tab4=None, tabd=None, comment='') → pyNastran.bdf.cards.materials.MATHP

Creates a MATHP card

add_mats1(mid, tid, Type, h, hr, yf, limit1, limit2, comment='') → pyNastran.bdf.cards.material_deps.MATS1

Creates a MATS1 card

add_matt1(mid, e_table=None, g_table=None, nu_table=None, rho_table=None, a_table=None, ge_table=None, st_table=None, sc_table=None, ss_table=None, comment='') → pyNastran.bdf.cards.material_deps.MATT1

Creates a MATT1 card

add_matt2(mid, g11_table=None, g12_table=None, g13_table=None, g22_table=None, g23_table=None, g33_table=None, rho_table=None, a1_table=None, a2_table=None, a3_table=None, ge_table=None, st_table=None, sc_table=None, ss_table=None, comment='') → pyNastran.bdf.cards.material_deps.MATT2

Creates a MATT2 card

add_matt3(mid, ex_table=None, eth_table=None, ez_table=None, nuth_table=None, nuxz_table=None, rho_table=None, gzx_table=None, ax_table=None, ath_table=None, az_table=None, ge_table=None, comment='') → pyNastran.bdf.cards.material_deps.MATT3

Creates a MATT3 card

add_matt4(mid, k_table=None, cp_table=None, h_table=None, mu_table=None, hgen_table=None, comment='') → pyNastran.bdf.cards.material_deps.MATT4

Creates a MATT4 card

add_matt5(mid, kxx_table=None, kxy_table=None, kxz_table=None, kyy_table=None, kyz_table=None, kzz_table=None, cp_table=None, hgen_table=None, comment='') → pyNastran.bdf.cards.material_deps.MATT5

Creates a MATT5 card

add_matt8(mid, e1_table=None, e2_table=None, nu12_table=None, g12_table=None, g1z_table=None, g2z_table=None, rho_table=None, a1_table=None, a2_table=None, xt_table=None, xc_table=None, yt_table=None, yc_table=None, s_table=None, ge_table=None, f12_table=None, comment='') → pyNastran.bdf.cards.material_deps.MATT8

Creates a MATT8 card

add_matt9(mid, g11_table=None, g12_table=None, g13_table=None, g14_table=None, g15_table=None, g16_table=None, g22_table=None, g23_table=None, g24_table=None, g25_table=None, g26_table=None, g33_table=None, g34_table=None, g35_table=None, g36_table=None, g44_table=None, g45_table=None, g46_table=None, g55_table=None, g56_table=None, g66_table=None, rho_table=None, a1_table=None, a2_table=None, a3_table=None, a4_table=None, a5_table=None, a6_table=None, ge_table=None, comment='') → pyNastran.bdf.cards.material_deps.MATT9
add_mdlprm(mdlprm_dict: Dict[str, Union[int, float]], comment: str = '') → pyNastran.bdf.cards.params.MDLPRM

Creates a MDLPRM card

Parameters
mdlprm_dictDict[name, value]
namestr

the name of the MDLPRM

value: int/float

varies depending on the type of MDLPRM

commentstr; default=’’

a comment for the card

add_mkaero1(machs: List[float], reduced_freqs: List[float], comment: str = '') → pyNastran.bdf.cards.aero.dynamic_loads.MKAERO1

Creates an MKAERO1 card, which defines a set of mach and reduced frequencies.

Parameters
machsList[float]

series of Mach numbers

reduced_freqsList[float]

series of reduced frequencies

commentstr; default=’’

a comment for the card

add_mkaero2(machs, reduced_freqs, comment='') → pyNastran.bdf.cards.aero.dynamic_loads.MKAERO2

Creates an MKAERO2 card, which defines a set of mach and reduced frequency pairs.

Parameters
machsList[float]

series of Mach numbers

reduced_freqsList[float]

series of reduced frequencies

commentstr; default=’’

a comment for the card

add_modtrak() → pyNastran.bdf.cards.methods.MODTRAK
add_moment(sid, node, mag, xyz, cid=0, comment='') → pyNastran.bdf.cards.loads.static_loads.MOMENT

Creates a MOMENT card

Parameters
sidint

load id

nodeint

the node to apply the load to

magfloat

the load’s magnitude

cidint; default=0

the coordinate system for the load

xyz(3, ) float ndarray; default

the load direction in the cid frame

commentstr; default=’’

a comment for the card

add_moment1(sid, node, mag, g1, g2, comment='') → pyNastran.bdf.cards.loads.static_loads.MOMENT1

Creates a MOMENT1 card

Parameters
sidint

load id

nodeint

the node to apply the load to

magfloat

the load’s magnitude

n1 / n2int / int

defines the load direction n = n2 - n1

commentstr; default=’’

a comment for the card

add_moment2(sid, node, mag, g1, g2, g3, g4, comment='') → pyNastran.bdf.cards.loads.static_loads.MOMENT2

Creates a MOMENT2 card

Parameters
sidint

load id

nodeint

the node to apply the load to

magfloat

the load’s magnitude

g1 / g2 / g3 / g4int / int / int / int

defines the load direction n = (g2 - g1) x (g4 - g3)

commentstr; default=’’

a comment for the card

add_mondsp1(name, label, axes, aecomp_name, xyz, cp=0, cd=None, ind_dof='123', comment='') → pyNastran.bdf.cards.aero.aero.MONDSP1

Creates a MONDSP1 card

Parameters
namestr

Character string of up to 8 characters identifying the monitor point

labelstr

A string comprising no more than 56 characters that identifies and labels the monitor point.

axesstr

components {1,2,3,4,5,6}

aecomp_namestr

name of the AECOMP/AECOMPL entry

xyzList[float, float, float]; default=None

The coordinates in the CP coordinate system about which the loads are to be monitored. None : [0., 0., 0.]

cpint, CORDx; default=0

coordinate system of XYZ

cdint; default=None -> cp

the coordinate system for load outputs

ind_dofstr; default=’123’

the dofs to map

commentstr; default=’’

a comment for the card

Notes

MSC specific card

add_monpnt1(name: str, label: str, axes: str, aecomp_name: str, xyz: List[float], cp: int = 0, cd: Optional[int] = None, comment: str = '') → pyNastran.bdf.cards.aero.aero.MONPNT1

Creates a MONPNT1 card

Parameters
namestr

Character string of up to 8 characters identifying the monitor point

labelstr

A string comprising no more than 56 characters that identifies and labels the monitor point.

axesstr

components {1,2,3,4,5,6}

aecomp_namestr

name of the AECOMP/AECOMPL entry

xyzList[float, float, float]; default=None

The coordinates in the CP coordinate system about which the loads are to be monitored. None : [0., 0., 0.]

cpint, CORDx; default=0

int : coordinate system

cdint; default=None -> cp

the coordinate system for load outputs

commentstr; default=’’

a comment for the card

Notes

CD - MSC specific field

add_monpnt2(name, label, table, Type, nddl_item, eid, comment='') → pyNastran.bdf.cards.aero.aero.MONPNT2

Creates a MONPNT2 card

add_monpnt3(name, label, axes, grid_set, elem_set, xyz, cp=0, cd=None, xflag=None, comment='') → pyNastran.bdf.cards.aero.aero.MONPNT3

Creates a MONPNT3 card

add_mpc(conid: int, nodes: List[int], components: List[str], coefficients: List[float], comment: str = '') → pyNastran.bdf.cards.constraints.MPC

Creates an MPC card

Parameters
conidint

Case Control MPC id

nodesList[int]

GRID/SPOINT ids

componentsList[str]

the degree of freedoms to constrain (e.g., ‘1’, ‘123’)

coefficientsList[float]

the scaling coefficients

add_mpcadd(conid, sets, comment='') → pyNastran.bdf.cards.constraints.MPCADD

Creates an MPCADD card

add_nlparm(nlparm_id, ninc=None, dt=0.0, kmethod='AUTO', kstep=5, max_iter=25, conv='PW', int_out='NO', eps_u=0.01, eps_p=0.01, eps_w=0.01, max_div=3, max_qn=None, max_ls=4, fstress=0.2, ls_tol=0.5, max_bisect=5, max_r=20.0, rtol_b=20.0, comment='') → pyNastran.bdf.cards.dynamic.NLPARM

Creates an NLPARM card

add_nlpci(nlpci_id, Type='CRIS', minalr=0.25, maxalr=4.0, scale=0.0, desiter=12, mxinc=20, comment='') → pyNastran.bdf.cards.dynamic.NLPCI

Creates an NLPCI card

add_nlrsfd(sid, ga, gb, plane, bdia, blen, bclr, soln, visco, pvapco, nport, pres1, theta1, pres2, theat2, npnt, offset1, offset2) → None
add_nolin1(sid, gi, ci, s, gj, cj, t) → None
add_nolin2(sid, g, ci, s, gj, cj, gk, ck) → None
add_nolin3(sid, gi, ci, s, gj, cj, a) → None
add_nolin4(sid, gi, ci, s, gj, cj, a) → None
add_nsm(sid: int, nsm_type: str, pid_eid: int, value: float, comment: str = '') → pyNastran.bdf.cards.properties.mass.NSM

Creates an NSM card

Parameters
sidint

Case control NSM id

nsm_typestr

Type of card the NSM is applied to valid_properties = {

PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT

}

pid_eidList[int]; int

property id or element id depending on nsm_type

valueList[float]; float

the non-structural pass per unit length/area same length as pid_eid

commentstr; default=’’

a comment for the card

add_nsm1(sid: int, nsm_type: str, value: float, ids: List[int], comment: str = '') → pyNastran.bdf.cards.properties.mass.NSM1

Creates an NSM1 card

Parameters
sidint

Case control NSM id

nsm_typestr

Type of card the NSM is applied to valid_properties = {

PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT

}

valuefloat

the non-structural pass per unit length/area

idsList[int]

property ids or element ids depending on nsm_type

commentstr; default=’’

a comment for the card

add_nsmadd(sid: int, sets: List[int], comment: str = '') → pyNastran.bdf.cards.properties.mass.NSMADD

Creates an NSMADD card, which sum NSM sets

Parameters
sidint

the NSM Case Control value

setsList[int]

the NSM, NSM1, NSML, NSML1 values

commentstr; default=’’

a comment for the card

add_nsml(sid: int, nsm_type: str, pid_eid: int, value: float, comment: str = '') → pyNastran.bdf.cards.properties.mass.NSML

Creates an NSML card, which defines lumped non-structural mass

Parameters
sidint

Case control NSM id

nsm_typestr

Type of card the NSM is applied to valid_properties = {

PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT

}

pid_eidList[int]; int

property id or element id depending on nsm_type

valueList[float]; float

the non-structural pass per unit length/area same length as pid_eid

commentstr; default=’’

a comment for the card

add_nsml1(sid: int, nsm_type: str, value: float, ids: List[int], comment: str = '') → pyNastran.bdf.cards.properties.mass.NSML1

Creates an NSML1 card, which defines lumped non-structural mass

Parameters
sidint

Case control NSM id

nsm_typestr

Type of card the NSM is applied to valid_properties = {

PSHELL, PCOMP, PBAR, PBARL, PBEAM, PBEAML, PBCOMP, PROD, CONROD, PBEND, PSHEAR, PTUBE, PCONEAX, PRAC2D, ELEMENT

}

valuefloat

the non-structural pass per unit length/area

idsList[int]

property ids or element ids depending on nsm_type

commentstr; default=’’

a comment for the card

add_nxstrat(sid, params, comment='') → pyNastran.bdf.cards.materials.NXSTRAT

Creates an NXSTRAT card

add_omit1(ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.OMIT, pyNastran.bdf.cards.bdf_sets.OMIT1]

Creates an OMIT1 card, which defines the degree of freedoms that will be excluded (o-set) from the analysis set (a-set).

Parameters
idsList[int]

the GRID/SPOINT ids

componentsstr

the degree of freedoms to be omitted (e.g., ‘1’, ‘123’)

commentstr; default=’’

a comment for the card

add_paabsf(pid, tzreid=None, tzimid=None, s=1.0, a=1.0, b=0.0, k=0.0, rhoc=1.0, comment='')
add_pacabs(pid, cutfr, b, k, m, synth=True, tid_resistance=None, tid_reactance=None, tid_weight=None, comment='') → pyNastran.bdf.cards.elements.acoustic.PACBAR

Creates a PACABS card

Parameters
pidint

Property identification number.

synthbool; default=True

Request the calculation of B, K, and M from the tables TIDi below

tid_resistanceint; default=None

Identification of the TABLEDi entry that defines the resistance.

tid_reactanceint; default=None

Identification of the TABLEDi entry that defines the reactance.

tid_weightint; default=None

Identification of the TABLEDi entry that defines the weighting function.

cutfrfloat

Cutoff frequency for tables referenced above. (Real > 0.0)

B, K, Mfloat

Equivalent damping, stiffness and mass values per unit area. (Real > 0.0)

..note:: tables are defined as a function of frequency in cycles/time
add_pacbar(pid, mback, mseptm, freson, kreson, comment='') → pyNastran.bdf.cards.elements.acoustic.PACBAR

Creates a PACBAR card

Parameters
pidint

Property identification number. (Integer > 0)

mbackfloat

Mass per unit area of the backing material

mseptmfloat

Mass per unit area of the septum material

fresonfloat; default=None

Resonant frequency of the sandwich construction in hertz.

kresonfloat; default=None

Resonant stiffness of the sandwich construction.

add_paero1(pid, caero_body_ids=None, comment='') → pyNastran.bdf.cards.aero.aero.PAERO1

Creates a PAERO1 card, which defines associated bodies for the panels in the Doublet-Lattice method.

Parameters
pidint

PAERO1 id

caero_body_idsList[int]; default=None

CAERO2 ids that are within the same IGID group

commentstr; default=’’

a comment for the card

add_paero2(pid: int, orient: str, width: float, AR: float, thi: List[int], thn: List[int], lrsb: Optional[int] = None, lrib: Optional[int] = None, lth: Optional[int] = None, comment: str = '') → pyNastran.bdf.cards.aero.aero.PAERO2

Creates a PAERO2 card, which defines additional cross-sectional properties for the CAERO2 geometry.

Parameters
pidint

PAERO1 id

orientstr

Orientation flag. Type of motion allowed for bodies. Refers to the aerodynamic coordinate system of ACSID. See AERO entry. valid_orientations = {Z, Y, ZY}

widthfloat

Reference half-width of body and the width of the constant width interference tube

ARfloat

Aspect ratio of the interference tube (height/width)

thi / thnList[int]

The first (thi) and last (thn) interference element of a body to use the theta1/theta2 array

lrsbint; default=None
intAEFACT id containing a list of slender body half-widths

at the end points of the slender body elements

None : use width

lribint; default=None
intAEFACT id containing a list of interference body

half-widths at the end points of the interference elements

None : use width

lthList[int, int]; default=None

AEFACT ids for defining theta arrays for interference calculations for theta1/theta2; length=2

commentstr; default=’’

a comment for the card

add_paero3(pid, nbox, ncontrol_surfaces, x, y, comment='') → pyNastran.bdf.cards.aero.aero.PAERO3

Creates a PAERO3 card, which defines the number of Mach boxes in the flow direction and the location of cranks and control surfaces of a Mach box lifting surface.

Parameters
pidint

PAERO1 id

nboxint

Number of Mach boxes in the flow direction; 0 < nbox < 50

ncontrol_surfacesint

Number of control surfaces. (0, 1, or 2)

x / yList[float, None]

float : locations of points 5 through 12, which are in the aerodynamic coordinate system, to define the cranks and control surface geometry.

commentstr; default=’’

a comment for the card

add_paero4(pid, docs, caocs, gapocs, cla=0, lcla=0, circ=0, lcirc=0, comment='') → pyNastran.bdf.cards.aero.aero.PAERO4

Creates a PAERO4 card

add_paero5(pid: int, caoci: List[float], nalpha: int = 0, lalpha: int = 0, nxis: int = 0, lxis: int = 0, ntaus: int = 0, ltaus: int = 0, comment='') → pyNastran.bdf.cards.aero.aero.PAERO5

Creates a PAERO5 card

add_panel(names: List[str], set_ids: List[int]) → None
add_param(key: str, values: List[Union[int, float, str]], comment: str = '') → pyNastran.bdf.cards.params.PARAM
add_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='') → pyNastran.bdf.cards.properties.bars.PBAR

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

add_pbarl(pid: int, mid: int, Type: str, dim: List[float], group: str = 'MSCBML0', nsm: float = 0.0, comment: str = '') → pyNastran.bdf.cards.properties.bars.PBARL

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 valid_types = {

ROD, TUBE, 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

add_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='') → pyNastran.bdf.cards.properties.beam.PBCOMP

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

add_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='') → pyNastran.bdf.cards.properties.beam.PBEAM

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]; default=None -> [0.]*nxxb

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

add_pbeam3(pid, mid, A, iz, iy, iyz=0.0, j=None, nsm=0.0, cy=0.0, cz=0.0, dy=0.0, dz=0.0, ey=0.0, ez=0.0, fy=0.0, fz=0.0, comment='') → pyNastran.bdf.cards.properties.bars.PBEAM3

Creates a PBEAM3 card

add_pbeaml(pid, mid, beam_type, xxb, dims, so=None, nsm=None, group='MSCBML0', comment='') → pyNastran.bdf.cards.properties.beam.PBEAML

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

add_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='') → pyNastran.bdf.cards.properties.bars.PBEND

Creates a PBEND card

add_pbmsect(pid, mid, form, options, comment='') → pyNastran.bdf.cards.properties.beam.PBMSECT

Creates a PBMSECT card

add_pbrsect(pid, mid, form, options, comment='') → pyNastran.bdf.cards.properties.bars.PBRSECT

Creates a PBRSECT card

add_pbush(pid, k, b, ge, rcv=None, mass=None, comment='') → pyNastran.bdf.cards.properties.bush.PBUSH

Creates a PBUSH card, which defines a property for a CBUSH

Parameters
pidint

property id

kList[float]

Nominal stiffness values in directions 1 through 6. len(k) = 6

bList[float]

Nominal damping coefficients in direction 1 through 6 in units of force per unit velocity len(b) = 6

geList[float]

Nominal structural damping constant in directions 1 through 6. len(ge) = 6

rcvList[float]; default=None -> (None, None, None, None)

[sa, st, ea, et] = rcv length(rcv) = 4

massfloat; default=None

lumped mass of the CBUSH This is an MSC only parameter.

commentstr; default=’’

a comment for the card

add_pbush1d(pid: int, k: float = 0.0, c: float = 0.0, m: float = 0.0, sa: float = 0.0, se: float = 0.0, optional_vars=None, comment: str = '') → pyNastran.bdf.cards.properties.bush.PBUSH1D

Creates a PBUSH1D card

add_pbusht(pid: int, k_tables: List[int], b_tables: List[int], ge_tables: List[int], kn_tables: List[int], comment: str = '') → pyNastran.bdf.cards.properties.bush.PBUSHT

Creates a PBUSHT card

add_pcomp(pid, mids, thicknesses, thetas=None, souts=None, nsm=0.0, sb=0.0, ft=None, tref=0.0, ge=0.0, lam=None, z0=None, comment='') → pyNastran.bdf.cards.properties.shell.PCOMP

Creates a PCOMP card

Parameters
pidint

property id

midsList[int, …, int]

material ids for each ply

thicknessesList[float, …, float]

thicknesses for each ply

thetasList[float, …, float]; default=None

ply angle None : [0.] * nplies

soutsList[str, …, str]; default=None

should the stress? be printed; {YES, NO} None : [NO] * nplies

nsmfloat; default=0.

nonstructural mass per unit area

sbfloat; default=0.

Allowable shear stress of the bonding material. Used by the failure theory

ftstr; default=None

failure theory; {HILL, HOFF, TSAI, STRN, None}

treffloat; default=0.

reference temperature

gefloat; default=0.

structural damping

lamstr; default=None

symmetric flag; {SYM, MEM, BEND, SMEAR, SMCORE, None} None : not symmmetric

z0float; default=None

Distance from the reference plane to the bottom surface None : -1/2 * total_thickness

commentstr; default=’’

a comment for the card

add_pcompg(pid, global_ply_ids, mids, thicknesses, thetas=None, souts=None, nsm=0.0, sb=0.0, ft=None, tref=0.0, ge=0.0, lam=None, z0=None, comment='') → pyNastran.bdf.cards.properties.shell.PCOMPG

Creates a PCOMPG card

Parameters
pidint

property id

global_ply_idsList[int]

the ply id

midsList[int, …, int]

material ids for each ply

thicknessesList[float, …, float]

thicknesses for each ply

thetasList[float, …, float]; default=None

ply angle None : [0.] * nplies

soutsList[str, …, str]; default=None

should the stress? be printed; {YES, NO} None : [NO] * nplies

nsmfloat; default=0.

nonstructural mass per unit area

sbfloat; default=0.

Allowable shear stress of the bonding material. Used by the failure theory

ftstr; default=None

failure theory; {HILL, HOFF, TSAI, STRN, None}

treffloat; default=0.

reference temperature

gefloat; default=0.

structural damping

lamstr; default=None

symmetric flag; {SYM, MEM, BEND, SMEAR, SMCORE, None} None : not symmmetric

z0float; default=None

Distance from the reference plane to the bottom surface None : -1/2 * total_thickness

commentstr; default=’’

a comment for the card

add_pcomps(pid, global_ply_ids, mids, thicknesses, thetas, cordm=0, psdir=13, sb=None, nb=None, tref=0.0, ge=0.0, failure_theories=None, interlaminar_failure_theories=None, souts=None, comment='') → pyNastran.bdf.cards.properties.solid.PCOMPS

Creates a PCOMPS card

add_pconeax(pid, mid1, t1=None, mid2=0, i=None, mid3=None, t2=None, nsm=0.0, z1=None, z2=None, phi=None, comment='') → pyNastran.bdf.cards.axisymmetric.axisymmetric.PCONEAX

Creates a PCONEAX card

add_pconv(pconid, mid=None, form=0, expf=0.0, ftype=0, tid=None, chlen=None, gidin=None, ce=0, e1=None, e2=None, e3=None, comment='') → pyNastran.bdf.cards.thermal.thermal.PCONV

Creates a PCONV card

Parameters
pconidint

Convection property ID

midint; default=None

Material ID

formint; default=0

Type of formula used for free convection Must be {0, 1, 10, 11, 20, or 21}

expffloat; default=0.0

Free convection exponent as implemented within the context of the particular form that is chosen

ftypeint; default=0

Formula type for various configurations of free convection

tidint; default=None

Identification number of a TABLEHT entry that specifies the two variable tabular function of the free convection heat transfer coefficient

chlenfloat; default=None

Characteristic length

gidinint; default=None

Grid ID of the referenced inlet point

ceint; default=0

Coordinate system for defining orientation vector.

e1 / e2 / e3List[float]; default=None

Components of the orientation vector in coordinate system CE. The origin of the orientation vector is grid point G1

commentstr; default=’’

a comment for the card

add_pconvm(pconid, mid, coef, form=0, flag=0, expr=0.0, exppi=0.0, exppo=0.0, comment='') → pyNastran.bdf.cards.thermal.thermal.PCONVM

Creates a PCONVM card

Parameters
pconidint

Convection property ID

mid: int

Material ID

coef: float

Constant coefficient used for forced convection

form: int; default=0

Type of formula used for free convection Must be {0, 1, 10, 11, 20, or 21}

flag: int; default=0

Flag for mass flow convection

expr: float; default=0.0

Reynolds number convection exponent

exppi: float; default=0.0

Prandtl number convection exponent for heat transfer into the working fluid

exppo: float; default=0.0

Prandtl number convection exponent for heat transfer out of the working fluid

commentstr; default=’’

a comment for the card

add_pdamp(pid: int, b: float, comment: str = '') → pyNastran.bdf.cards.properties.damper.PDAMP

Creates a PDAMP card

add_pdamp5(pid: int, mid: int, b: float, comment: str = '') → pyNastran.bdf.cards.properties.damper.PDAMP5

Creates a PDAMP5 card

add_pdampt(pid: int, tbid: int, comment: str = '') → pyNastran.bdf.cards.properties.damper.PDAMPT

Creates a PDAMPT card

add_pelas(pid: int, k: float, ge: float = 0.0, s: float = 0.0, comment: str = '') → pyNastran.bdf.cards.properties.springs.PELAS

Creates a PELAS card

Parameters
pidint

property id

kfloat

spring stiffness

geint; default=0.0

damping coefficient

sfloat; default=0.0

stress coefficient

commentstr; default=’’

a comment for the card

add_pelast(pid: int, tkid: int = 0, tgeid: int = 0, tknid: int = 0, comment: str = '') → pyNastran.bdf.cards.properties.springs.PELAST

Creates a PELAST card

Parameters
pidint

property id

tkidfloat

TABLEDx that defines k vs. frequency

tgeidint; default=0

TABLEDx that defines ge vs. frequency

sfloat; default=0.

TABLEDx that defines force vs. displacement

commentstr; default=’’

a comment for the card

add_pfast(pid, d, kt1, kt2, kt3, mcid=-1, mflag=0, kr1=0.0, kr2=0.0, kr3=0.0, mass=0.0, ge=0.0, comment='') → pyNastran.bdf.cards.properties.properties.PFAST

Creates a PAST card

Parameters
pidint

property id

dint

diameter of the fastener

kt1, kt2, kt3float

stiffness values in directions 1-3

mcidint; default=01

specifies the element stiffness coordinate system

mflagint; default=0

0-absolute; 1-relative

kr1, kr2, kr3float; default=0.0

rotational stiffness values in directions 1-3

massfloat; default=0.0

lumped mass of the fastener

gefloat; default=0.0

structural damping

commentstr; default=’’

a comment for the card

add_pgap(pid: int, u0: float = 0.0, f0: float = 0.0, ka: float = 100000000.0, kb: Optional[float] = None, mu1: float = 0.0, kt: Optional[float] = None, mu2: Optional[float] = None, tmax: float = 0.0, mar: float = 100.0, trmin: float = 0.001, comment: str = '') → pyNastran.bdf.cards.properties.properties.PGAP

Defines the properties of the gap element (CGAP entry).

Parameters
pidint

property id for a CGAP

u0float; default=0.

Initial gap opening

f0float; default=0.

Preload

kafloat; default=1.e8

Axial stiffness for the closed gap

kbfloat; default=None -> 1e-14 * ka

Axial stiffness for the open gap

mu1float; default=0.

Coefficient of static friction for the adaptive gap element or coefficient of friction in the y transverse direction for the nonadaptive gap element

ktfloat; default=None -> mu1*ka

Transverse stiffness when the gap is closed

mu2float; default=None -> mu1

Coefficient of kinetic friction for the adaptive gap element or coefficient of friction in the z transverse direction for the nonadaptive gap element

tmaxfloat; default=0.

Maximum allowable penetration used in the adjustment of penalty values. The positive value activates the penalty value adjustment

marfloat; default=100.

Maximum allowable adjustment ratio for adaptive penalty values KA and KT

trminfloat; default=0.001

Fraction of TMAX defining the lower bound for the allowable penetration

commentstr; default=’’

a comment for the card

add_phbdy(pid, af=None, d1=None, d2=None, comment='') → pyNastran.bdf.cards.thermal.thermal.PHBDY

Creates a PHBDY card

Parameters
eidint

element id

pidint

property id

afint

Area factor of the surface used only for CHBDYP element Must be {POINT, LINE, TUBE, ELCYL} TUBE : constant thickness of hollow tube

d1, d2float; default=None

Diameters associated with the surface Used with CHBDYP [ELCYL, TUBE, FTUBE] surface elements

commentstr; default=’’

a comment for the card

add_pihex(pid, mid, cordm=0, integ=None, stress=None, isop=None, fctn='SMECH', comment='') → pyNastran.bdf.cards.properties.solid.PIHEX

See also

PSOLID

add_pload(sid, pressure, nodes, comment='') → pyNastran.bdf.cards.loads.static_loads.PLOAD

Creates a PLOAD card, which defines a uniform pressure load on a shell/solid face or arbitrarily defined quad/tri face

Parameters
sidint

load id

pressurefloat

the pressure to apply

nodesList[int]

The nodes that are used to define the normal are defined using the same method as the CTRIA3/CQUAD4 normal. n = 3 or 4

commentstr; default=’’

a comment for the card

add_pload1(sid, eid, load_type, scale, x1, p1, x2=None, p2=None, comment='') → pyNastran.bdf.cards.loads.static_loads.PLOAD1

Creates a PLOAD1 card, which may be applied to a CBAR/CBEAM

Parameters
sidint

load id

eidint

element to apply the load to

load_typestr

type of load that’s applied valid_types = {FX, FY, FZ, FXE, FYE, FZE,

MX, MY, MZ, MXE, MYE, MZE}

scalestr

Determines scale factor for X1, X2. {LE, FR, LEPR, FRPR}

x1 / x2float / float

the starting/end position for the load application the default for x2 is x1

p1 / p2float / float

the magnitude of the load at x1 and x2 the default for p2 is p1

commentstr; default=’’

a comment for the card

Point Loadx1 == x2
Distributed Loadx1 != x2
add_pload2(sid, pressure, eids, comment='') → pyNastran.bdf.cards.loads.static_loads.PLOAD2

Creates a PLOAD2 card, which defines an applied load normal to the quad/tri face

Parameters
sidint

load id

pressurefloat

the pressure to apply to the elements

eidsList[int]

the elements to apply pressure to n < 6 or a continouus monotonic list of elements (e.g., [1, 2, …, 1000])

commentstr; default=’’

a comment for the card

add_pload4(sid, eids, pressures, g1=None, g34=None, cid=0, nvector=None, surf_or_line='SURF', line_load_dir='NORM', comment='') → pyNastran.bdf.cards.loads.static_loads.PLOAD4

Creates a PLOAD4 card

Parameters
sidint

the load id

eidsList[int, …]

shells : the range of element ids; must be sequential solids : must be length 1

pressuresList[float, float, float, float]

tri : must be length 4 (the last value should be the same as the 0th value) quad : must be length 4

g1int/None

only used for solid elements

g34int / None

only used for solid elements

cidint; default=0

the coordinate system for ???

nvector(3, ) float ndarray

blank : load acts normal to the face the local pressure vector

surf_or_linestr; default=’SURF’

SURF : surface load LINE : line load (only defined for QUADR, TRIAR) not supported

line_load_dirstr; default=’NORM’

direction of the line load (see surf_or_line); {X, Y, Z, TANG, NORM} not supported

commentstr; default=’’

a comment for the card

TODO: fix the way “pressures” works
add_ploadx1(sid, eid, pa, nids, pb=None, theta=0.0, comment='') → pyNastran.bdf.cards.axisymmetric.loads.PLOADX1

Creates a PLOADX1 card, which defines surface traction for axisymmetric elements.

Parameters
sidint

load id

eidint

element id (CQUADX, CTRIAX, or CTRIAX6)

nidsList[int, int]

Corner grid points. GA and GB are any two adjacent corner grid points of the element

pa / pbfloat / None

Surface traction at grid point GA or GB pb : default is None -> pa

thetafloat; default=0.0

Angle between surface traction and inward normal to the line segment.

commentstr; default=’’

a comment for the card

add_plotel(eid: int, nodes: List[int], comment: str = '') → pyNastran.bdf.cards.elements.elements.PLOTEL

Adds a PLOTEL card

Parameters
eidint

Element ID

nodesList[int, int]

Unique GRID point IDs

commentstr; default=’’

a comment for the card

add_plplane(pid, mid, cid=0, stress_strain_output_location='GRID', comment='') → pyNastran.bdf.cards.properties.shell.PLPLANE

Creates a PLPLANE card

add_plsolid(pid, mid, stress_strain='GRID', ge=0.0, comment='') → pyNastran.bdf.cards.properties.solid.PLSOLID

Creates a PLSOLID card

Parameters
pidint

property id

midint

material id

stress_strainstr

Location of stress and strain output valid types = {GRID, GAUSS}

gefloat; default=0.

damping coefficient

commentstr; default=’’

a comment for the card

add_pmass(pid: int, mass: float, comment: str = '') → pyNastran.bdf.cards.properties.mass.PMASS

Creates an PMASS card, which defines a mass applied to a single DOF

Parameters
pidint

Property id used by a CMASS1/CMASS3 card

massfloat

the mass to apply

commentstr; default=’’

a comment for the card

add_point(nid: int, xyz: Any, cp: int = 0, comment: str = '') → pyNastran.bdf.cards.nodes.POINT

Creates the POINT card

Parameters
nidint

node id

xyz(3, ) float ndarray; default=None -> [0., 0., 0.]

the xyz/r-theta-z/rho-theta-phi values

cpint; default=0

coordinate system for the xyz location

commentstr; default=’’

a comment for the card

add_pointax(nid, ringax, phi, comment='') → pyNastran.bdf.cards.axisymmetric.axisymmetric.POINTAX

Creates a POINTAX card

add_pplane(pid: int, mid: int, t: float = 0.0, nsm: float = 0.0, formulation_option: int = 0, comment: str = '') → pyNastran.bdf.cards.properties.shell.PPLANE

Creates a PPLANE card

add_prac2d(pid, mid, thick, iplane, nsm=0.0, gamma=0.5, phi=180.0, comment='') → pyNastran.bdf.cards.properties.properties.PRAC2D

Creates a PRAC2D card

add_prac3d(pid, mid, gamma=0.5, phi=180.0, comment='') → pyNastran.bdf.cards.properties.properties.PRAC3D

Creates a PRAC3D card

add_presax(sid, pressure, rid1, rid2, phi1=0.0, phi2=360.0, comment='') → pyNastran.bdf.cards.axisymmetric.loads.PRESAX

Creates a PRESAX card

add_prod(pid: int, mid: int, A: float, j: float = 0.0, c: float = 0.0, nsm: float = 0.0, comment: str = '') → pyNastran.bdf.cards.properties.rods.PROD

Creates a PROD card

Parameters
pidint

property id

midint

material id

Afloat

area

Jfloat; default=0.

polar moment of inertia

cfloat; default=0.

stress factor

nsmfloat; default=0.

nonstructural mass per unit length

commentstr; default=’’

a comment for the card

add_pset(idi, poly1, poly2, poly3, cid, typei, typeids, comment='') → pyNastran.bdf.cards.parametric.geometry.PSET

PSET ID POLY1 POLY2 POLY3 CID SETTYP ID

add_pshear(pid: int, mid: int, t: float, nsm: float = 0.0, f1: float = 0.0, f2: float = 0.0, comment: str = '') → pyNastran.bdf.cards.properties.shell.PSHEAR

Creates a PSHEAR card

Parameters
pidint

property id

midint

material id

tfloat

shear panel thickness

nsmfloat; default=0.

nonstructural mass per unit length

f1float; default=0.0

Effectiveness factor for extensional stiffness along edges 1-2 and 3-4

f2float; default=0.0

Effectiveness factor for extensional stiffness along edges 2-3 and 1-4

commentstr; default=’’

a comment for the card

add_pshell(pid, mid1=None, t=None, mid2=None, twelveIt3=1.0, mid3=None, tst=0.833333, nsm=0.0, z1=None, z2=None, mid4=None, comment='') → pyNastran.bdf.cards.properties.shell.PSHELL

Creates a PSHELL card

Parameters
pidint

property id

mid1int; default=None

defines membrane material defines element density (unless blank)

mid2int; default=None

defines bending material defines element density if mid1=None

mid3int; default=None

defines transverse shear material

mid4int; default=None

defines membrane-bending coupling material

twelveIt3float; default=1.0

Bending moment of inertia ratio, 12I/T^3. Ratio of the actual bending moment inertia of the shell, I, to the bending moment of inertia of a homogeneous shell, T^3/12. The default value is for a homogeneous shell.

nsmfloat; default=0.0

non-structural mass per unit area

z1 / z2float; default=None

fiber distance location 1/2 for stress/strain calculations z1 default : -t/2 if thickness is defined z2 default : t/2 if thickness is defined

commentstr; default=’’

a comment for the card

add_psolid(pid, mid, cordm=0, integ=None, stress=None, isop=None, fctn='SMECH', comment='') → pyNastran.bdf.cards.properties.solid.PSOLID

Creates a PSOLID card

Parameters
pidint

property id

midint

material id

cordmint; default=0

material coordinate system

integint; default=None

None-varies depending on element type 0, ‘BUBBLE’ 1, ‘GAUSS’ 2, ‘TWO’ 3, ‘THREE’ REDUCED FULL

stressint/str; default=None

None/GRID, 1-GAUSS

isopint/str; default=None

0-REDUCED 1-FULL

fctnstr; default=’SMECH’

PFLUID/SMECH

commentstr; default=’’

a comment for the card

add_ptube(pid, mid, OD1, t=None, nsm=0.0, OD2=None, comment='') → pyNastran.bdf.cards.properties.rods.PTUBE

Adds a PTUBE card

Parameters
pidint

property id

midint

material id

OD1float

outer diameter at End A

tfloat; default=None -> OD1/2.

thickness

nsmfloat; default=0.

non-structural mass per unit length

OD2float; default=None -> OD1

outer diameter at End B

commentstr; default=’’

a comment for the card

add_pval(idi, poly1, poly2, poly3, cid, typei, typeids, comment='') → pyNastran.bdf.cards.parametric.geometry.PVAL

PVAL ID POLY1 POLY2 POLY3 CID SETTYP ID

add_pvisc(pid, ce, cr, comment='') → pyNastran.bdf.cards.properties.damper.PVISC

Creates a PVISC card

Parameters
pidint

property id for a CVISC

cefloat

Viscous damping values for extension in units of force per unit velocity

crfloat

Viscous damping values for rotation in units of moment per unit velocity.

commentstr; default=’’

a comment for the card

add_qbdy1(sid, qflux, eids, comment='') → pyNastran.bdf.cards.thermal.loads.QBDY1

Creates a QBDY1 card

add_qbdy2(sid, eid, qfluxs, comment='') → pyNastran.bdf.cards.thermal.loads.QBDY2

Creates a QBDY1 card

add_qbdy3(sid, Q0, cntrlnd, eids, comment='') → pyNastran.bdf.cards.thermal.loads.QBDY3

Creates a QBDY3 card

Parameters
sidint

Load set identification number. (Integer > 0)

q0float; default=None

Magnitude of thermal flux vector into face

control_idint; default=0

Control point

eidsList[int] or THRU

Element identification number of a CHBDYE, CHBDYG, or CHBDYP entry

commentstr; default=’’

a comment for the card

add_qhbdy(sid, flag, q0, grids, af=None, comment='') → pyNastran.bdf.cards.thermal.loads.QHBDY

Creates a QHBDY card

Parameters
sidint

load id

flagstr

valid_flags = {POINT, LINE, REV, AREA3, AREA4, AREA6, AREA8}

q0float

Magnitude of thermal flux into face. Q0 is positive for heat into the surface

affloat; default=None

Area factor depends on type

gridsList[int]

Grid point identification of connected grid points

commentstr; default=’’

a comment for the card

add_qset(ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.QSET, pyNastran.bdf.cards.bdf_sets.QSET1]

Creates a QSET/QSET1 card, which defines generalized degrees of freedom (q-set) to be used for dynamic reduction or component mode synthesis.

Parameters
idsList[int]

the GRID/SPOINT ids

componentsList[str]; str

the degree of freedoms to be created (e.g., ‘1’, ‘123’) if a list is passed in, a QSET is made if a str is passed in, a QSET1 is made

commentstr; default=’’

a comment for the card

add_qset1(ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.QSET, pyNastran.bdf.cards.bdf_sets.QSET1]

See also

add_qset

add_qvect(sid, q0, eids, t_source=None, ce=0, vector_tableds=None, control_id=0, comment='') → pyNastran.bdf.cards.thermal.loads.QVECT

Creates a QVECT card

Parameters
sidint

Load set identification number. (Integer > 0)

q0float; default=None

Magnitude of thermal flux vector into face

t_sourcefloat; default=None

Temperature of the radiant source

ceint; default=0

Coordinate system identification number for thermal vector flux

vector_tabledsList[int/float, int/float, int/float]
vectorfloat; default=0.0

directional cosines in coordinate system CE) of the thermal vector flux

tabledint

TABLEDi entry identification numbers defining the components as a function of time

control_idint; default=0

Control point

eidsList[int] or THRU

Element identification number of a CHBDYE, CHBDYG, or CHBDYP entry

commentstr; default=’’

a comment for the card

add_qvol(sid, qvol, control_point, elements, comment='') → pyNastran.bdf.cards.thermal.loads.QVOL

Creates a QVOL card

add_radbc(nodamb, famb, cntrlnd, eids, comment='') → pyNastran.bdf.cards.thermal.radiation.RADBC

Creates a RADBC card

add_radm(radmid, absorb, emissivity, comment='') → pyNastran.bdf.cards.thermal.radiation.RADM

Creates a RADM card

add_randps(sid, j, k, x=0.0, y=0.0, tid=0, comment='') → pyNastran.bdf.cards.loads.random_loads.RANDPS

Creates a RANDPS card

Parameters
sidint

random analysis set id defined by RANDOM in the case control deck

jint

Subcase id of the excited load set

kint

Subcase id of the applied load set k > j

x / yfloat; default=0.0

Components of the complex number

tidint; default=0

TABRNDi id that defines G(F)

commentstr; default=’’

a comment for the card

add_randt1(sid, n, t0, tmax, comment='') → pyNastran.bdf.cards.loads.random_loads.RANDT1

Creates a RANDT1 card

Parameters
sidint

random analysis set id defined by RANDOM in the case control deck

nint

???

t0int

???

tmaxfloat

???

commentstr; default=’’

a comment for the card

add_rbar(eid, nids, cna, cnb, cma, cmb, alpha=0.0, comment='') → pyNastran.bdf.cards.elements.rigid.RBAR

Creates a RBAR element

Parameters
eidint

element id

nidsList[int, int]

node ids; connected grid points at ends A and B

cna / cnbstr

independent DOFs in ‘123456’

cma / cmbstr

dependent DOFs in ‘123456’

alphafloat; default=0.0

coefficient of thermal expansion

commentstr; default=’’

a comment for the card

add_rbar1(eid, nids, cb, alpha=0.0, comment='') → pyNastran.bdf.cards.elements.rigid.RBAR1

Creates an RBAR1 element

add_rbe1(eid, Gni, Cni, Gmi, Cmi, alpha=0.0, comment='') → pyNastran.bdf.cards.elements.rigid.RBE1

Creates an RBE1 element

Parameters
eidint

element id

GniList[int]

independent node ids

CniList[str]

the independent components (e.g., ‘123456’)

GmiList[int]

dependent node ids

CmiList[str]

the dependent components (e.g., ‘123456’)

alphafloat; default=0.

thermal expansion coefficient

commentstr; default=’’

a comment for the card

add_rbe2(eid, gn, cm, Gmi, alpha: float = 0.0, tref: float = 0.0, comment='') → pyNastran.bdf.cards.elements.rigid.RBE2

Creates an RBE2 element

Parameters
eidint

element id

gnint

Identification number of grid point to which all six independent degrees-of-freedom for the element are assigned.

cmstr

Component numbers of the dependent degrees-of-freedom in the global coordinate system at grid points GMi.

GmiList[int]

dependent nodes

alphafloat; default=0.0

thermal expansion coefficient

treffloat; default=0.0

reference temperature

add_rbe3(eid: int, refgrid: int, refc: str, weights: List[float], comps: List[str], Gijs: List[int], Gmi=None, Cmi=None, alpha: float = 0.0, tref: float = 0.0, comment: str = '') → pyNastran.bdf.cards.elements.rigid.RBE3

Creates an RBE3 element

Parameters
eidint

element id

refgridint

dependent node

refc - str

dependent components for refgrid???

GiJsList[int, …, int]

independent nodes

compsList[str, …, str]

independent components

weightsList[float, …, float]

independent weights for the importance of the DOF

GmiList[int, …, int]; default=None -> []

dependent nodes / UM Set

CmiList[str, …, str]; default=None -> []

dependent components / UM Set

alphafloat; default=0.0

thermal expansion coefficient

treffloat; default=0.0

reference temperature

commentstr; default=’’

a comment for the card

add_rcross(sid, rtype1, id1, comp1, rtype2, id2, comp2, curid) → None
add_release(seid, comp, nids, comment='') → pyNastran.bdf.cards.superelements.RELEASE
add_rforce(sid, nid, scale, r123, cid=0, method=1, racc=0.0, mb=0, idrf=0, comment='') → pyNastran.bdf.cards.loads.loads.RFORCE

Creates an RFORCE card

add_rforce1(sid, nid, scale, group_id, cid=0, r123=None, racc=0.0, mb=0, method=2, comment='') → pyNastran.bdf.cards.loads.loads.RFORCE1

Creates an RFORCE1 card

Parameters
sidint

load set id

nidint

grid point through which the rotation vector acts

scalefloat

scale factor of the angular velocity in revolutions/time

r123List[float, float, float] / (3, ) float ndarray

rectangular components of the rotation vector R that passes through point G

raccint; default=0.0

???

mbint; default=0

Indicates whether the CID coordinate system is defined in the main Bulk Data Section (MB = -1) or the partitioned superelement Bulk Data Section (MB = 0). Coordinate systems referenced in the main Bulk Data Section are considered stationary with respect to the assembly basic coordinate system.

group_idint

Group identification number. The GROUP entry referenced in the GROUPID field selects the grid points to which the load is applied.

cidint; default=0

Coordinate system defining the components of the rotation vector.

methodint; default=2

Method used to compute centrifugal forces due to angular velocity.

commentstr; default=’’

a comment for the card

add_rgyro(sid, asynci, refrot, unit, speed_low, speed_high, speed, comment='') → None

Creates an RGYRO card

add_ringax(nid, R, z, ps=None, comment='') → pyNastran.bdf.cards.axisymmetric.axisymmetric.RINGAX

Creates a RINGAX card

add_rload1(sid, excite_id, delay=0, dphase=0, tc=0, td=0, Type='LOAD', comment='') → pyNastran.bdf.cards.loads.dloads.RLOAD1

Creates an RLOAD1 card, which defienes a frequency-dependent load based on TABLEDs.

Parameters
sidint

load id

excite_idint

node id where the load is applied

delayint/float; default=None

the delay; if it’s 0/blank there is no delay float : delay in units of time int : delay id

dphaseint/float; default=None

the dphase; if it’s 0/blank there is no phase lag float : delay in units of time int : delay id

tcint/float; default=0

TABLEDi id that defines C(f) for all degrees of freedom in EXCITEID entry

tdint/float; default=0

TABLEDi id that defines D(f) for all degrees of freedom in EXCITEID entry

Typeint/str; default=’LOAD’

the type of load 0/LOAD 1/DISP 2/VELO 3/ACCE 4, 5, 6, 7, 12, 13 - MSC only

commentstr; default=’’

a comment for the card

add_rload2(sid, excite_id, delay=0, dphase=0, tb=0, tp=0, Type='LOAD', comment='') → pyNastran.bdf.cards.loads.dloads.RLOAD2

Creates a nRLOAD2 card, which defienes a frequency-dependent load based on TABLEDs.

Parameters
sidint

load id

excite_idint

node id where the load is applied

delayint/float; default=None

the delay; if it’s 0/blank there is no delay float : delay in units of time int : delay id

dphaseint/float; default=None

the dphase; if it’s 0/blank there is no phase lag float : delay in units of time int : delay id

tbint/float; default=0

TABLEDi id that defines B(f) for all degrees of freedom in EXCITEID entry

tcint/float; default=0

TABLEDi id that defines C(f) for all degrees of freedom in EXCITEID entry

tdint/float; default=0

TABLEDi id that defines D(f) for all degrees of freedom in EXCITEID entry

tpint/float; default=0

TABLEDi id that defines phi(f) for all degrees of freedom in EXCITEID entry

Typeint/str; default=’LOAD’

the type of load 0/LOAD 1/DISP 2/VELO 3/ACCE 4, 5, 6, 7, 12, 13 - MSC only

commentstr; default=’’

a comment for the card

add_rotord(sid, rstart, rstep, numstep, rids, rsets, rspeeds, rcords, w3s, w4s, rforces, brgsets, refsys='ROT', cmout=0.0, runit='RPM', funit='RPM', zstein='NO', orbeps=1e-06, roprt=0, sync=1, etype=1, eorder=1.0, threshold=0.02, maxiter=10, comment='') → pyNastran.bdf.cards.dynamic.ROTORD

Creates a ROTORD card

add_rotorg(sid, nids, comment='') → pyNastran.bdf.cards.dynamic.ROTORG

Creates a ROTORG card

add_rrod(eid, nids, cma='', cmb='', alpha=0.0, comment='') → pyNastran.bdf.cards.elements.rigid.RROD

Creates a RROD element

Parameters
eidint

element id

nidsList[int, int]

node ids; connected grid points at ends A and B

cma / cmbstr; default=’’

dependent DOFs

alphafloat; default=0.0

coefficient of thermal expansion

commentstr; default=’’

a comment for the card

add_rspint(rid, grida, gridb, gr, unit, table_id, comment='') → None

Creates an RSPINT card

add_rspline(eid, independent_nid, dependent_nids, dependent_components, diameter_ratio=0.1, comment='') → pyNastran.bdf.cards.elements.rigid.RSPLINE

Creates an RSPLINE card, which uses multipoint constraints for the interpolation of displacements at grid points

Parameters
eidint

element id

independent_nidint

the independent node id

dependent_nidsList[int]

the dependent node ids

dependent_componentsList[str]

Components to be constrained

diameter_ratiofloat; default=0.1

Ratio of the diameter of the elastic tube to the sum of the lengths of all segments

commentstr; default=’’

a comment for the card

add_rsscon(eid, rigid_type, shell_eid=None, solid_eid=None, a_solid_grids=None, b_solid_grids=None, shell_grids=None, comment='') → pyNastran.bdf.cards.elements.rigid.RSSCON

Creates an RSSCON card, which defines multipoint constraints to model clamped connections of shell-to-solid elements.

Parameters
eidint

element id

rigid_typestr

GRID/ELEM

shell/solid_eidint; default=None

the shell/solid element id (if rigid_type=ELEM)

shell/solid_gridsList[int, int]; default=None

the shell/solid node ids (if rigid_type=GRID)

commentstr; default=’’

a comment for the card

add_sebndry(seid_a, seid_b, ids, comment='') → pyNastran.bdf.cards.superelements.SEBNDRY
add_sebset(seid, ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.SEBSET, pyNastran.bdf.cards.bdf_sets.SEBSET1]

Creates an SEBSET/SEBSET1 card

add_sebset1(seid, ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.SEBSET, pyNastran.bdf.cards.bdf_sets.SEBSET1]

See also

add_secset

add_sebulk(seid, superelement_type, rseid, method='AUTO', tol=1e-05, loc='YES', unitno=None, comment='') → pyNastran.bdf.cards.superelements.SEBULK
add_seconct(seid_a: int, seid_b: int, tol: float, loc: str, nodes_a: List[int], nodes_b: List[int], comment: str = '') → pyNastran.bdf.cards.superelements.SECONCT
add_secset(seid, ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.SECSET, pyNastran.bdf.cards.bdf_sets.SECSET1]

Creates an SECSET/SECSET1 card

add_secset1(seid, ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.SECSET, pyNastran.bdf.cards.bdf_sets.SECSET1]

See also

add_secset

add_seelt(seid, ids, comment='') → pyNastran.bdf.cards.superelements.SEELT
add_seexcld(seid_a, seid_b, nodes, comment='') → pyNastran.bdf.cards.superelements.SEEXCLD
add_selabel(seid, label, comment='') → pyNastran.bdf.cards.superelements.SELABEL
add_seload(lid_s0, seid, lid_se, comment='') → pyNastran.bdf.cards.superelements.SELOAD
add_seloc(seid, nodes_seid, nodes0, comment='') → pyNastran.bdf.cards.superelements.SELOC

Creates an SELOC card, which transforms the superelement SEID from PA to PB. Basically, define two CORD1Rs.

Parameters
seidint

the superelement to transform

nodes_seidList[int, int, int]

the nodes in the superelement than define the resulting coordinate system

nodes0List[int, int, int]

the nodes in the superelement than define the starting coordinate system

commentstr; default=’’

a comment for the card

add_sempln(seid, p1, p2, p3, comment='') → pyNastran.bdf.cards.superelements.SEMPLN
add_senqset(set_id, n, comment='') → pyNastran.bdf.cards.superelements.SENQSET
add_seqgp(nids: List[int], seqids: List[Union[int, float]], comment: str = '') → pyNastran.bdf.cards.nodes.SEQGP

Creates the SEQGP card

Parameters
nidsint

the node ids

seqidint/float

the superelement id

commentstr; default=’’

a comment for the card

add_seqset(seid, ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.SEQSET, pyNastran.bdf.cards.bdf_sets.SEQSET1]

Creates an SEQSET card

add_seqset1(seid, ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.SEQSET, pyNastran.bdf.cards.bdf_sets.SEQSET1]

See also

add_secset

add_seset(seid, ids, comment='') → pyNastran.bdf.cards.bdf_sets.SESET

Creates an SEUSET card

add_sesup(nodes, Cs, comment='') → pyNastran.bdf.cards.constraints.SESUP

Creates an SESUP card

add_set1(sid, ids, is_skin=False, comment='') → pyNastran.bdf.cards.bdf_sets.SET1

Creates a SET1 card, which defines a list of structural grid points or element identification numbers.

Parameters
sidint

set id

idsList[int, str]

AECOMP, SPLINEx, PANEL : all grid points must exist XYOUTPUT : missing grid points are ignored The only valid string is THRU ids = [1, 3, 5, THRU, 10]

is_skinbool; default=False

if is_skin is used; ids must be empty

commentstr; default=’’

a comment for the card

add_set2(sid: int, macro: int, sp1: float, sp2: float, ch1: float, ch2: float, zmax: float = 0.0, zmin: float = 0.0, comment: str = '') → pyNastran.bdf.cards.bdf_sets.SET2

Creates a SET2 card, which defines a list of structural grid points in terms of aerodynamic macro elements.

Parameters
sidint

set id

macroint

the aerodynamic macro element id

sp1 / sp2float

lower/higher span division point defining the prism containing the set

ch1 / ch2float

lower/higher chord division point defining the prism containing the set

zmax / zminfloat; default=0.0/0.0

z-coordinate of top/bottom of the prism containing the set a zero value implies a value of infinity

commentstr; default=’’

a comment for the card

add_set3(sid: int, desc: str, ids: List[int], comment: str = '') → pyNastran.bdf.cards.bdf_sets.SET3

Creates a SET3 card

add_setree(seid, seids, comment='') → pyNastran.bdf.cards.superelements.SETREE
add_sload(sid, nids, mags, comment='') → pyNastran.bdf.cards.loads.loads.SLOAD

Creates an SLOAD (GRID/SPOINT load)

Parameters
sidint

load id

nidsint; List[int]

the GRID/SPOINT ids

magsfloat; List[float]

the load magnitude

commentstr; default=’’

a comment for the card

add_snorm(nid: int, normal: List[float], cid: int = 0, comment: str = '') → pyNastran.bdf.cards.elements.shell.SNORM
add_spc(conid: int, nodes: List[int], components: List[str], enforced: List[float], comment: str = '') → pyNastran.bdf.cards.constraints.SPC

Creates an SPC card, which defines the degree of freedoms to be constrained

Parameters
conidint

constraint id

nodesList[int]

GRID/SPOINT ids

componentsList[str]

the degree of freedoms to constrain (e.g., ‘1’, ‘123’)

enforcedList[float]

the constrained value for the given node (typically 0.0)

commentstr; default=’’

a comment for the card

Notes

len(nodes) == len(components) == len(enforced)

Warning

non-zero enforced deflection requires an SPCD as well

add_spc1(conid, components, nodes, comment='') → pyNastran.bdf.cards.constraints.SPC1

Creates an SPC1 card, which defines the degree of freedoms to be constrained to a value of 0.0

Parameters
conidint

constraint id

componentsstr

the degree of freedoms to constrain (e.g., ‘1’, ‘123’)

nodesList[int]

GRID/SPOINT ids

commentstr; default=’’

a comment for the card

add_spcadd(conid, sets, comment='') → pyNastran.bdf.cards.constraints.SPCADD

Creates a SPCADD card

add_spcax(conid, ringax, hid, component, enforced, comment='') → pyNastran.bdf.cards.constraints.SPCAX

Creates an SPCAX card

add_spcd(sid, nodes, components, enforced, comment='') → pyNastran.bdf.cards.loads.loads.SPCD

Creates an SPCD card, which defines the degree of freedoms to be set during enforced motion

Parameters
conidint

constraint id

nodesList[int]

GRID/SPOINT ids

componentsList[str]

the degree of freedoms to constrain (e.g., ‘1’, ‘123’)

enforcedList[float]

the constrained value for the given node (typically 0.0)

commentstr; default=’’

a comment for the card

Notes

len(nodes) == len(components) == len(enforced)

Warning

Non-zero enforced deflection requires an SPC/SPC1 as well. Yes, you really want to constrain the deflection to 0.0 with an SPC1 card and then reset the deflection using an SPCD card.

add_spline1(eid: int, caero: int, box1: int, box2: int, setg: int, dz: float = 0.0, method: str = 'IPS', usage: str = 'BOTH', nelements: int = 10, melements: int = 10, comment: str = '') → pyNastran.bdf.cards.aero.aero.SPLINE1

Creates a SPLINE1, which defines a surface spline.

Parameters
eidint

spline id

caeroint

CAEROx id that defines the plane of the spline

box1 / box2int

First/last box id that is used by the spline

setgint

SETx id that defines the list of GRID points that are used by the surface spline

dzfloat; default=0.0

linear attachment flexibility dz = 0.; spline passes through all grid points

methodstr; default=IPS

method for spline fit valid_methods = {IPS, TPS, FPS} IPS : Harder-Desmarais Infinite Plate Spline TPS : Thin Plate Spline FPS : Finite Plate Spline

usagestr; default=BOTH

Spline usage flag to determine whether this spline applies to the force transformation, displacement transformation, or both valid_usage = {FORCE, DISP, BOTH}

nelementsint; default=10

The number of FE elements along the local spline x-axis if using the FPS option

melementsint; default=10

The number of FE elements along the local spline y-axis if using the FPS option

commentstr; default=’’

a comment for the card

add_spline2(eid: int, caero: int, box1: int, box2: int, setg: int, dz: float = 0.0, dtor: float = 1.0, cid: int = 0, dthx: float = 0.0, dthy: float = 0.0, usage: str = 'BOTH', comment: str = '') → pyNastran.bdf.cards.aero.aero.SPLINE2

Creates a SPLINE2 card, which defines a beam spline.

Parameters
eidint

spline id

caeroint

CAEROx id that defines the plane of the spline

box1 / box2int

First/last box/body id that is used by the spline

setgint

SETx id that defines the list of GRID points that are used by the beam spline

dzfloat; default=0.0

linear attachment flexibility dz = 0.; spline passes through all grid points

dtorfloat; default=1.0

Torsional flexibility ratio (EI/GJ). Use 1.0 for bodies (CAERO2).

cidint; default=0

Rectangular coordinate system for which the y-axis defines the axis of the spline. Not used for bodies, CAERO2

dthxfloat; default=None

Rotational attachment flexibility. DTHX : Used for rotation about the spline’s x-axis (in-plane

bending rotations). It is not used for bodies (CAERO2).

DTHYUsed for rotation about the spline’s y-axis (torsion).

It is used for slope of bodies.

usagestr; default=BOTH

Spline usage flag to determine whether this spline applies to the force transformation, displacement transformation, or both valid_usage = {FORCE, DISP, BOTH}

commentstr; default=’’

a comment for the card

add_spline3(eid: int, caero: int, box_id: int, components: int, nodes: List[int], displacement_components: List[int], coeffs: List[float], usage: str = 'BOTH', comment: str = '') → pyNastran.bdf.cards.aero.aero.SPLINE3

Creates a SPLINE3 card, which is useful for control surface constraints.

Parameters
eidint

spline id

caeroint

CAEROx id that defines the plane of the spline

box_idint

Identification number of the aerodynamic box number.

componentsint

The component of motion to be interpolated. 3, 5 (CAERO1) 2, 3, 5, 6 (CAERO2) 3 (CAERO3) 3, 5, 6 (CAERO4) 3, 5, 6 (CAERO5) 1, 2, 3, 5, 6 (3D Geometry) 2-lateral displacement 3-transverse displacement 5-pitch angle 6-relative control angle for CAERO4/5; yaw angle for CAERO2

nodesList[int]

Grid point identification number of the independent grid point.

displacement_componentsList[int]

Component numbers in the displacement coordinate system. 1-6 (GRIDs) 0 (SPOINTs)

coeffsList[float]

Coefficient of the constraint relationship.

usagestr; default=BOTH

Spline usage flag to determine whether this spline applies to the force transformation, displacement transformation, or both valid_usage = {FORCE, DISP, BOTH}

commentstr; default=’’

a comment for the card

add_spline4(eid: int, caero: int, aelist: int, setg: int, dz: float, method: str, usage: str, nelements: int, melements: int, comment: str = '') → pyNastran.bdf.cards.aero.aero.SPLINE4

Creates a SPLINE4 card, which defines a curved Infinite Plate, Thin Plate, or Finite Plate Spline.

Parameters
eidint

spline id

caeroint

CAEROx id that defines the plane of the spline

box1 / box2int

First/last box id that is used by the spline

setgint

SETx id that defines the list of GRID points that are used by the surface spline

dzfloat; default=0.0

linear attachment flexibility dz = 0.; spline passes through all grid points

methodstr; default=IPS

method for spline fit valid_methods = {IPS, TPS, FPS} IPS : Harder-Desmarais Infinite Plate Spline TPS : Thin Plate Spline FPS : Finite Plate Spline

usagestr; default=BOTH

Spline usage flag to determine whether this spline applies to the force transformation, displacement transformation, or both valid_usage = {FORCE, DISP, BOTH}

nelements / melementsint; default=10

The number of FE elements along the local spline x/y-axis if using the FPS option

commentstr; default=’’

a comment for the card

add_spline5(eid, caero, aelist, setg, thx, thy, dz=0.0, dtor=1.0, cid=0, usage='BOTH', method='BEAM', ftype='WF2', rcore=None, comment='') → pyNastran.bdf.cards.aero.aero.SPLINE5

Creates a SPLINE5 card

add_spoint(ids: Union[int, List[int]], comment: str = '') → pyNastran.bdf.cards.nodes.SPOINTs

Creates the SPOINTs card that contains many SPOINTs

Parameters
idsList[int]

SPOINT ids

commentstr; default=’’

a comment for the card

add_suport(nodes, Cs, comment='') → pyNastran.bdf.cards.constraints.SUPORT

Creates a SUPORT card, which defines free-body reaction points. This is always active.

Parameters
nodesList[int]

the nodes to release

CsList[str]

components to support at each node

commentstr; default=’’

a comment for the card

add_suport1(conid, nodes, Cs, comment='') → pyNastran.bdf.cards.constraints.SUPORT1

Creates a SUPORT card, which defines free-body reaction points.

Parameters
conidint

Case Control SUPORT id

nodesList[int]

the nodes to release

CsList[str]

components to support at each node

commentstr; default=’’

a comment for the card

add_tabdmp1(tid, x, y, Type='G', comment='') → pyNastran.bdf.cards.bdf_tables.TABDMP1

Creates a TABDMP1 card

add_tabled1(tid: int, x: numpy.ndarray, y: numpy.ndarray, xaxis: str = 'LINEAR', yaxis: str = 'LINEAR', extrap: int = 0, comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLED1

Creates a TABLED1, which is a dynamic load card that is applied by the DAREA card

Parameters
tidint

table id

xList[float]

nvalues

yList[float]

nvalues

xaxisstr

LINEAR, LOG

yaxisstr

LINEAR, LOG

extrapint; default=0
Extrapolation method:

0 : linear 1 : constant

Note

this is NX specific

commentstr; default=’’

a comment for the card

add_tabled2(tid: int, x1: float, x: numpy.ndarray, y: numpy.ndarray, extrap: int = 0, comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLED2

Creates a TABLED2 card

add_tabled3(tid: int, x1: float, x2: float, x: numpy.ndarray, y: numpy.ndarray, extrap: int = 0, comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLED3

Creates a TABLED3 card

add_tabled4(tid: int, x1: float, x2: float, x3: float, x4: float, a: List[float], comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLED4

Creates a TABLED4 card

add_tableh1(tid: int, x, y, comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLEH1
add_tableht(tid: int, x, y, comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLEHT
add_tablem1(tid: int, x: numpy.ndarray, y: numpy.ndarray, xaxis: str = 'LINEAR', yaxis: str = 'LINEAR', extrap: int = 0, comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLEM1

Creates a TABLEM1 card

add_tablem2(tid: int, x1: float, x: numpy.ndarray, y: numpy.ndarray, extrap: int = 0, comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLEM2

Creates a TABLEM2 card

add_tablem3(tid: int, x1: float, x2: float, x: numpy.ndarray, y: numpy.ndarray, extrap: int = 0, comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLEM3

Creates a TABLEM3 card

add_tablem4(tid: int, x1: float, x2: float, x3: float, x4: float, a: List[float], comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLEM4

Creates a TABLEM4 card

add_tables1(tid: int, x: numpy.ndarray, y: numpy.ndarray, Type: int = 1, comment: str = '') → pyNastran.bdf.cards.bdf_tables.TABLES1

Adds a TABLES1 card, which defines a stress dependent material

Parameters
tidint

Table ID

Typeint; default=1

Type of stress-strain curve (1 or 2) 1 - Cauchy (true) stress vs. total true strain 2 - Cauchy (true) stress vs. plastic true strain (MSC only)

x, yList[float]

table values

commentstr; default=’’

a comment for the card

add_tablest(tid, x, y, comment='') → pyNastran.bdf.cards.bdf_tables.TABLEST

Creates an TABLEST card

add_tabrnd1(tid, x, y, xaxis='LINEAR', yaxis='LINEAR', comment='') → pyNastran.bdf.cards.bdf_tables.TABRND1

Creates an TABRND1 card

add_tabrndg(tid, Type, LU, WG, comment='') → pyNastran.bdf.cards.bdf_tables.TABRNDG

Creates a TABRNDG card

Parameters
tidint

table id

Typeint

PSD type 1 : von Karman 2 : Dryden

LUfloat

Scale of turbulence divided by velocity (units of time)

WGfloat

Root-mean-square gust velocity

commentstr; default=’’

a comment for the card

add_temp(sid, temperatures, comment='') → pyNastran.bdf.cards.thermal.loads.TEMP

Creates a TEMP card

Parameters
sidint

Load set identification number

temperaturesdict[nid]
nidint

node id

temperaturefloat

the nodal temperature

commentstr; default=’’

a comment for the card

add_tempax(sid, ring, phi, temperature, comment='') → pyNastran.bdf.cards.axisymmetric.loads.TEMPAX

Creates a TEMPAX card

add_tempd(sid, temperature, comment='') → pyNastran.bdf.cards.thermal.loads.TEMPD

Creates a TEMPD card

Parameters
sidint

Load set identification number. (Integer > 0)

temperaturefloat

default temperature

commentstr; default=’’

a comment for the card

add_tf(sid, nid0, c, b0, b1, b2, nids, components, a, comment='') → pyNastran.bdf.cards.dynamic.TF

Creates a TF card

add_tic(sid, nodes, components, u0=0.0, v0=0.0, comment='') → pyNastran.bdf.cards.dynamic.TIC

Creates a TIC card

Parameters
sidint

Case Control IC id

nodesint / List[int]

the nodes to which apply the initial conditions

componentsint / List[int]

the DOFs to which apply the initial conditions

u0float / List[float]

Initial displacement.

v0float / List[float]

Initial velocity.

commentstr; default=’’

a comment for the card

add_tload1(sid, excite_id, tid, delay=0, Type='LOAD', us0=0.0, vs0=0.0, comment='') → pyNastran.bdf.cards.loads.dloads.TLOAD1

Creates a TLOAD1 card, which defienes a load based on a table

Parameters
sidint

load id

excite_idint

node id where the load is applied

tidint

TABLEDi id that defines F(t) for all degrees of freedom in EXCITEID entry float : MSC not supported

delayint/float; default=0

the delay; if it’s 0/blank there is no delay float : delay in units of time int : delay id

Typeint/str; default=’LOAD’

the type of load 0/LOAD 1/DISP 2/VELO 3/ACCE 4, 5, 6, 7, 12, 13 - MSC only

us0float; default=0.

Factor for initial displacements of the enforced degrees-of-freedom MSC only

vs0float; default=0.

Factor for initial velocities of the enforced degrees-of-freedom MSC only

commentstr; default=’’

a comment for the card

add_tload2(sid, excite_id, delay=0, Type='LOAD', T1=0.0, T2=None, frequency=0.0, phase=0.0, c=0.0, b=0.0, us0=0.0, vs0=0.0, comment='') → pyNastran.bdf.cards.loads.dloads.TLOAD2

Creates a TLOAD2 card, which defines a exponential time load

Parameters
sidint

load id

excite_idint

node id where the load is applied

delayint/float; default=None

the delay; if it’s 0/blank there is no delay float : delay in units of time int : delay id

Typeint/str; default=’LOAD’

the type of load 0/LOAD 1/DISP 2/VELO 3/ACCE 4, 5, 6, 7, 12, 13 - MSC only

T1float; default=0.

time constant (t1 > 0.0) times below this are ignored

T2float; default=None

time constant (t2 > t1) times above this are ignored

frequencyfloat; default=0.

Frequency in cycles per unit time.

phasefloat; default=0.

Phase angle in degrees.

cfloat; default=0.

Exponential coefficient.

bfloat; default=0.

Growth coefficient.

us0float; default=0.

Factor for initial displacements of the enforced degrees-of-freedom MSC only

vs0float; default=0.

Factor for initial velocities of the enforced degrees-of-freedom MSC only

commentstr; default=’’

a comment for the card

add_topvar(opt_id, label, ptype, xinit, pid, xlb=0.001, delxv=0.2, power=3.0) → pyNastran.bdf.cards.optimization.TOPVAR

adds a TOPVAR

add_trim(sid, mach, q, labels, uxs, aeqr=1.0, trim_type=1, comment='') → Union[pyNastran.bdf.cards.aero.static_loads.TRIM, pyNastran.bdf.cards.aero.static_loads.TRIM2]

Creates a TRIM/TRIM2 card for a static aero (144) analysis.

Parameters
sidint

the trim id; referenced by the Case Control TRIM field

machfloat

the mach number

qfloat

dynamic pressure

labelsList[str]

names of the fixed variables

uxsList[float]

values corresponding to labels

aeqrfloat

0.0 : rigid trim analysis 1.0 : elastic trim analysis (default)

trim_typeint

1 : creates a TRIM 2 : creates a TRIM2

commentstr; default=’’

a comment for the card

add_tstep(sid, N, DT, NO, comment='') → pyNastran.bdf.cards.dynamic.TSTEP

Creates a TSTEP card

add_tstep1(sid, tend, ninc, nout, comment='') → pyNastran.bdf.cards.dynamic.TSTEP1

Creates a TSTEP1 card

add_tstepnl(sid, ndt, dt, no, method='ADAPT', kstep=None, max_iter=10, conv='PW', eps_u=0.01, eps_p=0.001, eps_w=1e-06, max_div=2, max_qn=10, max_ls=2, fstress=0.2, max_bisect=5, adjust=5, mstep=None, rb=0.6, max_r=32.0, utol=0.1, rtol_b=20.0, min_iter=None, comment='') → pyNastran.bdf.cards.dynamic.TSTEPNL

Creates a TSTEPNL card

add_uset(name, ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.USET, pyNastran.bdf.cards.bdf_sets.USET1]

Creates a USET card, which defines a degrees-of-freedom set.

Parameters
namestr

SNAME Set name. (One to four characters or the word ‘ZERO’ followed by the set name.)

idsList[int]

the GRID/SPOINT ids

componentsList[str]

the degree of freedoms (e.g., ‘1’, ‘123’) if a list is passed in, a USET is made if a str is passed in, a USET1 is made

commentstr; default=’’

a comment for the card

add_uset1(name, ids, components, comment='') → Union[pyNastran.bdf.cards.bdf_sets.USET, pyNastran.bdf.cards.bdf_sets.USET1]

See also

add_uset

add_view(iview, icavity, shade='BOTH', nbeta=1, ngamma=1, dislin=0.0, comment='') → pyNastran.bdf.cards.thermal.radiation.VIEW

Creates a VIEW card

add_view3d(icavity, gitb=4, gips=4, cier=4, error_tol=0.1, zero_tol=1e-10, warp_tol=0.01, rad_check=3, comment='') → pyNastran.bdf.cards.thermal.radiation.VIEW3D

Creates a VIEW3D card

property caero_ids

gets the CAEROx ids

clear_attributes() → None

removes the attributes from the model

property coord_ids

gets the number of coordinate system ids

create_card_object(card_lines, card_name, is_list=True, has_none=True)

Creates a BDFCard object, which is really just a list that allows indexing past the last field

Parameters
card_lines: list[str]

the list of the card fields input is list of card_lines -> [‘GRID, 1, 2, 3.0, 4.0, 5.0’]

card_namestr

the card_name -> ‘GRID’

is_listbool; default=True

True : this is a list of fields False : this is a list of lines

has_nonebool; default=True

can there be trailing Nones in the card data (e.g. [‘GRID, 1, 2, 3.0, 4.0, 5.0, ‘])

Returns
card_objectBDFCard()

the card object representation of card

cardlist[str]

the card with empty fields removed

create_subcases(subcase_ids: Union[List[int], int, None] = None) → Dict[int, pyNastran.bdf.subcase.Subcase]

creates a series of subcases

cross_reference(xref: bool = True, xref_nodes: bool = True, xref_elements: bool = True, xref_nodes_with_elements: bool = False, xref_properties: bool = True, xref_masses: bool = True, xref_materials: bool = True, xref_loads: bool = True, xref_constraints: bool = True, xref_aero: bool = True, xref_sets: bool = True, xref_optimization: bool = True, word: str = '') → None

Links up all the cards to the cards they reference

Parameters
xrefbool; default=True

cross references the model

xref_nodesbool; default=True

set cross referencing of nodes/coords

xref_elementbool; default=True

set cross referencing of elements

xref_propertiesbool; default=True

set cross referencing of properties

xref_massesbool; default=True

set cross referencing of CMASS/PMASS

xref_materialsbool; default=True

set cross referencing of materials

xref_loadsbool; default=True

set cross referencing of loads

xref_constraintsbool; default=True

set cross referencing of constraints

xref_aerobool; default=True

set cross referencing of CAERO/SPLINEs

xref_setsbool; default=True

set cross referencing of SETx

wordstr; default=’’

model flag

To only cross-reference nodes:
.. code-block:: python

model = BDF() model.read_bdf(bdf_filename, xref=False) model.cross_reference(xref=True, xref_loads=False, xref_constraints=False,

xref_materials=False, xref_properties=False, xref_aero=False, xref_masses=False, xref_sets=False)

.. warning:: be careful if you call this method with False values
disable_cards(cards: Sequence[str]) → None

Method for removing broken cards from the reader

Parameters
cardsList[str]; Set[str]

a list/set of cards that should not be read

.. python ::

bdf_model.disable_cards([‘DMIG’, ‘PCOMP’])

property dmigs
property dmijis
property dmijs
property dmiks
property dmis
property element_ids

gets the element ids

export_hdf5_file(hdf5_file, exporter=None) → None

Converts the BDF objects into hdf5 object

Parameters
hdf5_fileH5File()

an h5py object

exporterHDF5Exporter; default=None

unused

export_hdf5_filename(hdf5_filename: str) → None

Converts the BDF objects into hdf5 object

Parameters
hdf5_filenamestr

the path to the hdf5 file

TODO: doesn’t support:
  • BucklingEigenvalues

geom_check(geom_check: bool, xref: bool) → None

what about xref?

get_MPCx_node_ids(mpc_id: int, consider_mpcadd: bool = True, stop_on_failure: bool = True) → List[List[int]]

see pyNastran.bdf.mesh_utils.mpc_dependency.get_mpc_node_ids(...)

get_MPCx_node_ids_c1(mpc_id: int, consider_mpcadd: bool = True, stop_on_failure: bool = True) → Tuple[Dict[str, List[int]], Dict[str, List[int]]]

see pyNastran.bdf.mesh_utils.mpc_dependency.get_mpc_node_ids_c1(...)

get_SPCx_node_ids(spc_id: int, consider_spcadd: bool = True, stop_on_failure: bool = True) → List[int]

Get the SPC/SPCADD/SPC1/SPCAX IDs.

Parameters
spc_idint

the SPC id

stop_on_failurebool; default=True

errors if parsing something new

Returns
node_idsList[int]

the constrained associated node ids

get_SPCx_node_ids_c1(spc_id: int, stop_on_failure: bool = True) → Dict[str, List[int]]

Get the SPC/SPCADD/SPC1/SPCAX IDs.

Parameters
spc_idint

the SPC id

stop_on_failurebool; default=True

errors if parsing something new

Returns
node_ids_c1Dict[component] = node_ids
componentstr

the DOF to constrain

node_idsList[int]

the constrained node ids

get_area_breakdown(property_ids=None, stop_if_no_area=True, sum_bar_area=True)

gets a breakdown of the area by property region

TODO: What about CONRODs? #’PBRSECT’, #’PBCOMP’, #’PBMSECT’, #’PBEAM3’, #’PBEND’, #’PIHEX’, #’PCOMPS’,

sum_bar_areabool; default=True

sum the areas for CBAR/CBEAM/CROD/CONROD/CTUBE elements True : get the area of the model by property id False : only get the cross sectional properties

get_bdf_cards(bulk_data_lines: List[str], bulk_data_ilines: Optional[Any] = None) → Tuple[Any, Any, Any]

Parses the BDF lines into a list of card_lines

get_bdf_cards_dict(bulk_data_lines, bulk_data_ilines=None)

Parses the BDF lines into a list of card_lines

get_bdf_stats(return_type: str = 'string') → Union[str, List[str]]

Print statistics for the BDF

Parameters
return_typestr (default=’string’)
the output type (‘list’, ‘string’)

‘list’ : list of strings ‘string’ : single, joined string

Returns
return_datastr, optional

the output data

Note

if a card is not supported and not added to the proper lists, this method will fail

Todo

RBE3s from OP2s can show up as ???s ..

get_card_ids_by_card_types(card_types: Optional[List[str]] = None, reset_type_to_slot_map: bool = False, stop_on_missing_card: bool = False, combine: bool = False) → Dict[str, List[int]]
Parameters
card_typesstr / List[str] / default=None

the list of keys to consider (list of strings; string) None : all cards

reset_type_to_slot_mapbool

should the mapping dictionary be rebuilt (default=False); set to True if you added cards

stop_on_missing_cardbool

crashes if you request a card and it doesn’t exist

combinebool; default=False

change out_dict into out_list combine the list of cards

Returns
out_dict: dict[str]=List[ids]

the key=card_type, value=the ID of the card object

out_list: List[ids]

value=the ID of the card object useful

Examples

>>> out_dict = model.get_card_ids_by_card_types(
    card_types=['GRID', 'CTRIA3', 'CQUAD4'], combine=False)
>>> out_dict = {
    'GRID' : [1, 2, 10, 42, 1000],
    'CTRIA3' : [1, 2, 3, 5],
    'CQUAD4' : [4],
}

shell elements

>>> out_dict = model.get_card_ids_by_card_types(
    card_types=['CTRIA3', 'CQUAD4'], combine=True)
>>> out_dict = {
    [1, 2, 3, 4, 5],
}
get_cards_by_card_types(card_types: List[str], reset_type_to_slot_map: bool = False, stop_on_missing_card: bool = False) → None
Parameters
card_typesList[str]

the list of keys to consider

reset_type_to_slot_mapbool

should the mapping dictionary be rebuilt (default=False); set to True if you added cards

stop_on_missing_cardbool

crashes if you request a card and it doesn’t exist

Returns
out_dictdict[str] = List[BDFCard()]

the key=card_type, value=the card object

get_custom_types() → Dict[str, Any]

helper method for dict_to_h5py

get_dependent_nid_to_components(mpc_id=None, stop_on_failure=True)

see pyNastran.bdf.mesh_utils.mpc_dependency.get_dependent_nid_to_components(...)

get_displacement_index() → Tuple[Any, Any, Dict[int, Any]]

Get index and transformation matricies for nodes with their output in coordinate systems other than the global. Used in combination with OP2.transform_displacements_to_global

Returns
nids_all(nnodes,) int ndarray

the GRID/SPOINT/EPOINT ids

nids_transformdict[cd]

the indicies in nids_all that correspond to cd > 0 cd : int

the CD coordinate system

nnodesiint

nnodesi <= nnodes

icd_transformdict{int cid

Dictionary from coordinate id to index of the nodes in self.point_ids that their output (CD) in that coordinate system.

Examples

# assume GRID 1 has a CD=10 # assume GRID 2 has a CD=10 # assume GRID 5 has a CD=50 >>> model.point_ids [1, 2, 5] >>> icd_transform = model.get_displacement_index() >>> icd_transform[10] [0, 1]

>>> icd_transform[50]
[2]
get_displacement_index_xyz_cp_cd(fdtype: str = 'float64', idtype: str = 'int32', sort_ids: bool = True) → Any

Get index and transformation matricies for nodes with their output in coordinate systems other than the global. Used in combination with OP2.transform_displacements_to_global

Parameters
fdtypestr; default=’float64’

the type of xyz_cp

idtypestr; default=’int32’

the type of nid_cp_cd

sort_idsbool; default=True

sort the ids

Returns
icd_transformdict{int cd

Dictionary from coordinate id to index of the nodes in self.point_ids that their output (CD) in that coordinate system.

icp_transformdict{int cp

Dictionary from coordinate id to index of the nodes in self.point_ids that their input (CP) in that coordinate system.

xyz_cp(n, 3) float ndarray

points in the CP coordinate system

nid_cp_cd(n, 3) int ndarray

node id, CP, CD for each node

Examples

# assume GRID 1 has a CD=10, CP=0 # assume GRID 2 has a CD=10, CP=0 # assume GRID 5 has a CD=50, CP=0 >>> model.point_ids [1, 2, 5] >>> out = model.get_displacement_index_xyz_cp_cd() >>> icd_transform, icp_transform, xyz_cp, nid_cp_cd = out >>> nid_cp_cd [

[1, 0, 10], [2, 0, 10], [5, 0, 50],

] >>> icd_transform[10] [0, 1]

>>> icd_transform[50]
[2]
get_dload_entries(sid: int, msg: str = '') → Union[TLOAD1, TLOAD2, RLOAD1, RLOAD2]

gets the dload entries (e.g., TLOAD1, TLOAD2)

get_element_faces(element_ids: Optional[List[int]] = None, allow_blank_nids: bool = True) → Any

Gets the elements and faces that are skinned from solid elements. This includes internal faces, but not existing shells.

Parameters
element_idsList[int] / None

skin a subset of element faces default=None -> all elements

allow_blank_nidsbool; default=True

allows for nids to be None

Returns
eid_faces(int, List[(int, int, …)])

value1 : element id value2 : face

get_element_ids_dict_with_pids(pids: Union[List[int], int, None] = None, stop_if_no_eids: bool = True, msg: str = '') → Dict[int, List[int]]

Gets all the element IDs with a specific property ID.

Parameters
pidsList[int] / int

list of property ID

stop_if_no_eidsbool; default=True

prevents crashing if there are no elements setting this to False really doesn’t make sense for non-DMIG models

Returns
element_idsdict[pid] = List[eid]

dictionary of lists by property pid : int

property id

eidint

element id

For example, we want all the elements with pids=[4, 5, 6],
but we want them in separate groups

Notes

What happens with CONRODs?

get_element_ids_list_with_pids(pids: Optional[List[int]] = None) → List[int]

Gets all the element IDs with a specific property ID.

Parameters
pidsList[int]; default=None -> all

list of property ID

Returns
element_idsList[int]

the element ids

For example, we want to get all the element ids with pids=[1, 2, 3]
get_elements_nodes_by_property_type(dtype: str = 'int32', save_element_types: bool = False) → Tuple[Dict[Tuple[str, int], Tuple[List[int], List[int]]]]

Gets a dictionary of (etype, pid) to [eids, node_ids]

Parameters
dtypestr; default=’int32’

the type of the integers

save_element_typesbool; default=False

adds the etype_to_eids_pids_nids output

Returns
etype_pid_to_eids_nidsdict[(etype, pid)]
etypestr

the element type

pidint

the property id CONRODS have a pid of 0

eids(neids, ) int ndarray

the elements with the property id of pid

nids(neids, nnodes/element) int ndarray

the nodes corresponding to the element

etype_to_eids_pids_nidsdict[etype]

Enabled by save_element_types; default=None etype : str

the element type

eids(neids, ) int ndarray

the elements with the property id of pid

pids(neids, ) int ndarray

the property ids CONRODS have a pid of 0

nids(neids, nnodes/element) int ndarray

the nodes corresponding to the element

get_elements_properties_nodes_by_element_type(dtype: str = 'int32', solids: Optional[Dict[str, Any]] = None, stop_if_no_eids: bool = True) → numpy.array

Gets a dictionary of element type to [eids, pids, node_ids]

Parameters
dtypestr; default=’int32’

the type of the integers

solidsdict[etype]
etypestr

the element type should only be CTETRA, CHEXA, CPENTA, CPYRAM

valuevaries
(nnodes_min, nnodes_max)Tuple(int, int)

the min/max number of nodes for the element

(nnodes, )Tuple(int, )

the number of nodes useful if you only have CTETRA4s or only want CTETRA10s fails if you’re wrong (and too low)

Returns
etype_to_eids_pids_nidsdict[etype]
etypestr

the element type

eids(neids, ) int ndarray

the elements with the property id of pid

pids(neids, ) int ndarray

the property ids CONRODS have a pid of 0

nids(neids, nnodes/element) int ndarray

the nodes corresponding to the element

get_encoding(encoding: Optional[str] = None) → str

gets the file encoding

get_h5attrs() → List[str]

helper method for dict_to_h5py

get_length_breakdown(property_ids=None, stop_if_no_length=True)

gets a breakdown of the length by property region

TODO: What about CONRODs?

get_mass_breakdown(property_ids: Optional[int] = None, stop_if_no_mass: bool = True, detailed: bool = False) → Dict[int, float]

Gets a breakdown of the mass by property region.

Parameters
property_idsList[int] / int

list of property ID

stop_if_no_massbool; default=True

prevents crashing if there are no elements setting this to False really doesn’t make sense for non-DMIG models

detailedbool, optional, default

Separates structural and nonstructural mass outputs.

Returns
pids_to_massdict {int

Map from property id to mass (structural mass only if detailed is True).

pids_to_mass_nonstructuraldict {int

Map from property id to nonstructural mass (only if detailed is True).

mass_type_to_massdict {str

Map from mass id to mass for mass elements.

TODO: What about CONRODs, CONM2s?
#’PBCOMP’,
#’PBMSECT’,
#’PBEAM3’,
#’PBEND’,
#’PIHEX’,
#’PCOMPS’,
get_material_id_to_property_ids_map(msg: str = '') → Dict[int, List[int]]

Returns a dictionary that maps a material ID to a list of properties

Returns
mid_to_pids_mapdict[int] = int

the mapping

msgstr; default=’’

a message added to the error message

Note

all properties require an mid to be counted (except for PCOMP, which has multiple mids)

get_material_ids() → Iterable[int]

gets the material ids

get_mklist() → numpy.ndarray

gets the MKLIST vector from MKAERO1/MKAERO2

get_mpcs(mpc_id: int, consider_mpcadd: bool = True, stop_on_failure: bool = True) → Tuple[List[int], List[str]]

see pyNastran.bdf.mesh_utils.mpc_dependency.get_mpcs(...)

get_nid_map(sort_ids: bool = True) → Dict[int, int]

Maps the GRID/SPOINT/EPOINT ids to a sorted/unsorted order.

Parameters
sort_idsbool; default=True

sort the ids

Returns
nid_mapDict[nid]
nidint

the GRID/SPOINT/EPOINT id

iint

the index

..note :: GRIDs, SPOINTs, & EPOINTs are stored in separate slots,

so they are unorganized.

get_node_id_to_element_ids_map() → Dict[int, List[int]]

Returns a dictionary that maps node IDs to a list of elemnent IDs

Todo

support 0d or 1d elements

Todo

support elements with missing nodes (e.g. CQUAD8 with missing nodes)

get_node_id_to_elements_map() → Dict[int, List[int]]

Returns a dictionary that maps node IDs to a list of elements.

Returns
nid_to_elements_mapDict[nid]=List[eid]

node id to a list of elements

Todo

support 0d or 1d elements ..

Todo

support elements with missing nodes (e.g. CQUAD8 with missing nodes)

get_node_ids_with_elements(eids: List[int], msg: str = '') → Set[int]

Get the node IDs associated with a list of element IDs

Parameters
eidsList[int]

list of element ID

msgstr

An additional message to print out if an element is not found

Returns
node_idsSet[int]

set of node IDs

For example::

eids = [1, 2, 3] # list of elements with pid=1 msg = ‘ which are required for pid=1’ node_ids = bdf.get_node_ids_with_elements(eids, msg=msg)

get_param(key: str, default: Union[int, float, str, List[float]]) → Union[int, float, str, List[float]]

gets a param card

get_pid_to_node_ids_and_elements_array(pids: Union[List[int], int, None] = None, etypes: Optional[List[str]] = None, idtype: str = 'int32', msg: str = '') → Tuple[Dict[int, str], numpy.ndarray]

a work in progress

Parameters
pidsList[int]

list of property ID

etypesList[str]

element types to consider

Returns
pid_to_eids_ieids_mapdict[(pid, etype)] = eid_ieid
eid_ieid(Nelements, 2) int ndarray

eid is the element id ieid is the index in the node_ids array

node_ids(nelements, nnodes) int ndarray
nelementsint

the number of elements in the property type

nnodesint

varies based on the element type

get_point_grids(nodes: List[Any], msg: str = '') → None

gets GRID, POINT cards

get_property_id_to_element_ids_map(msg: str = '') → Dict[int, List[int]]

Returns a dictionary that maps a property ID to a list of elements.

Returns
pid_to_eids_mapDict[pid]=List[eid]

property id to a list of elements

msgstr; default=’’

a message added to the error message

get_reduced_dloads(dload_id, scale=1.0, consider_dload_combinations=True, skip_scale_factor0=False, msg='')

Accounts for scale factors.

Parameters
dload_idint

the desired DLOAD id

consider_dload_combinationsbool; default=True

look at the DLOAD card

scalefloat; default=1.0

additional scale factor on top of the existing LOADs

skip_scale_factor0bool; default=False

Skip loads with scale factor=0.0. Nastran does not do this. Nastran will fail if referenced loads do not exist.

msgstr

debug message

Returns
dloadsList[loads]

a series of dload objects

scale_factorsList[float]

the associated scale factors

Warning

assumes xref=True ..

get_reduced_loads(load_case_id, scale=1.0, consider_load_combinations=True, skip_scale_factor0=False, stop_on_failure=True, msg='')

Accounts for scale factors.

Parameters
load_case_idint

the desired LOAD id

consider_load_combinationsbool; default=True

look at the LOAD card

scalefloat; default=1.0

additional scale factor on top of the existing LOADs

skip_scale_factor0bool; default=False

Skip loads with scale factor=0.0. Nastran does not do this. Nastran will fail if referenced loads do not exist.

stop_on_failurebool; default=True

errors if parsing something new

msgstr

debug message

Returns
loadsList[loads]

a series of load objects

scale_factorsList[float]

the associated scale factors

is_gravbool

is there a gravity card

Warning

assumes xref=True ..

get_reduced_mpcs(mpc_id: int, consider_mpcadd: bool = False, stop_on_failure: bool = True) → List[Any]

Get all traced MPCs that are part of a set

Parameters
mpc_idint

the MPC id

consider_mpcaddbool

MPCADDs should not be considered when referenced from an MPCADD from a case control, True should be used.

stop_on_failurebool; default=True

errors if parsing something new

Returns
mpcsList[MPC]

the various MPCs

get_reduced_nsms(nsm_id: int, consider_nsmadd: bool = True, stop_on_failure: bool = True) → List[Any]

Get all traced NSMs that are part of a set

Parameters
nsm_idint

the NSM id

consider_nsmaddbool

NSMADDs should not be considered when referenced from an NSMADD from a case control, True should be used.

stop_on_failurebool; default=True

errors if parsing something new

Returns
mpcsList[NSM]

the various NSMs

get_reduced_spcs(spc_id: int, consider_spcadd: bool = True, stop_on_failure: bool = True) → List[Any]

Get all traced SPCs that are part of a set

Parameters
spc_idint

the SPC id

consider_spcaddbool

SPCADDs should not be considered when referenced from an SPCADD from a case control, True should be used.

stop_on_failurebool; default=True

errors if parsing something new

Returns
spcsList[SPC]

the various SPCs

get_rigid_elements_with_node_ids(node_ids)

see pyNastran.bdf.mesh_utils.mpc_dependency.get_rigid_elements_with_node_ids(...)

get_rslot_map(reset_type_to_slot_map=False) → Dict[str, str]

gets the rslot_map

get_spcs(spc_id: int, consider_nodes: bool = False, stop_on_failure: bool = True) → Tuple[List[int], List[str]]

Gets the SPCs in a semi-usable form.

Parameters
spc_idint

the desired SPC ID

consider_nodesbool; default=False

True : consider the GRID card PS field False: consider the GRID card PS field

Returns
nidsList[int]

the constrained nodes

compsList[str]

the components that are constrained on each node

Considers:
  • SPC

  • SPC1

  • SPCADD

  • GRID

Doesn’t consider:
  • non-zero enforced value on SPC

  • GMSPC

get_structural_material_ids() → Iterable[int]
get_thermal_material_ids() → Iterable[int]

gets the thermal material ids

get_volume_breakdown(property_ids: Optional[int] = None, stop_if_no_volume: bool = True) → Dict[int, float]

gets a breakdown of the volume by property region

TODO: What about CONRODs? #’PBRSECT’, #’PBCOMP’, #’PBMSECT’, #’PBEAM3’, #’PBEND’, #’PIHEX’,

get_xyz_in_coord(cid=0, fdtype='float64', sort_ids=True)

Gets the xyz points (including SPOINTS) in the desired coordinate frame

Parameters
cidint; default=0

the desired coordinate system

fdtypestr; default=’float64’

the data type of the xyz coordinates

sort_idsbool; default=True

sort the ids

Returns
xyz(n, 3) ndarray

the xyz points in the cid coordinate frame

get_xyz_in_coord_array(cid: int = 0, fdtype: str = 'float64', idtype: str = 'int32') → Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, Dict[int, numpy.ndarray], Dict[int, numpy.ndarray]]

Gets the xyzs as an array in an arbitrary coordinate system

Parameters
fdtypestr; default=’float64’

the type of xyz_cp

idtypestr; default=’int32’

the type of nid_cp_cd

cidint; default=0

the coordinate system to get xyz in

Returns
nid_cp_cd(n, 3) int ndarray

node id, CP, CD for each node

xyz_cid(n, 3) float ndarray

points in the CID coordinate system

xyz_cp(n, 3) float ndarray

points in the CP coordinate system

icd_transformdict{int cd

Dictionary from coordinate id to index of the nodes in self.point_ids that their output (CD) in that coordinate system.

icp_transformdict{int cp

Dictionary from coordinate id to index of the nodes in self.point_ids that their input (CP) in that coordinate system.

Todo

how are SPOINTs/EPOINTs identified? ..

Examples

>>> out = model.get_xyz_in_coord_array(cid=0, fdtype='float64', idtype='int32')
>>> nid_cp_cd, xyz_cid, xyz_cp, icd_transform, icp_transform = out
get_xyz_in_coord_no_xref(cid=0, fdtype='float64', sort_ids=True)

see get_xyz_in_coord

include_zip(bdf_filename: Optional[str] = None, encoding: Optional[str] = None, make_ilines: bool = True) -> (List[str], Any)

Read a bdf without perform any other operation, except (optionally) insert the INCLUDE files in the bdf

Parameters
bdf_filenamestr / None

the input bdf (default=None; popup a dialog)

encodingstr; default=None -> system default

the unicode encoding

make_ilinesbool; default=True

flag for ilines

Returns
all_linesList[str]

all the lines packed into a single line stream

ilines(nlines, 2) int ndarray
if make_ilines = True:

the [ifile, iline] pair for each line in the file

if make_ilines = False:

ilines = None

Note

Setting read_includes to False is kind of pointless if called directly; it’s useful for read_bdf

increase_card_count(card_name: str, count_num: int = 1) → None

Used for testing to check that the number of cards going in is the same as each time the model is read verifies proper writing of cards

Parameters
card_namestr

the card_name -> ‘GRID’

count_numint, optional

the amount to increment by (default=1)

>>> bdf.read_bdf(bdf_filename)
>>> bdf.card_count[‘GRID’]
50
property is_bdf_vectorized

Returns False for the BDF class

property is_long_ids
is_reject(card_name: str) → bool

Can the card be read.

If the card is rejected, it’s added to self.reject_count

Parameters
card_namestr

the card_name -> ‘GRID’

load(obj_filename: str = 'model.obj') → None

Loads a pickleable object

load_hdf5_file(h5_file) → None

Loads a BDF object from an hdf5 object

Parameters
hdf5_fileH5File()

an h5py object

exporterHDF5Exporter; default=None

unused

load_hdf5_filename(hdf5_filename: str) → None

Loads a BDF object from an hdf5 filename

Parameters
hdf5_filenamestr

the path to the hdf5 file

loads = None

stores LOAD, FORCE, FORCE1, FORCE2, MOMENT, MOMENT1, MOMENT2, PLOAD, PLOAD2, PLOAD4, SLOAD GMLOAD, SPCD, DEFORM, QVOL

mass_properties(element_ids=None, mass_ids=None, reference_point=None, sym_axis=None, scale=None, inertia_reference: str = 'cg')
mass_properties_no_xref(element_ids=None, mass_ids=None, reference_point=None, sym_axis=None, scale=None, inertia_reference='cg')
mass_properties_nsm(element_ids=None, mass_ids=None, nsm_id=None, reference_point=None, sym_axis=None, scale=None, inertia_reference='cg', xyz_cid0_dict=None, debug=False)
property material_ids

gets the material ids

property nastran_format
property ncaeros

gets the number of CAEROx panels

property ncoords

gets the number of coordinate systems

property nelements

gets the number of element

property nid_map

Gets the GRID/SPOINT/EPOINT ids to a sorted order.

Parameters
sort_idsbool; default=True

sort the ids

Returns
nid_mapDict[nid]
nidint

the GRID/SPOINT/EPOINT id

iint

the index

..note :: GRIDs, SPOINTs, & EPOINTs are stored in separate slots,

so they are unorganized.

..note :: see self.get_nid_map(sort_ids=False) for the unsorted version
property nmaterials

gets the number of materials

property nnodes

gets the number of GRIDs

property node_ids

gets the GRID ids

nodes = None

stores SPOINT, GRID cards

property npoints

gets the number of GRID, SPOINT, EPOINT ids

property nproperties

gets the number of properties

object_attributes(mode: str = 'public', keys_to_skip: Optional[List[str]] = None, filter_properties: bool = False) → List[str]

List the names of attributes of a class as strings. Returns public attributes as default.

Parameters
modestr

defines what kind of attributes will be listed * ‘public’ - names that do not begin with underscore * ‘private’ - names that begin with single underscore * ‘both’ - private and public * ‘all’ - all attributes that are defined for the object

keys_to_skipList[str]; default=None -> []

names to not consider to avoid deprecation warnings

filter_properties: bool: default=False

filters the @property objects

Returns
attribute_namesList[str]

sorted list of the names of attributes of a given type or None if the mode is wrong

object_methods(mode: str = 'public', keys_to_skip: Optional[List[str]] = None) → List[str]

List the names of methods of a class as strings. Returns public methods as default.

Parameters
objinstance

the object for checking

modestr

defines what kind of methods will be listed * “public” - names that do not begin with underscore * “private” - names that begin with single underscore * “both” - private and public * “all” - all methods that are defined for the object

keys_to_skipList[str]; default=None -> []

names to not consider to avoid deprecation warnings

Returns
methodList[str]

sorted list of the names of methods of a given type or None if the mode is wrong

property point_ids

gets the GRID, SPOINT, EPOINT ids

pop_parse_errors() → None

raises an error if there are parsing errors

pop_xref_errors() → None

raises an error if there are cross-reference errors

property property_ids

gets the property ids

read_bdf(bdf_filename: Optional[str] = None, validate: bool = True, xref: bool = True, punch: bool = False, read_includes: bool = True, save_file_structure: bool = False, encoding: Optional[str] = None) → None

Read method for the bdf files

Parameters
bdf_filenamestr / None

the input bdf (default=None; popup a dialog)

validatebool; default=True

runs various checks on the BDF

xrefbool; default=True

should the bdf be cross referenced

punchbool; default=False

indicates whether the file is a punch file

read_includesbool; default=True

indicates whether INCLUDE files should be read

save_file_structurebool; default=False

enables the write_bdfs method

encodingstr; default=None -> system default

the unicode encoding

.. code-block:: python
>>> bdf = BDF()
>>> bdf.read_bdf(bdf_filename, xref=True)
>>> g1 = bdf.Node(1)
>>> print(g1.get_position())
[10.0, 12.0, 42.0]
>>> bdf.write_card(bdf_filename2)
>>> print(bdf.card_stats())

—BDF Statistics— SOL 101 bdf.nodes = 20 bdf.elements = 10 etc.

reject_card_lines(card_name: str, card_lines: List[str], show_log: bool = True, comment: str = '') → None

rejects a card

replace_cards(replace_model) → None

Replaces the common cards from the current (self) model from the ones in the new replace_model. The intention is that you’re going to replace things like PSHELLs and DESVARs from a pch file in order to update your BDF with the optimized geometry.

Todo

only does a subset of cards.

Notes

loads/spcs (not supported) are tricky because you can’t replace cards one-to-one…not sure what to do

reset_errors() → None

removes the errors from the model

reset_rslot_map() → None

helper method for get_rslot_map

safe_acsid(msg: str = '') → Optional[Coord]

gets the aerodynamic coordinate system

safe_aefact(aefact_id, ref_id, xref_errors, msg='')

Gets an AEFACT card

Parameters
ref_idint

the referencing value (e.g., an CAERO eid references a AEFACT)

safe_aelist(aelist_id, ref_id, xref_errors, msg='')

Gets an AELIST card

Parameters
ref_idint

the referencing value (e.g., an AESURF eid references a AELIST)

safe_caero(caero_id, ref_id, xref_errors, msg='')
safe_coord(cid: int, ref_id: int, xref_errors: Dict[str, Tuple[int, int]], msg='')

Gets a CORDx card

Parameters
ref_idint

the referencing value (e.g., an node and element references a coord)

safe_cross_reference(xref=True, xref_nodes=True, xref_elements=True, xref_nodes_with_elements=False, xref_properties=True, xref_masses=True, xref_materials=True, xref_loads=True, xref_constraints=True, xref_aero=True, xref_sets=True, xref_optimization=True, create_superelement_geometry=False, debug=True, word='')

Performs cross referencing in a way that skips data gracefully.

Warning

not fully implemented

safe_element(eid, ref_id, xref_errors, msg='')

Gets an element card

Parameters
ref_idint

the referencing value (e.g., a load references an element)

ref_id = 10 # PLOAD4
pid = 42 # CQUAD4
xref_errors = {‘eid’[]}
self.safe_element(eid, ref_id, xref_errors)
safe_elements(eids, ref_id: int, xref_errors: Dict[str, Tuple[int, int]], msg='')

Gets an series of elements

Doesn’t get rigid (RROD, RBAR, RBE2, RBE3, RBAR, RBAR1, RSPLINE, RSSCON) or mass (CMASS1, CONM2)

Parameters
ref_id: int

typically a load_id

safe_empty_nodes(nids, msg='')

safe xref version of self.Nodes(nid, msg=’’)

safe_get_elements(eids, msg='')

safe xref version of self.Elements(eid, msg=’’)

safe_get_nodes(nids: List[int], msg: str = '') → Tuple[List[Any], str]

safe xref version of self.Nodes(nid, msg=’’)

safe_get_points(point_ids, msg='')

safe xref version of self.Points(point_ids, msg=’’)

safe_material(mid: int, ref_id: int, xref_errors, msg='')

Gets a material card

Parameters
midint

the material_id

ref_idint

the referencing value (e.g., an property references a material, so use self.pid)

safe_paero(paero_id, ref_id, xref_errors, msg='')

Gets a PAEROx card

Parameters
ref_idint

the referencing value (e.g., a load references an element)

ref_id = 10 # CAERO1
pid = 42 # PAERO1
xref_errors = {‘paero’[]}
self.safe_element(pid, ref_id, xref_errors)
safe_property(pid, ref_id, xref_errors, msg='')
Parameters
ref_idint

the referencing value (e.g., an element references a property)

ref_id = 10 # CQUAD4
pid = 42 # PSHELL
xref_errors = {‘pid’[]}
self.safe_property(pid, ref_id, xref_errors)
safe_property_mass(pid, ref_id, xref_errors, msg='')

Gets a mass_property card

Parameters
ref_idint

the referencing value (e.g., an element references a property)

safe_tabled(tabled_id, ref_id, xref_errors, msg='')
Parameters
ref_idint

the referencing value (e.g., an TLOAD1 eid references a TABLED1)

safe_tableh(tableh_id, ref_id, xref_errors, msg='')
Parameters
ref_idint

the referencing value (e.g., an MATT1 eid references a TABLEH1)

save(obj_filename: str = 'model.obj', unxref: bool = True) → None

Saves a pickleable object

saves(unxref: bool = True) → str

Saves a pickled string

set_as_msc()
set_as_mystran()
set_as_nasa95()
set_as_nx()
set_as_optistruct()
set_as_zona()
set_cards(cards: Union[List[str], Set[str]]) → None

Method for setting the cards that will be processed

Parameters
cardsList[str]; Set[str]

a list/set of cards that should not be read

.. python ::

bdf_model.set_cards([‘GRID’, ‘CTRIA3’])

set_dynamic_syntax(dict_of_vars: Dict[str, Union[int, float, str]]) → None

Uses the OpenMDAO syntax of %varName in an embedded BDF to update the values for an optimization study.

Parameters
dict_of_varsdict[str] = int/float/str

dictionary of 7 character variable names to map.

.. code-block:: python

GRID, 1, %xVar, %yVar, %zVar

>>> dict_of_vars = {'xVar': 1.0, 'yVar', 2.0, 'zVar':3.0}
>>> bdf = BDF()
>>> bdf.set_dynamic_syntax(dict_of_vars)
>>> bdf.read_bdf(bdf_filename, xref=True)

Notes

Case sensitivity is supported. Variables should be 7 characters or less to fit in an 8-character field.

Warning

Type matters!

set_error_storage(nparse_errors: int = 100, stop_on_parsing_error: bool = True, nxref_errors: int = 100, stop_on_xref_error: bool = True) → None

Catch parsing errors and store them up to print them out all at once (not all errors are caught).

Parameters
nparse_errorsint

how many parse errors should be stored (default=0; all=None; no storage=0)

stop_on_parsing_errorbool

should an error be raised if there are parsing errors (default=True)

nxref_errorsint

how many cross-reference errors should be stored (default=0; all=None; no storage=0)

stop_on_xref_errorbool

should an error be raised if there are cross-reference errors (default=True)

set_param(key: str, values: Union[int, float, str, List[float]], comment: str = '') → None

sets a param card; creates it if necessary

property sol

gets the solution (e.g. 101, 103)

property subcases

gets the subcases

sum_forces_moments(p0: int, loadcase_id: int, cid: int = 0, include_grav: bool = False, xyz_cid0: Union[None, Dict[int, Any]] = None)

..see :: pyNastran.bdf.mesh_utils.loads.sum_forces_moments

sum_forces_moments_elements(p0: int, loadcase_id: int, eids: List[int], nids: List[int], cid: int = 0, include_grav: bool = False, xyz_cid0: Union[None, Dict[int, Any]] = None)

..see :: pyNastran.bdf.mesh_utils.loads.sum_forces_moments_elements

superelement_nodes(seid: int, nodes: List[Any], msg: str = '') → None
tempbc(sid, Type, nodes, temps, comment='') → pyNastran.bdf.cards.thermal.thermal.TEMPBC
transform_xyzcp_to_xyz_cid(xyz_cp: numpy.ndarray, nids: numpy.ndarray, icp_transform: Dict[int, numpy.ndarray], cid: int = 0, in_place: bool = False, atol: float = 1e-06) → numpy.ndarray

Vectorized method for calculating node locations in an arbitrary coordinate system.

Parameters
xyz_cp(n, 3) float ndarray

points in the CP coordinate system

nids(n, ) int ndarray

the GRID/SPOINT/EPOINT ids corresponding to xyz_cp

icp_transformdict{int cp

Dictionary from coordinate id to index of the nodes in self.point_ids that their input (CP) in that coordinate system.

cidint; default=0

the coordinate system to get xyz in

in_placebool, default=False

If true the original xyz_cp is modified, otherwise a new one is created.

Returns
xyz_cid(n, 3) float ndarray

points in the CID coordinate system

Examples

# assume GRID 1 has a CD=10, CP=0 # assume GRID 2 has a CD=10, CP=0 # assume GRID 5 has a CD=50, CP=1 >>> model.point_ids [1, 2, 5] >>> out = model.get_displacement_index_xyz_cp_cd() >>> icd_transform, icp_transform, xyz_cp, nid_cp_cd = out >>> nids = nid_cp_cd[:, 0] >>> xyz_cid0 = model.transform_xyzcp_to_xyz_cid(

xyz_cp, nids, icp_transform, cid=0)

>>> xyz_cid1 = model.transform_xyzcp_to_xyz_cid(
        xyz_cp, nids, icp_transform,
        cid=1)
property type_slot_str

helper method for printing supported cards

uncross_reference(word: str = '') → None

uncross references the model

update_card(card_name: str, icard: int, ifield: int, value: Union[int, float, str]) → None

Updates a Nastran card based on standard Nastran optimization names

Parameters
card_namestr

the name of the card (e.g. GRID)

icardint

the unique 1-based index identifier for the card (e.g. the GRID id)

ifieldint

the index on the card (e.g. X on GRID card as an integer representing the field number)

valuevaries

the value to assign

Returns
objvaries

the corresponding object (e.g. the GRID object)

# On GRID 100, set Cp (2) to 42
>>> model.update_card('GRID', 100, 2, 42)
    ..
# On GRID 100, set X (3) to 43.
>>> model.update_card('GRID', 100, 3, 43.)
    ..
update_model_by_desvars(xref=True, desvar_values=None)

doesn’t require cross referenceing

update_solution(sol: int, method: Optional[str], sol_iline: int) → None

Updates the overall solution type (e.g. 101,200,600)

Parameters
solint

the solution type (101, 103, etc)

methodstr

the solution method (only for SOL=600)

sol_ilineint

the line to put the SOL/method on

validate() → None

runs some checks on the input data beyond just type checking

write_bdf(out_filename: Optional[Union[str, StringIO]] = None, encoding: Optional[str] = None, size: int = 8, is_double: bool = False, interspersed: bool = False, enddata: Optional[bool] = None, write_header: bool = True, close: bool = True) → None

Writes the BDF.

Parameters
out_filenamevaries; default=None

str - the name to call the output bdf file - a file object StringIO() - a StringIO object None - pops a dialog

encodingstr; default=None -> system specified encoding

the unicode encoding latin1, and utf8 are generally good options

sizeint; {8, 16}

the field size

is_doublebool; default=False

False : small field True : large field

interspersedbool; default=True

Writes a bdf with properties & elements interspersed like how Patran writes the bdf. This takes slightly longer than if interspersed=False, but makes it much easier to compare to a Patran-formatted bdf and is more clear.

enddatabool; default=None

bool - enable/disable writing ENDDATA None - depends on input BDF

write_headerbool; default=True

flag for writing the pyNastran header

closebool; default=True

should the output file be closed

write_bdfs(out_filenames: Optional[Union[str, StringIO]], relative_dirname: Optional[str] = None, encoding: Optional[str] = None, size: int = 8, is_double: bool = False, enddata: Optional[bool] = None, close: bool = True, is_windows: Optional[bool] = None) → None

Writes the BDF.

Parameters
out_filenamevaries; default=None

str - the name to call the output bdf file - a file object StringIO() - a StringIO object None - pops a dialog

relative_dirnamestr; default=None -> os.curdir

A relative path to reference INCLUDEs. ‘’ : relative to the main bdf None : use the current directory path : absolute path

encodingstr; default=None -> system specified encoding

the unicode encoding latin1, and utf8 are generally good options

sizeint; {8, 16}

the field size

is_doublebool; default=False

False : small field True : large field

enddatabool; default=None

bool - enable/disable writing ENDDATA None - depends on input BDF

closebool; default=True

should the output file be closed

is_windowsbool; default=None
True/FalseWindows has a special format for writing INCLUDE

files, so the format for a BDF that will run on Linux and Windows is different.

None : Check the platform

write_skin_solid_faces(skin_filename, write_solids=False, write_shells=True, size=8, is_double=False, encoding=None)
property wtmass

Gets the PARAM,WTMASS value, which defines the weight to mass conversion factor

kg -> kg : 1.0 lb -> slug : 1/32.2 lb -> slinch : 1/(32.2*12)=1/386.4

pyNastran.bdf.bdf.load_bdf_object(obj_filename: str, xref: bool = True, log=None, debug: bool = True)[source]
pyNastran.bdf.bdf.main()[source]

shows off how unicode works because it’s overly complicated

pyNastran.bdf.bdf.map_update(fem: pyNastran.bdf.bdf.BDF, version: str)[source]
pyNastran.bdf.bdf.map_version(fem: pyNastran.bdf.bdf.BDF, version: str)[source]
pyNastran.bdf.bdf.read_bdf(bdf_filename: Optional[str] = None, validate: bool = True, xref: bool = True, punch: bool = False, save_file_structure: bool = False, skip_cards: Optional[List[str]] = None, read_cards: Optional[List[str]] = None, encoding: Optional[str] = None, log: Optional[SimpleLogger] = None, debug: bool = True, mode: str = 'msc') → BDF[source]

Creates the BDF object

Parameters
bdf_filenamestr (default=None -> popup)

the bdf filename

debugbool/None
used to set the logger if no logger is passed in

True: logs debug/info/error messages False: logs info/error messages None: logs error messages

loglogging module object / None

if log is set, debug is ignored and uses the settings the logging object has

validatebool; default=True

runs various checks on the BDF

xrefbool; default=True

should the bdf be cross referenced

punchbool; default=False

indicates whether the file is a punch file

save_file_structurebool; default=False

enables the write_bdfs method

skip_cardsList[str]; default=None

None : include all cards list of cards to skip

read_cardsList[str]; default=None

None : include all cards list of cards to read (all the cards)

encodingstr; default=None -> system default

the unicode encoding

modestr; default=’msc’

the type of Nastran valid_modes = {‘msc’, ‘nx’}

Returns
modelBDF()

an BDF object

Note

this method will change in order to return an object that does not have so many methods

Todo

finish this ..