wiki:u/erica/ExactRiemannSolver

Version 15 (modified by Erica Kaminski, 12 years ago) ( diff )

Intro

The Riemann problem is an IVP for the Euler Equations, which consists of 2 constant initial data states separated by a discontinuity between them, say at x=0. For x<x=0, we say the data state is XL, for which there are initial variables WL=(rho_L, p_L, u_L). Similarly for the initial right data state, XR=x>x=0, the initial variables are WR=(rho_R, p_R, u_R). The solution of this IVP consists of 3 nonlinear waves, a left wave that is either a shock or a rarefaction, a center contact discontinuity, and a right wave that is either a shock or a rarefaction wave. Depending on which type of L- or R-wave is present, different expressions exist that describe the change in variables across them. The contact discontinuity is special in that the pressure (p) and velocity (u) are constant across it.

Program Outline for Exact Riemann Solver

Given the above properties of the Riemann problem, an algebraic expression can be derived which gives p in the central "star-region" (denoted by '*'). The overall structure of the Riemann problem then is to solve this algebraic equation for p*. Once p* is known, u* follows immediately. The remaining rho*_L and rho*_R follow from expressions valid for the specific L- or R- wave present.

Specifically, this means that the code will determine at every point (x,t), that point's relative position to the different waves present. Once the position is determined, the solution is given by analytic expressions for the following five possibilities: pre- or post- shock, ahead of rarefaction head, behind rarefaction tail, or within the rarefaction fan. The position of each sampling point (x,t) is determined by a characteristic speed in the grid given by s = dx/t, where dx is the distance from the initial discontinuity to the sampling point (x,t), and t is the simulation end time.

The program thus will consist of 4 parts: 1. Code to find p* using an iterative process, 2. Comparing p* to p_L and p_R to identify the types of nonlinear waves present in the solution, 3. Find remaining quantities in star region, where u* is given by simple expression in Toro (eqn. 4.9), and wave-specific expressions give rho*_L and rho*_R.

Exact Riemann Solver

  1. Declarations
    1. Wl=()
    2. Wr=()
    3. tol =
  1. Main Program Body
    1. Call P* routine - find and record p*
    2. Call Identification routine - find types of waves present, record
    3. Call U*() - reads in vars and returns U*
    4. Call rho* - reads in vars and returns rho*
    5. Print to File - u*, rho*, p*
  1. Functions
    1. FL = ()
    2. FR = ()
    3. U* = ()
    4. rho*L = {}
    5. rho*R = {}
  1. Subroutines
    1. Find p* using initial estimate
      1. type of approximation (1)-(5) for different options (on screen options)
      2. let p0=(approximation)
      3. Begin iterative process, that ends once | | < tol
  1. Determine types of waves present
    1. comparing p* to pL and pR
    2. series of if statements corresponding to flow chart
    3. left_wave = 1 for shock, 2 for rarefaction

Results

Attachments (5)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.