23 "Variable describing the volumetric heat source. Note that if this variable evaluates to a " 24 "negative number, then this object will be an energy sink");
27 "Function describing the volumetric heat source. Note that if this function evaluates to a " 28 "negative number, then this object will be an energy sink");
34 _temperature_source_strong_residual(
35 getADMaterialProperty<
Real>(
"temperature_source_strong_residual"))
37 bool has_coupled =
isCoupled(
"source_variable");
39 if (!has_coupled && !has_function)
40 mooseError(
"Either the 'source_variable' or 'source_function' param must be set for the " 41 "'INSADMomentumCoupledForce' object");
42 else if (has_coupled && has_function)
43 mooseError(
"Both the 'source_variable' or 'source_function' param are set for the " 44 "'INSADMomentumCoupledForce' object. Please use one or the other.");
47 paramError(
"source_variable",
"Only expect one variable for the 'source_variable' parameter");
53 for (
const auto block_id :
blockIDs())
55 obj_tracker.
set(
"has_heat_source",
true, block_id);
57 obj_tracker.set(
"heat_source_var",
getVar(
"source_variable", 0)->
name(), block_id);
58 else if (has_function)
59 obj_tracker.set(
"heat_source_function", getParam<FunctionName>(
"source_function"), block_id);
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()
const ADMaterialProperty< Real > & _temperature_source_strong_residual
void set(const std::string &name, const T &value, SubdomainID sub_id)
Set the internal parameter name to value.
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
virtual const std::set< SubdomainID > & blockIDs() const
DualNumber< Real, DNDerivativeType, true > ADReal
virtual const std::string & name() const
bool isParamValid(const std::string &name) const
static InputParameters validParams()
Computes an arbitrary volumetric heat source (or sink).
FEProblemBase & _fe_problem
void paramError(const std::string ¶m, Args... args) const
ADReal precomputeQpResidual() override
registerMooseObject("NavierStokesApp", INSADEnergySource)
unsigned int coupledComponents(const std::string &var_name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
INSADEnergySource(const InputParameters ¶meters)
void mooseError(Args &&... args) const
Object for tracking what kernels have been added to an INSAD simulation.