Changes between Version 18 and Version 19 of u/ehansen/buildcode


Ignore:
Timestamp:
11/01/11 11:51:58 (13 years ago)
Author:
ehansen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/ehansen/buildcode

    v18 v19  
    1 [[PageOutline(2-3)]]
     1[[PageOutline(2)]]
    22
    33= Building a 1D Hydro Code =
     
    2323[[BR]]
    2424== Solving the Riemann Problem ==
    25 The Riemann problem is essentially the Euler equations with discrete initial conditions.  Initial data has a left state and a right state, separated by a discontinuity.
     25The 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:
     26
     27[[latex($a=\sqrt{\frac{\gamma p}{\rho}}$)]]
     28
     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.  Below is an image showing an example of this:
     30
     31[[Image(riemann_regions.gif, width= 600)]]
     32
     33Initial 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.
    2634
    2735[[BR]]
     
    8593[[latex($S_{max} = max[|v_i| + a_i]$)]]
    8694
    87 Where v is the particle velocity and a is the sound speed.
     95Where v is the particle velocity and a is the sound speed.  Like the boundary condition routine, the CFL condition routine must be called every time step since [[latex($S_{max}$)]] is not constant.
    8896
    8997[[BR]]