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.

commentnote

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: NodalBCs and IntegratedBCs. 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)
commentnote

_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

Available Subsystems

Available Actions

  • Moose App
  • AddBCActionAdd a BoundaryCondition object to the simulation.

References

  1. 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]
  2. 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]
  3. 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]
  4. 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]
  5. 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]
  6. 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]
  7. 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]
  8. 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]