Skip to content

crashmetrics.energy_check and crashmetrics.lsdyna

energy_check

Energy checks for explicit crash simulations, for any load case.

Functions:

  • check_energies: Run the global and per-part energy checks and return a report.

Classes:

Name Description
GlobalEnergies

Global energy time histories (LS-DYNA glstat).

PartEnergies

Per-part energy time histories (LS-DYNA matsum).

EnergyLimits

Acceptance limits; every one can be changed or switched off.

The checks are solver-agnostic: fill `GlobalEnergies` and
`PartEnergies` from any source, or read LS-DYNA output with
`crashmetrics.lsdyna`. All energies must use one consistent unit.
Checks:
| Check | Value compared with its limit |
| --- | --- |
| energy_ratio | total /
| hourglass | peak hourglass / peak internal energy |
| negative_contact | most negative sliding
| damping | peak system damping energy / reference |
| added_mass | peak added mass, % of the model mass |
| eroded_energy | peak eroded energy / reference
| part_hourglass | per part: peak hourglass / peak internal energy |
| part_negative_internal | per part: most negative / peak internal energy |
The energy ratio uses glstat's own ratio if given. The reference
energy is the largest value of initial total energy plus
external work, so the checks work for impacts
and for prescribed-motion or quasi-static cases
Part checks cover parts whose peak internal energy is at least
``part_min_internal_share`` of the model's peak internal energy.
Default limits: hourglass energy below 10 % of internal energy, globally
and per part, is LS-DYNA's published rule of thumb. The other defaults
are common rules of thumb, not a standard. Set your own guideline values
in `EnergyLimits`.

GlobalEnergies dataclass

GlobalEnergies(
    time: FloatArray,
    kinetic: FloatArray,
    internal: FloatArray,
    hourglass: FloatArray | None = None,
    sliding: FloatArray | None = None,
    external_work: FloatArray | None = None,
    damping: FloatArray | None = None,
    rigidwall: FloatArray | None = None,
    eroded_kinetic: FloatArray | None = None,
    eroded_internal: FloatArray | None = None,
    eroded_hourglass: FloatArray | None = None,
    total: FloatArray | None = None,
    energy_ratio: FloatArray | None = None,
    added_mass: FloatArray | None = None,
    added_mass_percent: FloatArray | None = None,
    time_step: FloatArray | None = None,
    extra: dict[str, FloatArray] = dict(),
)

Global energy time histories, in one consistent energy unit.

Only time, kinetic and internal are required; checks that need a missing channel are reported as skipped.

sliding class-attribute instance-attribute

sliding: FloatArray | None = None

Sliding interface (contact) energy.

damping class-attribute instance-attribute

damping: FloatArray | None = None

System damping energy.

total class-attribute instance-attribute

total: FloatArray | None = None

Total energy; computed from the components if not given.

energy_ratio class-attribute instance-attribute

energy_ratio: FloatArray | None = None

Solver's energy ratio; computed if not given.

added_mass_percent class-attribute instance-attribute

added_mass_percent: FloatArray | None = None

Added mass as a percentage of the model mass.

extra class-attribute instance-attribute

extra: dict[str, FloatArray] = field(default_factory=dict)

Other channels, by normalised name.

from_mapping classmethod

from_mapping(
    data: Mapping[str, ArrayLike],
) -> GlobalEnergies

Build from named channels, such as glstat or binout variables.

Names are matched case-insensitively and ignoring punctuation, so "kinetic energy", "kinetic_energy" and "Kinetic Energy" all work. Unknown channels go to extra.

total_energy

total_energy() -> FloatArray

Total energy: the given total, or the sum of the components.

ratio

ratio() -> FloatArray

Energy ratio: the given one, or total / (initial + external work).

As in LS-DYNA, the ratio is 1 where the denominator is below 1e-8.

reference_energy

reference_energy() -> float

Largest value of initial total energy plus external work.

PartEnergies dataclass

PartEnergies(
    time: FloatArray,
    part_ids: NDArray[int64],
    internal: FloatArray,
    kinetic: FloatArray | None = None,
    hourglass: FloatArray | None = None,
    added_mass: FloatArray | None = None,
    part_names: dict[int, str] = dict(),
    extra: dict[str, FloatArray] = dict(),
)

