Source Term
This page describes how to apply source terms.
Entry Point
EulerEquationMod.evalSourceTerm
— Function.EulerEquationMod.evalSourceTerm
This function performs all the actions necessary to update eqn.res with the source term. The source term is stored in eqn.src_func. It is an abstract field, so it cannot be accessed (performantly) directly, so it is passed to an inner function.
Inputs:
mesh : Abstract mesh type
sbp : Summation-by-parts operator
eqn : Euler equation object
opts : options dictonary
Outputs: none
Aliasing restrictions: none
Functions
EulerEquationMod.applySourceTerm
— Method.EulerEquationMod.applySourceTerm
This function updates eqn.res with the source term.
Inputs: mesh sbp eqn opts src_func: the functor that returns the value of the source term at a node This functor must have the signature: src_func(q, coords, params, t) where coords is a vector of length 2 or 3 containing the x and y coordinates of the node, params is the ParamType, t is the current time, and q is the vector to be populated with the source term values.
Outputs: none
Aliasing restrictions: params.q_vals cannot be in use
EulerEquationMod.getSRCFunctors
— Method.EulerEquationMod.getSRCFunctors
This function gets the functor specified by opts["SRCname"] and stores it to the equation object. Currently one 1 source functor is allowed.
EulerEquationMod.SRCDict
— Constant.EulerEquationMod.SRCDict
Stores the functors that evaluate source terms at a node. Every new functor should be added to this dictonary
All functors must have the signature:
src_func(q, coords, params::ParamType, t)
where coords is the vector of length 2 containing the x and y coordinates of the node, t is the current time, and q is the vector to be populated with the source term values.
Source Term Functors
EulerEquationMod.SRCExp
— Type.AdvectionEquationMod.SRC0
This is the zero source term. This is the default of source term is specified
EulerEquationMod.SRCPeriodicMMS
— Type.Functor for source term corresponding to ICPeriodicMMS