bdf Module

digraph inheritance4178fd21b7 { bgcolor=transparent; rankdir=LR; size=""; "pyNastran.bdf.bdf.BDF" [URL="#pyNastran.bdf.bdf.BDF",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="NASTRAN BDF Reader/Writer/Editor class."]; "pyNastran.bdf.bdf.BDF_" -> "pyNastran.bdf.bdf.BDF" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf.BDF_" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Base class for the BDF Reader/Writer/Editor class that's used by the"]; "pyNastran.bdf.bdf_methods.BDFMethods" -> "pyNastran.bdf.bdf.BDF_" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.get_card.GetCard" -> "pyNastran.bdf.bdf.BDF_" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddCards" -> "pyNastran.bdf.bdf.BDF_" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.write_mesh_file.WriteMeshs" -> "pyNastran.bdf.bdf.BDF_" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.uncross_reference.UnXrefMesh" -> "pyNastran.bdf.bdf.BDF_" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddCards" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="defines the add_cardname functions that use the object inits"]; "pyNastran.bdf.bdf_interface.attributes.BDFAttributes" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="defines attributes of the BDF"]; "pyNastran.bdf.bdf_interface.cross_reference.XrefMesh" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Links up the various cards in the BDF."]; "pyNastran.bdf.bdf_interface.attributes.BDFAttributes" -> "pyNastran.bdf.bdf_interface.cross_reference.XrefMesh" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.get_card.GetCard" [URL="bdf_interface/pyNastran.bdf.bdf_interface.get_card.html#pyNastran.bdf.bdf_interface.get_card.GetCard",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="defines various methods to access high level BDF data"]; "pyNastran.bdf.bdf_interface.get_methods.GetMethods" -> "pyNastran.bdf.bdf_interface.get_card.GetCard" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.get_methods.GetMethods" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="defines various methods to access low level BDF data"]; "pyNastran.bdf.bdf_interface.attributes.BDFAttributes" -> "pyNastran.bdf.bdf_interface.get_methods.GetMethods" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.safe_cross_reference.SafeXrefMesh" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Links up the various cards in the BDF."]; "pyNastran.bdf.bdf_interface.cross_reference.XrefMesh" -> "pyNastran.bdf.bdf_interface.safe_cross_reference.SafeXrefMesh" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.uncross_reference.UnXrefMesh" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Unlinks up the various cards in the BDF."]; "pyNastran.bdf.bdf_interface.safe_cross_reference.SafeXrefMesh" -> "pyNastran.bdf.bdf_interface.uncross_reference.UnXrefMesh" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.write_mesh.WriteMesh" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Defines methods for writing cards"]; "pyNastran.bdf.bdf_interface.attributes.BDFAttributes" -> "pyNastran.bdf.bdf_interface.write_mesh.WriteMesh" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.write_mesh_file.WriteMeshs" [URL="bdf_interface/pyNastran.bdf.bdf_interface.write_mesh_files.html#pyNastran.bdf.bdf_interface.write_mesh_file.WriteMeshs",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Defines methods for writing cards"]; "pyNastran.bdf.bdf_interface.write_mesh.WriteMesh" -> "pyNastran.bdf.bdf_interface.write_mesh_file.WriteMeshs" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_methods.BDFMethods" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Has the following methods:"]; "pyNastran.bdf.bdf_interface.attributes.BDFAttributes" -> "pyNastran.bdf.bdf_methods.BDFMethods" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
Main BDF class. Defines:
  • BDF

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

Bases: 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(aeparm_name: str, msg: str = '') AEPARM

gets an AEPARM

AEParam_int(aid: int, msg: str = '') AEPARM

gets an AEPARM

AEStat(aestat_name: str, msg: str = '') AESTAT

gets an AESTAT

AEStat_int(aid: int, msg: str = '') AESTAT

gets an AESTAT

AESurf(aesurf_name: str, msg: str = '') AESURF

gets an AESURF

AESurf_int(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 = '') 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[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 = '') DRESP1 | DRESP2 | DRESP3

gets a DRESPx

DVcrel(dv_id: int, msg: str = '') DVCREL1 | DVCREL2

gets a DVCREL1/DVCREL2

DVmrel(dv_id: int, msg: str = '') DVMREL1 | DVMREL2

gets a DVMREL1/DVMREL2

DVprel(dv_id: int, msg: str = '') 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 = '') GRID | SPOINT | EPOINT | None

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[GRID | SPOINT | EPOINT | None]

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 = '') MATHE | MATHP

gets a hyperelastic material

Load(sid: int, consider_load_combinations: bool = True, msg: str = '') list[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 = '') 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 = '') CMASS1 | CMASS2 | CMASS3 | CMASS4 | CONM1 | CONM2

gets a mass element (CMASS1, CONM2)

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

gets a structural or thermal material

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

gets one or more Materials

Method(sid: int, msg: str = '') EIGR | EIGRL

gets a METHOD (EIGR, EIGRL)

NLParm(nlparm_id: int, msg: str = '') NLPARM

gets an NLPARM

NSM(nsm_id: int, consider_nsmadd: bool = True, msg: str = '') NSM | NSM1 | NSML | NSML1 | NSMADD

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 = '') 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[GRID | SPOINT | EPOINT]

Returns a series of node objects given a list of IDs

PAero(pid: int, msg: str = '') 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(table_id: int, msg: str = '') TABRND1 | TABRNDG

gets a TABRND1 / TABRNDG

RigidElement(eid: int, msg: str = '') 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 = '') 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 = '') SET1 | SET3

