Changes between Version 27 and Version 28 of u/ehansen/buildcode


Ignore:
Timestamp:
11/04/11 09:47:43 (13 years ago)
Author:
ehansen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/ehansen/buildcode

    v27 v28  
    1515Where [[latex($\rho$)]] is mass density, v is velocity (only in x-direction for 1D), p is pressure, and E is total energy per unit volume. E is further defined as [[latex($E = \rho (\frac{1}{2} v^2 + e)$)]] where e is the specific internal energy.  The specific internal energy depends on the equation of state.  For an ideal gas [[latex($e = \frac{p}{\rho(\gamma - 1)}$)]] where [[latex($\gamma$)]] is the ratio of specific heats.  Basically, these laws state that in a given volume, the change in a conserved quantity must be equal to the flux through the boundaries of that volume.  In other words, the conserved quantity is in front of the time derivative and its flux is in front of the spatial derivative.
    1616
    17 The Euler equations can also be written in integral form for a general control volume  [[latex($[x_1,x_2] \ \mathrm{x} \ [t_1,t_2]$)]] .  To simplify the notation, let U be a column matrix containing the conserved quantities and F be the matrix of the corresponding fluxes. Now the Euler equations are:
     17The Euler equations can also be written in integral form for a general control volume  [[latex($[x_1,x_2] \ \mathrm{x} \ [t_1,t_2]$)]] .  To simplify the notation, let U be a vector containing the conserved quantities and F be the vector of the corresponding fluxes. Now the Euler equations are:
    1818
    1919 [[latex($\int^{x_2}_{x_1} U(x,t_2) \ \mathrm{d}x = \int_{x_1}^{x_2} U(x,t_1) \ \mathrm{d}x + \int_{t_1}^{t_2}F(U(x_1,t)) \ \mathrm{d}t - \int_{t_1}^{t_2} F(U(x_2,t)) \ \mathrm{d}t \hspace{1 in} (1)$)]] 
     
    2323[[BR]]
    2424== The Riemann Problem ==
    25 The Riemann problem is essentially the Euler equations with discrete initial conditions.  The initial conditions consist of a left state and a right state separated by a discontinuity.  If you turned the differential form of the Euler equations into an eigenvalue problem, you would find three eigenvalues and three corresponding eigenvectors.  These eigenvalues correspond to wave speeds of v, v + a, and v - a where v is the velocity and a is the sound speed.  The sound speed is defined as:
     25The Riemann problem is essentially the Euler equations with discrete initial conditions.  The initial conditions consist of a left state and a right state separated by a discontinuity.  You can turn the differential form of the Euler equations into an eigenvalue problem by writing the flux term as a Jacobian matrix multiplied by the conserved variable vector.   The Jacobian matrix involves various derivatives of the conserved quantities.  If you solved this eigensystem, you would find three eigenvalues and three corresponding eigenvectors.  These eigenvalues correspond to wave speeds of v, v + a, and v - a where v is the velocity and a is the sound speed.  The sound speed is defined as:
    2626
    2727[[latex($a=\sqrt{\frac{\gamma p}{\rho}}$)]]
     
    3535A description of an exact Riemann solver can be quite tedious and lengthy, so I will leave out many details in this section.  In solving the Riemann problem, we will use what are known as primitive variables.  The primitive variables are density, velocity, and pressure.  It is important to keep in mind that, apart from density, these are different than the conserved variables.  Basically, the unknowns are in the star region, so if we can find these quantities then the problem is solved.
    3636=== 1.  Find the pressure and velocity in the star region ===
    37 This pressure is computed through an iteration scheme.  You start with a guess for the star pressure.  This can be found using approximate Riemann solvers.  Then, you calculate pressure functions to get a better value for the pressure.  If the difference between the guess pressure and better pressure is below some tolerance then you have found the star pressure.  If it is not below the tolerance, the better pressure becomes the new guess pressure and the process repeats.  The star velocity is then very straightforward, as it is computed directly from the star pressure.
     37This pressure is computed through an iteration scheme.  You start with a guess* for the star pressure.  This can be found using approximate Riemann solvers.  Then, you calculate pressure functions to get a better value for the pressure.  If the difference between the guess pressure and better pressure is below some tolerance then you have found the star pressure.  If it is not below the tolerance, the better pressure becomes the new guess pressure and the process repeats.  The star velocity is then very straightforward, as it is computed directly from the star pressure.
    3838=== 2.  Sample the wave speed ===
    39 Now that we have the solution for the star region, we can get the solution everywhere.  This is done by sampling the wave speed S as opposed to sampling the position x.  There are essentially 10 possible solutions for any given S.  Let W be a column matrix containing the correct values for the primitive variables.
     39Now that we have the solution for the star region, we can get the solution everywhere.  This is done by sampling the wave speed S as opposed to sampling the position x.  There are essentially 10 possible solutions for any given S.  Let W be a vector containing the correct values for the primitive variables.
    4040||= =||= Left side of contact discontinuity =||= Right side of contact discontinuity =||
    4141||=  Data =||= [[latex($W_L$)]] =||= [[latex($W_R$)]] =||
     
    4848[[BR]]
    4949== The HLLC Solver ==
     50The HLLC solver is different in that it computes an approximation for the fluxes directly rather than using a Riemann problem solution to calculate the exact fluxes.  In order to calculate the approximate fluxes, the HLLC solver needs values for the pressure and velocity in the star region.  This can be done using the same guess procedure* mentioned in the exact Riemann solver description.
    5051
    5152[[BR]]
    5253== The Roe Solver ==
     54The Roe solver is different from all other solvers presented on this page because it makes an approximation to the Riemann problem itself and then solves that problem exactly.  The Roe method takes the Riemann problem and linearizes it by assuming a constant coefficient matrix instead of a Jacobian matrix as mentioned in the Riemann problem section. 
     55
     56[[BR]]
     57=== * A Note on the "Guess" Procedure ===
     58Since all three Riemann solvers use this procedure, I thought it was important to explain it in more detail.  The guess procedure is essentially an adaptive non-iterative Riemann solver.  It uses three different approximate Riemann solvers which are all based on the exact solver: the Primitive Variable Riemann Solver (PVRS), the Two Rarefaction Riemann Solver (TRRS), and the Two Shock Riemann Solver (TSRS).  It chooses which solver to use based on the initial conditions. 
    5359
    5460[[BR]]