Mushy Layer  1.0
Public Member Functions | Protected Attributes | List of all members
AdvectionPhysics Class Reference

An GodunovPhysics-derived class for simple advection-diffusion problems. More...

#include <AdvectionPhysics.H>

Inheritance diagram for AdvectionPhysics:
GodunovPhysics

Public Member Functions

 AdvectionPhysics ()
 Constructor.
 
 ~AdvectionPhysics ()
 Destructor.
 
virtual void setNComp (int a_nComp)
 Set the number of components.
 
virtual Real getMaxWaveSpeed (const FArrayBox &a_U, const Box &a_box)
 Compute the maximum wave speed.
 
virtual GodunovPhysicsnew_godunovPhysics () const
 Factory method - this object is its own factory. More...
 
virtual int numConserved ()
 Number of conserved variables. More...
 
virtual Vector< string > stateNames ()
 Names of the conserved variables. More...
 
virtual int numFluxes ()
 Number of flux variables. More...
 
virtual void getFlux (FArrayBox &a_flux, const FArrayBox &a_WHalf, const int &a_dir, const Box &a_box)
 compute fluxes from primitive values on a face ( advVel*wHalf) More...
 
virtual bool isDefined () const
 Is the object completely defined. More...
 
virtual int numPrimitives ()
 Number of primitve variables. More...
 
virtual 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. More...
 
virtual 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. More...
 
virtual void charValues (FArrayBox &a_lambda, const FArrayBox &a_W, const int &a_dir, const Box &a_box)
 Compute the characteristic values (eigenvalues) More...
 
virtual void incrementSource (FArrayBox &a_S, const FArrayBox &a_W, const Box &a_box)
 Add to (increment) the source terms given the current state. More...
 
virtual void riemann (FArrayBox &a_WGdnv, 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. More...
 
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. More...
 
virtual void quasilinearUpdate (FArrayBox &a_AdWdx, 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.
 
virtual 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. More...
 
virtual int pressureIndex ()
 Component index within the primitive variables of the pressure. More...
 
virtual Real smallPressure ()
 Used to limit the absolute value of a "pressure" difference. More...
 
virtual int bulkModulusIndex ()
 Component index within the primitive variables of the bulk modulus. More...
 
void setAdvVelPtr (FluxBox *a_advVelPtr)
 Set face-centered advection velocity.
 
void setInflowOutflowVelPtr (FluxBox *a_velPtr)
 Pass advection velocity to BCs to determine if we have inflow or outflow at boundaries.
 
const FluxBoxadvectionVelPtr () const
 Get face-centered advection velocity.
 
void setCellVelPtr (FArrayBox *a_cellVelPtr)
 Set cell-centered advection velocity.
 
const FArrayBoxcellVelPtr () const
 Get cell-centered advection velocity.
 
- Public Member Functions inherited from GodunovPhysics
virtual int densityIndex ()
 

Protected Attributes

FluxBoxm_advVelPtr
 face-centered advection velocity
 
FArrayBoxm_cellVelPtr
 cell-centered advection velocity (centered at old time)
 
bool m_nCompDefined
 Have the numbers below been defined.
 
int m_numCons
 number of conserved variables
 
int m_numPrim
 number of primitive variables
 
int m_numFlux
 number of fluxes
 

Detailed Description

An GodunovPhysics-derived class for simple advection-diffusion problems.

Member Function Documentation

◆ bulkModulusIndex()

int AdvectionPhysics::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.

◆ charAnalysis()

void AdvectionPhysics::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: It is assumed that the characteristic analysis puts the smallest eigenvalue first, the largest eigenvalue last, and orders the characteristic variables accordingly.

Implements GodunovPhysics.

◆ charSynthesis()

void AdvectionPhysics::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.

◆ charValues()

void AdvectionPhysics::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.

◆ getFlux()

void AdvectionPhysics::getFlux ( FArrayBox a_flux,
const FArrayBox a_WHalf,
const int &  a_dir,
const Box a_box 
)
virtual

compute fluxes from primitive values on a face ( advVel*wHalf)

Fluxes are computed as advVel*wHalf

Reimplemented from GodunovPhysics.

◆ incrementSource()

void AdvectionPhysics::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.

◆ isDefined()

bool AdvectionPhysics::isDefined ( ) const
virtual

Is the object completely defined.

Return true if the object is completely defined.

Reimplemented from GodunovPhysics.

◆ new_godunovPhysics()

GodunovPhysics * AdvectionPhysics::new_godunovPhysics ( ) const
virtual

Factory method - this object is its own factory.

Return a pointer to new AdvectionPhysics object with the same definition as this object.

Implements GodunovPhysics.

◆ numConserved()

int AdvectionPhysics::numConserved ( )
virtual

Number of conserved variables.

Return the number of conserved variables.

Implements GodunovPhysics.

◆ numFluxes()

int AdvectionPhysics::numFluxes ( )
virtual

Number of flux variables.

Return the number of flux variables. This can be greater than the number of conserved variables if addition fluxes/face-centered quantities are computed.

Implements GodunovPhysics.

◆ numPrimitives()

int AdvectionPhysics::numPrimitives ( )
virtual

Number of primitve variables.

Return the number of primitive variables. This may be greater than the number of conserved variables if derived/redundant quantities are also stored for convenience.

Implements GodunovPhysics.

◆ postNormalPred()

void AdvectionPhysics::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.

◆ pressureIndex()

int AdvectionPhysics::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.

◆ riemann()

void AdvectionPhysics::riemann ( FArrayBox a_WGdnv,
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.

◆ smallPressure()

Real AdvectionPhysics::smallPressure ( )
virtual

Used to limit the absolute value of a "pressure" difference.

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.

◆ stateNames()

Vector< string > AdvectionPhysics::stateNames ( )
virtual

Names of the conserved variables.

Return the names of the conserved variables.

Implements GodunovPhysics.

◆ velocityInterval()

Interval AdvectionPhysics::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.


The documentation for this class was generated from the following files: