RiemannExact(p1,rho1,u1,p4,rho4,u4,tol)
The code gives the exact solution of Euler's 1-D unsteady Riemann problem of the shock tube. The analytical solution is calculated by means of the Newton-Raphson's method and the characteristic equations.
After having set the inputs to the left and right gases' variables, one can easily check the waves generated from the discontinuity; the program returns in output the type of the solution, which can be for example an RCS (meaning that an expansion has generated on the first family and a shock on the second family). The user then has the chance to get the most important variables (sound speed, pressure, velocity) plotted versus the shock tube's length coordinate. NB: all interactions are neglected.
INPUTS:
p1: pressure of the gas in the left part of the shock tube
rho1: density of the gas in the left part of the shock tube
u1: velocity of the particles in the left part of the shock tube
p4: pressure of the gas in the right part of the shock tube
rho4: density of the gas in the right part of the shock tube
u4: velocity of the particles in the right part of the shock tube
tol: tolerance of solution
Virginia Notaro
Cite As
Virginia Notaro (2024). RiemannExact(p1,rho1,u1,p4,rho4,u4,tol) (https://www.mathworks.com/matlabcentral/fileexchange/48734-riemannexact-p1-rho1-u1-p4-rho4-u4-tol), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |