Changes between Version 31 and Version 32 of u/ehansen/buildcode


Ignore:
Timestamp:
11/14/11 14:49:29 (13 years ago)
Author:
ehansen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/ehansen/buildcode

    v31 v32  
    4848[[BR]]
    4949== The HLLC Solver ==
    50 The HLLC solver is different in that it computes an approximation for the fluxes directly rather than using a Riemann problem solution to calculate the exact fluxes.  In order to calculate the approximate fluxes, the HLLC solver needs values for the pressure and velocity in the star region.  This can be done using the same guess procedure* mentioned in the exact Riemann solver description.
     50The HLLC solver is different in that it computes an approximation for the fluxes directly rather than using a Riemann problem solution to calculate the exact fluxes.  The basic idea is to assume a wave configuration of three waves which separate four constant regions.  The two middle regions form the star region, so the HLLC solver needs values for the pressure and velocity in the star region.  This can be done using the same guess procedure* mentioned in the exact Riemann solver description.  These values are then used to compute various wave speeds, and the wave speeds are in turn used to compute the fluxes.
    5151
    5252[[BR]]
    5353== The Roe Solver ==
    54 The Roe solver is different from all other solvers presented on this page because it makes an approximation to the Riemann problem itself and then solves that problem exactly.  The Roe method takes the Riemann problem and linearizes it by assuming a constant coefficient matrix instead of a Jacobian matrix as mentioned in the Riemann problem section. 
     54The Roe solver is different from all other solvers presented on this page because it makes an approximation to the Riemann problem itself and then solves that problem exactly.  The Roe method takes the Riemann problem and linearizes it by assuming a constant coefficient matrix instead of a Jacobian matrix as mentioned in the Riemann problem section.  The eigenvalues and eigenvectors of this new linear system are then computed.  Then, a parameter known as the ''wave strength'' is computed.  The wave strengths are found from projecting the difference of the data across a cell boundary onto the eigenvectors.  Lastly, the fluxes can be computed using corresponding eigenvalues, wave strengths, and eigenvectors.
     55
     56The original Roe method has trouble at sonic points inside rarefactions.  It will produce waves known as rarefaction shocks which violate an entropy condition.  Values from the star region can be used to fix this problem.  A simple way to obtain these values is to use the same guess procedure* from the other two Riemann solvers.  These star region values define new eigenvalues that are to be used near sonic points.  Thus the entropy problem is resolved.
    5557
    5658[[BR]]
    5759=== * A Note on the "Guess" Procedure ===
    58 Since all three Riemann solvers use this procedure, I thought it was important to explain it in more detail.  The guess procedure is essentially an adaptive non-iterative Riemann solver.  It uses three different approximate Riemann solvers which are all based on the exact solver: the Primitive Variable Riemann Solver (PVRS), the Two Rarefaction Riemann Solver (TRRS), and the Two Shock Riemann Solver (TSRS).  It chooses which solver to use based on the initial conditions.
     60Since all three Riemann solvers use this procedure, I thought it was important to explain it in more detail.  The guess procedure is essentially an adaptive non-iterative Riemann solver.  It uses three different approximate Riemann solvers: the Primitive Variable Riemann Solver (PVRS), the Two Rarefaction Riemann Solver (TRRS), and the Two Shock Riemann Solver (TSRS).  These solvers are all easy to implement and involve simple approximations.  The program chooses which solver to use based on the initial conditions.  The PVRS is similar to the Roe solver in that it linearizes the Riemann problem, but it then makes simpler approximations to compute the solution.  The TRRS and TSRS are both based on the exact Riemann solver.  These basically assume a particular wave configuration and use those simple solutions as opposed to a sampling procedure.
    5961
    6062[[BR]]
     
    124126[[BR]]
    125127== The MUSCL-Hancock Scheme ==
     128The MUSCL-Hancock scheme achieves second order accuracy by adding a few more steps to the process.  The essential idea here is that instead of using the initial data directly we are going to alter the data slightly.  This process is known as ''reconstruction''.  Instead of having constant data across a cell, we give the data a slope.  In other words, the data in each cell is now represented by a sloped line rather than a flat line.  This methodology can achieve second order accuracy, and other methods can give higher order accuracy.  For example, representing the data as a quadratic could achieve third order accuracy and so on. 
     129
     130=== 1. Compute a limited slope ===
     131The first thing one usually thinks to use for a slope is the difference of data states across a cell boundary.  However, this will produce what are known as ''spurious oscillations'', because a simple difference can overestimate the desired slope.  This is why most methods use some type of limited slope.  This can be computed directly or via a ''slope limiter''.  The slope limiter is another parameter that is just multiplied by the original slope to keep it from becoming too large.
     132
     133=== 2. Reconstruct the data ===
     134Once a suitable slope is found, it can be used to compute what are known as ''boundary extrapolated values''.  These are the extreme points of the data located at the intercell boundaries.  This data is then evolved in time by half of a time step via a formula similar to (9).  Now we have the fully reconstructed, evolved data.  This data is then used to solve the Riemann problem, and the process proceeds exactly as the first order Godunov method.
    126135
    127136[[BR]]
     
    135144   * Impose CFL condition to get appropriate time step
    136145   * Begin flux calculation procedure
     146      * Calculate a limited slope (MUSCL only)
     147      * Reconstruct the data (MUSCL only)
    137148      * Solve local Riemann problem (exact, HLLC, or Roe)
    138149      * Use solution from Riemann solver to compute fluxes
     
    143154* Output data to a file
    144155
     156The MUSCL only steps can easily be omitted to obtain the first order Godunov results. 
    145157[[BR]]
    146158== Test Results ==