https://mooseframework.inl.gov
PrandtlNumberMaterial.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 
10 #include "PrandtlNumberMaterial.h"
11 #include "Numerics.h"
12 
13 registerMooseObject("ThermalHydraulicsApp", PrandtlNumberMaterial);
14 
17 {
19  params.addRequiredParam<MaterialPropertyName>("cp", "Constant-pressure specific heat");
20  params.addRequiredParam<MaterialPropertyName>("mu", "Dynamic viscosity");
21  params.addRequiredParam<MaterialPropertyName>("k", "Thermal conductivity");
22  params.addClassDescription("Computes the Prandtl number as a material property");
23  return params;
24 }
25 
27  : Material(parameters),
28  _Pr(declareProperty<Real>("Pr")),
29  _cp(getMaterialProperty<Real>("cp")),
30  _mu(getMaterialProperty<Real>("mu")),
31  _k(getMaterialProperty<Real>("k"))
32 {
33 }
34 
35 void
37 {
38  _Pr[_qp] = THM::Prandtl(_cp[_qp], _mu[_qp], _k[_qp]);
39 }
static InputParameters validParams()
auto Prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
Definition: Numerics.h:133
const MaterialProperty< Real > & _k
Thermal conductivity.
PrandtlNumberMaterial(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
static InputParameters validParams()
const MaterialProperty< Real > & _mu
Dynamic viscosity.
registerMooseObject("ThermalHydraulicsApp", PrandtlNumberMaterial)
virtual void computeQpProperties()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< Real > & _cp
Constant-pressure specific heat.
void addClassDescription(const std::string &doc_string)
MaterialProperty< Real > & _Pr
Prandtl number.
Computes Prandtl number as material property.