The Riemann problem of 1D elastodynamics
Ut = Solve1D(x,t) [Ut,U0] = Solve1D(x,t) [Ut,U0,x] = Solve1D(x,t)
Ut = Solve1D(x,t) generates the analytical solution to the Riemann problem for 1D elastodynamics. The constitutive law is set in the file Sigma1D.m. The initial conditions are set in the file RiemannParameters.txt. The solution Ut is computed at the time t and the abscissaes x. The first column of Ut stores the strain, the second column stores the particle velocity.
Let us assume that there is a valid RiemannParameters.txt file in the current MATLAB folder. Here, we use the file which is generated by Config1D. Then, following code solves the Riemann problem:
x = -0.2:0.001:0.2; % abscissaes (m) t = 0.05e-3; % final time (s) Ut = Solve1D(x,t);
Sound speed c0 = 1.961161e+03 m/s Hyperbolicity domain epsilon in ]-6.116451e-04, 5.449784e-04[ S1S2 Newton-Raphson iterations -1.646774e-06 1.331760e-10 8.630159e-19 3 iterations
Here, the solution is made of two shock waves: one propagating towards decreasing x, and one propagating towards increasing x. Both strain and particle velocity are discontinuous, whereas only the strain was discontinuous at t = 0. You can predict the nature of the solution with the graphical application at the link http://gchiavassa.perso.centrale-marseille.fr/RiemannElasto/.
It may happen that the solution displays only a constant state, because the waves are outside the vizualisation range. In this case, you can set x so as to capture the waves. Also, it may happen that a rarefaction wave or a compound waves looks like a discontinuity. In this case, you can increase the density of the abscissaes (reduce the cell size) and zoom on the wave to visualize the rarefaction.
Here, computing the intermediate state requires 3 Newton-Raphson iterations. If it requires more than 10 iterations, one can tune the value of DepsM in the configuration file.