Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

rivp.c File Reference

One-dimensional Riemann Initial Value Problem. More...

#include <math.h>
#include "../../util/source/compiler.h"
#include "../../util/source/useful.h"
#include <stdio.h>
#include "flux_calc.h"
#include "../../nm/source/qd_power.h"
#include "../../mb_cns/source/cns_work_vector.h"
#include "../../mb_cns/source/ivdep.h"

Defines

#define QUICK_AND_DIRTY   1
#define SHOCK_RATIO   1.5
#define LINEAR   1

Functions

int rivp (struct flow_state QL[], struct flow_state QR[], struct flow_state QIF[], double WSL[], double WSR[], int first, int last)
 Compute flux using a solution to the 1D Riemann problem.
int rivp_stage_3 (struct flow_state QL[], struct flow_state QR[], struct flow_state QLstar[], struct flow_state QRstar[], double WSL[], double WSR[], double geff[], struct flow_state QIF[], int first, int last)
 Interpolate interface state from intermediate states.


Detailed Description

One-dimensional Riemann Initial Value Problem.

Todo:
Really should get rid of the vector loop some time.

Need to rework interpolation and remove the assumption that e = Cv.T


Function Documentation

int rivp struct flow_state  QL[],
struct flow_state  QR[],
struct flow_state  QIF[],
double  WSL[],
double  WSR[],
int  first,
int  last
 

Compute flux using a solution to the 1D Riemann problem.

Given the initial LEFT and RIGHT states (QL and QR) either side of an interface, compute the solution to the one-dimensional Riemann problem when the interface is removed. This solution is returned as values of the flow quantities at the interface (QIF) and the velocities of the left and right waves.

Parameters:
*QL : IN : pointer to the array of LEFT states see "flux_calc.h" for a definition of the components
*QR : IN : RIGHT states
first : IN : first element to be computed
last : IN : last element to be computed
QIF : OUT : Flow state at the interface
WSL : OUT : Left wave velocity
WSR : OUT : Right wave velocity
Version:
 * 1.0,  20 Dec 90
 * 1.01, 20-Feb-91: include "compilers.h"
 * 1.10, 17-Mar-91: installed quick and dirty power routine
 * 1.2,  25-Apr-91: vacuum case installed, WSL and WSR added
 * 1.3,  26-Apr-91: vector version
 * 1.4,  27-May-91: strong shock solution added.
 * 1.4.1 28-May-91: Newton steps added as a second stage
 * 1.4.2 05-Jun-91: changed the way intermediate variables are
 *                  backed out
 * 2.0   18-Nov-92: Split the interpolation section off into
 *                  the new function rivp_stage_3().
 *                  Made the stage numbering consistent with
 *                  the AIAA Journal paper.
 * 3.0   04-Mar-93: Split the main loop into smaller parts
 *                  for the Fujitsu compiler
 *                  Promote scalar temporaries to vectors.
 * 3.01  10-Mar-93: Have removed the 4 Newton-step code but
 *                  have left the two step code.
 *                  Have introduced a new temporary variable
 *                  into the calculation of the wave speeds.
 * 4.0   17-Mar-93: Added Toro's linearized Riemann solver.
 * 5.0   13-Aug-93: Added general-strength shock expressions 
 *                  to stage 2.
 * 5.01  16-Aug-93: Finally got the signs right in the Newton steps.
 * 5.1   29-Oct-93: Fixed a couple of problems for cases where
 *                  the Newton steps run into trouble.  Also
 *                  put the number of Newton steps back to 4.
 * 6.0   29-Jan-96: Thermo properties now come via service functions.
 * 6.01  29-Apr-96: Promoted DEBUG output to level 4 so that not so much
 *                  is written.
 * 6.02  03-Nov-96: Removed Toro's linearised solver and
 *                  the strong-shock code which hasn't been
 *                  used for ages.
 * --------------------------------------------------------------------------
 * 08-Sep-2002 : Started to remove the e = C_v * T dependency from the
 *               code here but it is deeply embedded in the later stages
 *               of the calculations.  Maybe it just isn't worth bothering
 *               to keep it up-to-date.  Consider these functions deprecated!
 * --------------------------------------------------------------------------
 *
