Changes between Version 20 and Version 21 of u/ehansen/buildcode


Ignore:
Timestamp:
11/01/11 12:44:10 (13 years ago)
Author:
ehansen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/ehansen/buildcode

    v20 v21  
    1313|| Conservation of Momentum || [[latex($\frac{\partial}{\partial t} (\rho v) + \frac{\partial}{\partial x} (\rho v^2 + p) = 0$)]] ||
    1414|| Conservation of Energy || [[latex($\frac{\partial}{\partial t} E + \frac{\partial}{\partial x} (v(E+p)) = 0$)]] ||
    15 Where [[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.
     15Where [[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
    1717The 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:
     
    2222
    2323[[BR]]
    24 == Solving the Riemann Problem ==
    25 The Riemann problem is essentially the Euler equations with discrete initial conditions.  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:
     24== The Riemann Problem ==
     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.  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:
    2626
    2727[[latex($a=\sqrt{\frac{\gamma p}{\rho}}$)]]
    2828
    29 An analysis of the eigenvectors would show that there are essentially three types of waves; contact, shock, and rarefaction.  The contact wave is always in the middle, and the left or right waves can be either shock or rarefaction waves.  The waves divide x-t space into four distinct regions: left data, star left, star right, and right data.  Below is an image showing an example of this:
     29An analysis of the eigenvectors would show that there are essentially three types of waves; contact, shock, and rarefaction.  The contact wave is always in the middle, and the left or right waves can be either shock or rarefaction waves.  The waves divide x-t space into four distinct regions: left data, star left, star right, and right data.  Furthermore, velocity and pressure inside the star region is constant while density can be different in the star left and star right regions.  Data across a shock wave has a discontinuous jump while data across a rarefaction has a smooth transition.  This means that a rarefaction wave actually has some "thickness" to it.  The region inside a rarefaction is known as the fan state.
    3030
    31 [[Image(riemann_regions.gif, width= 400)]]
     31This is essentially the problem set-up.  Now we need to actually solve the problem using some type of numerical method.
    3232
    33 Initial data has a left state and a right state, separated by a discontinuity.  It is often easiest to solve the Riemann problem using 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.
     33[[BR]]
     34== The Exact Riemann Solver ==
     35A 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.
     36=== 1.  Find the pressure and velocity in the star region ===
     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.
     38=== 2.  Sampling the wave speed ===
     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:
     40||= =||= Left side of contact discontinuity =||= Right side of contact discontinuity =||
     41||=  Data =||= [[latex($W_L$)]] =||= [[latex($W_R$)]] =||
     42||= Star (Shock) =||= [[latex($W_{\mathrm{*}L}^{SHO}$)]] =||= [[latex($W_{\mathrm{*}R}^{SHO}$)]] =||
     43||= Star (Rarefaction) =||= [[latex($W_{\mathrm{*}L}^{RAR}$)]] =||= [[latex($W_{\mathrm{*}R}^{RAR}$)]] =||
     44||= Rarefaction Fan =||= [[latex($W_{L}^{FAN}$)]] =||= [[latex($W_{R}^{FAN}$)]] =||
    3445
     46A sampling procedure involves checking several logical statements to determine which state S is in.
    3547[[BR]]
    3648== Discretisation ==