gets a SET, SET1, SET2, or SET3 card

Spline(eid: int, msg: str = '') SPLINE1 | SPLINE2 | SPLINE3 | SPLINE4 | SPLINE5

gets a SPLINEx

StructuralMaterial(mid, msg='') MAT1 | MAT2 | MAT3 | MAT8 | MAT9 | MAT10 | MAT11 | MAT3D | EQUIV | MATG

gets a structural material

Table(tid, msg='') TABLES1 | TABLEST | TABLEH1 | TABLEHT

gets a TABLES1, TABLEST, TABLEH1, TABLEHT

TableD(tid: int, msg: str = '') TABLED1 | TABLED2 | TABLED3 | TABLED4

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

TableM(table_id: int, msg: str = '') TABLEM1 | TABLEM2 | TABLEM3 | TABLEM4

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

ThermalMaterial(mid: int, msg: str = '') MAT4 | MAT5

gets a thermal material

Trim(trim_id: int, msg: str = '') TRIM

gets an TRIM

add_accel(sid, N, direction, locs, vals, cid=0, comment='') 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='') 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='') ACMODL
add_acsrce(sid, excite_id, rho, b, delay=0, dphase=0, power=0, comment='') 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: int | list[int], comment: str = '') 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 = '') 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='') 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 = '') 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='') 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 = '') 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='') 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 = '') 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, aelist_id1, cid2=None, aelist_id2=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='') 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

aelist_id1 / aelist_id2int / 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='') 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='') ASET | 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='') ASET | ASET1
add_axic(nharmonics, comment='') AXIC

Creates a AXIC card

add_baror(pid, is_g0, g0, x, offt='GGG', comment: str = '') BAROR
add_bconp(contact_id, slave, master, sfac, fric_id, ptype, cid, comment='') BCONP

Creates a BCONP card

add_bcrpara(crid, surf='TOP', offset=None, Type='FLEX', grid_point=0, comment='') 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='') BCTADD

Creates a BCTADD card

add_bctpara(csid, params, comment='') BCTPARA

Creates a BCTPARA card

add_bctset(csid, sids, tids, frictions, min_distances, max_distances, comment='', sol=101) BCTSET

Creates a BCTSET card

add_bfric(friction_id, mu1, fstiff=None, comment='')
add_blseg(line_id, nodes, comment='') BLSEG

Creates a BLSEG card

add_bolt_msc()
add_bolt_nx(bolt_id: int, element_type: int, eids: list | None = None, nids: list | None = None, csid=None, idir=None, comment: str = '') BOLT
add_boltfor_nx(sid: int, load_value: float, bolt_ids: list[int], comment: str = '') BOLTFOR
add_boltseq_nx(sid: int, s_nos: list[int], b_ids: list[int], n_incs: list[int] | None = None, comment: str = '') BOLT
add_bset(ids, components, comment='') BSET | 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='') BSET | BSET1
add_bsurf(sid, eids, comment='') BSURF

Creates a BSURF card

add_bsurfs(id, eids, g1s, g2s, g3s, comment='') BSURFS

Creates a BSURFS card

add_bulk_lines(lines: list[str]) None
add_caabsf(eid, pid, nodes, comment='') CHACAB
add_caero1(eid: int, pid: int, igroup: int, p1: ndarray[Any, dtype[float64]], x12: float, p4: ndarray[Any, dtype[float64]], x43: float, cp: int = 0, nspan: int = 0, lspan: int = 0, nchord: int = 0, lchord: int = 0, comment: str = '') 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 = '') 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='') CAERO3

Creates a CAERO3 card

add_caero4(eid, pid, p1, x12, p4, x43, cp=0, nspan=0, lspan=0, comment='') 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 = '') CAERO5

Creates a CAERO5 card

add_caero7(eid: int, label: str, p1: ndarray, x12: float, p4: ndarray, x43: float, cp: int = 0, nspan: int = 0, nchord: int = 0, lspan: int = 0, p_airfoil: Any = None, ztaic: Any = None, comment: str = '') 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: list[float] | None, g0: int | None, offt: str = 'GGG', pa: int = 0, pb: int = 0, wa: list[float] | None = None, wb: list[float] | None = None, comment: str = '', validate: bool = False) 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 = '') 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: list[float] | None, g0: int | None, offt='GGG', bit=None, pa=0, pb=0, wa=None, wb=None, sa=0, sb=0, comment='') 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='') CBEAM3

Creates a CBEAM3 card

add_cbend(eid, pid, nids, g0, x, geom, comment='') CBEND

Creates a CBEND card

add_cbush(eid: int, pid: int, nids, x: list[float] | None, g0: int | None, cid=None, s: float = 0.5, ocid: int = -1, si: list[float] | None = None, comment='') 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: int | None = None, comment: str = '') CBUSH1D

Creates a CBUSH1D card

add_cbush2d(eid: int, pid: int, nids: list[int], cid: int = 0, plane: str = 'XY', sptid: int | None = None, comment: str = '') CBUSH2D

Creates a CBUSH2D card

add_cconeax(eid, pid, rings, comment='') CCONEAX

Creates a CCONEAX card

add_cdamp1(eid: int, pid: int, nids: list[int], c1: int = 0, c2: int = 0, comment: str = '') 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 = '') 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 = '') 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 = '') 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 = '') 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 = '') 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 = '') 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 = '') 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 = '') 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 = '') 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: list[int] | None, g0: int | None, cid: int | None = None, comment: str = '') 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='') CHACAB
add_chacbr(eid, pid, nodes, comment='') CHACBR
add_chbdye(eid, eid2, side, iview_front=0, iview_back=0, rad_mid_front=0, rad_mid_back=0, comment='') 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='') 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='') 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='') CHEXA8 | 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='') CHEXA1

