Changes between Version 22 and Version 23 of u/ehansen/buildcode


Ignore:
Timestamp:
11/03/11 10:59:26 (13 years ago)
Author:
ehansen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/ehansen/buildcode

    v22 v23  
    44
    55== Introduction ==
    6 I've created this page to document the important aspects of building a hydro code.  It contains general information that I have learned from reading ''Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction'' by E.F. Toro.  In the near future, it will contain useful information from my own personal experience as I build my first hydro code.
     6I've created this page to document the important aspects of building a hydro code.  It contains general information that I have learned from reading ''Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction'' by E.F. Toro.  The page contains what I feel is the most important information from my own personal experience as I build my first hydro code.
    77
    88[[BR]]
     
    4545
    4646A sampling procedure involves checking several logical statements to determine which state S is in.  With the Riemann problem now solved, we have the correct values for the ''primitive'' variables.
     47
     48[[BR]]
     49== The HLLC Solver ==
     50
     51[[BR]]
     52== The Roe Solver ==
     53
    4754[[BR]]
    4855== Discretisation ==
     
    111118[[BR]]
    112119== Program Outline ==
    113 These are the basic steps in my program SEEQUOD (Solver for Euler EQUations in One Dimension).  SEEQUOD currently uses an exact Riemann solver, but will later be updated to use approximate Riemann solvers as well.  Also, SEEQUOD currently uses a first order Godunov upwind scheme, but again will later be updated to use higher order update schemes.  These steps should be general enough to apply to many codes that are used to solve the Euler Equations.
     120These are the basic steps in my program SEEQUOD (Solver for Euler EQUations in One Dimension).  SEEQUOD currently uses either an exact Riemann solver or the HLLC solver.  A Roe solver is to be added in the near future.  Also, SEEQUOD currently uses a first order Godunov upwind scheme, but again will later be updated to use higher order update schemes.  These steps should be general enough to apply to many codes that are used to solve the Euler Equations.
    114121
    115122* Read all input data necessary for problem
     
    119126   * Impose CFL condition to get appropriate time step
    120127   * Begin flux calculation procedure
    121       * Solve local Riemann problem (primitive variable solution)
     128      * Solve local Riemann problem (exact or HLLC)
    122129      * Use solution from Riemann solver to compute fluxes
    123130      * Repeat flux calculation procedure until fluxes are computed for all cells
     
    138145||= 5 =||= 0.8 =||= 0.012 =||= 1.0 =||= -19.59745 =||= 1000.0 =||= 1.0 =||= -19.59745 =||= 0.01 =||
    139146
    140 Density, velocity, pressure, and internal energy were plotted for every test.  The following images show the numerical results (points) alongside the exact solution (line).
     147Density, velocity, pressure, and internal energy were plotted for every test.  The following images show the numerical results (points) alongside the exact solution (line).  The first five groups of plots all used the exact Riemann solver.  Test 1 was also run with the HLLC solver. The density plot was made to compare it to the results of the exact solver.  Notice that the HLLC solver actually does a better job of resolving the left rarefaction.
     148 
    141149All plots appear to be the same as those presented by Toro.  Therefore, the codes SEEQUOD and SEEQUODexact must be correct.
     150
    142151
    143152[[CollapsibleStart(Test 1)]]
     
    161170|| [[Image(test5_pressure.png, width=500)]] || [[Image(test5_intenergy.png, width=500)]] ||
    162171[[CollapsibleEnd]]
     172[[CollapsibleStart(Test1 (HLLC vs. Exact))]]
     173||= HLLC =||= Exact =||
     174|| [[Image(hllc_test1_density.png, width=500)]] || [[Image(test1_density.png, width=500)]] ||
     175[[CollpasibleEnd]]