Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

MHDPhysics Class Reference

#include <MHDPhysics.H>

Inheritance diagram for MHDPhysics:

Inheritance graph
[legend]
Collaboration diagram for MHDPhysics:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MHDPhysics (const Real &a_smallPressure)
 Constructor.
 ~MHDPhysics ()
 Destructor.
Real getMaxWaveSpeed (const FArrayBox &a_U, const Box &a_box)
 Compute the maximum wave speed.
virtual GodunovPhysicsnew_godunovPhysics () const
 Object factory for this class.
int numConserved ()
 Number of conserved variables.
Vector< string > stateNames ()
 Names of the conserved variables.
Vector< string > plotNames ()
 Names of the plot variables.
int numFluxes ()
 Number of flux variables.
void getFlux (FArrayBox &a_flux, const FArrayBox &a_whalf, const int &a_dir, const Box &a_box)
 Compute a flux from primitive variable values on a face.
int numPrimitives ()
 Number of primitive variables.
void charAnalysis (FArrayBox &a_dW, const FArrayBox &a_W, const int &a_dir, const Box &a_box)
 Transform a_dW from primitive to characteristic variables.
void charSynthesis (FArrayBox &a_dW, const FArrayBox &a_W, const int &a_dir, const Box &a_box)
 Transform a_dW from characteristic to primitive variables.
void charValues (FArrayBox &a_lambda, const FArrayBox &a_W, const int &a_dir, const Box &a_box)
 Compute the characteristic values (eigenvalues).
void incrementSource (FArrayBox &a_S, const FArrayBox &a_W, const Box &a_box)
 Add to (increment) the source terms given the current state.
void riemann (FArrayBox &a_WStar, const FArrayBox &a_WLeft, const FArrayBox &a_WRight, const FArrayBox &a_W, const Real &a_time, const int &a_dir, const Box &a_box)
 Compute the solution to the Riemann problem.
virtual void postNormalPred (FArrayBox &a_dWMinus, FArrayBox &a_dWPlus, const FArrayBox &a_W, const Real &a_dt, const Real &a_dx, const int &a_dir, const Box &a_box)
 Post-normal predictor calculation.
void quasilinearUpdate (FArrayBox &a_dWdx, const FArrayBox &a_WHalf, const FArrayBox &a_W, const Real &a_scale, const int &a_dir, const Box &a_box)
 Compute the quasilinear update A*dW/dx.
void consToPrim (FArrayBox &a_W, const FArrayBox &a_U, const Box &a_box)
 Compute primitive variables from conserved variables.
virtual Interval velocityInterval ()
 Interval within the primitive variables corresponding to the velocities.
virtual int pressureIndex ()
 Component index within the primitive variables of the pressure.
virtual Real smallPressure ()
 Used to limit the absolute value of a "pressure" difference (away from zero).
virtual int bulkModulusIndex ()
 Component index within the primitive variables of the bulk modulus.

Protected Attributes

Real m_smallPressure
 Used to limit the absolute value of a "pressure" difference (away from zero).

Detailed Description

The GodunovPhysics-derived class MHDPhysics provides the physics-dependent components for a higher-order method for a single patch: characteristic analysis, Riemann solver, quasilinear update, conservative update, and transformations between conserved, primitive, and flux variables.


Constructor & Destructor Documentation

MHDPhysics::MHDPhysics const Real a_smallPressure  ) 
 

Constructor.

MHDPhysics::~MHDPhysics  ) 
 

Destructor.


Member Function Documentation

virtual int MHDPhysics::bulkModulusIndex  )  [virtual]
 

Component index within the primitive variables of the bulk modulus.

Return the component index withn the primitive variables for the bulk modulus. Used for slope flattening (slope computation) used as a normalization to measure shock strength.

Implements GodunovPhysics.

void MHDPhysics::charAnalysis FArrayBox a_dW,
const FArrayBox a_W,
const int &  a_dir,
const Box a_box
[virtual]
 

Transform a_dW from primitive to characteristic variables.

On input, a_dW contains the increments of the primitive variables. On output, it contains the increments in the characteristic variables.

IMPORTANT NOTE: The characteristic analysis puts the smallest eigenvalue first, the largest eigenvalue last, and orders the characteristic variables accordingly.

Implements GodunovPhysics.

void MHDPhysics::charSynthesis FArrayBox a_dW,
const FArrayBox a_W,
const int &  a_dir,
const Box a_box
[virtual]
 

Transform a_dW from characteristic to primitive variables.

On input, a_dW contains the increments of the characteristic variables. On output, it contains the increments in the primitive variables.

IMPORTANT NOTE: It is assumed that the characteristic analysis puts the smallest eigenvalue first, the largest eigenvalue last, and orders the characteristic variables accordingly.