see CHEXA

add_chexa2(eid, mid, nids, comment='') CHEXA2

see CHEXA

add_cihex1(eid, pid, nids, comment='') CIHEX1

see CHEXA

add_cihex2(eid, pid, nids, comment='') CIHEX2

see CHEXA

add_cload(sid, scale, scale_factors, load_ids, comment='') 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 = '') 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 = '') 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 = '') 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 = '') 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: ndarray[Any, dtype[float64]], cid=0, comment='') 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: list[float] | None = None, I: list[float] | None = None, comment: str = '') 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 = '') 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='') 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='') 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 = '') 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 = '') 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 = '') 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: list[float] | ndarray[Any, dtype[float64]] | None, zaxis: list[float] | ndarray[Any, dtype[float64]] | None, xzplane: list[float] | ndarray[Any, dtype[float64]] | None, rid: int = 0, setup: bool = True, comment: str = '') 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: list[float] | ndarray[Any, dtype[float64]] | None, zaxis: list[float] | ndarray[Any, dtype[float64]] | None, xzplane: list[float] | ndarray[Any, dtype[float64]] | None, rid: int = 0, setup: bool = True, comment: str = '') 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: list[float] | ndarray[Any, dtype[float64]] | None, zaxis: list[float] | ndarray[Any, dtype[float64]] | None, xzplane: list[float] | ndarray[Any, dtype[float64]] | None, rid: int = 0, setup: bool = True, comment: str = '') 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 = '') CORD3G

Creates a CORD3G card

add_cpenta(eid, pid, nids, comment='') CPENTA6 | 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='') CPLSTN3

Creates a CPLSTN4 card

add_cplstn4(eid, pid, nids, theta=0.0, comment='') CPLSTN4

Creates a CPLSTN4 card

add_cplstn6(eid, pid, nids, theta=0.0, comment='') CPLSTN6

Creates a CPLSTN6 card

add_cplstn8(eid, pid, nids, theta=0.0, comment='') CPLSTN8

Creates a CPLSTN8 card

add_cplsts3(eid, pid, nids, theta=0.0, tflag=0, T1=None, T2=None, T3=None, comment='') CPLSTS3

Creates a CPLSTS3 card

add_cplsts4(eid, pid, nids, theta=0.0, tflag=0, T1=None, T2=None, T3=None, T4=None, comment='') 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='') 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='') CPLSTS8

Creates a CPLSTS8 card

add_cpyram(eid, pid, nids, comment='') CPYRAM5 | 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='') 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='') 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='') 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='') 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='') CQUADX

Creates a CQUADX card

add_cquadx4(eid, pid, nids, theta=0.0, comment='') CQUADX4

Creates a CQUADX4 card

add_cquadx8(eid, pid, nids, theta=0.0, comment='') CQUADX8

Creates a CQUADX8 card

add_crac2d(eid, pid, nids, comment='') CRAC2D

Creates a PRAC2D card

add_crac3d(eid, pid, nids, comment='') CRAC3D

Creates a CRAC3D card

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

Creates a CREEP card

add_crod(eid: int, pid: int, nids: list[int], comment: str = '') 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='') CSET | 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='') CSET | CSET1

See also

add_cset

add_cshear(eid, pid, nids, comment='') 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='') 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='') CSUPER
add_csupext(seid, nodes, comment='') CSUPEXT
add_ctetra(eid, pid, nids, comment='') CTETRA4 | 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='') CTRAX3

Creates a CTRAX3 card

add_ctrax6(eid, pid, nids, theta=0.0, comment='') 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='') 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='') 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='') 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='') CTRIAX

Creates a CTRIAX card

add_ctriax6(eid, mid, nids, theta=0.0, comment='') CTRIAX

Creates a CTRIAX6 card

add_ctube(eid: int, pid: int, nids: list[int], comment: str = '') 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 = '') 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='') CYAX
add_cyjoin(side, coord, nids, comment='') CYJOIN
add_darea(sid, nid, component, scale, comment='') 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='') 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 = '') 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='') DDVAL

Creates a DDVAL card

add_deform(sid: int, eid: int, deformation: float, comment='') DEFORM

Creates an DEFORM card, which defines applied deformation on a 1D element. 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='') 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_dense_dmi(name: str, myarray: ndarray, form: int | str, tin=None, tout=None, validate: bool = True)

default for tin/tout = myarray.dtype

..warning :: only supports square matrices for the moment

add_deqatn(equation_id: int, eqs: list[str], comment: str = '') 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: int, label: str, xinit: float, xlb: float = -1e+20, xub: float = 1e+20, delx=None, ddval: int | None = None, comment: str = '') 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 = '') 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='') 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: str, form: int, tin: int, tout: int, nrows: int, ncols: int, GCj, GCi, Real, Complex=None, comment='') DMI

Creates a DMI card

add_dmiax(name, matrix_form, tin, tout, ncols, GCNj, GCNi, Real, Complex=None, comment='') DMIAX

Creates a DMIAX card

add_dmig(name, ifo, tin, tout, polar, ncols, GCj, GCi, Real, Complex=None, comment='') 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: int, ncol: int, load_sequences, comment='') DMIG_UACCEL

Creates a DMIG,UACCEL card

add_dmij(name, form, tin, tout, nrows, ncols, GCj, GCi, Real, Complex=None, comment='') DMIJ

Creates a DMIJ card

