Source Term

Source Term

This page describes how to apply source terms.

Entry Point

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

source

Functions

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

source

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.

source

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

Source Term Functors

AdvectionEquationMod.SRC0

This is the zero source term. This is the default of source term is specified

source

Functor for source term corresponding to ICPeriodicMMS

source