https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSFVEnergyTimeDerivative.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#include "INSFVEnergyVariable.h"
12
13#include "NS.h"
14
16
19{
22 "Adds the time derivative term to the incompressible Navier-Stokes energy equation.");
23 params.addRequiredParam<MooseFunctorName>(NS::density, "Density");
24 params.addParam<MooseFunctorName>(NS::time_deriv(NS::specific_enthalpy),
26 "The time derivative of the specific enthalpy");
27 return params;
28}
29
31 : FVFunctorTimeKernel(params),
32 _rho(getFunctor<ADReal>(NS::density)),
33 _h_dot(getFunctor<ADReal>(NS::time_deriv(NS::specific_enthalpy)))
34{
35 if (!dynamic_cast<INSFVEnergyVariable *>(&_var))
36 paramError("variable", "The supplied variable should be of INSFVEnergyVariable type.");
37}
38
41{
42 const auto elem_arg = makeElemArg(_current_elem);
43 const auto state = determineState();
44 return _rho(elem_arg, state) * _h_dot(elem_arg, state);
45}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", INSFVEnergyTimeDerivative)
MooseVariableFV< Real > & _var
const Elem *const & _current_elem
static InputParameters validParams()
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
INSFVEnergyTimeDerivative(const InputParameters &params)
const Moose::Functor< ADReal > & _h_dot
The time derivative of the specific enthalpy.
static InputParameters validParams()
const Moose::Functor< ADReal > & _rho
the density
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)
void paramError(const std::string &param, Args... args) const
Moose::StateArg determineState() const
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