add_dmiji(name, ifo, tin, tout, nrows, ncols, GCj, GCi, Real, Complex=None, comment='') DMIJI
DMIJI | NAME | 0 | IFO | TIN | TOUT POLAR | | NCOL |
add_dmik(name, ifo, tin, tout, polar, ncols, GCj, GCi, Real, Complex=None, comment='') 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 = '') DMNCON
add_doptprm(params: dict[str, int | float], comment='') DOPTPRM

Creates a DOPTPRM card

add_dphase(sid, nodes, components, phase_leads, comment='') 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: int | float | str | None, attb: int | float | str | None, atti: list[int | float | str], validate: bool = True, comment: str = '') 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='') 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='') 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: float = -0.5, nstr: int = 20, comment: str = '') 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='') 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: str, fields: dict[int, list], comment='') DTI | 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='') 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='') DVCREL2

Creates a DVCREL2 card

add_dvgrid(dvid: int, nid: int, dxyz: ndarray[Any, dtype[float64]], cid: int = 0, coeff: float = 1.0, comment: str = '') 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: float | None = None, mp_max: float = 1e+20, c0: float = 0.0, validate: bool = True, comment: str = '') 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: float | None = None, mp_max: float = 1e+20, validate: bool = True, comment: str = '') 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: 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 = '') 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: int | str, deqation: int, dvids: list[int] = None, labels: list[str] = None, p_min: float | None = None, p_max: float = 1e+20, validate: bool = True, comment: str = '') 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 = '') DVTREL1
add_dynred(sid, fmax, nirv, nit, idir, nqdes) None
add_eigb(sid, method, L1, L2, nep, ndp, ndn, norm, G, C, comment='') 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='') EIGC

Creates an EIGC card

add_eigp(sid, alpha1, omega1, m1, alpha2, omega2, m2, comment='') 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='') 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='') 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}

optionslist[str]; default=None -> []

line 2 keys

valueslist[int | float | str]; default=None -> []

line 2 values

commentstr; default=’’

a comment for the card

add_epoint(ids: int | list[int], comment: str = '') 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='') FEEDGE
add_feface(face_id, nids, cid, surf_ids, comment='') FEFACE
add_flfact(sid: int, factors: list[float], comment: str = '') 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: int | None = None, omax: float | None = None, epsilon: float = 0.001, comment: str = '', validate: bool = False) 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 (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='') 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='') 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='') 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='') FORCEAX
add_freq(sid, freqs, comment='') 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='') 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='') 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='') FREQ3

Creates a FREQ3 card

add_freq4(sid, f1=0.0, f2=1e+20, fspread=0.1, nfm=3, comment='') 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='') 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) GENEL

creates a GENEL card using the flexiblity (Z) approach

add_genel_stiffness(eid, ul, ud, k, s=None) GENEL

creates a GENEL card using the stiffness (K) approach

add_gmcurv(curve_id, group, data, cid_in=0, cid_bc=0, comment='') GMCURV
add_gmspc(conid, component, entity, entity_id, comment='') GMSPC

Creates a GMSPC card

add_gmsurf(curve_id, group, data, cid_in=0, cid_bc=0, comment='') GMSURF
add_grav(sid, scale, N, cid=0, mb=0, comment='') 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 = '') 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: None | list[float] | ndarray[Any, dtype[float64]], cp: int = 0, cd: int = 0, ps: str = '', seid: int = 0, comment: str = '') 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 = '') GROUP
add_gust(sid, dload, wg, x0, V=None, comment='') 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_include_file(include_filename: str, is_windows: bool | None = None) None
add_load(sid, scale, scale_factors, load_ids, comment='') 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='') LOADCYH

Creates a LOADCYH card

add_loadcyn(sid, scale, segment_id, scales, load_ids, segment_type=None, comment='') LOADCYN

Creates a LOADCYN card

add_lseq(sid, excite_id, lid, tid=None, comment='') 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='') 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='') 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='') 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='') 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='') MAT3

Creates a MAT3 card

add_mat3d(mid, e1, e2, e3, nu12, nu13, nu23, g12, g13, g23, rho=0.0, comment='') 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='') 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='') 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='') 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='') MAT9

Creates a MAT9 card

add_matcid(cid: int, form: int, eids=None, start: int | None = None, thru: int | None = None, by: int | None = None, comment: str = '') MATCID

Creates the MATCID card, which defines the Material Coordinate System for Solid Elements

-Overrides the material coordinate system for CHEXA, CPENTA, CTETRA, and CPYRAM solid elements when the elements reference a PSOLID property.

-Overrides the material coordinate system for CHEXA and CPENTA solid elements when the elements reference a PCOMPS property.

-Overrides the material coordinate system for CHEXCZ and CPENTCZ solid elements.

Parameters:
cidint

coordinate system id

form: int

integer indicating the format alternative (for reference, see the 4 different formats below)

eidsarray[int, …]

Array of element identification numbers

start: int

used in format alternative 2 and 3, indicates starting eID

thruint

used in format alternative 2 and 3

byint

used in format alternative 3

commentstr; default=’’

a comment for the card

Format (alternative 1):

1

2

3

4

5

6

7

8

9

MATCID

CID

EID1

EID2

EID3

EID4

EID5

EID6

EID7

EID8

EID9

-etc-

Format (alternative 2):

1

2

3

4

5

6

7

8

9

MATCID

CID

EID1

“THRU”

EID2

Format (alternative 3):

1

2

3

4 | 5 | 6 | 7

8

9

MATCID

CID

EID1

“THRU”

EID2

“BY”

N

