Changes between Version 39 and Version 40 of u/erica/GudonovMethodEuler


Ignore:
Timestamp:
05/06/13 14:49:03 (12 years ago)
Author:
Erica Kaminski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/erica/GudonovMethodEuler

    v39 v40  
    1818 [[Image(God.png, 35%)]]
    1919
    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.
     20In 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.
    2121
    2222If we were to blow the left star region up (on the intercell boundary between cell i-1 and i), what we would have is 3 non-linear 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 non-linear waves would be generated. We would like to first find pstar, the value of pressure between the left and right waves, in the region so-called 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
    2323
    2424{{{#!Latex
    25 \rho_s, p_s, u_s
     25\rho_s, P_s, u_s
    2626}}}
    2727
     
    3333
    3434{{{#!Latex
    35 momentum-flux = \rho_s * u_s * u_s + p_s
     35momentum-flux = \rho_s * u_s * u_s + P_s
    3636}}}
    3737
    3838{{{#!Latex
    39 energy-flux = u_s * (0.5*u_s*u_s*\rho_s + p_s/(\gamma - 1) + p_s)
     39energy-flux = u_s * (0.5*u_s*u_s*\rho_s + P_s/(\gamma - 1) + P_s)
    4040}}}
    4141
     
    8484Transmissive 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).
    8585
     86=== Variable transformations ===
     87
     88The 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
    8698== The code ==
    8799[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.