Changes between Version 22 and Version 23 of u/ehansen/buildcode
- Timestamp:
- 11/03/11 10:59:26 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/ehansen/buildcode
v22 v23 4 4 5 5 == 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 usefulinformation from my own personal experience as I build my first hydro code.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. The page contains what I feel is the most important information from my own personal experience as I build my first hydro code. 7 7 8 8 [[BR]] … … 45 45 46 46 A 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 47 54 [[BR]] 48 55 == Discretisation == … … 111 118 [[BR]] 112 119 == 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.120 These 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. 114 121 115 122 * Read all input data necessary for problem … … 119 126 * Impose CFL condition to get appropriate time step 120 127 * Begin flux calculation procedure 121 * Solve local Riemann problem ( primitive variable solution)128 * Solve local Riemann problem (exact or HLLC) 122 129 * Use solution from Riemann solver to compute fluxes 123 130 * Repeat flux calculation procedure until fluxes are computed for all cells … … 138 145 ||= 5 =||= 0.8 =||= 0.012 =||= 1.0 =||= -19.59745 =||= 1000.0 =||= 1.0 =||= -19.59745 =||= 0.01 =|| 139 146 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). 147 Density, 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 141 149 All plots appear to be the same as those presented by Toro. Therefore, the codes SEEQUOD and SEEQUODexact must be correct. 150 142 151 143 152 [[CollapsibleStart(Test 1)]] … … 161 170 || [[Image(test5_pressure.png, width=500)]] || [[Image(test5_intenergy.png, width=500)]] || 162 171 [[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]]