Format (alternative 4):

1

2

3

4

5

6

7

8

9

MATCID

CID

“ALL”

add_matdmg(mid, ppf_model, y012, yc12, ys12, ys22, y11limt, y11limc, ksit=None, ksic=None, b2=None, b3=None, a=None, litk=None, bigk=None, expn=None, tau=None, adel=None, plyuni=None, tid=None, hbar=None, dmax=None, pe=None, user=None, r01=None, ds=None, gic=None, giic=None, giiic=None, comment='') MATDMG

Creates a MATDMG 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='') 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='') 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='') MATHP

Creates a MATHP card

add_mats1(mid, tid, Type, h, hr, yf, limit1, limit2, comment='') 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='') int

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='') 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='') MATT3

Creates a MATT3 card

add_matt4(mid, k_table=None, cp_table=None, h_table=None, mu_table=None, hgen_table=None, comment='') 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='') 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='') 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='') MATT9
add_mdlprm(mdlprm_dict: dict[str, int | float], comment: str = '') 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 = '') 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='') 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(sid, low_range, high_range, mt_filter, comment: str = '') MODTRAK
add_moment(sid, node, mag, xyz, cid=0, comment='') 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='') 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='') 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: str, label: str, axes: str, aecomp_name: str, xyz: ndarray, cp: int = 0, cd=None, ind_dof: str = '123', comment: str = '') 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: int | None = None, comment: str = '') 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='') MONPNT2

Creates a MONPNT2 card

add_monpnt3(name, label, axes, grid_set, elem_set, xyz, cp=0, cd=None, xflag=None, comment='') MONPNT3

Creates a MONPNT3 card

add_mpc(conid: int, nodes: list[int], components: list[str], coefficients: list[float], comment: str = '') 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='') 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='') 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='') 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 = '') 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 = '') 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 = '') 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 = '') 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 = '') 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='') NXSTRAT

Creates an NXSTRAT card

add_omit1(ids: list[int], components: str, comment='') OMIT | 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='') 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='') 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='') 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: int | None = None, lrib: int | None = None, lth: int | None = None, comment: str = '') 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='') 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='') 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='') PAERO5

Creates a PAERO5 card

add_panel(names: list[str], set_ids: list[int]) None
add_param(key: str, values: list[int | float | str], comment: str = '') 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='') 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 = '') 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='') 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='') 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='') PBEAM3

Creates a PBEAM3 card

add_pbeaml(pid: int, mid: int, beam_type: str, xxb: list[float], dims: list[list[float]], so=None, nsm=None, group: str = 'MSCBML0', comment: str = '') 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_pbeaml_dvprel1(pid: int, mid: int, beam_type: str, xxb, dims, dim_constraints, so=None, nsm=None, group: str = 'MSCBML0', comment: str = '') tuple[PBARL, list[DESVAR], list[DVPREL1]]

dim = [0.1, 0.2, 0.3, 0.4] dim_constraints = [

None, [0.01, 1.0], [None, 1.0], None,

]

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='') PBEND

Creates a PBEND card

add_pbmsect(pid, mid, form, options, comment='') PBMSECT

Creates a PBMSECT card

add_pbrsect(pid, mid, form, options, comment='') PBRSECT

Creates a PBRSECT card

add_pbush(pid, k, b, ge, rcv=None, mass=None, comment='') 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 = '') 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 = '') PBUSHT

Creates a PBUSHT card

add_pcomp(pid: int, mids: list[int], thicknesses: list[float], thetas=None, souts=None, nsm=0.0, sb=0.0, ft=None, tref=0.0, ge=0.0, lam=None, z0=None, comment='') 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='') 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='') 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='') 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='') 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: int, mid: int, coef: float, form: int = 0, flag: int = 0, expr: float = 0.0, exppi: float = 0.0, exppo: float = 0.0, comment: str = '') 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 = '') PDAMP

Creates a PDAMP card

add_pdamp5(pid: int, mid: int, b: float, comment: str = '') PDAMP5

Creates a PDAMP5 card

add_pdampt(pid: int, tbid: int, comment: str = '') PDAMPT

Creates a PDAMPT card

add_pelas(pid: int, k: float, ge: float = 0.0, s: float = 0.0, comment: str = '') 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 = '') 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: int, d: int, kt1: float, kt2: float, kt3: float, mcid: int = -1, mflag: int = 0, kr1: float = 0.0, kr2: float = 0.0, kr3: float = 0.0, mass: float = 0.0, ge: float = 0.0, comment: str = '') 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: float | None = None, mu1: float = 0.0, kt: float | None = None, mu2: float | None = None, tmax: float = 0.0, mar: float = 100.0, trmin: float = 0.001, comment: str = '') 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='') 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='') PIHEX

See also

PSOLID

add_pload(sid, pressure, nodes, comment='') 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='') 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='') 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

eidsint / list[int]

the elements to apply pressure to For NX Nastran and MSC Nastran < 2018 the list must have no more than 6 ids or it must be a continouus monotonic list (e.g., [1, 2, …, 1000]). If you don’t follow this rule, you’ll incur in a fatal error. This limitation does not apply to MSC Nastran >= 2018.

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='') 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='') 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 = '') 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='') PLPLANE

Creates a PLPLANE card

add_plsolid(pid, mid, stress_strain='GRID', ge=0.0, comment='') 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 = '') 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 = '') 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='') 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 = '') PPLANE

Creates a PPLANE card

add_prac2d(pid, mid, thick, iplane, nsm=0.0, gamma=0.5, phi=180.0, comment='') PRAC2D

