https://mooseframework.inl.gov
DissociationFluxBC.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 "DissociationFluxBC.h"
11 
12 registerMooseObject("ScalarTransportApp", DissociationFluxBC);
13 
16 {
17  auto params = ADIntegratedBC::validParams();
18  params.addRequiredCoupledVar("v",
19  "The variable that is dissociating on this boundary to "
20  "form the mobile species (specified with the variable param)");
21  params.addParam<MaterialPropertyName>(
22  "Kd", "Kd", "The name of the material property for the dissociation coefficient");
23  params.addClassDescription("Models creation of the variable at boundaries due to dissociation of "
24  "a coupled variable, e.g. B -> A");
25  return params;
26 }
27 
29  : ADIntegratedBC(parameters), _v(adCoupledValue("v")), _Kd(getADMaterialProperty<Real>("Kd"))
30 {
31 }
32 
33 ADReal
35 {
36  return -_test[_i][_qp] * _Kd[_qp] * _v[_qp];
37 }
static InputParameters validParams()
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
unsigned int _qp
Models creation of the variable at boundaries due to dissociation of a coupled variable, e.g.
const ADMaterialProperty< Real > & _Kd
The dissociation rate coefficient.
DissociationFluxBC(const InputParameters &parameters)
ADReal computeQpResidual() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADTemplateVariableTestValue< T > & _test
const ADVariableValue & _v
The coupled variable that is dissociating to form the variable this boundary condition is applied to...
registerMooseObject("ScalarTransportApp", DissociationFluxBC)