Supported Keywords ================== Each supported LS-DYNA keyword is parsed into a dedicated class exposing its data through the ``cards`` dictionary. Any keyword not listed here is still read and preserved verbatim as an ``Unknown`` block, so no data is lost when a file is read and written back. The ``type`` member of a keyword is a :class:`~dynakw.KeywordType` enumeration value, which is what :meth:`~dynakw.DynaKeywordReader.find_keywords` filters on. Geometry and mesh ----------------- ============================= ============================================== Keyword ``KeywordType`` ============================= ============================================== ``*NODE`` ``KeywordType.NODE`` ``*ELEMENT_SOLID`` ``KeywordType.ELEMENT_SOLID`` ``*ELEMENT_SHELL`` ``KeywordType.ELEMENT_SHELL`` ``*PART`` ``KeywordType.PART`` ============================= ============================================== Sections and materials ---------------------- ============================= ============================================== Keyword ``KeywordType`` ============================= ============================================== ``*SECTION_SOLID`` ``KeywordType.SECTION_SOLID`` ``*SECTION_SHELL`` ``KeywordType.SECTION_SHELL`` ``*MAT_ELASTIC`` ``KeywordType.MAT_ELASTIC`` ============================= ============================================== Sets ---- ============================= ============================================== Keyword ``KeywordType`` ============================= ============================================== ``*SET_NODE`` ``KeywordType.SET_NODE`` ``*SET_SEGMENT`` ``KeywordType.SET_SEGMENT`` ``*SET_SHELL`` ``KeywordType.SET_SHELL`` ``*SET_SOLID`` ``KeywordType.SET_SOLID`` ============================= ============================================== The set keywords accept the option suffixes described below. ``COLLECT`` may be appended to any of them; it does not change the card layout. Whichever option is used, the element or node data is always stored under ``'Card 2'``. ================= ========================================================== Keyword Available options ================= ========================================================== ``*SET_NODE`` *(blank)*, ``LIST``, ``COLUMN``, ``LIST_GENERATE``, ``LIST_GENERATE_INCREMENT``, ``LIST_SMOOTH``, ``GENERAL`` ``*SET_SHELL`` *(blank)*, ``LIST``, ``COLUMN``, ``LIST_GENERATE``, ``LIST_GENERATE_INCREMENT``, ``GENERAL`` ``*SET_SOLID`` *(blank)*, ``GENERATE``, ``GENERATE_INCREMENT``, ``GENERAL`` ================= ========================================================== Note that the option names differ between these keywords: ``*SET_SOLID`` uses ``GENERATE`` where ``*SET_NODE`` and ``*SET_SHELL`` use ``LIST_GENERATE``, and it has no ``LIST`` or ``COLUMN`` option. Its Card 1 carries ``SID`` and ``SOLVER`` only, with no ``DA1``-``DA4`` attribute defaults. For example, to collect every solid element ID listed by an unset (````) option block: .. code-block:: python import numpy as np from dynakw import DynaKeywordReader, KeywordType with DynaKeywordReader('sets.k') as dkr: for kw in dkr.find_keywords(KeywordType.SET_SOLID): if kw.option1: # skip GENERATE / GENERAL variants continue card = kw.cards['Card 2'] ids = np.concatenate([card[f'K{i}'] for i in range(1, 9)]) print(kw.cards['Card 1']['SID'][0], np.sort(ids[ids != 0])) Boundary conditions and parameters ---------------------------------- =============================== ============================================ Keyword ``KeywordType`` =============================== ============================================ ``*BOUNDARY_PRESCRIBED_MOTION`` ``KeywordType.BOUNDARY_PRESCRIBED_MOTION`` ``*PARAMETER`` ``KeywordType.PARAMETER`` ``*PARAMETER_EXPRESSION`` ``KeywordType.PARAMETER_EXPRESSION`` =============================== ============================================ Parameter references -------------------- A card field holding an ``&VARNAME`` reference is stored as a :class:`~dynakw.ParameterRef` rather than a number, so the reference survives a read/write round trip. See :doc:`getting_started` for how to read and set the values behind those references.