pyyeti.nastran.bulk.wtcard16¶
- pyyeti.nastran.bulk.wtcard16(f, fields)[source]¶
Write a Nastran card formatted in 16 fixed-field 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()orio.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 = ["GRID*", 101, 102, 1.0, 2.0, 3.0, 103] >>> nastran.wtcard16(1, fields) GRID* 101 102 1. 2. * 3. 103