Nastran API functions#

This page contains functions to be used with NASTRAN solver.

Generator of NASTRAN PCOMP property#

composipy.nastranapi.pcomp_generator.build_pcomp(sequence, midi, ti, pid=1, z0='', sout='FIBER')[source]#
Parameters
  • sequence (list) – Angles of the stacking sequence. A list (or a iterable) containing angles

  • midi (list or int) – A list of materials of plies or a material id (int) to be applied to all plies.

  • ti (list or float) – A list of thickness of plies or a thickness (float) to be applied to all plies.

  • pid (int, default 1) – NASTRAN property id

  • z0 (float, default '') – Laminate offset

  • sout (list or str, default 'FIBER') – A list of output request of plies or a output request to be applied to all plies. Options = YES, NO, FIBER If FIBER is used, then only the first and the last plies will be set as YES

Returns

text – Returns a PCOMP card.

Return type

str

composipy.nastranapi.pcomp_generator.build_sequence(stacking)[source]#
Parameters

stacking (str) – A string in Latex format

Returns

unities – A list that contains the stacking sequence

Return type

list

Example

>>> stack = '[\pm45_{1}/0_2/90/(0/90)_1]s'
>>> build_sequence(stack)
out :
    [45.0, -45.0, 0.0, 90.0, 0.0, 90.0, 90.0, 0.0, 90.0, 0.0, -45.0, 45.0]