add_card Module

digraph inheritanced8c40688cb { bgcolor=transparent; rankdir=LR; size=""; "pyNastran.bdf.bdf_interface.add_card.Add0dElements" [URL="#pyNastran.bdf.bdf_interface.add_card.Add0dElements",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.Add1dElements" [URL="#pyNastran.bdf.bdf_interface.add_card.Add1dElements",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.Add2dElements" [URL="#pyNastran.bdf.bdf_interface.add_card.Add2dElements",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.Add3dElements" [URL="#pyNastran.bdf.bdf_interface.add_card.Add3dElements",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.AddAcoustic" [URL="#pyNastran.bdf.bdf_interface.add_card.AddAcoustic",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.AddAero" [URL="#pyNastran.bdf.bdf_interface.add_card.AddAero",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.AddBolts" [URL="#pyNastran.bdf.bdf_interface.add_card.AddBolts",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.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.add_card.AddCoords" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddContact" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddBolts" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.Add0dElements" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.Add1dElements" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.Add2dElements" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.Add3dElements" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddRigidElements" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddMaterial" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddAero" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddThermal" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddAcoustic" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddOptimization" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddSuperelements" -> "pyNastran.bdf.bdf_interface.add_card.AddCards" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pyNastran.bdf.bdf_interface.add_card.AddContact" [URL="#pyNastran.bdf.bdf_interface.add_card.AddContact",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.AddCoords" [URL="#pyNastran.bdf.bdf_interface.add_card.AddCoords",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.AddMaterial" [URL="#pyNastran.bdf.bdf_interface.add_card.AddMaterial",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.AddOptimization" [URL="#pyNastran.bdf.bdf_interface.add_card.AddOptimization",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.AddRigidElements" [URL="#pyNastran.bdf.bdf_interface.add_card.AddRigidElements",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.AddSuperelements" [URL="#pyNastran.bdf.bdf_interface.add_card.AddSuperelements",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pyNastran.bdf.bdf_interface.add_card.AddThermal" [URL="#pyNastran.bdf.bdf_interface.add_card.AddThermal",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"]; }

Defines a method to add a card that is faster than add_card.

class pyNastran.bdf.bdf_interface.add_card.Add0dElements[source]

Bases: object

add_cdamp1(eid: int, pid: int, nids: list[int], c1: int = 0, c2: int = 0, comment: str = '') CDAMP1[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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[source]

Creates a CFAST card

add_cgap(eid: int, pid: int, nids: list[int], x: list[int] | None, g0: int | None, cid: int | None = None, comment: str = '') CGAP[source]

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_cmass1(eid: int, pid: int, nids: list[int], c1: int = 0, c2: int = 0, comment: str = '') CMASS1[source]

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[source]

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[source]

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[source]

Creates a CMASS4 card

Parameters:
eidint

element id

massfloat

SPOINT mass

nidslist[int, int]

SPOINT ids

commentstr; default=’’

a comment for the card

add_conm1(eid: int, nid: int, mass_matrix: ndarray[Any, dtype[float64]], cid=0, comment='') CONM1[source]

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[source]

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_cvisc(eid: int, pid: int, nids: list[int], comment: str = '') CVISC[source]

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_pdamp(pid: int, b: float, comment: str = '') PDAMP[source]

Creates a PDAMP card

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

Creates a PDAMP5 card

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

Creates a PDAMPT card

add_pelas(pid: int, k: float, ge: float = 0.0, s: float = 0.0, comment: str = '') PELAS[source]

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[source]

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[source]

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[source]

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_pmass(pid: int, mass: float, comment: str = '') PMASS[source]

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_pvisc(pid, ce, cr, comment='') PVISC[source]

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

class pyNastran.bdf.bdf_interface.add_card.Add1dElements[source]

Bases: object

add_baror(pid, is_g0, g0, x, offt='GGG', comment: str = '') BAROR[source]
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[source]

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[source]

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[source]

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[source]

Creates a CBEAM3 card

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

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[source]

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[source]

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[source]

Creates a CBUSH2D 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[source]

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_crod(eid: int, pid: int, nids: list[int], comment: str = '') CROD[source]

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_ctube(eid: int, pid: int, nids: list[int], comment: str = '') CTUBE[source]

Creates a CTUBE card

Parameters:
eidint

element id

pidint

property id

nidslist[int, int]

node ids

commentstr; default=’’

a comment for the card

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[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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]][source]

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[source]

Creates a PBEND card

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

Creates a PBMSECT card

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

Creates a PBRSECT card

add_pbush(pid, k, b, ge, rcv=None, mass=None, comment='') PBUSH[source]

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[source]

Creates a PBUSH1D card

add_pbush2d_cross(pid: int, k11: float, k22: float, b11: float, b22: float, m11: float, m22: float, k12: float, k21: float, b12: float, b21: float, m12: float, m21: float, comment: str = '') None[source]

MSC only card

PBUSH2D | PID | K11 | K22 | B11 | B22 | M11 | M22 |
| CROSS | K12 | K21 | B12 | B21 | M12 | M21 |
add_pbusht(pid: int, k_tables: list[int], b_tables: list[int], ge_tables: list[int], kn_tables: list[int], comment: str = '') PBUSHT[source]

Creates a PBUSHT card

add_prod(pid: int, mid: int, A: float, j: float = 0.0, c: float = 0.0, nsm: float = 0.0, comment: str = '') PROD[source]

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_ptube(pid, mid, OD1, t=None, nsm=0.0, OD2=None, comment='') PTUBE[source]

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

class pyNastran.bdf.bdf_interface.add_card.Add2dElements[source]

Bases: object

add_cquad(eid, pid, nids, theta_mcid=0.0, comment='') CQUAD[source]

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[source]

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[source]

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[source]

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_cshear(eid, pid, nids, comment='') CSHEAR[source]

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_ctria3(eid, pid, nids, zoffset=0.0, theta_mcid=0.0, tflag=0, T1=None, T2=None, T3=None, comment='') CTRIA3[source]

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[source]

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[source]

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_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[source]

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[source]

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_pshear(pid: int, mid: int, t: float, nsm: float = 0.0, f1: float = 0.0, f2: float = 0.0, comment: str = '') PSHEAR[source]

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[source]

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_snorm(nid: int, normal: list[float], cid: int = 0, comment: str = '') SNORM[source]
class pyNastran.bdf.bdf_interface.add_card.Add3dElements[source]

Bases: object

add_chexa(eid, pid, nids, comment='') CHEXA8 | CHEXA20[source]

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_cpenta(eid, pid, nids, comment='') CPENTA6 | CPENTA15[source]

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_cpyram(eid, pid, nids, comment='') CPYRAM5 | CPYRAM13[source]

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_ctetra(eid, pid, nids, comment='') CTETRA4 | CTETRA10[source]

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_pcomps(pid: int, global_ply_ids: list[int], mids: list[int], thicknesses: list[float], thetas: list[float], cordm: int = 0, psdir: int = 13, sb=None, nb=None, tref: float = 0.0, ge: float = 0.0, failure_theories=None, interlaminar_failure_theories=None, souts: list[str] = None, comment: str = '') PCOMPS[source]

Creates a PCOMPS card

add_plsolid(pid, mid, stress_strain='GRID', ge=0.0, comment='') PLSOLID[source]

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_psolid(pid, mid, cordm=0, integ=None, stress=None, isop=None, fctn='SMECH', comment='') PSOLID[source]

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

class pyNastran.bdf.bdf_interface.add_card.AddAcoustic[source]

Bases: object

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: str = '') ACMODL[source]
add_acplnw(sid: int, form: str, scale: float, real: int | float, imag: int | float, cid1: int, xyz: list[float], cid2: int, nxyz: list[float], comment: str = '') None[source]
add_amlreg(rid: int, sid: int, name: str, infid: list[int], nlayers: int = 5, radsurf: str = 'AML', comment: str = '') AMLREG[source]

AMLREG

RID

SID

Name/Descriptor

NL

RADSURF

INFID1

INFID2

INFID3

Parameters:
rid: int

AML region identification number

sidint

Surface identification number

namestr

The Name/Descriptor is an optional character string

infidlist[int]

Identification number of an infinite plane. Up to three (3) infinite planes are considered for an AML region. The infinite planes are used when acoustic results are to be computed exterior to the AML region. (Integer >= 0; Default = 0) See Remark 5.

nlayersint; default=5

Number of layers of extrusion to be formed by solver

radsurfstr; default=’AML’
Radiation surface type
1/AML: the pressure and velocities on the AML boundary

are used to compute results in the far field.

2/PHYB: the pressure and velocities on the physical

boundary (that is, all free fluid faces with the exception of faces on the AML and the infinite planes) are used to compute results in the far field.

0/NONE: the region does not radiate.

add_caabsf(eid, pid, nodes, comment='') CHACAB[source]
add_chacab(eid, pid, nodes, comment='') CHACAB[source]
add_chacbr(eid, pid, nodes, comment='') CHACBR[source]
add_matpor_craggs(mid: int, rho: float, c: float, resistivity: float, porosity: float, tortuosity: float, comment: str = '')[source]
MATPOR MID MODEL RHO C

RES POR TORT

add_matpor_delmiki(mid: int, rho: float, c: float, resistivity: float, porosity: float, frame: str, density: float = 0.0, comment: str = '')[source]
add_matpor_jca(mid: int, rho: float, c: float, resistivity: float, porosity: float, tortuosity: float, frame: str, gamma: float, prandtl_number: float, mu: float, L1: float, L2: float, density: float = 0.0, comment: str = '')[source]
add_micpnt(eid: int, node_id: int, name: str, comment: str = '') None[source]
add_paabsf(pid, tzreid=None, tzimid=None, s=1.0, a=1.0, b=0.0, k=0.0, rhoc=1.0, comment='')[source]
add_pacabs(pid, cutfr, b, k, m, synth=True, tid_resistance=None, tid_reactance=None, tid_weight=None, comment='') PACBAR[source]

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[source]

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_panel(names: list[str], set_ids: list[int]) None[source]
add_pmic(pid: int, comment: str = '') PMIC[source]
class pyNastran.bdf.bdf_interface.add_card.AddAero[source]

Bases: object

add_aecomp(name: str, list_type: list[str], lists: int | list[int], comment: str = '') AECOMP[source]

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[source]

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[source]

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) None[source]

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[source]

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[source]

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) None[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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_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[source]

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[source]

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[source]

Creates a CAERO3 card

add_caero4(eid, pid, p1, x12, p4, x43, cp=0, nspan=0, lspan=0, comment='') CAERO4[source]

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[source]

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[source]
add_csschd(sid, aesid, lschd, lalpha=None, lmach=None, comment='') CSSCHD[source]

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_diverg(sid: int, nroots: int, machs: list[float], comment: str = '') DIVERG[source]

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

add_flfact(sid: int, factors: list[float], comment: str = '') FLFACT[source]

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[source]

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_gust(sid, dload, wg, x0, V=None, comment='') GUST[source]

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_massset(mass_set_id, scale, scales, mass_set_ids) None[source]

adds an MASSSET card

add_mkaero1(machs: list[float], reduced_freqs: list[float], comment: str = '') MKAERO1[source]

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[source]

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_paero1(pid, caero_body_ids=None, comment='') PAERO1[source]

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[source]

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[source]

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[source]

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[source]

Creates a PAERO5 card

add_sblnd1(eid, eid1, eid2, option_bytes, w1, aero_grid, d1, d2, x, cid)[source]
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[source]

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[source]

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[source]

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[source]

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[source]

Creates a SPLINE5 card

add_trim(sid, mach, q, labels, uxs, aeqr=1.0, trim_type=1, comment='') TRIM | TRIM2[source]

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

class pyNastran.bdf.bdf_interface.add_card.AddBolts[source]

Bases: object

add_bolt_msc()[source]
add_bolt_nx(bolt_id: int, element_type: int, eids: list | None = None, nids: list | None = None, csid=None, idir=None, comment: str = '') BOLT[source]
add_boltfor_nx(sid: int, load_value: float, bolt_ids: list[int], comment: str = '') BOLTFOR[source]
add_boltseq_nx(sid: int, s_nos: list[int], b_ids: list[int], n_incs: list[int] | None = None, comment: str = '') BOLT[source]
class pyNastran.bdf.bdf_interface.add_card.AddContact[source]

Bases: object

add_bconp(contact_id, slave, master, sfac, fric_id, ptype, cid, comment='') BCONP[source]

Creates a BCONP card

add_bcrpara(crid, surf='TOP', offset=None, Type='FLEX', grid_point=0, comment='') BCRPARA[source]

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[source]

Creates a BCTADD card

add_bctpara(csid, params, comment='') BCTPARA[source]

Creates a BCTPARA card

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

Creates a BCTSET card

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

Creates a BLSEG card

add_bsurf(sid, eids, comment='') BSURF[source]

Creates a BSURF card

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

Creates a BSURFS card

class pyNastran.bdf.bdf_interface.add_card.AddCoords[source]

Bases: object

add_cord1c(cid: int, g1: int, g2: int, g3: int, comment: str = '') CORD1C[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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[source]

Creates a CORD3G card

class pyNastran.bdf.bdf_interface.add_card.AddMaterial[source]

Bases: object

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

Creates a CREEP 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[source]

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[source]

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[source]

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[source]

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[source]

Creates a MAT3 card

add_mat3d(mid, e1, e2, e3, nu12, nu13, nu23, g12, g13, g23, rho=0.0, comment='') MAT3D[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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.

  • CHEXA and CPENTA solid elements when the elements reference a PCOMPS property.

  • 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[source]

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[source]

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[source]

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[source]

Creates a MATHP card

add_mats1(mid, tid, Type, h, hr, yf, limit1, limit2, comment='') MATS1[source]

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[source]

Creates a MATT1 card

add_matt11(mid: int, e1_table=None, e2_table=None, e3_table=None, nu12_table=None, nu13_table=None, nu23_table=None, g12_table=None, g13_table=None, g23_table=None, rho_table=None, a1_table=None, a2_table=None, a3_table=None, ge_table=None, comment: str = '') MATT11[source]
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[source]

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[source]

Creates a MATT3 card

add_matt4(mid, k_table=None, cp_table=None, h_table=None, mu_table=None, hgen_table=None, comment='') MATT4[source]

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[source]

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[source]

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[source]
class pyNastran.bdf.bdf_interface.add_card.AddOptimization[source]

Bases: object

add_bndgrid(components: str, values: list[int], comment: str = '') None[source]
add_dconadd(oid, dconstrs, comment='') DCONADD[source]

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[source]

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[source]

Creates a DDVAL card

add_deqatn(equation_id: int, eqs: list[str], comment: str = '') DEQATN[source]

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[source]

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

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_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[source]
add_doptprm(params: dict[str, int | float], comment='') DOPTPRM[source]

Creates a DOPTPRM 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[source]

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[source]

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[source]

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

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[source]

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[source]

Creates a DTABLE card

Parameters:
default_valuesdict
keystr

the parameter name

valuefloat

the value

commentstr; default=’’

a comment for the card

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

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[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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[source]

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

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[source]
add_topvar(opt_id, label, ptype, xinit, pid, xlb=0.001, delxv=0.2, power=3.0) TOPVAR[source]

adds a TOPVAR

class pyNastran.bdf.bdf_interface.add_card.AddRigidElements[source]

Bases: object

add_rbar(eid, nids, cna, cnb, cma, cmb, alpha=0.0, comment='') RBAR[source]

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[source]

Creates an RBAR1 element

add_rbe1(eid, Gni, Cni, Gmi, Cmi, alpha=0.0, comment='') RBE1[source]

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[source]

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[source]

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_rrod(eid, nids, cma='', cmb='', alpha=0.0, comment='') RROD[source]

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_rspline(eid, independent_nid, dependent_nids, dependent_components, diameter_ratio=0.1, comment='') RSPLINE[source]

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[source]

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

class pyNastran.bdf.bdf_interface.add_card.AddSuperelements[source]

Bases: object

add_csuper(seid, psid, nodes, comment='') CSUPER[source]
add_csupext(seid, nodes, comment='') CSUPEXT[source]
add_release(seid, comp, nids, comment='') RELEASE[source]
add_sebndry(seid_a, seid_b, ids, comment='') SEBNDRY[source]
add_sebset(seid: int, ids: list[int], components, comment='') SEBSET | SEBSET1[source]

Creates an SEBSET/SEBSET1 card

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

See also

add_secset

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

Creates an SECSET/SECSET1 card

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

See also

add_secset

add_seelt(seid, ids, comment='') SEELT[source]
add_seexcld(seid_a, seid_b, nodes, comment='') SEEXCLD[source]
add_selabel(seid, label, comment='') SELABEL[source]
add_seload(lid_s0, seid, lid_se, comment='') SELOAD[source]
add_seloc(seid, nodes_seid, nodes0, comment='') SELOC[source]

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[source]
add_senqset(set_id, n, comment='') SENQSET[source]
add_seqset(seid: int, ids: list[int], components, comment='') SEQSET | SEQSET1[source]

Creates an SEQSET card

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

See also

add_secset

add_seset(seid, ids, comment='') SESET[source]

Creates an SEUSET card

add_sesup(nodes, Cs, comment='') SESUP[source]

Creates an SESUP card

add_setree(seid, seids, comment='') SETREE[source]
class pyNastran.bdf.bdf_interface.add_card.AddThermal[source]

Bases: object

add_chbdye(eid, eid2, side, iview_front=0, iview_back=0, rad_mid_front=0, rad_mid_back=0, comment='') CHBDYE[source]

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[source]

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[source]

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_conv(eid, pconid, ta, film_node=0, cntrlnd=0, comment='') CONV[source]

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[source]

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_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[source]

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[source]

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_phbdy(pid, af=None, d1=None, d2=None, comment='') PHBDY[source]

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_qbdy1(sid, qflux, eids, comment='') QBDY1[source]

Creates a QBDY1 card

add_qbdy2(sid, eid, qfluxs, comment='') QBDY2[source]

Creates a QBDY2 card

add_qbdy3(sid, Q0, cntrlnd, eids, comment='') QBDY3[source]

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[source]

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_qvect(sid, q0, eids, t_source=None, ce=0, vector_tableds=None, control_id=0, comment='') QVECT[source]

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[source]

Creates a QVOL card

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

Creates a RADBC card

add_radm(radmid, absorb, emissivity, comment='') RADM[source]

Creates a RADM card

add_temp(sid, temperatures, comment='') TEMP[source]

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_tempbc(sid, Type, nodes, temps, comment='') TEMPBC[source]
add_tempd(sid, temperature, comment='') TEMPD[source]

Creates a TEMPD card

Parameters:
sidint

Load set identification number. (Integer > 0)

temperaturefloat

default temperature

commentstr; default=’’

a comment for the card

add_view(iview: int, icavity: int, shade: str = 'BOTH', nbeta: int = 1, ngamma: int = 1, dislin: float = 0.0, comment: str = '') VIEW[source]

Creates a VIEW card

Parameters:
iview: int

Identification number.

icavity: int

Cavity identification number for grouping the radiant exchange faces of CHBDYi elements.

SHADE: str; default=’BOTH’

Shadowing flag for the face of CHBDYi element. 1/NONE: face can neither shade nor be shaded by other faces. KSHD: face can shade other faces. KBSHD: face can be shaded by other faces. BOTH: face can both shade and be shaded by other faces.

nbeta: int; default=1

Subelement mesh size in the beta direction.

ngamma: int; default=1

Subelement mesh size in the gamma direction.

dislin: float; default=0.0

The displacement of a surface perpendicular to the surface.

add_view3d(icavity: int, gitb: int = 4, gips: int = 4, cier: int = 4, error_tol: float = 0.1, zero_tol: float = 1e-10, warp_tol: float = 0.01, rad_check: int = 3, comment: str = '') VIEW3D[source]

Creates a VIEW3D card

pyNastran.bdf.bdf_interface.add_card.add_beam_stress_strain_constraints(model, pid: int, label: str, response_type: str, static_stress_constraints, dresp_id: int, dconstr_id: int, dconstrs, end_a: bool = True, end_b: bool = True) int[source]