https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ThermalGraphiteProperties.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 "libmesh/utility.h"
12
14
17{
19
20 MooseEnum graphite_grade("H_451");
21 params.addRequiredParam<MooseEnum>("grade", graphite_grade, "Graphite grade");
22 params.addRangeCheckedParam<Real>("density", 1850.0, "density > 0.0", "(Constant) density");
23 params.addClassDescription("Graphite thermal properties.");
24 return params;
25}
26
28 : ThermalSolidProperties(parameters),
29 _grade(getParam<MooseEnum>("grade").getEnum<GraphiteGrade>()),
30 _rho_const(getParam<Real>("density")),
31 _c1(4184.0),
32 _c2(0.54212),
33 _c3(2.42667e-6),
34 _c4(90.2725),
35 _c5(43449.3),
36 _c6(1.59309e7),
37 _c7(1.43688e9)
38{
39}
40
41Real
43{
44 switch (_grade)
45 {
47 return _c1 * (_c2 - _c3 * T - _c4 / T - _c5 / Utility::pow<2>(T) + _c6 / Utility::pow<3>(T) -
48 _c7 / Utility::pow<4>(T));
49 default:
50 mooseError("Unhandled GraphiteGrade enum!");
51 }
52}
53
54void
55ThermalGraphiteProperties::cp_from_T(const Real & T, Real & cp, Real & dcp_dT) const
56{
57 cp = cp_from_T(T);
58
59 switch (_grade)
60 {
62 {
63 dcp_dT = _c1 * (-_c3 + _c4 / Utility::pow<2>(T) + 2.0 * _c5 / Utility::pow<3>(T) -
64 3.0 * _c6 / Utility::pow<4>(T) + 4.0 * _c7 / Utility::pow<5>(T));
65 break;
66 }
67 default:
68 mooseError("Unhandled GraphiteGrade enum!");
69 }
70}
71
72Real
74{
75 switch (_grade)
76 {
78 {
79 return _c1 * (_c2 * T - 0.5 * _c3 * Utility::pow<2>(T) - _c4 * std::log(T) + _c5 / T -
80 0.5 * _c6 / Utility::pow<2>(T) + _c7 / (3.0 * Utility::pow<3>(T)));
81 }
82 default:
83 mooseError("Unhandled GraphiteGrade enum!");
84 }
85}
86
87Real
89{
90 switch (_grade)
91 {
93 return 3.28248e-5 * Utility::pow<2>(T) - 1.24890e-1 * T + 1.692145e2;
94 default:
95 mooseError("Unhandled GraphiteGrade enum!");
96 }
97}
98
99void
100ThermalGraphiteProperties::k_from_T(const Real & T, Real & k, Real & dk_dT) const
101{
102 k = k_from_T(T);
103
104 switch (_grade)
105 {
107 {
108 dk_dT = 6.56496e-5 * T - 1.24890e-1;
109 break;
110 }
111 default:
112 mooseError("Unhandled GraphiteGrade enum!");
113 }
114}
115
116Real
117ThermalGraphiteProperties::rho_from_T(const Real & /* T */) const
118{
119 return _rho_const;
120}
121
122void
123ThermalGraphiteProperties::rho_from_T(const Real & T, Real & rho, Real & drho_dT) const
124{
125 rho = rho_from_T(T);
126 drho_dT = 0.0;
127}
const double rho
const double T
registerMooseObject("SolidPropertiesApp", ThermalGraphiteProperties)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
void mooseError(Args &&... args) const
Graphite thermal properties as a function of temperature.
const Real & _rho_const
constant density
virtual Real k_from_T(const Real &T) const override
ThermalGraphiteProperties(const InputParameters &parameters)
static InputParameters validParams()
virtual Real cp_from_T(const Real &T) const override
virtual Real cp_integral(const Real &T) const override
virtual Real rho_from_T(const Real &T) const override
GraphiteGrade
enumeration for selecting the graphite grade
enum ThermalGraphiteProperties::GraphiteGrade _grade
Common class for solid properties that are a function of temperature.
static InputParameters validParams()