Creates a PRAC2D card

add_prac3d(pid, mid, gamma=0.5, phi=180.0, comment='') PRAC3D

Creates a PRAC3D card

add_presax(sid, pressure, rid1, rid2, phi1=0.0, phi2=360.0, comment='') 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 = '') 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='') 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 = '') 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='') 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='') 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='') 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='') PVAL

PVAL ID POLY1 POLY2 POLY3 CID SETTYP ID

add_pvisc(pid, ce, cr, comment='') 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='') QBDY1

Creates a QBDY1 card

add_qbdy2(sid, eid, qfluxs, comment='') QBDY2

Creates a QBDY2 card

add_qbdy3(sid, Q0, cntrlnd, eids, comment='') 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='') 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='') QSET | 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='') QSET | QSET1

See also

add_qset

add_qvect(sid, q0, eids, t_source=None, ce=0, vector_tableds=None, control_id=0, comment='') 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='') QVOL

Creates a QVOL card

add_radbc(nodamb, famb, cntrlnd, eids, comment='') RADBC

Creates a RADBC card

add_radm(radmid, absorb, emissivity, comment='') RADM

Creates a RADM card

add_randps(sid, j, k, x=0.0, y=0.0, tid=0, comment='') 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='') 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='') 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='') RBAR1

Creates an RBAR1 element

add_rbe1(eid, Gni, Cni, Gmi, Cmi, alpha=0.0, comment='') 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: int, gn: int, cm: str, Gmi: list[int], alpha: float = 0.0, tref: float = 0.0, comment: str = '', validate: bool = False) 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[list[int]], Gmi=None, Cmi=None, alpha: float = 0.0, tref: float = 0.0, comment: str = '') RBE3

Creates an RBE3 element

Parameters:
eidint

element id

refgridint

dependent node

refc - str

dependent components for refgrid???

weightslist[float]

independent weights for the importance of the DOF

compslist[str]

independent components len(comps) = len(weights)

GiJsvaries

independent nodes list[list[int]]:

allows for different nodes for the different weights len(GiJs) = len(weights)

list[int, …, int]:

intended for a single weight This will be expanded into list[list[int]]

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='') RELEASE
add_rforce(sid, nid, scale, r123, cid=0, method=1, racc=0.0, mb=0, idrf=0, comment='') RFORCE

Creates an RFORCE card

add_rforce1(sid, nid, scale, group_id, cid=0, r123=None, racc=0.0, mb=0, method=2, comment='') 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='') RINGAX

Creates a RINGAX card

add_rload1(sid, excite_id, delay=0, dphase=0, tc=0, td=0, Type='LOAD', comment='') RLOAD1

Creates an RLOAD1 card, which defines 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='') RLOAD2

Creates an RLOAD2 card, which defines 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='') ROTORD

Creates a ROTORD card

add_rotorg(sid, nids, comment='') ROTORG

Creates a ROTORG card

add_rrod(eid, nids, cma='', cmb='', alpha=0.0, comment='') 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='') 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='') 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='') SEBNDRY
add_sebset(seid: int, ids: list[int], components, comment='') SEBSET | SEBSET1

Creates an SEBSET/SEBSET1 card

add_sebset1(seid: int, ids: list[int], components, comment='') SEBSET | SEBSET1

See also

add_secset

add_sebulk(seid, superelement_type, rseid, method='AUTO', tol=1e-05, loc='YES', unitno=None, comment='') SEBULK
add_seconct(seid_a: int, seid_b: int, tol: float, loc: str, nodes_a: list[int], nodes_b: list[int], comment: str = '') SECONCT
add_secset(seid: int, ids: list[int], components, comment='') SECSET | SECSET1

Creates an SECSET/SECSET1 card

add_secset1(seid: int, ids: list[int], components, comment='') SECSET | SECSET1

See also

add_secset

add_seelt(seid, ids, comment='') SEELT
add_seexcld(seid_a, seid_b, nodes, comment='') SEEXCLD
add_selabel(seid, label, comment='') SELABEL
add_seload(lid_s0, seid, lid_se, comment='') SELOAD
add_seloc(seid, nodes_seid, nodes0, comment='') 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='') SEMPLN
add_senqset(set_id, n, comment='') SENQSET
add_seqgp(nids: list[int], seqids: list[int | float], comment: str = '') 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: int, ids: list[int], components, comment='') SEQSET | SEQSET1

Creates an SEQSET card

add_seqset1(seid, ids, components, comment='') SEQSET | SEQSET1

See also

add_secset

add_seset(seid, ids, comment='') SESET

Creates an SEUSET card

add_sesup(nodes, Cs, comment='') SESUP

Creates an SESUP card

add_set1(sid, ids, is_skin=False, comment='') 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 = '') 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 = '') SET3

Creates a SET3 card

add_setree(seid, seids, comment='') SETREE
add_sload(sid, nids, mags, comment='') 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 = '') SNORM
add_spc(conid: int, nodes: list[int], components: list[str], enforced: list[float], comment: str = '') 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: int, components: str, nodes: list[int], comment: str = '') 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='') SPCADD

Creates a SPCADD card

add_spcax(conid, ringax, hid, component, enforced, comment='') SPCAX

Creates an SPCAX card

add_spcd(sid, nodes, components, enforced, comment='') 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 = '') 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 = '') 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 = '') 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 = '') 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='') SPLINE5

Creates a SPLINE5 card

add_spoint(ids: int | list[int], comment: str = '') 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='') 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='') 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='') TABDMP1

Creates a TABDMP1 card

add_tabled1(tid: int, x: ndarray, y: ndarray, xaxis: str = 'LINEAR', yaxis: str = 'LINEAR', extrap: int = 0, comment: str = '') 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: ndarray, y: ndarray, extrap: int = 0, comment: str = '') TABLED2

Creates a TABLED2 card

add_tabled3(tid: int, x1: float, x2: float, x: ndarray, y: ndarray, extrap: int = 0, comment: str = '') TABLED3

Creates a TABLED3 card

add_tabled4(tid: int, x1: float, x2: float, x3: float, x4: float, a: list[float], comment: str = '') TABLED4

Creates a TABLED4 card

add_tableh1(tid: int, x, y, comment: str = '') TABLEH1
add_tableht(tid: int, x, y, comment: str = '') TABLEHT
add_tablem1(tid: int, x: ndarray, y: ndarray, xaxis: str = 'LINEAR', yaxis: str = 'LINEAR', extrap: int = 0, comment: str = '') TABLEM1

Creates a TABLEM1 card

add_tablem2(tid: int, x1: float, x: ndarray, y: ndarray, extrap: int = 0, comment: str = '') TABLEM2

Creates a TABLEM2 card

add_tablem3(tid: int, x1: float, x2: float, x: ndarray, y: ndarray, extrap: int = 0, comment: str = '') TABLEM3

Creates a TABLEM3 card

add_tablem4(tid: int, x1: float, x2: float, x3: float, x4: float, a: list[float], comment: str = '') TABLEM4

Creates a TABLEM4 card

add_tables1(tid: int, x: ndarray, y: ndarray, Type: int = 1, comment: str = '') 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='') TABLEST

Creates an TABLEST card

add_tabrnd1(tid, x, y, xaxis='LINEAR', yaxis='LINEAR', comment='') TABRND1

Creates an TABRND1 card

add_tabrndg(tid, Type, LU, WG, comment='') 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='') TEMP

Creates a TEMP card

Parameters:
sidint

Load set identification number

temperaturesdict[nid]temperature
nidint

node id

temperaturefloat

the nodal temperature

commentstr; default=’’

a comment for the card

add_tempax(sid, ring, phi, temperature, comment='') TEMPAX

Creates a TEMPAX card

add_tempd(sid, temperature, comment='') 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='') TF

Creates a TF card

add_tic(sid, nodes, components, u0=0.0, v0=0.0, comment='') 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: int, excite_id: int, tid: int | float, delay: int | float = 0, Type: str = 'LOAD', us0: float = 0.0, vs0: float = 0.0, comment: str = '') TLOAD1

Creates a TLOAD1 card, which defines a load based on a table

Parameters:
sidint

load id

excite_idint

node id where the load is applied

tidint / float

TABLEDi id that defines F(t) for all degrees of freedom in EXCITEID entry

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='') 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) TOPVAR

adds a TOPVAR

add_trim(sid, mach, q, labels, uxs, aeqr=1.0, trim_type=1, comment='') TRIM | 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='') TSTEP

Creates a TSTEP card

add_tstep1(sid, tend, ninc, nout, comment='') 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='') TSTEPNL

Creates a TSTEPNL card

add_uset(name, ids, components, comment='') USET | 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='') USET | USET1

See also

add_uset

add_uxvec(idi: int, labels: list[str], uxs: list[float])
add_view(iview, icavity, shade='BOTH', nbeta=1, ngamma=1, dislin=0.0, comment='') 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='') 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: list[str], card_name: str, is_list: bool = True, has_none: bool = 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: int | list[int] | None = None) dict[int, 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: dict[str, DMIG]
property dmijis: dict[str, DMIJI]
property dmijs: dict[str, DMIJ]
property dmiks: dict[str, DMIK]
property dmis: dict[str, DMI]
property element_ids

gets the element ids

enable_cards(cards: Sequence[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.enable_cards([‘GRID’, ‘CTRIA3’])

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: bool = True, sum_bar_area: bool = True) dict[int, float]

Gets a breakdown of the area by property region

Parameters:
property_idslist[int] / int

list of property ID

stop_if_no_areabool; default=True

prevents crashing if there are no elements

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 (e.g., A=A_pid*Nelements) False : only get the cross sectional properties (e.g., A=A_pid)

Returns:
pids_to_areadict[int pid]float area

the pid to area dictionary

TODO: What about CONRODs?
#’PBRSECT’, ‘PBCOMP’, ‘PBMSECT’, ‘PBEAM3’, ‘PBEND’, ‘PIHEX’, ‘PCOMPS’,
get_bdf_cards(bulk_data_lines: list[str], bulk_data_ilines: Any | None = 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') 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: 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) dict[str, Any]
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](nnodesi,) int ndarray

the indicies in nids_all that correspond to cd > 0 cd : int

the CD coordinate system

nnodesiint

nnodesi <= nnodes

icd_transformdict{int cid(n,) int ndarray}

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(n,) int ndarray}

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(n,) int ndarray}

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 = '') TLOAD1 | TLOAD2 | RLOAD1 | RLOAD2

gets the dload entries (e.g., TLOAD1, TLOAD2)

get_element_faces(element_ids: list[int] | None = 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: 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: list[int] | None = 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)][eids, nids]
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][eids, pids, nids]

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: dict[str, Any] | None = None, stop_if_no_eids: bool = True) array

Gets a dictionary of element type to [eids, pids, node_ids]

Parameters:
dtypestr; default=’int32’

the type of the integers

solidsdict[etype]value
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][eids, pids, nids]
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: str | None = 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: bool = True)

gets a breakdown of the length by property region