Per-part energy time histories, arrays of shape (time, part).

added_mass class-attribute instance-attribute

added_mass: FloatArray | None = None

Added mass from mass scaling (LS-DYNA matsum +mass).

from_mapping classmethod

from_mapping(
    time: ArrayLike,
    part_ids: ArrayLike,
    data: Mapping[str, ArrayLike],
    part_names: Mapping[int, str] | None = None,
) -> PartEnergies

Build from named (time, part) arrays, such as matsum variables.

"internal_energy" / "inten", "kinetic_energy" / "kinen", "hourglass_energy" / "hgeng" and "added_mass" / "+mass" are recognised.

EnergyLimits dataclass

EnergyLimits(
    energy_ratio: tuple[float, float] | None = (0.95, 1.05),
    hourglass: float | None = 0.1,
    negative_contact: float | None = 0.05,
    damping: float | None = 0.05,
    added_mass_percent: float | None = 5.0,
    eroded_energy: float | None = None,
    part_hourglass: float | None = 0.1,
    part_negative_internal: float | None = 0.01,
    part_min_internal_share: float = 0.01,
)

Acceptance limits. Set a limit to None to report the value only.

Defaults: the 10 % hourglass limits follow LS-DYNA's rule of thumb; the others are common rules of thumb. Replace them with your own guideline values.

energy_ratio class-attribute instance-attribute

energy_ratio: tuple[float, float] | None = (0.95, 1.05)

Allowed (minimum, maximum) energy ratio over the whole run.

hourglass class-attribute instance-attribute

hourglass: float | None = 0.1

Peak hourglass energy / peak internal energy.

negative_contact class-attribute instance-attribute

negative_contact: float | None = 0.05

Most negative contact energy (magnitude) / reference energy.

damping class-attribute instance-attribute

damping: float | None = 0.05

Peak system damping energy / reference energy.

added_mass_percent class-attribute instance-attribute

added_mass_percent: float | None = 5.0

Peak added mass, % of the model mass.

eroded_energy class-attribute instance-attribute

eroded_energy: float | None = None

Peak eroded energy / reference energy (reported only by default).

part_hourglass class-attribute instance-attribute

part_hourglass: float | None = 0.1

Per part: peak hourglass / peak internal energy.

part_negative_internal class-attribute instance-attribute

part_negative_internal: float | None = 0.01

Per part: most negative internal energy (magnitude) / peak.

part_min_internal_share class-attribute instance-attribute

part_min_internal_share: float = 0.01

Parts with a peak internal energy below this share of the model's peak internal energy are not checked.

EnergyCheck dataclass

EnergyCheck(
    name: str,
    description: str,
    value: float | None,
    limit: str,
    status: str,
    time: float | None = None,
    part: int | None = None,
    note: str = "",
)

Result of one check.

status instance-attribute

status: str

"pass", "fail", "info" (no limit) or "skipped".

time class-attribute instance-attribute

time: float | None = None

Time of the worst value.

part class-attribute instance-attribute

part: int | None = None

Worst part, for part checks.

PartResult dataclass

PartResult(
    part_id: int,
    name: str,
    peak_internal: float,
    share: float,
    checked: bool,
    hourglass_ratio: float | None,
    negative_internal_ratio: float,
    peak_added_mass: float | None,
    passed: bool,
)

Energy check values of one part.

share instance-attribute

share: float

Peak internal energy / model peak internal energy.

peak_added_mass instance-attribute

peak_added_mass: float | None

Largest added mass from mass scaling, if reported.

EnergyReport dataclass

EnergyReport(
    checks: tuple[EnergyCheck, ...],
    parts: tuple[PartResult, ...],
    reference_energy: float,
    limits: EnergyLimits,
)

Results of check_energies.

passed property

passed: bool

True if no check failed (skipped and info checks do not fail).

check

check(name: str) -> EnergyCheck

Return a check by name.

summary

summary() -> str

Plain-text table of the results.

normalise_name

normalise_name(name: str) -> str

Lower-case a channel name and join its words with underscores.

check_energies

check_energies(
    global_energies: GlobalEnergies,
    part_energies: PartEnergies | None = None,
    limits: EnergyLimits | None = None,
) -> EnergyReport

