BCs System
The BCs
system is used to impose boundary conditions in a finite element problem. Each BC
object sets the boundary condition for a single variable/equation, though multiple boundaries may be specified at once.
See FVBCs for boundary conditions of finite volume problems.
Some of the main types of boundary conditions are: - Dirichlet Boundary conditions to set the value of a variable on a boundary - Neumann Boundary conditions to set a flux for the equation corresponding to the variable. Depending on the equation being solved, this can be equivalent to setting the value of the derivative of the variable on the boundary - Robin boundary conditions to solve an equation tying both the variable value and its derivatives on the boundary
In MOOSE, boundary conditions are split in two categories: NodalBC
s and IntegratedBC
s. Similar to kernels, computeQpResidual/Jacobian
are the main routine to implement for most boundary conditions. Automatic differentiation is implemented for boundary conditions. AD
BCs do not require implementing computeQpJacobian
.
Nodal boundary conditions
Nodal boundary conditions are applied on nodes in the mesh. Nodal boundary conditions may only be applied on variables that have degrees of freedom at nodes, such as Lagrange variables.
We show below code snippets for the DirichletBCBase
. This boundary condition sets the value of a variable on a node.
If the value is preset, the computeQpValue
is called instead of the computeQpResidual
. This value is then directly placed in the solution vector.
params.addRequiredParam<Real>("value", "Value of the BC");
params.declareControllable("value");
params.addClassDescription("Imposes the essential boundary condition $u=g$, where $g$ "
"is a constant, controllable value.");
return params;
}
(moose/framework/src/bcs/DirichletBC.C)If the value is not preset, the computeQpResidual
routine is called. The residual of a non-preset DirichletBC
is simply the difference between the desired value and the current variable value.
Real
DirichletBCBase::computeQpResidual()
{
return _u[_qp] - computeQpValue();
}
(moose/framework/src/bcs/DirichletBCBase.C)_qp
, the index over quadrature points, is simply 0 on nodes. We use this indexing in order to keep consistent user interfaces.
Integrated boundary conditions
Integrated boundary conditions are applied on sides in the mesh. A local quadrature-based integration is performed to compute the residual and Jacobian contribution of the boundary condition.
In the following snippet, we show the definition of the contribution to the residual of a FunctionNeumannBC. The computeQpResidual
simply returns the value of the flux.
Real
FunctionNeumannBC::computeQpResidual()
{
return -_test[_i][_qp] * _func.value(_t, _q_point[_qp]);
}
(moose/framework/src/bcs/FunctionNeumannBC.C)Available Objects
- Moose App
- ADConservativeAdvectionBCBoundary condition for advection when it is integrated by parts. Supports Dirichlet (inlet-like) and implicit (outlet-like) conditions.
- ADCoupledVarNeumannBCImposes the integrated boundary condition , where is a variable.
- ADDirichletBCImposes the essential boundary condition , where is a constant, controllable value.
- ADFunctionDirichletBCImposes the essential boundary condition , where is calculated by a function.
- ADFunctionNeumannBCImposes the integrated boundary condition , where is a (possibly) time and space-dependent MOOSE Function.
- ADFunctionPenaltyDirichletBCEnforces a (possibly) time and space-dependent MOOSE Function Dirichlet boundary condition in a weak sense by penalizing differences between the current solution and the Dirichlet data.
- ADMatNeumannBCImposes the integrated boundary condition , where is a constant, is a material property, and is a coefficient defined by the kernel for .
- ADMatchedValueBCImplements a NodalBC which equates two different Variables' values on a specified boundary.
- ADNeumannBCImposes the integrated boundary condition , where is a constant, controllable value.
- ADPenaltyDirichletBCEnforces a Dirichlet boundary condition in a weak sense by penalizing differences between the current solution and the Dirichlet data.
- ADRobinBCImposes the Robin integrated boundary condition .
- ADVectorFunctionDirichletBCImposes the essential boundary condition , where components are calculated with functions.
- ADVectorFunctionNeumannBCImposes the integrated boundary condition , where is a (possibly) time and space-dependent MOOSE Function.
- ADVectorMatchedValueBCImplements a ADVectorNodalBC which equates two different Variables' values on a specified boundary.
- ADVectorRobinBCImposes the Robin integrated boundary condition .
- ArrayDirichletBCImposes the essential boundary condition , where are constant, controllable values.
- ArrayHFEMDirichletBCImposes the Dirichlet BC with HFEM.
- ArrayNeumannBCImposes the integrated boundary condition , where is a constant, controllable value.
- ArrayPenaltyDirichletBCEnforces a Dirichlet boundary condition in a weak sense with , where is the constant scalar penalty; is the test functions and is the differences between the current solution and the Dirichlet data.
- ArrayVacuumBCImposes the Robin boundary condition .
- ConvectiveFluxBCDetermines boundary values via the initial and final values, flux, and exposure duration
- CoupledVarNeumannBCImposes the integrated boundary condition , where is a variable.
- DGFunctionDiffusionDirichletBCDiffusion Dirichlet boundary condition for discontinuous Galerkin method.
- DiffusionFluxBCComputes a boundary residual contribution consistent with the Diffusion Kernel. Does not impose a boundary condition; instead computes the boundary contribution corresponding to the current value of grad(u) and accumulates it in the residual vector.
- DirectionalNeumannBCImposes the integrated boundary condition , where is a user-defined, constant vector.
- DirichletBCImposes the essential boundary condition , where is a constant, controllable value.
- EigenArrayDirichletBCArray Dirichlet BC for eigenvalue solvers
- EigenDirichletBCDirichlet BC for eigenvalue solvers
- FunctionDirichletBCImposes the essential boundary condition , where is a (possibly) time and space-dependent MOOSE Function.
- FunctionGradientNeumannBCImposes the integrated boundary condition arising from integration by parts of a diffusion/heat conduction operator, and where the exact solution can be specified.
- FunctionNeumannBCImposes the integrated boundary condition , where is a (possibly) time and space-dependent MOOSE Function.
- FunctionPenaltyDirichletBCEnforces a (possibly) time and space-dependent MOOSE Function Dirichlet boundary condition in a weak sense by penalizing differences between the current solution and the Dirichlet data.
- FunctorDirichletBCImposes the Dirichlet boundary condition , where is a functor and can have complex dependencies.
- FunctorNeumannBCImposes the integrated boundary condition , where is a functor.
- HFEMDirichletBCImposes the Dirichlet BC with HFEM.
- LagrangeVecDirichletBCImposes the essential boundary condition , where are constant, controllable values.
- LagrangeVecFunctionDirichletBCImposes the essential boundary condition , where components are calculated with functions.
- MatNeumannBCImposes the integrated boundary condition , where is a constant, is a material property, and is a coefficient defined by the kernel for .
- MatchedValueBCImplements a NodalBC which equates two different Variables' values on a specified boundary.
- NeumannBCImposes the integrated boundary condition , where is a constant, controllable value.
- OneDEqualValueConstraintBCComputes the integral of lambda times dg term from the mortar method (for two 1D domains only).
- PenaltyDirichletBCEnforces a Dirichlet boundary condition in a weak sense by penalizing differences between the current solution and the Dirichlet data.
- PostprocessorDirichletBCDirichlet boundary condition with value prescribed by a Postprocessor value.
- PostprocessorNeumannBCNeumann boundary condition with value prescribed by a Postprocessor value.
- SinDirichletBCImposes a time-varying essential boundary condition , where varies from an given initial value at time to a given final value over a specified duration.
- SinNeumannBCImposes a time-varying flux boundary condition , where varies from an given initial value at time to a given final value over a specified duration.
- VacuumBCVacuum boundary condition for diffusion.
- VectorCurlPenaltyDirichletBCEnforces a Dirichlet boundary condition for the curl of vector nonlinear variables in a weak sense by applying a penalty to the difference in the current solution and the Dirichlet data.
- VectorDirichletBCImposes the essential boundary condition , where are constant, controllable values.
- VectorDivPenaltyDirichletBCEnforces, in a weak sense, a Dirichlet boundary condition on the divergence of a nonlinear vector variable by applying a penalty to the difference between the current solution and the Dirichlet data.
- VectorFunctionDirichletBCImposes the essential boundary condition , where components are calculated with functions.
- VectorNeumannBCImposes the integrated boundary condition , where is a user-defined, constant vector.
- VectorPenaltyDirichletBCEnforces a Dirichlet boundary condition for vector nonlinear variables in a weak sense by applying a penalty to the difference in the current solution and the Dirichlet data.
- WeakGradientBCComputes a boundary residual contribution consistent with the Diffusion Kernel. Does not impose a boundary condition; instead computes the boundary contribution corresponding to the current value of grad(u) and accumulates it in the residual vector.
- Zapdos App
- CircuitDirichletPotentialDirichlet circuit boundary condition for potential (The current is given through a UserObject)
- DCIonBCElectric field driven outflow boundary condition (Based on Hagelaar et al. (2000))
- DriftDiffusionDoNothingBCBoundary condition where the flux at the boundary is equal to the bulk dift-diffusion equation
- EconomouDielectricBCDielectric boundary condition (Based on Lymberopoulos and Economou (1994))
- ElectronAdvectionDoNothingBCBoundary condition where the electron advection flux at the boundary is equal to the bulk electron advection equation
- ElectronDiffusionDoNothingBCBoundary condition where the electron diffusion flux at the boundary is equal to the bulk electron diffusion equation
- ElectronTemperatureDirichletBCElectron temperature boundary condition
- FieldEmissionBCThe electron flux boundary condition due to field emission (Based on Forbes (2006) and Forbes (2008))
- HagelaarElectronAdvectionBCKinetic advective electron boundary condition (Based on Hagelaar et al. (2000))
- HagelaarElectronBCKinetic electron boundary condition (Based on Hagelaar et al. (2000))
- HagelaarEnergyAdvectionBCKinetic advective electron energy boundary condition (Based on Hagelaar et al. (2000))
- HagelaarEnergyBCKinetic electron mean energy boundary condition (Based on Hagelaar et al. (2000))
- HagelaarIonAdvectionBCKinetic advective ion boundary condition (Based on Hagelaar et al. (2000))
- HagelaarIonDiffusionBCKinetic electron boundary condition (Based on Hagelaar et al. (2000))
- LogDensityDirichletBCDensity Dirichlet boundary condition (Densities must be in log form and in moles/m)
- LymberopoulosElectronBCSimpified kinetic electron boundary condition (Based on Lymberopoulos and Economou (1993))
- LymberopoulosIonBCSimpified kinetic ion boundary condition (Based on Lymberopoulos and Economou (1993))
- MatchedValueLogBCHenry’s Law like thermodynamic boundary condition for specifying a species concentration ratio at the gas-liquid interface
- NeumannCircuitVoltageMoles_KVA Neumann boundary condition based on Kirchhoff's law of voltage
- PenaltyCircuitPotentialCircuit boundary condition for potential multiplied by a penalty term
- PotentialDriftOutflowBCThe drift flux boundary condition
- SakiyamaElectronDiffusionBCKinetic electron boundary condition (Based on Sakiyama and Graves (2006))
- SakiyamaEnergyDiffusionBCKinetic advective electron energy boundary condition (Based on Sakiyama and Graves (2007))
- SakiyamaEnergySecondaryElectronBCKinetic secondary electron for mean electron energy boundary condition (Based on Sakiyama and Graves (2007))
- SakiyamaIonAdvectionBCKinetic advective ion boundary condition (Based on Sakiyama and Graves (2006))
- SakiyamaSecondaryElectronBCKinetic secondary electron boundary condition (Based on Sakiyama and Graves (2006))
- SchottkyEmissionBCThe electron flux boundary condition due to field ehanced thermionic emission (Schottky emission) (Based on Go (2012))
- SecondaryElectronBCKinetic secondary electron boundary condition
- SecondaryElectronEnergyBCKinetic secondary electron for mean electron energy boundary condition
- TM0AntennaVertBCA simple vertical antenna BC of the azimuthal component of the magnetizing field.
- TM0PECVertBCA perfect electric conductor BC of the azimuthal component of the magnetizing field.
- Squirrel App
- ChannelGradientBC
- DGDiffusionPostprocessorDirichletBC
- DiffusiveFluxBC
- ExampleShapeSideIntegratedBC
- FlexiblePostprocessorDirichletBC
- InflowBC
- MatINSTemperatureNoBCBC
- OutflowBCDG upwinding for the convection
- PostprocessorInflowBC
- PostprocessorPenaltyDirichletBCEnforces a Dirichlet boundary condition in a weak sense by penalizing differences between the current solution and the Dirichlet postprocessor value.
- PostprocessorTemperatureInflowBC
- PostprocessorVelocityFunctionInflowBC
- RobinBC
- TemperatureInflowBC
- TemperatureOutflowBCDG upwinding for the convection
- VelocityFunctionOutflowBC
- VelocityFunctionTemperatureOutflowBC
Available Subsystems
- Moose App
- Periodic
Available Actions
- Moose App
- AddBCActionAdd a BoundaryCondition object to the simulation.
References
- Richard G Forbes.
Simple good approximations for the special elliptic functions in standard fowler-nordheim tunneling theory for a schottky-nordheim barrier.
Applied physics letters, 2006.
doi:10.1063/1.2354582.[BibTeX]
- Richard G Forbes.
Physics of generalized fowler-nordheim-type equations.
Journal of Vacuum Science & Technology B: Microelectronics and Nanometer Structures Processing, Measurement, and Phenomena, 26(2):788–793, 2008.
doi:10.1116/1.2827505.[BibTeX]
- David B Go.
Theoretical analysis of ion-enhanced thermionic emission for low-temperature, non-equilibrium gas discharges.
Journal of Physics D: Applied Physics, 46(3):035202, 2012.
doi:10.1088/0022-3727/46/3/035202.[BibTeX]
- GJM Hagelaar, FJ De Hoog, and GMW Kroesen.
Boundary conditions in fluid models of gas discharges.
Physical Review E, 62(1):1452, 2000.
doi:10.1103/PhysRevE.62.1452.[BibTeX]
- Dimitris P Lymberopoulos and Demetre J Economou.
Modeling and simulation of glow discharge plasma reactors.
Journal of Vacuum Science & Technology A: Vacuum, Surfaces, and Films, 12(4):1229–1236, 1994.
doi:10.1116/1.579300.[BibTeX]
- Dimitris P. Lymberopoulos and Demetre J. Economou.
Fluid simulations of glow discharges: effect of metastable atoms in argon.
Journal of Applied Physics, 73(8):3668–3679, 04 1993.
doi:10.1063/1.352926.[BibTeX]
- Y Sakiyama and David B Graves.
Corona-glow transition in the atmospheric pressure rf-excited plasma needle.
Journal of Physics D: Applied Physics, 39(16):3644, 2006.
doi:10.1088/0022-3727/39/16/018.[BibTeX]
- Yukinori Sakiyama and David B Graves.
Nonthermal atmospheric rf plasma in one-dimensional spherical coordinates: asymmetric sheath structure and the discharge mechanism.
Journal of applied physics, 2007.
doi:https://doi.org/10.1063/1.2715745.[BibTeX]