pyyeti.nastran.bulk.wtconm2

pyyeti.nastran.bulk.wtconm2(f, eid, gid, cid, mass, I_diag, I_offdiag=None, offset=None)[source]

Write a Nastran CONM2 card to a file.

Parameters:
  • f (string or file_like or 1 or None) – Either a name of a file, or is a file_like object as returned by open() or io.StringIO. Input as integer 1 to write to stdout. Can also be the name of a directory or None; in these cases, a GUI is opened for file selection.

  • eid (integer) – The element ID.

  • gid (integer) – The ID of the grid to which the mass element is attached.

  • cid (integer) – The coordinate system ID used to define the mass element.

  • mass (float) – Mass

  • I_diag (1d array_like) – The diagonal moment of inertia terms, I11, I22, and I33.

  • I_offdiag (1d array_like; optional) – The off-diagonal moment of inertia terma, I21, I31, and I32.

  • offset (1d array_like; optional) – Offset of the mass element from the grid to which it is attached.

Notes

This card will be written in 16 fixed-field format using the wtcard16() function.

Examples

>>> from pyyeti import nastran
>>> eid, gid, cid = 1, 2, 3
>>> mass = 5000.0
>>> I_diag = [6000.0, 7000.0, 8000.0]
>>> nastran.wtconm2(1, eid, gid, cid, mass, I_diag)
CONM2*                 1               2               3           5000.
*                     0.              0.              0.                *
*                  6000.              0.           7000.              0.
*                     0.           8000.