https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
12
13#include "metaphysicl/raw_type.h"
14
17
18template <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
32template <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
42template <bool is_ad>
43void
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
registerMooseObject("SolidPropertiesApp", ConstantDensityThermalSolidPropertiesMaterial)
Moose::GenericType< Real, is_ad > GenericReal
Computes solid thermal properties as a function of temperature but with a constant density.
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Computes solid thermal properties as a function of temperature.