https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
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
32 _rho_dot(getFunctor<ADReal>(NS::time_deriv(NS::density))),
33 _h(getFunctor<ADReal>(NS::specific_enthalpy))
34{
35}
36
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}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", WCNSFVEnergyTimeDerivative)
const Elem *const & _current_elem
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Moose::StateArg determineState() const
Computes the energy time derivative for the weakly compressible formulation of the energy equation,...
WCNSFVEnergyTimeDerivative(const InputParameters &params)
static InputParameters validParams()
const Moose::Functor< ADReal > & _h
The specific enthalpy.
const Moose::Functor< ADReal > & _rho_dot
Functor for the time derivative of density, material property or variable.
static const std::string density
Definition NS.h:34
static const std::string specific_enthalpy
Definition NS.h:69
std::string time_deriv(const std::string &var)
Definition NS.h:98