https://mooseframework.inl.gov
ADPrandtlNumberMaterial.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 "Numerics.h"
12 #include "FlowModelSinglePhase.h"
13 
14 registerMooseObject("ThermalHydraulicsApp", ADPrandtlNumberMaterial);
15 
18 {
20  params.addParam<MaterialPropertyName>("Pr", "Pr", "Prandlt number property name");
21  params.addParam<MaterialPropertyName>("cp",
23  "Constant-pressure specific heat");
24  params.addParam<MaterialPropertyName>(
25  "mu", FlowModelSinglePhase::DYNAMIC_VISCOSITY, "Dynamic viscosity");
26  params.addParam<MaterialPropertyName>(
27  "k", FlowModelSinglePhase::THERMAL_CONDUCTIVITY, "Thermal conductivity");
28  params.addClassDescription("Computes Prandtl number as material property");
29  return params;
30 }
31 
33  : Material(parameters),
34  _Pr(declareADProperty<Real>("Pr")),
35  _cp(getADMaterialProperty<Real>("cp")),
36  _mu(getADMaterialProperty<Real>("mu")),
37  _k(getADMaterialProperty<Real>("k"))
38 {
39 }
40 
41 void
43 {
44  _Pr[_qp] = THM::Prandtl(_cp[_qp], _mu[_qp], _k[_qp]);
45 }
static const std::string SPECIFIC_HEAT_CONSTANT_PRESSURE
registerMooseObject("ThermalHydraulicsApp", ADPrandtlNumberMaterial)
static const std::string DYNAMIC_VISCOSITY
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
auto Prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
Definition: Numerics.h:133
static const std::string THERMAL_CONDUCTIVITY
Computes Prandtl number as material property.
ADMaterialProperty< Real > & _Pr
Prandtl number.
ADPrandtlNumberMaterial(const InputParameters &parameters)
unsigned int _qp
static InputParameters validParams()
const ADMaterialProperty< Real > & _k
Thermal conductivity.
static InputParameters validParams()
const ADMaterialProperty< Real > & _cp
Constant-pressure specific heat.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const ADMaterialProperty< Real > & _mu
Dynamic viscosity.