https://mooseframework.inl.gov
ConstantDensityThermalSolidPropertiesMaterial.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 
11 #include "ThermalSolidProperties.h"
12 
13 #include "metaphysicl/raw_type.h"
14 
17 
18 template <bool is_ad>
21 {
23 
24  params.addRequiredParam<Real>("T_ref", "Reference temperature for constant density [K]");
25 
26  params.addClassDescription("Computes solid thermal properties as a function of temperature but "
27  "with a constant density.");
28 
29  return params;
30 }
31 
32 template <bool is_ad>
35  : ThermalSolidPropertiesMaterialTempl<is_ad>(parameters),
36 
37  _T_ref(this->template getParam<Real>("T_ref")),
38  _rho_constant(MetaPhysicL::raw_value(_sp.rho_from_T(GenericReal<is_ad>(_T_ref))))
39 {
40 }
41 
42 template <bool is_ad>
43 void
45 {
46  _cp[_qp] = _sp.cp_from_T(_temperature[_qp]);
47  _k[_qp] = _sp.k_from_T(_temperature[_qp]);
48  _rho[_qp] = _rho_constant;
49 }
50 
Moose::GenericType< Real, is_ad > GenericReal
Computes solid thermal properties as a function of temperature but with a constant density...
Computes solid thermal properties as a function of temperature.
auto raw_value(const Eigen::Map< T > &in)
void addRequiredParam(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
registerMooseObject("SolidPropertiesApp", ConstantDensityThermalSolidPropertiesMaterial)