https://mooseframework.inl.gov
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 }
static InputParameters validParams()
registerMooseObject("NavierStokesApp", ThermalDiffusivityFunctorMaterial)
const Moose::Functor< ADReal > & _rho
density
static const std::string density
Definition: NS.h:33
const Moose::Functor< ADReal > & _k
thermal conductivity
DualNumber< Real, DNDerivativeType, true > ADReal
static const std::string cp
Definition: NS.h:121
static const std::string thermal_diffusivity
Definition: NS.h:133
ThermalDiffusivityFunctorMaterial(const InputParameters &parameters)
static const std::string k
Definition: NS.h:130
Computes the thermal diffusivity given the thermal conductivity, specific heat capacity, and fluid density.
const Moose::Functor< ADReal > & _cp
specific heat capacity