Author:
P.A. Jacobs ICASE Mail Stop 123C NASA Langley Rearch Centre Hampton VA 23665.

PJ Department of Mechanical Engineering The University of Queensland Brisbane 4072

 * References ...
 * ----------
 *
 * Most of this solver is now documented in
 * P. A. Jacobs "An approximate Riemann solver for hypervelocity
 * flows."  AIAA Journal vol. 30(10) 1992.
 *
 * S.R. Chakravarthy "Development of upwind schemes for the
 * Euler equations"
 * NASA Contractor Report 4043, 1987.
 *
 * P. Colella "Glimm's method for gas dynamics"
 * SIAM J. Sci. Stat. Comput. vol.3, 76-110, 1982.
 *
 * T. A. Edwards (1988)
 * "The effect of exhaust plume/afterbody interaction on
 * installed scramjet performance."
 * NASA Technical Memorandum 101033
 *
 * H.M. Glaz & A.B. Wardlaw "A high-order Godunov scheme for
 * steady supersonic gas dynamics" J. Comput. Phys. vol.58,
 * pp157-187, 1985.
 *
 * J.J. Gottlieb & C.P.T. Groth "Assessment of Riemann solvers
 * for unsteady one-dimensional inviscid flows of perfect gases"
 * J. Comput. Phys. vol.78(2), 437-458, 1988.
 *
 * B. van Leer "On the relation between the upwind-differencing
 * schemes of Godunov, Engquist-Osher & Roe"
 * SIAM J. Sci. Stat. Comput. vol.5(1), 1-20, 1984.
 *
 * B. van Leer, W-T. Lee & K.G. Powell "Sonic point capturing"
 * AIAA-89-1945-CP (AIAA 9th CFD conference), 1989.
 *
 * H.W. Liepmann & A.Roshko "Elements of Gas Dynamics"
 * Wiley, 1957.
 *
 * S. Osher & F. Solomon "Upwind difference schemes for
 * hyperbolic systems of conservation laws"
 * Mathematics of Computation, vol.38, 339-, 1982.
 *
 * P.L. Roe "Some contributions to the modelling of
 * discontinuous flows" Lectures in Applied Mathematics,
 * Vol. 22 (part 2), 163-193, 1985
 * 
 * E. F. Toro "A linearized Riemann solver for the time-
 * dependent Euler equations of gas-dynamics"
 * Proc. R. Soc. Lond. A Vol. 434, 683-693 (1991)
 *
 * M. Vinokur & Y. Liu (1988)
 * "Equilibrium gas flow computations II: An analysis of
 * numerical formulations of conservation laws."
 * AIAA Paper 88-0127
 * 

int rivp_stage_3 struct flow_state  QL[],
struct flow_state  QR[],
struct flow_state  QLstar[],
struct flow_state  QRstar[],
double  WSL[],
double  WSR[],
double  geff[],
struct flow_state  QIF[],
int  first,
int  last
 

Interpolate interface state from intermediate states.

Given the initial LEFT and RIGHT states (QL and QR) either side of an interface and the intermediate states, interpolate (or select) the interface state.

Parameters:
*QL : IN : pointer to the array of LEFT states see "flux_calc.h" for a definition of the components
*QR : IN : RIGHT states
*QLstar,*QRstar : IN : the intermediate states
*geff : IN : the array of effective gammas
WSL : IN : Left wave velocity
WSR : IN : Right wave velocity
first : IN : first element to be computed
last : IN : last element to be computed
QIF : OUT : Flow state at the interface
Version:
1.0, 18-Nov-92: Split off from rivp()

1.01, 03-Nov-96: Update multiple-species code.


Generated on Tue Oct 25 10:24:13 2005 for CFCFD by  doxygen 1.4.4