compare_decks
Compare two LS-DYNA keyword decks field by field to find differences, matching cards by keyword and ID and normalizing formats, units, and parameter values.
Instructions
Read-only field-by-field comparison of two keyword decks, for example a standalone reference
against the deck Workbench wrote. Cards are matched by keyword and id (MID, PID...), not order;
card name case, comma versus fixed format, number formatting (1.0e3 equals 1000) and *PARAMETER
values are normalised. Fields of the common cards carry the manual's field names (MAT_JOHNSON_COOK,
MAT_ELASTIC, MAT_PLASTIC_KINEMATIC, EOS_GRUNEISEN, SECTION_SOLID/SPH/SHELL, CONTROL_TERMINATION/
SPH/HOURGLASS/TIMESTEP/CONTACT/ENERGY, DATABASE_BINARY_D3PLOT, INITIAL_VELOCITY, HOURGLASS); other
cards use "field N". Status per row: equal, differs, only-in-reference, only-in-candidate,
default-vs-explicit (one side blank and the other the manual default); known_workbench_default
marks a candidate value that is a known Workbench default (see audit_deck). At most 300 rows
(differences first); truncated says if more existed.
Args: reference_path, candidate_path, cards (keyword prefixes such as ["MAT_JOHNSON_COOK",
"CONTROL_"]; default all), candidate_unit_scale ({"length": 1000.0, "mass": 0.001, "time": 1.0}:
how many candidate units one reference unit is, per base quantity; converts density, stress,
velocity, energy and time of the reference before comparing; absent = compare raw values)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cards | No | ||
| candidate_path | Yes | ||
| reference_path | Yes | ||
| candidate_unit_scale | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |