Ember
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ConvectionSystemSplit Class Reference

Composite system representing the Convection term for all components. More...

#include <convectionSystem.h>

Inheritance diagram for ConvectionSystemSplit:
[legend]

Public Member Functions

 ConvectionSystemSplit ()
 
void setGrid (const OneDimGrid &grid)
 Copy the specified grid to this object.
 
void setTolerances (const ConfigOptions &options)
 Set tolerances for the CVODE solvers.
 
void setGas (CanteraGas &gas)
 Set the Cantera object used for property evaluations.
 
void resize (const size_t nPoints, const size_t nSpec, dmatrix &state)
 Set the problem size and provide values for the current state variables.
 
void setState (double tInitial)
 Set the state of the internal solvers from the state of the composite solver.
 
void setLeftBC (const double Tleft, const dvec &Yleft)
 Set boundary conditions for temperature and mass fractions left of the domain when using BoundaryCondition::ControlVolume or BoundaryCondition::WallFlux.
 
void set_rVzero (const double rVzero)
 Set the mass flux boundary value at j=0.
 
void evaluate ()
 Evaluate time derivatives for each state variable and the normal mass flux at the current state.
 
void setDensityDerivative (const dvec &drhodt)
 Set the time derivative of the density.
 
void updateContinuityBoundaryCondition (const dvec &qdot, ContinuityBoundaryCondition::BC newBC)
 
void setSplitConstants (const dmatrix &splitConst)
 Set the constants introduced by the splitting method.
 
void resetSplitConstants ()
 Set the constants introduced by the splitting method to zero.
 
void integrateToTime (const double tf)
 Integrate the the split convection equations to tf.
 
void integrateSpeciesTerms (size_t k1, size_t k2)
 Integrate the species terms in the range [k1, k2)
 
void unroll_y ()
 convert the solver's solution vectors to the full U, Y, and T.
 
int getNumSteps ()
 Compute the total number of timesteps taken by the solvers for the individual components.
 
void setupQuasi2D (std::shared_ptr< BilinearInterpolator > &vzInterp, std::shared_ptr< BilinearInterpolator > &vrInterp)
 Set the velocity field data used in the Quasi2D case.
 
- Public Member Functions inherited from GridBased
 GridBased ()
 
virtual ~GridBased ()
 
virtual void setGrid (const OneDimGrid &grid)
 Copy the specified grid to this object.
 

Public Attributes

VecMap U
 normalized tangential velocity (u*a/u_inf) [1/s]
 
VecMap T
 temperature [K]
 
MatrixMap Y
 species mass fractions, Y(k,j) [-]
 
dvec Wmx
 Mixture molecular weight [kg/kmol].
 
dvec V
 mass flux normal to the flame [kg/m^2*s]
 
dvec dUdt
 Time derivative of U [1/s^2].
 
dvec dTdt
 Time derivative of T [K/s].
 
dvec dWdt
 Time derivative of Wmx [kg/kmol*s].
 
dmatrix dYdt
 Time derivative of Y [1/s].
 
ConvectionSystemUTW utwSystem
 System used to solve for U, T, and Wmx.
 
std::shared_ptr< vecInterpolatorvInterp
 Interpolation data for V, used for the species solvers.
 
PerfTimer utwTimer
 
PerfTimer speciesTimer
 
- Public Attributes inherited from GridBased
OneDimGrid grid
 the actual grid
 

Private Member Functions

void configureSolver (SundialsCvode &solver, const size_t k)
 

Private Attributes

double reltol
 CVODE integration tolerances.
 
double abstolU
 velocity absolute tolerance
 
double abstolT
 temperature absolute tolerance
 
double abstolW
 molecular weight absolute tolerance
 
double abstolY
 mass fraction absolute tolerance
 
std::shared_ptr< SundialsCvodeutwSolver
 Solver for utwSystem.
 
boost::ptr_vector< ConvectionSystemYspeciesSystems
 Systems used to solve the convection term for each species.
 
boost::ptr_vector< SundialsCvodespeciesSolvers
 Solvers for system in speciesSystems.
 
