Nastran-to-Python tools

Tools for working with data that originated in Nastran. Typically, a Nastran modes run is executed with the “nas2cam” DMAP (CAM is now replaced by Python but the DMAP retains the old name). This creates an op2/op4 file pair which is read by pyyeti.nastran.op2.rdnas2cam(). After that, the tools in this module can be used to create rigid-body modes, form data recovery matrices, make partition vectors based on sets, form RBE3-like interpolation matrices, etc.

The functions provided by this module can be accessed by just importing the “nastran” package. For example, you can access the rbgeom() function in these two ways:

>>> from pyyeti import nastran
>>> from pyyeti.nastran import n2p
>>> n2p.rbgeom is nastran.rbgeom
True

addgrid(uset, gid, nasset, coordin, xyz, ...)

Add a grid or grids to a USET table.

addulvs(nas, *ses, **kwargs)

Add ULVS matrices to the nas "nas2cam" data structure

build_coords(cords)

Builds the coordinate system dictionary from an array of coordinate card information.

expanddof(dof[, grids_only])

Expands degree of freedom (DOF) specification

find_xyz_triples(drmrb[, get_trans, mats, ...])

Find x, y, z triples in rigid-body motion matrix.

formdrm(nas, seup, dof[, sedn, gset])

Form a displacement data recovery matrix for specified dof.

formrbe3(uset, GRID_dep, DOF_dep, Ind_List)

Form a least squares interpolation matrix, like RBE3 in Nastran.

formtran(nas, se, dof[, gset])

Make a transformation matrix from a-set DOF to specified DOF within the same SE.

formulvs(nas, seup[, sedn, keepcset, ...])

Form ULVS for an upstream SE relative to a given downstream SE.

getcoordinates(uset, gid, csys[, coordref])

Get coordinates of a grid or location in a specified coordinate system.

make_uset(dof[, nasset, xyz])

Make a uset DataFrame

mkcordcardinfo(uset[, cid])

Returns 'coordinate card' data from information in USET table

mkdofpv(uset, nasset, dof, *[, strict, ...])

Make a DOF partition vector for a particular set from a Nastran USET table.

mksetpv(uset, major, minor)

Make a set partition vector from a Nastran USET table.

mkusetcoordinfo(cord[, uset, coordref])

Function for getting coordinfo as needed by the USET table.

mkusetmask([nasset])

Get bit-masks for use with the Nastran USET table.

rbcoords(rb[, verbose])

Return coordinates of each node given rigid-body modes.

rbgeom(grids[, refpoint])

Compute 6 rigid-body modes from geometry.

rbgeom_uset(uset[, refpoint])

Compute 6 rigid-body modes from geometry using a USET table.

rbmove(rb, oldref, newref)

Returns rigid-body modes relative to new reference point.

replace_basic_cs(uset, new_cs_id[, ...])

Define a new coordinate system as the base for a USET table

upasetpv(nas, seup)

Form upstream a-set partition vector for a downstream SE

upqsetpv(nas[, sedn])

Form upstream q-set partition vector for a downstream SE

usetprt(file, uset[, printsets])

Print Nastran DOF set membership information from USET table.