Check the energy balance of a simulation.

Parameters:

Name Type Description Default
global_energies GlobalEnergies

Global energies, for example from crashmetrics.lsdyna.read_glstat.

required
part_energies PartEnergies | None

Optional per-part energies, for example from crashmetrics.lsdyna.read_matsum, for the part checks.

None
limits EnergyLimits | None

Acceptance limits; EnergyLimits defaults if omitted.

None

Returns:

Type Description
EnergyReport

report.passed, report.failures, report.summary().

lsdyna

LS-DYNA output readers and the crashmetrics-energy command.

Functions:

  • read_glstat, parse_glstat: Global statistics (glstat) ASCII file -> GlobalEnergies.
  • read_matsum, parse_matsum: Material/part energy summary (matsum) ASCII file -> PartEnergies.
  • read_d3hsp, parse_d3hsp: d3hsp file -> D3hsp (see crashmetrics.d3hsp).
  • check_run: Read a run directory's glstat (and matsum) and check its energies.
  • main: Command-line entry point: crashmetrics-energy RUN_DIR.

The readers for the other ASCII files (nodout, rcforc, sleout, secforc, rwforc, sbtout, deforc, jntforc, abstat, rbdout, spcforc, swforc) live in crashmetrics.lsdyna_ascii and are re-exported here, so from crashmetrics.lsdyna import read_nodout works.

The parsers read values by their labels, not by position, so they do not depend on the line order or on which optional channels a given LS-DYNA version writes:

  • glstat: lines of the form kinetic energy....... 1.23456E+05 (one or more dots after the label); a new record starts at each time... line.
  • matsum: key= value pairs; a new record starts at each time = and a new part at each mat.#= (or part=, pid=). Part names come from the {BEGIN LEGEND} block and per-part added mass from +mass=.

Fortran numbers such as 1.23456-100 (no E) and 1.0D+03 are read correctly. Binout files are read by crashmetrics.binout (Binout.glstat, Binout.matsum); check_run uses them when a run folder has no ASCII glstat.

D3hsp dataclass

D3hsp(
    version: str | None = None,
    parallel: str | None = None,
    precision: str | None = None,
    release: str | None = None,
    revision: str | None = None,
    platform: str | None = None,
    compiler: str | None = None,
    hostname: str | None = None,
    run_date: str | None = None,
    command_line: tuple[str, ...] = (),
    input_file: str | None = None,
    ncpu: int | None = None,
    termination: str = "incomplete",
    termination_time: str | None = None,
    messages: tuple[D3hspMessage, ...] = (),
    model: dict[str, int] = dict(),
    parameters: dict[str, float] = dict(),
    keyword_counts: dict[str, int] = dict(),
    part_masses: dict[int, float] = dict(),
    rigid_parts: tuple[int, ...] = (),
    total_mass: float | None = None,
    mass_center: tuple[float, float, float] | None = None,
    smallest_timesteps: tuple[TimestepElement, ...] = (),
    problem_time: float | None = None,
    problem_cycles: int | None = None,
    cpu_seconds: float | None = None,
    elapsed_seconds: float | None = None,
    start_time: str | None = None,
    end_time: str | None = None,
    workers: int | None = None,
    worker_type: str | None = None,
    timing: tuple[TimingRow, ...] = (),
    memory: dict[str, str] = dict(),
)

Summary of an LS-DYNA d3hsp file. Missing items are None or empty.

version class-attribute instance-attribute

version: str | None = None

Version line, e.g. "smp d R16".

parallel class-attribute instance-attribute

parallel: str | None = None

"smp" or "mpp".

precision class-attribute instance-attribute

precision: str | None = None

"single" or "double".

release class-attribute instance-attribute

release: str | None = None

e.g. "R16".

run_date class-attribute instance-attribute

run_date: str | None = None

Date and time the run started, as printed.

termination class-attribute instance-attribute

termination: str = 'incomplete'

"normal", "error" or "incomplete".

model class-attribute instance-attribute

model: dict[str, int] = field(default_factory=dict)

Nodes, elements by type, materials, contacts (when reported).

parameters class-attribute instance-attribute

parameters: dict[str, float] = field(default_factory=dict)

