Changes between Version 5 and Version 6 of u/ehansen/buildcode


Ignore:
Timestamp:
10/31/11 18:06:10 (13 years ago)
Author:
ehansen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/ehansen/buildcode

    v5 v6  
    1111|| Conservation of Energy || [[latex($\frac{\partial}{\partial t} E + \frac{\partial}{\partial x} (v(E+p)) = 0$)]] ||
    1212Where [[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.
    13 [[BR]]
     13
     14The 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:
     15
     16 [[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(x_1,t) \ \mathrm{d}t - \int_{t_1}^{t_2} F(x_2,t) \ \mathrm{d}t \ \ \ \ \ (1)$)]] 
     17
     18In this form, it might be easier to see that the change in conserved quantity is equal to the flux coming into the volume minus the flux going out of the volume.
    1419== Solving the Riemann Problem ==
    1520The 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.
     
    1924[[BR]]
    2025== Godunov's First Order Upwind Scheme ==
     26First, we want to use the integral form of the Euler equations (1).  Next, we define a cell average for cell i at time step n + 1: 
     27
     28[[latex($U_{i}^{n+1} = \frac{1}{\Delta x} \int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}} \tilde{U}(x,t^{n+1}) \ \mathrm{d}x$ \ \ \ \ \ (2))]]
     29
     30Where [[latex($\tilde{U}$)]] is the global solution as opposed to the local solution [[latex($U$)]].  However, we already know that the global solution can be written in terms of its fluxes.  You just use equation (1) with a specific control volume:
     31
     32[[latex($\int^{x_{i+\frac{1}{2}}}_{x_{i - \frac{1}{2}}} \tilde{U}(x,t^{n+1}) \ \mathrm{d}x = \int^{x_{i+\frac{1}{2}}}_{x_{i - \frac{1}{2}}} \tilde{U}(x,t^{n}) \ \mathrm{d}x + \int_{t^{n}}^{t^{n+1}}F(x_{i-\frac{1}{2}},t) \ \mathrm{d}t - \int_{t^{n}}^{t^{n+1}} F(x_{i+\frac{1}{2}},t) \ \mathrm{d}t \ \ \ \ \ (3)$)]]
     33
     34
    2135[[BR]]
    2236== Program Outline ==