https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CoupledVarNeumannBCTempl< is_ad > Class Template Reference

Implements a Neumann BC where grad(u)=_coupled_var on the boundary. More...

#include <CoupledVarNeumannBC.h>

Inheritance diagram for CoupledVarNeumannBCTempl< is_ad >:
[legend]

Public Member Functions

 CoupledVarNeumannBCTempl (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual GenericReal< is_ad > computeQpResidual () override
 

Protected Attributes

const GenericVariableValue< is_ad > & _coupled_var
 Variable providing the value of grad(u) on the boundary.
 
const unsigned int _coupled_num
 The identifying number of the coupled variable.
 
const Real _coef
 A coefficient that is multiplied with the residual contribution.
 
const GenericVariableValue< is_ad > & _scale_factor
 Scale factor.
 

Detailed Description

template<bool is_ad>
class CoupledVarNeumannBCTempl< is_ad >

Implements a Neumann BC where grad(u)=_coupled_var on the boundary.

Uses the term produced from integrating the diffusion operator by parts.

Definition at line 23 of file CoupledVarNeumannBC.h.

Constructor & Destructor Documentation

◆ CoupledVarNeumannBCTempl()

template<bool is_ad>
CoupledVarNeumannBCTempl< is_ad >::CoupledVarNeumannBCTempl ( const InputParameters parameters)

Definition at line 30 of file CoupledVarNeumannBC.C.

31 : IntegratedBCParent<is_ad>(parameters),
32 _coupled_var(this->template coupledGenericValue<is_ad>("v")),
33 _coupled_num(this->coupled("v")),
34 _coef(this->template getParam<Real>("coef")),
35 _scale_factor(this->template coupledGenericValue<is_ad>("scale_factor"))
36{
37}
typename std::conditional< is_ad, ADIntegratedBC, IntegratedBC >::type IntegratedBCParent
const unsigned int _coupled_num
The identifying number of the coupled variable.
const GenericVariableValue< is_ad > & _scale_factor
Scale factor.
const GenericVariableValue< is_ad > & _coupled_var
Variable providing the value of grad(u) on the boundary.
const Real _coef
A coefficient that is multiplied with the residual contribution.

Member Function Documentation

◆ computeQpResidual()

template<bool is_ad>
GenericReal< is_ad > CoupledVarNeumannBCTempl< is_ad >::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 41 of file CoupledVarNeumannBC.C.

42{
43 return -_scale_factor[_qp] * _coef * _test[_i][_qp] * _coupled_var[_qp];
44}

◆ validParams()

template<bool is_ad>
InputParameters CoupledVarNeumannBCTempl< is_ad >::validParams ( )
static

Definition at line 17 of file CoupledVarNeumannBC.C.

18{
20 params.addRequiredCoupledVar("v", "Coupled variable setting the gradient on the boundary.");
21 params.addCoupledVar("scale_factor", 1., "Scale factor to multiply the heat flux with");
22 params.addParam<Real>(
23 "coef", 1.0, "Coefficent ($\\sigma$) multiplier for the coupled force term.");
24 params.addClassDescription("Imposes the integrated boundary condition "
25 "$\\frac{\\partial u}{\\partial n}=v$, "
26 "where $v$ is a variable.");
27 return params;
28}
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
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.
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Data Documentation

◆ _coef

template<bool is_ad>
const Real CoupledVarNeumannBCTempl< is_ad >::_coef
protected

A coefficient that is multiplied with the residual contribution.

Definition at line 40 of file CoupledVarNeumannBC.h.

◆ _coupled_num

template<bool is_ad>
const unsigned int CoupledVarNeumannBCTempl< is_ad >::_coupled_num
protected

The identifying number of the coupled variable.

Definition at line 37 of file CoupledVarNeumannBC.h.

◆ _coupled_var

template<bool is_ad>
const GenericVariableValue<is_ad>& CoupledVarNeumannBCTempl< is_ad >::_coupled_var
protected

Variable providing the value of grad(u) on the boundary.

Definition at line 34 of file CoupledVarNeumannBC.h.

◆ _scale_factor

template<bool is_ad>
const GenericVariableValue<is_ad>& CoupledVarNeumannBCTempl< is_ad >::_scale_factor
protected

Scale factor.

Definition at line 43 of file CoupledVarNeumannBC.h.


The documentation for this class was generated from the following files: