Boundary Integrals

Advection Boundary Integrals

This page describes the functions that compute the boundary integrals.

Evaluate boundary integrals for advection equation, updating eqn.res with the result.

Inputs

  • mesh : Abstract mesh type

  • sbp : Summation-by-parts operator

  • eqn : Advection equation object

  • opts : options dictionary

Outputs

  • None

source

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.

source

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

source

AdvectionEquationMod.BCDict

It stores all the possible boundary condition dictionary options. Whenever a new boundary condition is created, it should get added to BCDict.

source

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 type

  • sbp : Summation-by-parts operator

  • eqn : Advection equation object

  • opts : Input dictionary options

Outputs

  • None

source

Boundary Conditions

This section describes all boundary conditions currently available

Default BC to calculate the boundary face integral (no numerical flux functions)

source

AdvectionEquationMod.exp2xplus2yBC

Uses the Roe solver to calculate the boundary flux using calc_exp2xplus2y to get the boundary state.

source

AdvectionEquationMod.exp3xplusyBC

Uses the Roe solver to calculate the boundary flux using calc_exp3xplusy to get the boundary state.

source

AdvectionEquationMod.exp5xplus4yplus2BC

Uses the Roe solver to calculate the boundary flux using calc_exp5xplus4yplus2 to get the boundary state.

source

AdvectionEquationMod.exp5xplusyBC

Uses the Roe solver to calculate the boundary flux using calc_exp5xplusy to get the boundary state.

source

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 directions

  • coords : Nodal coordinates

  • dxidx : Mapping Jacobian

  • nrm : SBP face-normal vectors

  • bndryflux : Flux at the boundary

Outputs

  • None

source

AdvectionEquationMod.exp_xyBC

Uses the Roe solver to calculate the boundary flux using calc_exp_xy to get the boundary state

source

AdvectionEquationMod.mms1BC

Uses the Roe solver to calculate the boundary flux using calc_mms1 to get the boundary state.

source

AdvectionEquationMod.p0BC

Uses the Roe solver to calculate the boundary flux using calc_p0 to get the boundary state

source

AdvectionEquationMod.p1BC

Uses the Roe solver to calculate the boundary flux using calc_p1 to get the boundary state

source

AdvectionEquationMod.p2BC

Uses the Roe solver to calculate the boundary flux using calc_p2 to get the boundary state

source

AdvectionEquationMod.p3BC

Uses the Roe solver to calculate the boundary flux using calc_p3 to get the boundary state

source

AdvectionEquationMod.p4BC

Uses the Roe solver to calculate the boundary flux using calc_p4 to get the boundary state.

source

AdvectionEquationMod.p5BC

Uses the Roe solver to calculate the boundary flux using calc_p5 to get the boundary state.

source

AdvectionEquationMod.sinwave_BC

Uses the Roe solver to calculate the boundary flux using calc_sinewave to get the boundary state

source

AdvectionEquationMod.sinwave_ampl_BC

Uses the Roe solver to calculate the boundary flux using calc_sinewave_ampl to get the boundary state

source

AdvectionEquationMod.sinwavey_BC

Uses the Roe solver to calculate the boundary flux using calc_sinewavey to get the boundary state

source

AdvectionEquationMod.sinwavey_pertBC

Uses the Roe solver to calculate the boundary flux using calc_sinewave_pert to get the boundary state

source

BC for unsteadymms

source

BC for unsteadypoly

source

AdvectionEquationMod.x4BC

Uses the Roe solver to calculate the boundary flux using calc_x4 to get the boundary state.

source

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 ParamType

  • coords : Nodal coordinates

  • nrm_scaled : scaled face normal vector in x-y space

  • t: current time value

Outputs

  • bndryflux : Flux at the boundary

  • None

source

AdvectionEquationMod.xplusyBC

Uses Roe solver to calculate the boundary flux using calc_xplusy to get the boundary state

source

Numerical Flux Functions

This section lists the numerical flux functions used to impose the boundary conditions weakly.

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 node

  • u_bc : Prescribed solution value at the boundary

  • params: the equation ParamType object

  • nrm : scaled face normal vector in x-y space

Outputs

  • bndryflux : Boundary flux at the particular node

source

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 node

  • dxidx : The jacobian for this node

  • nrm : nrm is the normal vector

  • net_flux:

  • params: the equation ParamType

Outputs

  • None

source