21 "Adds the time derivative term to the incompressible Navier-Stokes momentum equation.");
24 "The time derivative of the density material property");
30 _rho(getFunctor<
ADReal>(
NS::density)),
31 _rho_dot(getFunctor<
ADReal>(
NS::time_deriv(
NS::density)))
44 const auto rho_dot =
_rho_dot(elem_arg, state);
45 const auto var_dot =
_var.
dot(elem_arg, state);
46 const auto rho =
_rho(elem_arg, state);
47 const auto var =
_var(elem_arg, state);
50 mooseAssert(var.derivatives()[dof_number] == 1.,
51 "This is an implicit assumption in our coefficient calculation.");
53 const auto strong_resid = rho_dot * var +
rho * var_dot;
59 a +=
rho * var_dot.derivatives()[dof_number];
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", WCNSFVMomentumTimeDerivative)
Real elementVolume(const Elem *elem) const
MooseVariableFV< Real > & _var
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
const unsigned int _index
index x|y|z
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms.
All navier-stokes momentum time derivative terms should inherit from this class.
static InputParameters validParams()
void addResidualAndJacobian(const ADReal &residual, dof_id_type dof)
Process into either the system residual or Jacobian.
const bool _contribute_to_rc_coeffs
Whether to contribute to RC coefficients.
unsigned int number() const
DotType dot(const ElemArg &elem, const StateArg &state) const
virtual void addToA(const libMesh::Elem *elem, unsigned int component, const ADReal &value)=0
API for momentum residual objects that have on-diagonals for velocity call.
unsigned int number() const
Moose::StateArg determineState() const
Computes the momentum time derivative for the weakly compressible formulation of the momentum equatio...
static InputParameters validParams()
void gatherRCData(const Elem &) override
Should be a non-empty implementation if the residual object is a FVElementalKernel and introduces res...
const Moose::Functor< ADReal > & _rho_dot
The time derivative of density.
WCNSFVMomentumTimeDerivative(const InputParameters ¶ms)
const Moose::Functor< ADReal > & _rho
The density.
static const std::string density
std::string time_deriv(const std::string &var)