Advection Boundary Integrals
This page describes the functions that compute the boundary integrals.
AdvectionEquationMod.evalBoundaryIntegrals
— Function.Evaluate boundary integrals for advection equation, updating eqn.res with the result.
Inputs
mesh
: Abstract mesh typesbp
: Summation-by-parts operatoreqn
: Advection equation objectopts
: options dictionary
Outputs
None
AdvectionEquationMod.calcBoundaryFlux
— Function.This function calculates the boundary flux for the portion of the boundary with a particular boundary condition. The eqn.q are converted to conservative variables if needed. For the DG version, eqn.q_bndry must already be populated with the q variables interpolated to the boundary
Inputs:
mesh : AbstractMesh sbp : AbstractSBP eqn : AdvectionEquation functor : a callable object that calculates the boundary flux at a node idx_range: the Range describing which Boundaries have the current BC bndry_facenums: An array with elements of type Boundary that tell which element faces have the boundary condition Outputs:
bndryflux : the array to store the boundary flux, corresponds to bndry_facenums
note that bndry_facenums and bndryflux must be only the portion of the their parent arrays that correspond to the Boundaries that have the current boundary condition applied.
The functor must have the signature: functor( q, aux_vars, x, dxidx, nrm, bndryflux_i, eqn.params) where q are the conservative variables. where all arguments (except params and nrm) are vectors of values at a node.
params is the ParamType associated with the the EulerEquation object nrm = mesh.sbpface.normal[:, current_node]
This is a mid level function.
AdvectionEquationMod.calcBoundaryFlux_nopre
— Function.This function computes the boundary integrals (and should probably be renamed) without using eqn.q_bndry of eqn.bndryflux. eqn.res is updated with the results.
See calcBoundaryFlux for the meaning of the arguments
AdvectionEquationMod.BCDict
— Constant.AdvectionEquationMod.BCDict
It stores all the possible boundary condition dictionary options. Whenever a new boundary condition is created, it should get added to BCDict.
AdvectionEquationMod.getBCFunctors
— Function.AdvectionEquationMod.getBCFunctors
This function uses the opts dictionary to populate mesh.bndry_funcs with the the functors
This is a high level function.
Inputs
mesh
: Abstract mesh typesbp
: Summation-by-parts operatoreqn
: Advection equation objectopts
: Input dictionary options
Outputs
None
Boundary Conditions
This section describes all boundary conditions currently available
AdvectionEquationMod.defaultBC
— Type.Default BC to calculate the boundary face integral (no numerical flux functions)
AdvectionEquationMod.exp2xplus2yBC
Uses the Roe solver to calculate the boundary flux using calc_exp2xplus2y to get the boundary state.
AdvectionEquationMod.exp3xplusyBC
Uses the Roe solver to calculate the boundary flux using calc_exp3xplusy to get the boundary state.
AdvectionEquationMod.exp5xplus4yplus2BC
Uses the Roe solver to calculate the boundary flux using calc_exp5xplus4yplus2 to get the boundary state.
AdvectionEquationMod.exp5xplusyBC
Uses the Roe solver to calculate the boundary flux using calc_exp5xplusy to get the boundary state.
AdvectionEquationMod.exp_xplusyBC
Calculates q at the boundary which is equal to exp(x+y). It is a nodal level function.
Inputs
u
: Advection variable (eqn.q)alpha_x
&alpha_y
: velocities in the X & Y directionscoords
: Nodal coordinatesdxidx
: Mapping Jacobiannrm
: SBP face-normal vectorsbndryflux
: Flux at the boundary
Outputs
None
AdvectionEquationMod.exp_xyBC
— Type.AdvectionEquationMod.exp_xyBC
Uses the Roe solver to calculate the boundary flux using calc_exp_xy to get the boundary state
AdvectionEquationMod.mms1BC
— Type.AdvectionEquationMod.mms1BC
Uses the Roe solver to calculate the boundary flux using calc_mms1 to get the boundary state.
AdvectionEquationMod.p0BC
— Type.AdvectionEquationMod.p0BC
Uses the Roe solver to calculate the boundary flux using calc_p0 to get the boundary state
AdvectionEquationMod.p1BC
— Type.AdvectionEquationMod.p1BC
Uses the Roe solver to calculate the boundary flux using calc_p1 to get the boundary state
AdvectionEquationMod.p2BC
— Type.AdvectionEquationMod.p2BC
Uses the Roe solver to calculate the boundary flux using calc_p2 to get the boundary state
AdvectionEquationMod.p3BC
— Type.AdvectionEquationMod.p3BC
Uses the Roe solver to calculate the boundary flux using calc_p3 to get the boundary state
AdvectionEquationMod.p4BC
— Type.AdvectionEquationMod.p4BC
Uses the Roe solver to calculate the boundary flux using calc_p4 to get the boundary state.
AdvectionEquationMod.p5BC
— Type.AdvectionEquationMod.p5BC
Uses the Roe solver to calculate the boundary flux using calc_p5 to get the boundary state.
AdvectionEquationMod.sinwave_BC
— Type.AdvectionEquationMod.sinwave_BC
Uses the Roe solver to calculate the boundary flux using calc_sinewave to get the boundary state
AdvectionEquationMod.sinwave_ampl_BC
Uses the Roe solver to calculate the boundary flux using calc_sinewave_ampl to get the boundary state
AdvectionEquationMod.sinwavey_BC
— Type.AdvectionEquationMod.sinwavey_BC
Uses the Roe solver to calculate the boundary flux using calc_sinewavey to get the boundary state
AdvectionEquationMod.sinwavey_pertBC
Uses the Roe solver to calculate the boundary flux using calc_sinewave_pert to get the boundary state
BC for unsteadymms
BC for unsteadypoly
AdvectionEquationMod.x4BC
— Type.AdvectionEquationMod.x4BC
Uses the Roe solver to calculate the boundary flux using calc_x4 to get the boundary state.
AdvectionEquationMod.x5plusy5BC
— Type.AdvectionEquationMod.x5plusy5BC
Calculates q at the boundary which is equal to x^5 + y^5. It is a nodal level function.
Inputs
u
: Advection variable (eqn.q)params
: the equation ParamTypecoords
: Nodal coordinatesnrm_scaled
: scaled face normal vector in x-y spacet
: current time value
Outputs
bndryflux
: Flux at the boundaryNone
AdvectionEquationMod.xplusyBC
— Type.AdvectionEquationMod.xplusyBC
Uses Roe solver to calculate the boundary flux using calc_xplusy to get the boundary state
Numerical Flux Functions
This section lists the numerical flux functions used to impose the boundary conditions weakly.
AdvectionEquationMod.RoeSolver
— Method.AdvectionEquationMod.RoeSolver
Roe solver for the advection equations. It determines the boundary flux on each boundary. It is called at the nodal level
Inputs
u
: Solution of advection equation at a particular nodeu_bc
: Prescribed solution value at the boundaryparams
: the equation ParamType objectnrm
: scaled face normal vector in x-y space
Outputs
bndryflux
: Boundary flux at the particular node
AdvectionEquationMod.flux1
— Method.flux1
Calculates the boundary flux for the advection equation. It works at the nodal level.
Inputs
u_sbp_
: The entry from u_sbp for this nodedxidx
: The jacobian for this nodenrm
: nrm is the normal vectornet_flux
:params
: the equation ParamType
Outputs
None