Every echoed label..... value setting, by normalised label (first occurrence), e.g. "termination_time", "time_step_scale_factor".

keyword_counts class-attribute instance-attribute

keyword_counts: dict[str, int] = field(default_factory=dict)

Number of each keyword in the input, e.g. {"*CONTACT_option": 2} (first occurrence where LS-DYNA prints a name twice).

mass_center class-attribute instance-attribute

mass_center: tuple[float, float, float] | None = None

Mass centre of the whole model (the lines after the total mass).

workers class-attribute instance-attribute

workers: int | None = None

Number of SMP threads or MPP processes from the elapsed-time line.

worker_type class-attribute instance-attribute

worker_type: str | None = None

e.g. "SMP threads".

memory class-attribute instance-attribute

memory: dict[str, str] = field(default_factory=dict)

Last memory report, e.g. {"total": "755K"}.

min_timestep property

min_timestep: TimestepElement | None

Element with the smallest time step, from the d3hsp table.

message_counts

message_counts() -> dict[tuple[str, int], int]

Number of messages by (kind, number), most frequent first.

summary

summary() -> str

Plain-text summary of the run.

AsciiOutput dataclass

AsciiOutput(
    kind: str,
    time: ndarray,
    ids: tuple[Key, ...],
    data: dict[str, ndarray],
    totals: dict[str, ndarray] = dict(),
    names: dict[int, str] = dict(),
    title: str = "",
    version: str = "",
    cycle: ndarray | None = None,
)

Time histories read from one LS-DYNA ASCII output file.

Attributes:

Name Type Description
kind str

File type, e.g. "nodout".

time ndarray

Output times, in the model's time unit, shape (n,).

ids tuple[Key, ...]

Entity IDs (node, contact, section ...) in the order they first appear in the file.

data dict[str, ndarray]

Channel name -> array of shape (n, len(ids)); NaN where an entity has no value at a time (or the channel does not apply to it, e.g. belt_force of a retractor).

totals dict[str, ndarray]

File-level sums printed by LS-DYNA (sleout and spcforc), name -> array of shape (n,).

names dict[int, str]

Entity titles from the {BEGIN LEGEND} block (may be empty).

title, version

First two header lines: the model title and the LS-DYNA version line.

cycle ndarray | None

Cycle numbers where the file gives them, else None.

channels property

channels: list[str]

Channel names, in the order they were first read.

index

index(entity: Key) -> int

Column of an entity in the data arrays.

channel

channel(name: str, entity: Key | None = None) -> ndarray

One channel: shape (n,) for one entity, else (n, n_ids).

With entity=None and a single entity in the file, the 1-D history of that entity is returned.

entity

entity(entity: Key) -> dict[str, ndarray]

All channels of one entity that have at least one value.

magnitude

magnitude(
    channels: Sequence[str], entity: Key | None = None
) -> ndarray

Resultant of channels, e.g. ("x_force", "y_force", "z_force").

name

name(entity: Key) -> str

Title of an entity from the legend ("" if none).

summary

summary() -> str

Short text description of the file content.

to_csv

to_csv(
    path: str | Path,
    channels: Sequence[str] | None = None,
    ids: Sequence[Key] | None = None,
) -> Path

Write a wide CSV table: time, then one column per channel and entity.

Columns are named channel[id]; totals are added as total.name when no channel selection is given.

parse_d3hsp

parse_d3hsp(text: str) -> D3hsp

Parse the text of an LS-DYNA d3hsp file.

read_d3hsp

read_d3hsp(path: str | Path) -> D3hsp

Read an LS-DYNA d3hsp file.

read_abstat

