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 : // Navier-Stokes includes 11 : #include "ThermalDiffusivityFunctorMaterial.h" 12 : #include "NS.h" 13 : 14 : registerMooseObject("NavierStokesApp", ThermalDiffusivityFunctorMaterial); 15 : 16 : InputParameters 17 82 : ThermalDiffusivityFunctorMaterial::validParams() 18 : { 19 82 : auto params = FunctorMaterial::validParams(); 20 82 : params.addClassDescription("Computes the thermal diffusivity given the thermal conductivity, " 21 : "specific heat capacity, and fluid density."); 22 82 : params.addRequiredParam<MooseFunctorName>(NS::k, "The thermal conductivity."); 23 82 : params.addRequiredParam<MooseFunctorName>(NS::density, "The density."); 24 82 : params.addRequiredParam<MooseFunctorName>(NS::cp, "The specific heat capacity."); 25 82 : return params; 26 0 : } 27 : 28 44 : ThermalDiffusivityFunctorMaterial::ThermalDiffusivityFunctorMaterial( 29 44 : const InputParameters & parameters) 30 : : FunctorMaterial(parameters), 31 44 : _k(getFunctor<ADReal>(NS::k)), 32 44 : _cp(getFunctor<ADReal>(NS::cp)), 33 44 : _rho(getFunctor<ADReal>(NS::density)) 34 : { 35 132 : addFunctorProperty<ADReal>(NS::thermal_diffusivity, 36 58700 : [this](const auto & r, const auto & t) -> ADReal 37 117400 : { return _k(r, t) / (_rho(r, t) * _cp(r, t)); }); 38 88 : }