dvec Yleft
 Mass fraction left of the domain.
 
dvec W
 Molecular weight of each species [kg/kmol].
 
size_t nSpec
 Number of species.
 
size_t nVars
 Number of state variables in the UTW system (==3)
 
CanteraGasgas
 Cantera object used for computing Wmx.
 
bool quasi2d
 true when solving the quasi-2d problem; false otherwise.
 
double tStageStop
 end time of the current integration stage
 
SundialsContext sunContext
 

Additional Inherited Members

- Protected Attributes inherited from GridBased
dvecx
 The coordinates of the grid points [m].
 
dvecr
 "radius" at x[j].
 
dvecrphalf
 "radius" at x[j+1/2].
 
dvechh
 Grid spacing between x[j] and x[j+1].
 
dvecdlj
 Average of left and right grid spacing.
 
dveccfm
 Coefficient for y[j-1] in first centered difference.
 
dveccf
 Coefficient for y[j] in first centered difference.
 
dveccfp
 Coefficient for y[j+1] in first centered difference.
 
int & alpha
 curved grid exponent.
 
int & beta
 curved grid exponent.
 
size_t & nPoints
 number of grid point
 
size_t & jj
 index of last grid point (== nPoints-1)
 

Detailed Description

Composite system representing the Convection term for all components.

System which combines a ConvectionSystemUTW object and several ConvectionSystemY objects that together represent the complete convection term for all components.

Constructor & Destructor Documentation

◆ ConvectionSystemSplit()

ConvectionSystemSplit::ConvectionSystemSplit ( )

Member Function Documentation

◆ setGrid()

void ConvectionSystemSplit::setGrid ( const OneDimGrid grid)
virtual

Copy the specified grid to this object.

Reimplemented from GridBased.

◆ setTolerances()

void ConvectionSystemSplit::setTolerances ( const ConfigOptions options)

Set tolerances for the CVODE solvers.

◆ setGas()

void ConvectionSystemSplit::setGas ( CanteraGas gas)

Set the Cantera object used for property evaluations.

◆ resize()

void ConvectionSystemSplit::resize ( const size_t  nPoints,
const size_t  nSpec,
dmatrix state 
)

Set the problem size and provide values for the current state variables.

◆ setState()

void ConvectionSystemSplit::setState ( double  tInitial)

Set the state of the internal solvers from the state of the composite solver.

◆ setLeftBC()

void ConvectionSystemSplit::setLeftBC ( const double  Tleft,
const dvec Yleft 
)

Set boundary conditions for temperature and mass fractions left of the domain when using BoundaryCondition::ControlVolume or BoundaryCondition::WallFlux.

◆ set_rVzero()

void ConvectionSystemSplit::set_rVzero ( const double  rVzero)

Set the mass flux boundary value at j=0.

◆ evaluate()

void ConvectionSystemSplit::evaluate ( )

Evaluate time derivatives for each state variable and the normal mass flux at the current state.

◆ setDensityDerivative()

void ConvectionSystemSplit::setDensityDerivative ( const dvec drhodt)

Set the time derivative of the density.

Time derivatives of species and temperature from the other split terms are needed to correctly compute the density derivative appearing in the continuity equation.

◆ updateContinuityBoundaryCondition()

void ConvectionSystemSplit::updateContinuityBoundaryCondition ( const dvec qdot,
ContinuityBoundaryCondition::BC  newBC 
)

◆ setSplitConstants()

void ConvectionSystemSplit::setSplitConstants ( const dmatrix splitConst)

Set the constants introduced by the splitting method.

◆ resetSplitConstants()

void ConvectionSystemSplit::resetSplitConstants ( )

Set the constants introduced by the splitting method to zero.

◆ integrateToTime()

void ConvectionSystemSplit::integrateToTime ( const double  tf)

Integrate the the split convection equations to tf.

◆ integrateSpeciesTerms()

void ConvectionSystemSplit::integrateSpeciesTerms ( size_t  k1,
size_t  k2 
)

Integrate the species terms in the range [k1, k2)

◆ unroll_y()

