21 "Computes a body force due to a coupled vector variable or a vector function");
24 "The coupled vector variable applying the force. Positive variable components represent " 25 "momentum sources in that component direction, e.g. if the x-component is positive then this " 26 "object imposes a momentum source in the +x direction. Multiple variable names can be " 27 "provided; the result will be a summed force.");
28 params.
addParam<std::vector<FunctionName>>(
30 "A vector function which can be used to stand-in for the 'coupled_vector_var' param. " 31 "Multiple function names can be provided; the result will be a summed force");
37 _coupled_force_strong_residual(
38 getADMaterialProperty<
RealVectorValue>(
"coupled_force_strong_residual"))
40 bool has_coupled =
isCoupled(
"coupled_vector_var");
42 if (!has_coupled && !has_function)
43 mooseError(
"Either the 'coupled_vector_var' or 'vector_function' param must be set for the " 44 "'INSADMomentumCoupledForce' object");
50 for (
const auto block_id :
blockIDs())
52 obj_tracker.
set(
"has_coupled_force",
true, block_id);
55 "coupled_force_var",
getParam<std::vector<VariableName>>(
"coupled_vector_var"), block_id);
57 obj_tracker.set(
"coupled_force_vector_function",
58 getParam<std::vector<FunctionName>>(
"vector_function"),
virtual bool isCoupled(const std::string &var_name, unsigned int i=0) const
T & getUserObject(const std::string &name, unsigned int tid=0) const
static InputParameters validParams()
void set(const std::string &name, const T &value, SubdomainID sub_id)
Set the internal parameter name to value.
registerMooseObject("NavierStokesApp", INSADMomentumCoupledForce)
virtual const std::set< SubdomainID > & blockIDs() const
bool isParamValid(const std::string &name) const
FEProblemBase & _fe_problem
const T & getParam(const std::string &name) const
ADRealVectorValue precomputeQpResidual() override
INSADMomentumCoupledForce(const InputParameters ¶meters)
const ADMaterialProperty< RealVectorValue > & _coupled_force_strong_residual
Computes a body force due to a coupled vector variable or vector function.
static InputParameters validParams()
void mooseError(Args &&... args) const
Object for tracking what kernels have been added to an INSAD simulation.