https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MatNeumannBC.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "MatNeumannBC.h"
11
14
15template <bool is_ad>
18{
20
21 params.addClassDescription("Imposes the integrated boundary condition "
22 "$\\frac{C \\partial u}{\\partial n}=M*h$, "
23 "where $h$ is a constant, $M$ is a material property, and $C$ is a "
24 "coefficient defined by the kernel for $u$.");
25 params.addRequiredParam<MaterialPropertyName>(
26 "boundary_material",
27 "Material property multiplying the constant that will be enforced by the BC");
28 return params;
29}
30
31template <bool is_ad>
33 : NeumannBCTempl<is_ad>(parameters),
34 _boundary_prop(this->template getGenericMaterialProperty<Real, is_ad>("boundary_material"))
35{
36}
37
38template <bool is_ad>
41{
42 return -_test[_i][_qp] * _value * _boundary_prop[_qp];
43}
registerMooseObject("MooseApp", MatNeumannBC)
Moose::GenericType< Real, is_ad > GenericReal
Definition MooseTypes.h:698
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Implements a Neumann BC where D grad(u) = value * M on the boundary, where value is a constant and M ...
virtual GenericReal< is_ad > computeQpResidual() override
Method for computing the residual at quadrature points.
MatNeumannBCTempl(const InputParameters &parameters)
static InputParameters validParams()
Implements a simple constant Neumann BC where grad(u)=value on the boundary.
Definition NeumannBC.h:20
static InputParameters validParams()
Definition NeumannBC.C:17