pyyeti.nastran.bulk.wtcard16d

pyyeti.nastran.bulk.wtcard16d(f, fields)[source]

Write a Nastran card formatted in 16 fixed-field double-precision format.

Line wraps and continuations will be inserted automatically. Empty fields should be indicated by an empty string.

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.

  • fields (1d array_like) – List of fields in the card.

Notes

The items in fields will be formatted according to their data type. Python integers will be formated as Nastran integers, and Python floats will be formatted as Nastran reals, using format_float16. Strings will always be left-justified.

Example

>>> from pyyeti import nastran
>>> fields = ["DMIG*", "KJJ", 101, 1, '', 1001, 1, 10.0, '', 1001, 2, -15.0, '']
>>> nastran.wtcard16d(1, fields)
DMIG*   KJJ                          101               1
*                   1001               1           1.D+1                *
*                   1001               2         -1.5D+1
*