Line data Source code
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 : 15 : InputParameters 16 85 : PrandtlNumberMaterial::validParams() 17 : { 18 85 : InputParameters params = Material::validParams(); 19 170 : params.addRequiredParam<MaterialPropertyName>("cp", "Constant-pressure specific heat"); 20 170 : params.addRequiredParam<MaterialPropertyName>("mu", "Dynamic viscosity"); 21 170 : params.addRequiredParam<MaterialPropertyName>("k", "Thermal conductivity"); 22 85 : params.addClassDescription("Computes the Prandtl number as a material property"); 23 85 : return params; 24 0 : } 25 : 26 66 : PrandtlNumberMaterial::PrandtlNumberMaterial(const InputParameters & parameters) 27 : : Material(parameters), 28 66 : _Pr(declareProperty<Real>("Pr")), 29 132 : _cp(getMaterialProperty<Real>("cp")), 30 132 : _mu(getMaterialProperty<Real>("mu")), 31 198 : _k(getMaterialProperty<Real>("k")) 32 : { 33 66 : } 34 : 35 : void 36 54 : PrandtlNumberMaterial::computeQpProperties() 37 : { 38 54 : _Pr[_qp] = THM::Prandtl(_cp[_qp], _mu[_qp], _k[_qp]); 39 54 : }