d3plot#

LS-DYNA d3plot data source for crash simulation mesh pipelines.

Reads LS-DYNA d3plot binary result files (and optional .k keyword files for part thickness) and yields Mesh objects for use in curator pipelines.

Each source index maps to one simulation run directory containing a d3plot file. The resulting mesh carries:

  • points(N, 3) reference coordinates at t=0

  • cells(E, nodes_per_cell) shell element connectivity

  • point_datathickness (N,) plus displacement_t{idx:03d} (N, 3) for each timestep

  • cell_data (optional) — stress_vm_t{idx:03d} (E,) and effective_plastic_strain_t{idx:03d} (E,) for each timestep

  • global_datanum_timesteps scalar

Examples

>>> source = D3PlotSource(input_dir="/data/crash_sims")
>>> len(source)
50
>>> mesh = next(source[0])

Attributes#

Classes#

D3PlotSource

Read crash simulation meshes from LS-DYNA d3plot files.

Module Contents#

class physicsnemo_curator.domains.mesh.sources.d3plot.D3PlotSource(
input_dir: str,
read_stress: bool = False,
read_k_file: bool = True,
backend: Literal['python', 'rust'] | None = None,
)#

Bases: physicsnemo_curator.core.base.Source[physicsnemo.mesh.Mesh]

Read crash simulation meshes from LS-DYNA d3plot files.

Scans input_dir for subdirectories containing a d3plot file. Each subdirectory is one simulation run. The source reads node coordinates, shell connectivity, displacements over timesteps, and optionally stress / strain fields and per-node thickness from a .k keyword file.

Parameters:
  • input_dir (str) – Root directory containing run subdirectories, each with a d3plot.

  • read_stress (bool) – If True, read element shell stress and effective plastic strain.

  • read_k_file (bool) – If True, look for a .k file in each run directory to extract per-node thickness.

  • backend ({"python", "rust"}) – Computation backend for k-file parsing, node thickness, and von Mises stress. "rust" uses the native Rust extension for faster processing of large meshes. Defaults to "rust" when available, otherwise "python".

Examples

>>> source = D3PlotSource(input_dir="/data/crash_sims")
>>> len(source)
50

Note

Requires the lasso-python package (pip install lasso-python).

classmethod params() list[physicsnemo_curator.core.base.Param]#

Return parameter descriptors for the D3Plot source.

Returns:

Parameter list for CLI configuration.

Return type:

list[Param]

description: ClassVar[str] = 'LS-DYNA d3plot crash simulation reader --- shell meshes with multi-timestep displacement and...#

Short description shown in the interactive CLI.

name: ClassVar[str] = 'LS-DYNA D3Plot'#

Human-readable display name for the interactive CLI.

physicsnemo_curator.domains.mesh.sources.d3plot.logger#