Changes between Version 2 and Version 3 of u/erica/2D_Godunov
- Timestamp:
- 07/29/13 13:10:31 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/erica/2D_Godunov
v2 v3 1 [[PageOutline]] 2 1 3 = Introduction = 2 4 3 5 The method I chose for practice writing a higher dimension code is the 1st order accurate, split scheme, Godunov + Exact Riemann Solver to solve the 2D Euler equations for a cylindrical explosion. Given the higher dimension of the problem, new types of waves are present in the solution, namely shears. Shears are passively advected with the flow, as can be shown by combining the continuity equation and the corresponding momenta equations. 4 5 6 6 7 7 = Initialization = … … 9 9 This method begins by initializing a 2D Cartesian grid, with a circle in the center. The primitive fluid variables (rho, x-velocity, y-velocity, pressure) are set inside and outside of this circle. 10 10 11 = The essence of split schemes = 12 13 It can be proven for ''linear'' systems of equations of higher dimension, that splitting the problem into x and y components yields an exact solution. For non-linear systems, the effort leads to a highly accurate (but not exact) solution. The concept is as follows. 14 15 We begin with a 2D mesh of initial condition 16 17 [[latex($\vec{u}^n = \{ \vec{u}^n_{i,j} \} ~\forall ~i,~\forall~j$)]] 18 19 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, we have 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} = 0$)]] 22 23 and in the y-direction we have, 24 25 [[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 27 28 29 11 30 = Upsides / Downsides = 12 31 13 The good aspects of this methodare: 1) accurate resolution of shear waves, 2) simple to construct.32 The good aspects of this choice of method (split, Godunov + Exact Riemann Solver) are: 1) accurate resolution of shear waves, 2) simple to construct. 14 33 15 34 The downside is: 1) not higher order (if wanted to add this - code could become quite complex to take into account the addition of shears into the TVD algorithms)