Changes between Version 6 and Version 7 of u/erica/2D_Godunov
- Timestamp:
- 07/29/13 13:29:35 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/erica/2D_Godunov
v6 v7 17 17 [[latex($\vec{u}^n = \{ \vec{u}^n_{i,j} \} ~\forall ~i,~\forall~j$)]] 18 18 19 where u is the vector of primitive variables. To solve the Euler equations for this given initial condition, we split the 2D Euler equations into 2, 1D initial value problems (IVPs). In the x-split direction, this becomes 19 where u is the vector of primitive variables. To solve the Euler equations for this given initial condition, we split the 2D Euler equations, 20 21 [[latex($\frac{\partial }{\partial t} \begin{pmatrix} \rho \\ \rho u \\ E \\ \rho v \end{pmatrix} + \frac{\partial }{\partial x} \begin{pmatrix} \rho u \\ \rho u^2 + p \\ u(E+p) \\ \rho u v \end{pmatrix} + \frac{\partial }{\partial y} \begin{pmatrix} \rho v \\ \rho v^2 + p \\ v(E+p) \\ \rho u v \end{pmatrix} = 0$)]] 22 23 24 into 2, 1D problems. In the x-split direction, this is given by, 20 25 21 26 [[latex($\frac{\partial }{\partial t} \begin{pmatrix} \rho \\ \rho u \\ E \\ \rho v \end{pmatrix} + \frac{\partial }{\partial x} \begin{pmatrix} \rho u \\ \rho u^2 + p \\ u(E+p) \\ \rho u v \end{pmatrix} = 0$)]] … … 25 30 [[latex($\frac{\partial }{\partial t} \begin{pmatrix} \rho \\ \rho v \\ E \\ \rho u \end{pmatrix} + \frac{\partial }{\partial y} \begin{pmatrix} \rho v \\ \rho v^2 + p \\ v(E+p) \\ \rho u v \end{pmatrix} = 0$)]] 26 31 27 Note that the first 3 equations of these IVPs are just the 1D problem we have solved before. The difference is 1) the extra momentum equation, and 2) the presence of thetangential velocity components that factor into E.32 Note that the first 3 equations of these different splits form just the 1D problem we have solved before. From a computational perspective, the difference for solving these sets of equations then is 1) the extra momentum equation, and 2) the presence of tangential velocity components that factor into E. 28 33 29 Now, the 2 IVPs are solved on the grid independently. First the grid is sweeped in the x-direction, where it goes cell by cell on a given row and solves the IVPgiven by the x-split equation above + the initial condition prescribed for the ''mesh''. Once a row is is traversed, the next is traversed, until all of the grid has been solved in the x-split direction. This, by the way, is done the "normal" way-- using the Godunov conservative update formula in conjunction with the exact Riemann solver.34 Now, the x- and y- split equations are solved on the grid independently. First the grid is sweeped in the x-direction, where it goes cell by cell on a given row and solves the initial value problem (IVP) given by the x-split equation above + the initial condition prescribed for the ''mesh''. Once a row is is traversed, the next is traversed, until all of the grid has been solved in the x-split direction. This, by the way, is done the "normal" way-- using the Godunov conservative update formula in conjunction with the exact Riemann solver. 30 35 31 The solution data for the x-split mesh is then stored in a 2D array, and used as the initial condition for the y-direction sweep. The sweep proceeds as above, this time moving cell by cell along a given column solving the IVP given by the y-split Euler equations above (and initial condition that is the SOLUTION to the previous x-split sweep). Once a column is traversed, the next is followed upuntil the entire grid is sweeped. The solution to this last sweep is the solution to the full IVP (evolved to t+dt).36 The solution data for the x-split mesh is then stored in a 2D array, and used as the ''initial condition'' for the y-direction sweep. This sweep proceeds as above, this time moving cell by cell along a given column solving the IVP given by the y-split Euler equations above (and initial condition that is the SOLUTION to the previous x-split sweep). Once a column is traversed, the next is until the entire grid is sweeped. The solution to this last sweep is the solution to the full IVP (evolved to t+dt). 32 37 33 38 This process repeats for as many dt's needed to get to the final time of the simulation. Note, the dt is the SAME for both the x- and y-sweeps.