https://mooseframework.inl.gov
PCNSFVDensityTimeDerivative.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 "NS.h"
12 
14 
17 {
19  params.addClassDescription("A time derivative kernel for which the form is eps * ddt(rho*var).");
20  params.addParam<MaterialPropertyName>(NS::porosity, NS::porosity, "The porosity");
21  params.addRequiredCoupledVar(NS::density, "The density variable.");
22  return params;
23 }
24 
26  : FVTimeKernel(parameters),
27  _u_dot(_var.adUDot()),
28  _eps(getMaterialProperty<Real>(NS::porosity)),
29  _rho_dot(adCoupledDot(NS::density)),
30  _rho(adCoupledValue(NS::density))
31 {
32 }
33 
34 ADReal
36 {
37  return _eps[_qp] * (_u[_qp] * _rho_dot[_qp] + _u_dot[_qp] * _rho[_qp]);
38 }
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const MaterialProperty< Real > & _eps
The porosity.
static InputParameters validParams()
static const std::string density
Definition: NS.h:33
DualNumber< Real, DNDerivativeType, true > ADReal
static const std::string porosity
Definition: NS.h:104
const ADVariableValue & _u
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
const ADVariableValue & _u_dot
The time derivative of the primary variable.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("NavierStokesApp", PCNSFVDensityTimeDerivative)
const unsigned int _qp
PCNSFVDensityTimeDerivative(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)