elwaspatid: A Python package to compute space-time diagrams for the propagation of elastic waves in 1D rods

elwaspatid is a Python package for 1D elastic wave propagation dedicated to the computation of space-time diagrams. It is meant to model the propagation of elastic stress waves in slender bars (or rods) generated by the impact of another bar. Applications can include: mechanical testing (Split Hopkinson Pressure Bars, SHPB), mechanical systems that involve impact with a hammer, design of striker geometry to get a specific pulse shape, and understanding of wave reflection/transmission in bars in academical cases.

Summary elwaspatid is a Python package for 1D elastic wave propagation dedicated to the computation of space-time diagrams. It is meant to model the propagation of elastic stress waves in slender bars (or rods) generated by the impact of another bar. Applications can include: mechanical testing (Split Hopkinson Pressure Bars, SHPB), mechanical systems that involve impact with a hammer, design of striker geometry to get a specific pulse shape, and understanding of wave reflection/transmission in bars in academical cases.

Statement of Need
Space-time diagrams are a way to visualize the propagation of mechanical (traction-compression) waves. Transmission and reflection of waves across section changes and contact interfaces can quickly become hard to compute analytically (Johnson, 1972;Saint-Venant, 1867) or with the graphodynamical method (Dejuhasz, 1949;Fischer, 1959) when multiple waves are combined because of wave superposition. Additionally, we are often limited to simple wave shapes such as the classical rectangular pulse and to bars with constant cross-section; deviating from these conditions rapidly complicates the calculations.
The package is limited to non-dispersive propagation, which means that the pulse shape is not modified by the propagation, but this approximation is acceptable in numerous cases, when the length of the wave is several times greater than the bar radius (Johnson, 1972). The material is also supposed to stay in the elastic range of deformation.
To the best of our knowledge, there is no open source software available for the computation of space-time diagrams, even if wave propagation software can be found in many scientific fields. Williams et al. (1996) proposed a FORTRAN program for the propagation of wavefronts in layered media; this instructional tool is based on finite-difference and outputs the displacement with respect to the spatial variable. Computer Programs in Seismology (Herrmann, 2013) is a set of tools aimed at analysing seismic records.
Concerning guided waves, many efforts are devoted to the computation of dispersion curves for various waveguide geometries: Disperse (Lowe & Pavlakovic, 2013) is based on the global matrix method, axisym-safe-python (Kalkowski et al., 2018) uses axisymmetric semi-analytical finite elements (SAFE), and GUIGUW (Bocchini et al., 2011) is also based on the SAFE formulation. Contact between rods and space-time diagrams are out of scope for these methods.
Some software packages are dedicated to the post-processing of the strain records in the measuring bars of SHPB in order to obtain the stress and strain in the sample. They often take dispersion into account but space-time diagrams for 1D propagation are not computed (Francis et al., 2017;Gershanik, 2022;SurePulse, 2022).

Functionality
The underlying equations used in elwaspatid are derived from Bacon (1993), with a formulation in force and velocity. The rods are discretized between nodes into segments, where each segment is supposed to have a constant impedance. The length of each segment is chosen so that the transit time of the elastic wave in all segments is identical, which enables the use of the method of characteristics.
Force and velocity are computed at the nodes, and the displacement is then deduced from the velocity of the nodes. From the displacement of the nodes, we deduce the strain in the segments from the displacement at the nodes, and the stress in the elements from the strain in the elements.

Bar configuration, initial conditions
The bar configuration can involve as many bars as needed. Each bar has constant properties (elastic module, cross-section, density), and one-off cross-section change can be defined.
The bars are supposed to be at rest (null velocity) and in contact with each other at time t = 0.
It is possible to prescribe the initial velocity of the left bar and therefore model an impactor or striker. Conversely, one can provide the pulse shape arriving at the left end of the bar(s).

Boundary conditions
The following boundary conditions are available: • contact interface between two bars. Compression waves can cross the interface, traction waves cannot. • free end. Traction waves are reflected back as compression waves, and vice versa. • fixed end. Equivalent to a bar clamped to another bar of infinite impedance. • infinite end. Equivalent to anechoic condition, no wave reflection occurs.

Visualization
Wave propagation is computed from the bar configuration, the initial conditions, and the boundary conditions. Space-time diagram are a convenient way to represent the propagation, both in space and in time, of the waves. Figure Figure 1 illustrates the following simple case: a striker impacts a bar from the left. Both bars have the same impedance and a rectangular compression pulse is generated from the impact. As the second bar has free ends, the compression pulse is reflected at its right end as a traction pulse.
Space-time diagrams are pseudocolour plots with space as x-axis (in the initial configuration), time as y-axis and the wave quantity as colour. The wave-related quantity can be: • force (see Figure Figure 1, top left) • velocity (see Figure Figure 1, top right) • displacement (see Figure Figure 1, bottom left) An additional space-time diagram, called "de Saint Venant" after the name of the French scientist who introduced it (Saint-Venant, 1867), is available (see Figure Figure 1, bottom right). It combines the actual position of nodes of the bars plotted with respect to time and the visualization of the waves in the bars (force or velocity). It is the discrete version of the continuous form proposed by de Saint Venant.