Skip to content

D3plotHeader

Class for reading only header information of a d3plot

Attributes:

Name Type Description
filepath str

Filepath of the processed file.

itype np.dtype

Integer type of d3plot.

ftype np.dtype

Floating point type of d3plot.

wordsize int

size of words in bytes (4 = single precision, 8 = double precision).

raw_header Dict[str, Any]

Raw header data as dict.

external_numbers_dtype np.dtype

Integer type of user ids.

n_header_bytes int

Number of bytes of header (at least 256 or more).

title str

Main title.

title2 str

Optional, secondary title.

runtime int

Runtime of the d3plot as timestamp.

filetype D3plotFiletype

Filetype such as d3plot or d3part.

source_version int

Source version of LS-Dyna.

release_version str

Release version of LS-Dyna.

version float

Version of LS-Dyna.

extra_long_header bool

If header was longer than default.

n_dimensions int

Number of dimensions, usually three.

n_global_vars int

How many global vars for each state.

n_adapted_element_pairs int

How many adapted element pairs.

has_node_deletion_data bool

If node deletion data is present.

has_element_deletion_data bool

If element deletion data is present.

has_numbering_section bool

If a user numbering section is present.

has_material_type_section bool

If material type section was written.

n_numbering_section_words int

Amount of words for numbering section.

has_invariant_numbering bool

If invariant numbering is used whatever that means.

quadratic_elems_has_full_connectivity bool

If quadric elements have full connectivity.

quadratic_elems_has_data_at_integration_points bool

If quadric elements data is at integration points.

n_post_branches int

Unused and unknown.

n_types Tuple[int, ...]

Behind geometry these are integers indicating additional data such as part names.

n_parts int

Obviously number of parts.

n_nodes int

Number of nodes.

has_node_temperatures bool

If node temperature is present.

has_node_temperature_layers bool

If node temperatures are layered.

has_node_heat_flux bool

If node heat flux is present.

has_node_mass_scaling bool

Mass scaling is written.

has_node_displacement bool

Node displacement is written.

has_node_velocity bool

Node velocity is written.

has_node_acceleration bool

Node acceleration is written.

has_node_temperature_gradient bool

Node temperature gradient is written.

has_node_residual_forces bool

Node residual forces are written.

has_node_residual_moments bool

Node residual moments are written.

has_node_max_contact_penetration_absolute bool

Node contact penetration info exist.

has_node_max_contact_penetration_relative bool

Node relative contact penetration info was written.

has_node_contact_energy_density int

Node energy density was written.

n_shell_tshell_layers int

Number of layers for shells and thick shells.

n_shell_tshell_history_vars int

Number of history vars for shells and thick shells.

has_shell_tshell_stress bool

If shells and thick shells have stresses.

has_shell_tshell_pstrain bool

If shells and thick shells have eff. plastic strain.

has_element_strain bool

If all elements have strain.

has_solid_shell_plastic_strain_tensor bool

If solids have plastic strain tensor.

has_solid_shell_thermal_strain_tensor bool

If solids have thermal strain tensor.

n_solids int

Number of solids.

n_solid_vars int

Number of solid variables per element and state.

n_solid_materials int

Number of solid materials/parts.

n_solid_history_vars int

Number of solid history variables.

n_solid_thermal_vars int

Number of solid thermal variables.

n_solids_20_node_hexas int

Number of 20-node solid hexas.

n_solids_27_node_hexas int

Number of 27-node solid hexas.

n_solids_21_node_pentas int

Number of 21-node solid pentas.

n_solids_15_node_tetras int

Number of 15-node solid tetras.

n_solids_20_node_tetras int

Number of 20-node solid tetras.

n_solids_40_node_pentas int

Number of 40-node solid pentas.

n_solids_64_node_hexas int

Number of 64-node solid hexas.

has_solid_2_extra_nodes bool

If two extra nodes were written for solids.

has_solid_stress bool

If solid stress is present.

has_solid_pstrain bool

If solid eff. plastic strain is present.

has_quadratic_solids bool

If quadratic solids were used.

has_cubic_solids bool

If cubic solids were used.

has_solid_internal_energy_density bool

If solids have internal energy density.

n_solid_layers int

Number of solid layers.

n_shells int

Number of shells.

n_shell_vars int

Number of shell vars per element and state.

n_shell_materials int

Number of shell materials/parts.

n_shells_8_nodes int

Number of 8-node shells.

has_shell_four_inplane_gauss_points bool

If shells have four inplace gaussian integration points.

has_shell_forces bool

If shell forces are present.

has_shell_extra_variables bool

If extra shell variables such as forces are present.

has_shell_internal_energy_density bool

If shell internal energy density is present.

n_thick_shells int

Number of thick shell elements.

n_thick_shell_vars int

Number of thick shell element vars.

n_thick_shell_materials int

Number of thick shell materials/parts.

has_thick_shell_energy_density bool

If thick shells have energy density.

thick_shell_energy_density_position int

Nnused.

n_beams int

Number of beam elements.

n_beam_vars int

Number of state variables per beam element.

n_beam_materials int

Number of beam materials.

n_beam_history_vars int

Number of beam history variables.

n_airbags int

Number of airbags.

has_airbag_n_chambers bool

If airbags have number of chambers var.

has_rigid_road_surface bool

If rigid road surface was written.

has_rigid_body_data bool

If rigid body section was written.

has_reduced_rigid_body_data bool

If the reduced set of rigid body data was written.

n_rigid_wall_vars int

Number of rigid wall vars.

n_sph_nodes int

Number of sph nodes.

n_sph_materials int

Number of sph materials.

n_ale_materials int

Number of ale materials.

n_ale_fluid_groups int

Number of ale fluid groups.

has_cfd_data bool

If CFD-Data was written.

has_multi_solver_data bool

If multi-solver data was written.

cfd_extra_data int

If cfd data contains extra section.

legacy_code_type int

Originally a code indicator but unused nowadays.

unused_numst int

Unused and not explained in docs.

__init__(filepath=None)

Create a D3plotHeader instance

Parameters:

Name Type Description Default
filepath Union[str, BinaryBuffer, None]

path to a d3plot file or a buffer holding d3plot memory

None

Returns:

Name Type Description
header D3plotHeader

d3plot header instance

Examples:

Create an empty header file

>>> header = D3plotHeader()

Now load only the header of a d3plot.

>>> header.load_file("path/to/d3plot")

Or we can do the above together.

>>> header = D3plotHeader("path/to/d3plot")

Notes

This class does not load the entire memory of a d3plot
but merely what is required to parse the header information.
Thus, it is safe to use on big files.

load_file(file)

Load d3plot header from a d3plot file

Parameters:

Name Type Description Default
file Union[str, BinaryBuffer]

path to d3plot or BinaryBuffer holding memory of d3plot

required

Returns:

Name Type Description
self D3plotHeader

returning self on success

Notes

This routine only loads the minimal amount of data
that is neccessary. Thus it is safe to use on huge files.

Examples:

>>> header = D3plotHeader().load_file("path/to/d3plot")
>>> header.n_shells
19684

compare(other)

Compare two headers and get the differences

Parameters:

Name Type Description Default
other D3plotHeader

other d3plot header instance

required

Returns:

Name Type Description
differences Dict[str, Tuple[Any, Any]]

The different entries of both headers in a dict