pyyeti.nastran.bulk.wtcoordcards

pyyeti.nastran.bulk.wtcoordcards(f, ci)[source]

Write Nastran CORD2* cards 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.

  • ci (dictionary or None) – Dictionary of coordinate card info as returned by pyyeti.nastran.n2p.mkcordcardinfo(). If None or if dict is empty, this routine quietly does nothing.

Returns:

None

Notes

Typically called by wtextseout().

Examples

>>> import numpy as np
>>> from pyyeti import nastran
>>> ci = {10: ['CORD2R', np.array([[10, 1, 0],
...                                [100., 0., 0.],
...                                [100., 0., 100.],
...                                [200., 0., 0.]])]}
>>> nastran.wtcoordcards(1, ci)
$ Coordinate 10:
CORD2R*               10               0  1.00000000e+02  0.00000000e+00*
*         0.00000000e+00  1.00000000e+02  0.00000000e+00  1.00000000e+02*
*         2.00000000e+02  0.00000000e+00  0.00000000e+00