https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ThermalDiffusivityFunctorMaterial.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// Navier-Stokes includes
12#include "NS.h"
13
15
18{
19 auto params = FunctorMaterial::validParams();
20 params.addClassDescription("Computes the thermal diffusivity given the thermal conductivity, "
21 "specific heat capacity, and fluid density.");
22 params.addRequiredParam<MooseFunctorName>(NS::k, "The thermal conductivity.");
23 params.addRequiredParam<MooseFunctorName>(NS::density, "The density.");
24 params.addRequiredParam<MooseFunctorName>(NS::cp, "The specific heat capacity.");
25 return params;
26}
27
29 const InputParameters & parameters)
30 : FunctorMaterial(parameters),
31 _k(getFunctor<ADReal>(NS::k)),
32 _cp(getFunctor<ADReal>(NS::cp)),
33 _rho(getFunctor<ADReal>(NS::density))
34{
35 addFunctorProperty<ADReal>(NS::thermal_diffusivity,
36 [this](const auto & r, const auto & t) -> ADReal
37 { return _k(r, t) / (_rho(r, t) * _cp(r, t)); });
38}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", ThermalDiffusivityFunctorMaterial)
static InputParameters validParams()
Computes the thermal diffusivity given the thermal conductivity, specific heat capacity,...
const Moose::Functor< ADReal > & _k
thermal conductivity
ThermalDiffusivityFunctorMaterial(const InputParameters &parameters)
const Moose::Functor< ADReal > & _rho
density
const Moose::Functor< ADReal > & _cp
specific heat capacity
static const std::string density
Definition NS.h:34
static const std::string cp
Definition NS.h:125
static const std::string k
Definition NS.h:134
static const std::string thermal_diffusivity
Definition NS.h:137