12 #include "MooseError.h"
18 template <ComputeStage compute_stage>
23 params.addClassDescription(
"Applies a pressure on a given boundary in a given direction");
24 params.addRequiredRangeCheckedParam<
unsigned int>(
25 "component",
"component <= 2",
"The component for the pressure");
26 params.addParam<Real>(
"constant", 1.0,
"The magnitude to use in computing the pressure");
27 params.addParam<FunctionName>(
"function",
"The function that describes the pressure");
28 params.addParam<PostprocessorName>(
"postprocessor",
29 "Postprocessor that will supply the pressure value");
30 params.addParam<Real>(
"alpha", 0.0,
"alpha parameter required for HHT time integration scheme");
31 params.set<
bool>(
"use_displaced_mesh") =
true;
35 template <ComputeStage compute_stage>
37 : ADIntegratedBC<compute_stage>(parameters),
38 _component(getParam<unsigned int>(
"component")),
39 _constant(getParam<Real>(
"constant")),
40 _function(isParamValid(
"function") ? &this->getFunction(
"function") : nullptr),
41 _postprocessor(isParamValid(
"postprocessor") ? &this->getPostprocessorValue(
"postprocessor")
43 _alpha(getParam<Real>(
"alpha"))
47 template <ComputeStage compute_stage>
51 ADReal factor = _constant;
54 factor *= _function->value(_t + _alpha * _dt, _q_point[_qp]);
57 factor *= *_postprocessor;
59 return factor * (_normals[_qp](_component) * _test[_i][_qp]);