https://mooseframework.inl.gov
WCNSFVEnergyTimeDerivative.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
12 #include "NS.h"
13 
15 
18 {
20  params.addClassDescription(
21  "Adds the time derivative term to the incompressible Navier-Stokes momentum equation.");
22 
23  params.addRequiredParam<MooseFunctorName>(NS::time_deriv(NS::density),
24  "The time derivative of the density material property");
25  params.addParam<MooseFunctorName>(
26  NS::specific_enthalpy, NS::specific_enthalpy, "The specific enthalpy");
27  return params;
28 }
29 
31  : INSFVEnergyTimeDerivative(params),
32  _rho_dot(getFunctor<ADReal>(NS::time_deriv(NS::density))),
33  _h(getFunctor<ADReal>(NS::specific_enthalpy))
34 {
35 }
36 
37 ADReal
39 {
40  const auto elem_arg = makeElemArg(_current_elem);
41  const auto state = determineState();
43  _rho_dot(elem_arg, state) * _h(elem_arg, state);
44 }
static InputParameters validParams()
Computes the energy time derivative for the weakly compressible formulation of the energy equation...
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
Moose::StateArg determineState() const
registerMooseObject("NavierStokesApp", WCNSFVEnergyTimeDerivative)
static const std::string density
Definition: NS.h:33
DualNumber< Real, DNDerivativeType, true > ADReal
WCNSFVEnergyTimeDerivative(const InputParameters &params)
void addRequiredParam(const std::string &name, const std::string &doc_string)
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
static InputParameters validParams()
const Moose::Functor< ADReal > & _h
The specific enthalpy.
const Elem *const & _current_elem
void addClassDescription(const std::string &doc_string)
const Moose::Functor< ADReal > & _rho_dot
Functor for the time derivative of density, material property or variable.
std::string time_deriv(const std::string &var)
Definition: NS.h:97
static const std::string specific_enthalpy
Definition: NS.h:68