Implements GodunovPhysics.

void MHDPhysics::charValues FArrayBox a_lambda,
const FArrayBox a_W,
const int &  a_dir,
const Box a_box
[virtual]
 

Compute the characteristic values (eigenvalues).

Compute the characteristic values (eigenvalues)

IMPORTANT NOTE: It is assumed that the characteristic analysis puts the smallest eigenvalue first, the largest eigenvalue last, and orders the characteristic variables accordingly.

Implements GodunovPhysics.

void MHDPhysics::consToPrim FArrayBox a_W,
const FArrayBox a_U,
const Box a_box
[virtual]
 

Compute primitive variables from conserved variables.

Implements GodunovPhysics.

void MHDPhysics::getFlux FArrayBox a_flux,
const FArrayBox a_whalf,
const int &  a_dir,
const Box a_box
[virtual]
 

Compute a flux from primitive variable values on a face.

Implements GodunovPhysics.

Real MHDPhysics::getMaxWaveSpeed const FArrayBox a_U,
const Box a_box
[virtual]
 

Compute the maximum wave speed.

Implements GodunovPhysics.

void MHDPhysics::incrementSource FArrayBox a_S,
const FArrayBox a_W,
const Box a_box
[virtual]
 

Add to (increment) the source terms given the current state.

On input, a_S contains the current source terms. On output, a_S has had any additional source terms (based on the current state, a_W) added to it. This should all be done on the region defined by a_box.

Implements GodunovPhysics.

virtual GodunovPhysics* MHDPhysics::new_godunovPhysics  )  const [virtual]
 

Object factory for this class.

Implements GodunovPhysics.

int MHDPhysics::numConserved  )  [virtual]
 

Number of conserved variables.

Return the number of conserved variables.

Implements GodunovPhysics.

int MHDPhysics::numFluxes  )  [virtual]
 

Number of flux variables.

Return the number of flux variables.

Implements GodunovPhysics.

int MHDPhysics::numPrimitives  )  [virtual]
 

Number of primitive variables.

Return the number of primitive variables.

Implements GodunovPhysics.

Vector<string> MHDPhysics::plotNames  ) 
 

Names of the plot variables.

Return the names of the conserved variables.

virtual void MHDPhysics::postNormalPred FArrayBox a_dWMinus,
FArrayBox a_dWPlus,
const FArrayBox a_W,
const Real a_dt,
const Real a_dx,
const int &  a_dir,
const Box a_box
[virtual]
 

Post-normal predictor calculation.

Add increment to normal predictor, e.g. to account for source terms due to spatially-varying coefficients, to bound primitive variable ranges.

Implements GodunovPhysics.

virtual int MHDPhysics::pressureIndex  )  [virtual]
 

Component index within the primitive variables of the pressure.

Return the component index withn the primitive variables for the pressure. Used for slope flattening (slope computation).

Implements GodunovPhysics.

void MHDPhysics::quasilinearUpdate FArrayBox a_dWdx,
const FArrayBox a_WHalf,
const FArrayBox a_W,
const Real a_scale,
const int &  a_dir,
const Box a_box
[virtual]
 

Compute the quasilinear update A*dW/dx.

Implements GodunovPhysics.

void MHDPhysics::riemann FArrayBox a_WStar,
const FArrayBox a_WLeft,
const FArrayBox a_WRight,
const FArrayBox a_W,
const Real a_time,
const int &  a_dir,
const Box a_box
[virtual]
 

Compute the solution to the Riemann problem.

Given input left and right states in a direction, a_dir, compute a Riemann problem and generate fluxes at the faces within a_box.

Implements GodunovPhysics.

virtual Real MHDPhysics::smallPressure  )  [virtual]
 

Used to limit the absolute value of a "pressure" difference (away from zero).

Return a value that is used by slope flattening to limit (away from zero) the absolute value of a slope in the pressureIndex() component (slope computation).

Implements GodunovPhysics.

Vector<string> MHDPhysics::stateNames  )  [virtual]
 

Names of the conserved variables.

Return the names of the conserved variables.

Implements GodunovPhysics.

virtual Interval MHDPhysics::velocityInterval  )  [virtual]
 

Interval within the primitive variables corresponding to the velocities.

Return the interval of component indices within the primitive variable of the velocities. Used for slope flattening (slope computation) and computing the divergence of the velocity (artificial viscosity).

Implements GodunovPhysics.


Member Data Documentation

Real MHDPhysics::m_smallPressure [protected]
 

Used to limit the absolute value of a "pressure" difference (away from zero).


The documentation for this class was generated from the following file:
Generated on Wed Oct 5 12:49:08 2005 for Chombo&AMRIdealMHD by  doxygen 1.4.1