Equation Systems

class EquationSystem

Base class representation of a PDE.

EquationSystem defines the API supported by all concrete implementations of PDEs for performing the following actions:

  • Register computational fields

  • Register computational algorithms for interior domain and boundary conditions

  • Manage solve and update of the PDE for a given timestep

Subclassed by sierra::nalu::ChienKEpsilonEquationSystem, sierra::nalu::ContinuityEquationSystem, sierra::nalu::EnthalpyEquationSystem, sierra::nalu::GammaEquationSystem, sierra::nalu::LowMachEquationSystem, sierra::nalu::MatrixFreeHeatCondEquationSystem, sierra::nalu::MatrixFreeLowMachEquationSystem, sierra::nalu::MomentumEquationSystem, sierra::nalu::ProjectedNodalGradientEquationSystem, sierra::nalu::ShearStressTransportEquationSystem, sierra::nalu::SpecificDissipationRateEquationSystem, sierra::nalu::TotalDissipationRateEquationSystem, sierra::nalu::TurbKineticEnergyEquationSystem, sierra::nalu::VolumeOfFluidEquationSystem, sierra::nalu::WallDistEquationSystem, sierra::nalu::WilcoxKOmegaEquationSystem

Public Functions

virtual void solve_and_update()

Assemble the LHS and RHS and perform linear solve for prescribed number of iterations.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();             //<<<< Assemble and solve system
  eqsys->post_iter_work();
}
post_iter_work();

See

EquationSystems::solve_and_update

virtual void pre_iter_work()

Perform setup tasks before entering the solve and update step.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();                //<<<< Pre-iteration setup
  eqsys->solve_and_update();
  eqsys->post_iter_work();
}
post_iter_work();

See

EquationSystems::solve_and_update

virtual void post_iter_work()

Perform setup tasks after he solve and update step.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();
  eqsys->post_iter_work();                //<<<< Post-iteration actions
}
post_iter_work();

See

EquationSystems::solve_and_update

virtual void post_iter_work_dep()

Deprecated post iteration work logic.

template<typename T = DoubleType>
PecletFunction<T> *ngp_create_peclet_function(const std::string &dofName)

Create and return an instance of PecletFunction on device for use with Kernel.

virtual void solution_update(const double delta_frac, const stk::mesh::FieldBase &delta, const double field_frac, stk::mesh::FieldBase &field, const unsigned numComponents = 1, const stk::topology::rank_t rank = stk::topology::NODE_RANK)

Update field with delta solution of linear solve.

Public Members

std::vector<PecletFunctionBase *> ngpPecletFunctions_

Track NGP instances of PecletFunction.

std::vector<AlgorithmDriver *> preIterAlgDriver_

List of tasks to be performed before each EquationSystem::solve_and_update.

std::vector<AlgorithmDriver *> postIterAlgDriver_

List of tasks to be performed after each EquationSystem::solve_and_update.

size_t linsysWriteCounter_ = {0}

Counter to track the number of linear system outputs.

Move this to EquationSystem instead of LinearSystem so that we don’t reset the counter when performing matrix reinitializations.

class LowMachEquationSystem : public sierra::nalu::EquationSystem

Low-Mach formulation of the Navier-Stokes Equations.

This class is a thin-wrapper around sierra::nalu::ContinuityEquationSystem and sierra::nalu::MomentumEquationSystem that orchestrates the interactions between the velocity and the pressure Possion solves in the LowMachEquationSystem::solve_and_update method.

Public Functions

virtual void pre_iter_work()

Perform setup tasks before entering the solve and update step.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();                //<<<< Pre-iteration setup
  eqsys->solve_and_update();
  eqsys->post_iter_work();
}
post_iter_work();

See

EquationSystems::solve_and_update

virtual void solve_and_update()

Assemble the LHS and RHS and perform linear solve for prescribed number of iterations.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();             //<<<< Assemble and solve system
  eqsys->post_iter_work();
}
post_iter_work();

See

EquationSystems::solve_and_update

virtual void post_iter_work()

Perform setup tasks after he solve and update step.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();
  eqsys->post_iter_work();                //<<<< Post-iteration actions
}
post_iter_work();

See

EquationSystems::solve_and_update

class EnthalpyEquationSystem : public sierra::nalu::EquationSystem

Public Functions

void solve_and_update()

Assemble the LHS and RHS and perform linear solve for prescribed number of iterations.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();             //<<<< Assemble and solve system
  eqsys->post_iter_work();
}
post_iter_work();

See

EquationSystems::solve_and_update

void post_iter_work_dep()

Deprecated post iteration work logic.