TODO: What about CONRODs?

get_mass_breakdown(property_ids: int | None = None, stop_if_no_mass: bool = True) tuple[dict[int, float], dict[str, 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

Returns:
pids_to_massdict {intfloat, …}

Map from property id to mass.

mass_type_to_massdict {strfloat, …}

Map from mass id to mass for mass elements. CONM2s are listed here

TODO: What about CONRODs?
#’PBCOMP’, ‘PBMSECT’, ‘PBEAM3’, ‘PBEND’, ‘PIHEX’, ‘PCOMPS’,
get_mass_breakdown_detailed(property_ids: int | None = None, stop_if_no_mass: bool = True) tuple[dict[int, float], dict[int, float], dict[str, 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, defaultFalse

Separates structural and nonstructural mass outputs.

Returns:
pids_to_massdict {intfloat, …}

Map from property id to structural mass.

pids_to_mass_nonstructuraldict {intfloat, …}

Map from property id to nonstructural mass.

mass_type_to_massdict {strfloat, …}

Map from mass id to mass for mass elements. CONM2s are listed here

TODO: What about CONRODs?
#’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() 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]i
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 = '', return_array: bool = False) set[int] | ndarray

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

return_array: bool; default=False

True: returns a numpy array False: returns a set

Returns:
node_idsset[int]; np.ndarray

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: int | float | str | list[float]) int | float | str | list[float]

gets a param card

get_pid_to_node_ids_and_elements_array(pids: list[int] | int | None = None, etypes: list[str] | None = None, idtype: str = 'int32', msg: str = '') tuple[dict[int, str], 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: int, scale: float = 1.0, consider_load_combinations: bool = True, skip_scale_factor0: bool = False, stop_on_failure: bool = True, msg: str = '')

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: int | None = 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: int = 0, fdtype: str = 'float64', sort_ids: bool = 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[ndarray, ndarray, ndarray, dict[int, ndarray], dict[int, 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(n,) int ndarray}

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(n,) int ndarray}

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: str | None = None, encoding: str | None = None, make_ilines: bool = True) tuple[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: bool
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: dict[int, list[Any]]

stores LOAD, FORCE, FORCE1, FORCE2, MOMENT, MOMENT1, MOMENT2, PLOAD, PLOAD2, PLOAD4, SLOAD GMLOAD, SPCD, DEFORM, QVOL

property material_ids

gets the material ids

property nastran_format: str
property ncaeros: int

gets the number of CAEROx panels

property ncoords: int

gets the number of coordinate systems

property nelements: int

gets the number of element

property nid_map: dict[int, int]

Gets the GRID/SPOINT/EPOINT ids to a sorted order.

Parameters:
sort_idsbool; default=True

sort the ids

Returns:
nid_mapdict[nid]i
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: int

gets the number of materials

property nnodes: int

gets the number of GRIDs

property node_ids

gets the GRID ids

nodes: dict[int, Any]

stores SPOINT, GRID cards

property npoints: int

gets the number of GRID, SPOINT, EPOINT ids

property nproperties: int

gets the number of properties

object_attributes(mode: str = 'public', keys_to_skip: list[str] | None = 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: list[str] | None = 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: str | PurePath | None = None, validate: bool = True, xref: bool = True, punch: bool = False, read_includes: bool = True, save_file_structure: bool = False, encoding: str | None = 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 = '') Coord | None

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: Sequence[str]) None
set_dynamic_syntax(dict_of_vars: dict[str, 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: int | float | str | list[float], comment: str = '') None

sets a param card; creates it if necessary

property sol: int

gets the solution (e.g. 101, 103)

special_cards

/ is the delete from restart card

property subcases: dict[int, Subcase]

gets the subcases

superelement_nodes(seid: int, nodes: list[Any], msg: str = '') None
tempbc(sid, Type, nodes, temps, comment='') TEMPBC
transform_xyzcp_to_xyz_cid(xyz_cp: ndarray, nids: ndarray, icp_transform: dict[int, ndarray], cid: int = 0, in_place: bool = False, atol: float = 1e-06) 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(n,) int ndarray}

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: 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: 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: str | None, 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: str | StringIO | None = None, encoding: str | None = None, size: int = 8, nodes_size: int | None = None, elements_size: int | None = None, loads_size: int | None = None, is_double: bool = False, interspersed: bool = False, enddata: bool | None = 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: str | StringIO | None, relative_dirname: str | None = None, encoding: str | None = None, size: int = 8, is_double: bool = False, enddata: bool | None = None, close: bool = True, is_windows: bool | None = 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_bulk_data(bdf_file, size: int = 8, is_double: bool = False, interspersed: bool = False, enddata: bool | None = None, close: bool = True, nodes_size: int | None = None, elements_size: int | None = None, loads_size: int | None = None, is_long_ids: bool = False) None

Writes the BDF.

Parameters:
bdf_filevaries

file - a file object StringIO() - a StringIO object

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

closebool; default=True

should the output file be closed

.. note:: is_long_ids is only needed if you have ids longer

than 8 characters. It’s an internal parameter, but if you’re calling the new sub-function, you might need it. Chances are you won’t.

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: BDF, version: str)[source]
pyNastran.bdf.bdf.map_version(fem: BDF, version: str)[source]
pyNastran.bdf.bdf.read_bdf(bdf_filename: str | None = None, validate: bool = True, xref: bool = True, punch: bool = False, save_file_structure: bool = False, skip_cards: list[str] | None = None, read_cards: list[str] | None = None, encoding: str | None = None, log: SimpleLogger | None = 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 ..