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