class TurbKineticEnergyEquationSystem : public sierra::nalu::EquationSystem

Public Functions

void solve_and_update()

Assemble the LHS and RHS and perform linear solve for prescribed number of iterations.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();             //<<<< Assemble and solve system
  eqsys->post_iter_work();
}
post_iter_work();

See

EquationSystems::solve_and_update

class ShearStressTransportEquationSystem : public sierra::nalu::EquationSystem

Public Functions

virtual void solve_and_update()

Assemble the LHS and RHS and perform linear solve for prescribed number of iterations.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();             //<<<< Assemble and solve system
  eqsys->post_iter_work();
}
post_iter_work();

See

EquationSystems::solve_and_update

void post_iter_work()

Perform setup tasks after he solve and update step.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();
  eqsys->post_iter_work();                //<<<< Post-iteration actions
}
post_iter_work();

See

EquationSystems::solve_and_update

void pre_iter_work()

Perform setup tasks before entering the solve and update step.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();                //<<<< Pre-iteration setup
  eqsys->solve_and_update();
  eqsys->post_iter_work();
}
post_iter_work();

See

EquationSystems::solve_and_update

Warning

doxygenclass: Cannot find class “sierra::nalu::HeatCondEquationSystem” in doxygen xml output for project “nalu” from directory: ./doxygen/xml

Warning

doxygenclass: Cannot find class “sierra::nalu::MassFractionEquationSystem” in doxygen xml output for project “nalu” from directory: ./doxygen/xml

Warning

doxygenclass: Cannot find class “sierra::nalu::MixtureFractionEquationSystem” in doxygen xml output for project “nalu” from directory: ./doxygen/xml

class MomentumEquationSystem : public sierra::nalu::EquationSystem

Representation of the Momentum conservation equations in 2-D and 3-D.

class ContinuityEquationSystem : public sierra::nalu::EquationSystem
class SpecificDissipationRateEquationSystem : public sierra::nalu::EquationSystem
class ProjectedNodalGradientEquationSystem : public sierra::nalu::EquationSystem

Public Functions

void solve_and_update()

Assemble the LHS and RHS and perform linear solve for prescribed number of iterations.

This method is invoked in EquationSystems::solve_and_update method as shown below

pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();             //<<<< Assemble and solve system
  eqsys->post_iter_work();
}
post_iter_work();

See

EquationSystems::solve_and_update

class EquationSystems

A collection of Equations to be solved on a Realm.

EquationSystems holds a vector of EquationSystem instances representing the equations that are being solved in a given Realm and is responsible for the management of the solve and update of the various field quantities in a given timestep.

See

EquationSystems::solve_and_update

Public Functions

bool solve_and_update()

Solve and update the state of all variables for a given timestep.

This method is responsible for executing setup actions before calling solve, performing the actual solve, updating the solution, and performing post-solve actions after the solution has been updated. To provide sufficient granularity and control of this pre- and post- solve actions, the solve method uses the following series of steps:

// Perform tasks for this timestep before any Equation system is called
pre_iter_work();
// Iterate over all equation systems
for (auto eqsys: equationSystems_) {
  eqsys->pre_iter_work();
  eqsys->solve_and_update();
  eqsys->post_iter_work();
}
// Perform tasks after all equation systems have updated
post_iter_work();

Tasks that require to be performed before any equation system is solved for needs to be registered to preIterAlgDriver_ on EquationSystems, similiary for post-solve tasks. And actions to be performed immediately before individual equation system solves need to be registered in EquationSystem::preIterAlgDriver_.

See

pre_iter_work(), post_iter_work(), EquationSystem::pre_iter_work(),

See

EquationSystem::post_iter_work()

void pre_iter_work()

Perform necessary setup tasks that affect all EquationSystem instances at a given timestep.

See

EquationSystems::solve_and_update()

void post_iter_work()

Perform necessary actions once all EquationSystem instances have been updated for the prescribed number of outer iterations at a given timestep.

See

EquationSystems::solve_and_update()

Public Members

std::vector<AlgorithmDriver *> preIterAlgDriver_

A list of tasks to be performed before all EquationSystem::solve_and_update.

std::vector<AlgorithmDriver *> postIterAlgDriver_

A list of tasks to be performed after all EquationSystem::solve_and_update.

int numOversetItersDefault_ = {1}

Default number of overset coupling iterations.

This parameter controls the global settings for decoupled overset simulations. User can override this for individual equations by specifying the values for the specific equation system.

bool decoupledOversetGlobalFlag_ = {false}

Global flag indicating whether decoupled overset is used for all equation systems in this Realm.

User can override this for individual equation systems by using the appropriate input options.