25 "residuals for the INS equations.");
28 params.
addParam<MaterialPropertyName>(
"mu_name",
"mu",
"The name of the dynamic viscosity");
29 params.
addParam<MaterialPropertyName>(
"rho_name",
"rho",
"The name of the density");
35 _velocity(adCoupledVectorValue(
"velocity")),
36 _grad_velocity(adCoupledVectorGradient(
"velocity")),
38 _mu(getADMaterialProperty<
Real>(
"mu_name")),
39 _rho(getADMaterialProperty<
Real>(
"rho_name")),
40 _velocity_dot(nullptr),
41 _mass_strong_residual(declareADProperty<
Real>(
"mass_strong_residual")),
42 _advective_strong_residual(declareADProperty<
RealVectorValue>(
"advective_strong_residual")),
47 _td_strong_residual(declareADProperty<
RealVectorValue>(
"td_strong_residual")),
48 _gravity_strong_residual(declareADProperty<
RealVectorValue>(
"gravity_strong_residual")),
49 _boussinesq_strong_residual(declareADProperty<
RealVectorValue>(
"boussinesq_strong_residual")),
50 _coupled_force_strong_residual(
53 _relative_velocity(declareADProperty<
RealVectorValue>(
"relative_velocity")),
54 _advected_mesh_strong_residual(
57 _use_displaced_mesh(getParam<bool>(
"use_displaced_mesh")),
58 _ad_q_point(_bnd ? _assembly.adQPointsFace() : _assembly.adQPoints()),
59 _rz_radial_coord(_mesh.getAxisymmetricRadialCoord()),
60 _rz_axial_coord(_rz_radial_coord == 0 ? 1 : 0)
81 for (
const auto sub_id : this->
blockIDs())
84 _boussinesq_alphas[sub_id] = &getPossiblyConstantGenericMaterialPropertyByName<Real, true>(
86 _ref_temps[sub_id] = &getPossiblyConstantGenericMaterialPropertyByName<Real, false>(
134 _disp_x_num = (disp_x.kind() == Moose::VarKindType::VAR_NONLINEAR) &&
146 disp_y.kind() == (Moose::VarKindType::VAR_NONLINEAR &&
165 disp_z.kind() == (Moose::VarKindType::VAR_NONLINEAR &&
191 for (
const auto & var_name : var_names)
200 for (
const auto & func_name : func_names)
223 ((*_temperature)[
_qp] - (*_ref_temp)[
_qp]);
241 "Either the coupled force var or the coupled force vector function must be " 242 "non-empty in 'INSADMaterial'");
245 mooseAssert(var,
"null coupled variable in INSADMaterial");
250 mooseAssert(fn,
"null coupled function in INSADMaterial");
const MooseArray< Point > & _q_point
const ADVectorVariableGradient & _grad_velocity
gradient of velocity
ADMaterialProperty< RealVectorValue > & _gravity_strong_residual
Strong residual corresponding to the momentum gravity term.
const ADMaterialProperty< Real > * _boussinesq_alpha
FEProblemBase & _fe_problem
RealVectorValue _gravity_vector
The gravity vector.
virtual VectorMooseVariable & getVectorVariable(const THREAD_ID tid, const std::string &var_name)=0
T & getUserObject(const std::string &name, unsigned int tid=0) const
const unsigned int invalid_uint
ADMaterialProperty< RealVectorValue > & _advected_mesh_strong_residual
Strong residual corresponding to advected mesh term.
ADMaterialProperty< RealVectorValue > & _coupled_force_strong_residual
Strong residual corresponding to coupled force term.
NS::ViscousForm _viscous_form
The viscous form of the equations. This is either "laplace" or "traction".
static InputParameters validParams()
std::vector< const Function * > _coupled_force_vector_function
optional vector function(s)
const Moose::CoordinateSystemType & _coord_sys
virtual void resolveOptionalProperties() override
virtual void subdomainSetup() override
const MaterialProperty< Real > * _ref_temp
const INSADObjectTracker * _object_tracker
A user object that consumes information from INSAD residual objects and feeds it into this material...
virtual const std::set< SubdomainID > & blockIDs() const
bool hasUserObject(const std::string &name) const
unsigned int _disp_z_sys_num
ADMaterialProperty< RealVectorValue > & _td_strong_residual
Strong residual corresponding to the momentum transient term.
bool _has_gravity
Whether there is a gravity force in the momentum equation.
MaterialData & _material_data
const ADVariableValue * _disp_x_dot
The time derivative with respect to x-displacement.
static InputParameters validParams()
ADMaterialProperty< RealVectorValue > & _relative_velocity
The relative velocity, e.g. velocity - mesh_velocity.
const MooseArray< ADPoint > & _ad_q_point
The quadrature points with potential partial derivatives with respect to displacement degrees of free...
ADMaterialProperty< RealVectorValue > & _advective_strong_residual
Strong residual corresponding to the momentum advective term.
virtual Function & getFunction(const std::string &name, const THREAD_ID tid=0)
const bool _use_displaced_mesh
Whether we are on the displaced mesh.
unsigned int _disp_y_sys_num
registerMooseObject("NavierStokesApp", INSADMaterial)
static InputParameters validParams()
const T & get(const std::string &name, SubdomainID sub_id) const
Get the internal parameter name.
const ADVariableValue * _disp_z_dot
The time derivative with respect to z-displacement.
NonlinearSystemBase & currentNonlinearSystem()
const ADTemplateVariableValue< OutputType > & adSln() const override
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name)=0
bool isTrackerParamValid(const std::string &name, SubdomainID sub_id) const
const ADVariableValue * _disp_y_dot
The time derivative with respect to y-displacement.
unsigned int number() const
std::unordered_map< SubdomainID, const MaterialProperty< Real > * > _ref_temps
The reference temperature.
const ADVectorVariableValue & adCoupledVectorDot(const std::string &var_name, unsigned int comp=0) const
virtual void computeQpProperties() override
const ADVectorVariableValue & _velocity
velocity
const ADVectorVariableValue * _velocity_dot
Time derivative of the velocity, e.g. the acceleration.
bool _has_transient
Whether the momentum equations are transient.
ADMaterialProperty< RealVectorValue > & _boussinesq_strong_residual
Strong residual corresponding to the momentum boussinesq term.
void addMooseVariableDependency(MooseVariableFieldBase *var)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADVariableValue * _temperature
The temperature.
unsigned int _disp_x_sys_num
virtual std::vector< std::shared_ptr< UserObject > > addUserObject(const std::string &user_object_name, const std::string &name, InputParameters ¶meters)
static const std::string pressure
std::vector< const ADVectorVariableValue * > _coupled_force_var
optionally copuled vector var(s)
bool _has_coupled_force
Whether there is a force from a coupled vector variable or vector function.
bool _has_boussinesq
Whether natural convection forces via the Boussinesq approximation are added to the momentum equation...
std::unordered_map< SubdomainID, const ADMaterialProperty< Real > * > _boussinesq_alphas
The Boussinesq coefficient.
bool _has_advected_mesh
Whether we have mesh convection.
const SubdomainID & _current_subdomain_id
virtual void resolveOptionalProperties() override
const ADMaterialProperty< Real > & _rho
density
const unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
INSADMaterial(const InputParameters ¶meters)
Object for tracking what kernels have been added to an INSAD simulation.
void ErrorVector unsigned int
ADMaterialProperty< RealVectorValue > & _mesh_velocity
The mesh velocity.
ADMaterialProperty< Real > & _mass_strong_residual
The strong residual of the mass continuity equation.