pyyeti.nastran.bulk.wtrspline

pyyeti.nastran.bulk.wtrspline(f, rid, ids, DoL='0.1')[source]

Write Nastran RSPLINE card(s).

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.

  • rid (integer) – ID for 1st RSPLINE; gets incremented by 1 for each RSPLINE

  • ids (2d array_like) – 2 column matrix: [grid_ids, independent_flag]; has grids for RSPLINE in desired order and a 0 or 1 flag for each where 1 means the grid is independent. Note: the 1st and last grids must be independent.

  • DoL (string or real scalar) – Specifies ratio of diameter of elastic tube to the sum of the lengths of all segments. Written with: f'{DoL:<8}'

Returns:

None

Notes

The RSPLINEs will follow this pattern:

RSPLINE1  independent1 - dependents1 - independent2
RSPLINE2  independent2 - dependents2 - independent3
...

Note that there can be multiple dependents sandwiched between the two outside independent nodes per RSPLINE.

The spline element assumes a linear interpolation for displacement and torsion along the axis of the spline, a quadratic interpolation for rotations normal to the axis of the spline, and a cubic interpolation for displacements normal to the axis of the spline.

Raises:

ValueError – If there are less than 3 grids for RSPLINE. If either the first or last grids is dependent.

Examples

>>> import numpy as np
>>> from pyyeti import nastran
>>> ids = np.array([[100, 1],
...                 [101, 0],
...                 [102, 0],
...                 [103, 1],
...                 [104, 0],
...                 [105, 1]])
>>> nastran.wtrspline(1, 10, ids)
RSPLINE       10     0.1     100     101  123456     102  123456     103
RSPLINE       11     0.1     103     104  123456     105