Changes between Version 39 and Version 40 of u/erica/GudonovMethodEuler
 Timestamp:
 05/06/13 14:49:03 (12 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

u/erica/GudonovMethodEuler
v39 v40 18 18 [[Image(God.png, 35%)]] 19 19 20 In this picture, WL and WR denote the arrays of primitive fluid variables (namely, rho, u, p) designated as the values of those variables at the adjacent cell centers, the asterisk (*) indicates a star region that is bound by two outgoing arrows, the arrows indicate the wave pattern generated in the LRP, F is the numerical flux (described below), and the conservative formula is given by the Godunov scheme, also presented below.20 In this picture, WL and WR denote the arrays of primitive fluid variables (namely, rho, u, P) designated as the values of those variables at the adjacent cell centers, the asterisk (*) indicates a star region that is bound by two outgoing arrows, the arrows indicate the wave pattern generated in the LRP, F is the numerical flux (described below), and the conservative formula is given by the Godunov scheme, also presented below. 21 21 22 22 If we were to blow the left star region up (on the intercell boundary between cell i1 and i), what we would have is 3 nonlinear waves (contact, shock(s) and/or rarefaction(s)) being generated at this boundary IF the left and right states (WL and WR) were different. If these states are the same, then NO nonlinear waves would be generated. We would like to first find pstar, the value of pressure between the left and right waves, in the region socalled the "star region". Once this is known, we can determine the types of waves generated. Since they are propagating away from the intercell boundary, the exact values of the fluid variables along the intercell boundary depend on their relative speeds. We then would sample the solution to the LRP, along this boundary only. Once we have found the solution at this boundary, given by 23 23 24 24 {{{#!Latex 25 \rho_s, p_s, u_s25 \rho_s, P_s, u_s 26 26 }}} 27 27 … … 33 33 34 34 {{{#!Latex 35 momentumflux = \rho_s * u_s * u_s + p_s35 momentumflux = \rho_s * u_s * u_s + P_s 36 36 }}} 37 37 38 38 {{{#!Latex 39 energyflux = u_s * (0.5*u_s*u_s*\rho_s + p_s/(\gamma  1) + p_s)39 energyflux = u_s * (0.5*u_s*u_s*\rho_s + P_s/(\gamma  1) + P_s) 40 40 }}} 41 41 … … 84 84 Transmissive boundaries were set up for the current code. These boundary conditions (BC's) theoretically do not produce waves at the boundary, and so allow waves to travel right through them. Such BC's are prescribed by setting the values of the fluid variables at the ghost zone cell equal to the adjacent physical cell. Thus, the local Riemann problem has WL = WR at the boundary of the physical and ghost domains, and so the solution is trivial (no wave generated). 85 85 86 === Variable transformations === 87 88 The Exact Riemann Solver (contained in the separate module below  that includes routines to solve for pstar, ustar, and sampling along intercell boundary) uses PRIMITIVE variables, that is: density (rho), velocity (u), pressure (P). But, the Godunov scheme discretizes the Euler equations in CONSERVATIVE form, and so updating cells using this scheme, requires transforming to the conservative variables (density, momentum (p), energy (E)) updating them using Godunov formula, and then converting back to primitive form for use with the Exact Riemann Solver in the next time step. The transformation from primitive to conservative is as follows: 89 90 {{{#!Latex 91 \rho = \rho 92 \p = \rho*u 93 \E = 0.5*\rho*u^2 + P/(\gamma  1.0) 94 }}} 95 96 97 86 98 == The code == 87 99 [http://www.pas.rochester.edu/~erica/God_Eul.f90 Here] is an html version of the main program, with encompassing [http://www.pas.rochester.edu/~erica/solver.f90 module], and [http://www.pas.rochester.edu/~erica/GodEulproblem.data problem.data] file.