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 KeywordType enumeration
value, which is what find_keywords() filters on.
Geometry and mesh¶
Keyword |
|
|---|---|
|
|
|
|
|
|
|
|
Sections and materials¶
Keyword |
|
|---|---|
|
|
|
|
|
|
Sets¶
Keyword |
|
|---|---|
|
|
|
|
|
|
|
|
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 |
|---|---|
|
(blank), |
|
(blank), |
|
(blank), |
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
(<BLANK>) option block:
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 |
|
|---|---|
|
|
|
|
|
|
Parameter references¶
A card field holding an &VARNAME reference is stored as a
ParameterRef rather than a number, so the reference survives a
read/write round trip. See Getting Started for how to read and set the
values behind those references.