read_abstat(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA abstat file: airbag and control volume statistics.

ids limits the entities read.

read_ascii

read_ascii(
    path: str | Path,
    kind: str | None = None,
    ids: Iterable[Key] | None = None,
) -> AsciiOutput

Read an LS-DYNA ASCII output file.

The type comes from kind, else from the file name, else from the content; ids limits the entities read.

read_deforc

read_deforc(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA deforc file: discrete element (spring and damper) forces.

ids limits the entities read.

read_jntforc

read_jntforc(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA jntforc file: joint forces and joint stiffness output.

ids limits the entities read.

read_nodout

read_nodout(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA nodout file: nodal time histories.

ids limits the entities read.

read_rbdout

read_rbdout(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA rbdout file: rigid body motion.

ids limits the entities read.

read_rcforc

read_rcforc(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA rcforc file: contact resultant forces.

ids limits the entities read.

read_run

read_run(
    directory: str | Path,
    kinds: Iterable[str] | None = None,
    skip_errors: bool = False,
) -> dict[str, AsciiOutput]

Read every supported ASCII file in a run directory.

Files are found by name (nodout or NODOUT; a job-ID prefix such as run1.nodout also works). An output without an ASCII file is read from the folder's binout files if they have it (crashmetrics.binout). Files without any state (an empty output request) are left out.

Parameters:

Name Type Description Default
directory str | Path

Run directory.

required
kinds Iterable[str] | None

File types to read (default: all of KINDS).

None
skip_errors bool

Leave out files that cannot be read instead of raising.

False

read_rwforc

read_rwforc(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA rwforc file: rigid wall forces.

ids limits the entities read.

read_sbtout

read_sbtout(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA sbtout file: seatbelt, slip ring and retractor output.

ids limits the entities read.

read_secforc

read_secforc(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA secforc file: cross-section forces and moments.

ids limits the entities read.

read_sleout

read_sleout(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA sleout file: contact energies (totals in totals).

ids limits the entities read.

read_spcforc

read_spcforc(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA spcforc file: constraint (SPC) reaction forces.

ids limits the entities read.

read_swforc

read_swforc(
    path: str | Path, ids: Iterable[Key] | None = None
) -> AsciiOutput

Read an LS-DYNA swforc file: spotweld and constrained weld forces.

ids limits the entities read.

parse_glstat

parse_glstat(text: str) -> GlobalEnergies

Parse the text of an LS-DYNA glstat ASCII file.

read_glstat

read_glstat(path: str | Path) -> GlobalEnergies

Read an LS-DYNA glstat ASCII file.

parse_matsum

parse_matsum(text: str) -> PartEnergies

Parse the text of an LS-DYNA matsum ASCII file.

read_matsum

read_matsum(path: str | Path) -> PartEnergies

Read an LS-DYNA matsum ASCII file.

check_run

check_run(
    run: str | Path,
    matsum: str | Path | None = None,
    limits: EnergyLimits | None = None,
) -> EnergyReport

Check the energies of an LS-DYNA run.

Parameters:

Name Type Description Default
run str | Path

Run directory containing glstat (and optionally matsum), or binout files with them, or the path of a glstat file.

required
matsum str | Path | None

matsum file; by default matsum next to the glstat file is used if it exists.

None
limits EnergyLimits | None

Acceptance limits.

None

main

main(argv: Sequence[str] | None = None) -> int

Run crashmetrics-energy. Exit code 0 = passed, 1 = failed, 2 = error.

d3hsp

LS-DYNA d3hsp reader.

Functions:

  • read_d3hsp, parse_d3hsp: Read a d3hsp file into a D3hsp summary.
What is read
  • Run information: version, SMP/MPP, precision, revision, platform, run date, command line options, input file, number of CPUs.
  • Termination status: "normal", "error" or "incomplete" (no termination banner: still running, killed or crashed).
  • Warnings and errors (*** Warning 41123 (SOL+1123) and the message lines after it), with counts by message number.
  • Model size (nodes, elements by type, materials, contacts) and every label....... value setting echoed by LS-DYNA (parameters), plus the keyword counts (total # of *KEYWORD.... n).
  • Mass summary: mass of each part (rigid bodies marked), total mass and the mass centre of the model.
  • The smallest time steps table: element type, element, part, time step.
  • Timing: problem time and cycles, CPU and elapsed time, threads or processes, the CPU/clock breakdown by solver phase, and memory.

The reader works from labels and patterns, not line numbers, and was built and tested on SMP d3hsp files from LS-DYNA R14.1 and R16.1. MPP runs use the same layout for these items; the reader accepts mpp in the version line and MPP procs in the elapsed-time line, but check it on your own MPP output.

D3hspMessage dataclass

D3hspMessage(
    kind: str, number: int, code: str, text: str, line: int
)

A warning or error message.

kind instance-attribute

kind: str

"warning" or "error".

code instance-attribute

code: str

Category code, e.g. "SOL+1123".

text instance-attribute

text: str

Message text (the lines following the header, joined).

line instance-attribute

line: int

Line number in the file (1-based).

TimestepElement dataclass

TimestepElement(
    element_type: str,
    element_id: int,
    part_id: int,
    timestep: float,
)

One row of the smallest time steps table.

TimingRow dataclass

TimingRow(
    name: str,
    cpu: float,
    cpu_percent: float,
    clock: float,
    clock_percent: float,
    level: int,
)

One row of the timing information table.

level instance-attribute

level: int

0 for a solver phase, 1 for a sub-item of the phase above.

D3hsp dataclass

D3hsp(
    version: str | None = None,
    parallel: str | None = None,
    precision: str | None = None,
    release: str | None = None,
    revision: str | None = None,
    platform: str | None = None,
    compiler: str | None = None,
    hostname: str | None = None,
    run_date: str | None = None,
    command_line: tuple[str, ...] = (),
    input_file: str | None = None,
    ncpu: int | None = None,
    termination: str = "incomplete",
    termination_time: str | None = None,
    messages: tuple[D3hspMessage, ...] = (),
    model: dict[str, int] = dict(),
    parameters: dict[str, float] = dict(),
    keyword_counts: dict[str, int] = dict(),
    part_masses: dict[int, float] = dict(),
    rigid_parts: tuple[int, ...] = (),
    total_mass: float | None = None,
    mass_center: tuple[float, float, float] | None = None,
    smallest_timesteps: tuple[TimestepElement, ...] = (),
    problem_time: float | None = None,
    problem_cycles: int | None = None,
    cpu_seconds: float | None = None,
    elapsed_seconds: float | None = None,
    start_time: str | None = None,
    end_time: str | None = None,
    workers: int | None = None,
    worker_type: str | None = None,
    timing: tuple[TimingRow, ...] = (),
    memory: dict[str, str] = dict(),
)

Summary of an LS-DYNA d3hsp file. Missing items are None or empty.

version class-attribute instance-attribute

version: str | None = None

Version line, e.g. "smp d R16".

parallel class-attribute instance-attribute

parallel: str | None = None

"smp" or "mpp".

precision class-attribute instance-attribute

precision: str | None = None

"single" or "double".

release class-attribute instance-attribute

release: str | None = None

e.g. "R16".

run_date class-attribute instance-attribute

run_date: str | None = None

Date and time the run started, as printed.

termination class-attribute instance-attribute

termination: str = 'incomplete'

"normal", "error" or "incomplete".

model class-attribute instance-attribute

model: dict[str, int] = field(default_factory=dict)

Nodes, elements by type, materials, contacts (when reported).

parameters class-attribute instance-attribute

parameters: dict[str, float] = field(default_factory=dict)

Every echoed label..... value setting, by normalised label (first occurrence), e.g. "termination_time", "time_step_scale_factor".

keyword_counts class-attribute instance-attribute

keyword_counts: dict[str, int] = field(default_factory=dict)

Number of each keyword in the input, e.g. {"*CONTACT_option": 2} (first occurrence where LS-DYNA prints a name twice).

mass_center class-attribute instance-attribute

mass_center: tuple[float, float, float] | None = None

Mass centre of the whole model (the lines after the total mass).

workers class-attribute instance-attribute

workers: int | None = None

Number of SMP threads or MPP processes from the elapsed-time line.

worker_type class-attribute instance-attribute

worker_type: str | None = None

e.g. "SMP threads".

memory class-attribute instance-attribute

memory: dict[str, str] = field(default_factory=dict)

Last memory report, e.g. {"total": "755K"}.

min_timestep property

min_timestep: TimestepElement | None

Element with the smallest time step, from the d3hsp table.

message_counts

message_counts() -> dict[tuple[str, int], int]

Number of messages by (kind, number), most frequent first.

summary

summary() -> str

Plain-text summary of the run.

parse_d3hsp

parse_d3hsp(text: str) -> D3hsp

Parse the text of an LS-DYNA d3hsp file.

read_d3hsp

read_d3hsp(path: str | Path) -> D3hsp

Read an LS-DYNA d3hsp file.