void ConvectionSystemSplit::unroll_y ( )

convert the solver's solution vectors to the full U, Y, and T.

◆ getNumSteps()

int ConvectionSystemSplit::getNumSteps ( )

Compute the total number of timesteps taken by the solvers for the individual components.

◆ setupQuasi2D()

void ConvectionSystemSplit::setupQuasi2D ( std::shared_ptr< BilinearInterpolator > &  vzInterp,
std::shared_ptr< BilinearInterpolator > &  vrInterp 
)

Set the velocity field data used in the Quasi2D case.

◆ configureSolver()

void ConvectionSystemSplit::configureSolver ( SundialsCvode solver,
const size_t  k 
)
private

Member Data Documentation

◆ U

VecMap ConvectionSystemSplit::U

normalized tangential velocity (u*a/u_inf) [1/s]

◆ T

VecMap ConvectionSystemSplit::T

temperature [K]

◆ Y

MatrixMap ConvectionSystemSplit::Y

species mass fractions, Y(k,j) [-]

◆ Wmx

dvec ConvectionSystemSplit::Wmx

Mixture molecular weight [kg/kmol].

◆ V

dvec ConvectionSystemSplit::V

mass flux normal to the flame [kg/m^2*s]

◆ dUdt

dvec ConvectionSystemSplit::dUdt

Time derivative of U [1/s^2].

◆ dTdt

dvec ConvectionSystemSplit::dTdt

Time derivative of T [K/s].

◆ dWdt

dvec ConvectionSystemSplit::dWdt

Time derivative of Wmx [kg/kmol*s].

◆ dYdt

dmatrix ConvectionSystemSplit::dYdt

Time derivative of Y [1/s].

◆ utwSystem

ConvectionSystemUTW ConvectionSystemSplit::utwSystem

System used to solve for U, T, and Wmx.

◆ vInterp

std::shared_ptr<vecInterpolator> ConvectionSystemSplit::vInterp

Interpolation data for V, used for the species solvers.

◆ utwTimer

PerfTimer ConvectionSystemSplit::utwTimer

◆ speciesTimer

PerfTimer ConvectionSystemSplit::speciesTimer

◆ reltol

double ConvectionSystemSplit::reltol
private

CVODE integration tolerances.

relative integrator tolerance

◆ abstolU

double ConvectionSystemSplit::abstolU
private

velocity absolute tolerance

◆ abstolT

double ConvectionSystemSplit::abstolT
private

temperature absolute tolerance

◆ abstolW

double ConvectionSystemSplit::abstolW
private

molecular weight absolute tolerance

◆ abstolY

double ConvectionSystemSplit::abstolY
private

mass fraction absolute tolerance

◆ utwSolver

std::shared_ptr<SundialsCvode> ConvectionSystemSplit::utwSolver
private

Solver for utwSystem.

◆ speciesSystems

boost::ptr_vector<ConvectionSystemY> ConvectionSystemSplit::speciesSystems
private

Systems used to solve the convection term for each species.

◆ speciesSolvers

boost::ptr_vector<SundialsCvode> ConvectionSystemSplit::speciesSolvers
private

Solvers for system in speciesSystems.

◆ Yleft

dvec ConvectionSystemSplit::Yleft
private

Mass fraction left of the domain.

Used with BoundaryCondition::ControlVolume and BoundaryCondition::WallFlux.

◆ W

dvec ConvectionSystemSplit::W
private

Molecular weight of each species [kg/kmol].

◆ nSpec

size_t ConvectionSystemSplit::nSpec
private

Number of species.

◆ nVars

size_t ConvectionSystemSplit::nVars
private

Number of state variables in the UTW system (==3)

◆ gas

CanteraGas* ConvectionSystemSplit::gas
private

Cantera object used for computing Wmx.

◆ quasi2d

bool ConvectionSystemSplit::quasi2d
private

true when solving the quasi-2d problem; false otherwise.

◆ tStageStop

double ConvectionSystemSplit::tStageStop
private

end time of the current integration stage

◆ sunContext

SundialsContext ConvectionSystemSplit::sunContext
private

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