https://mooseframework.inl.gov
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 
13 registerMooseObject("SolidPropertiesApp", ThermalGraphiteProperties);
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 
41 Real
43 {
44  switch (_grade)
45  {
46  case GraphiteGrade::H_451:
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 
54 void
55 ThermalGraphiteProperties::cp_from_T(const Real & T, Real & cp, Real & dcp_dT) const
56 {
57  cp = cp_from_T(T);
58 
59  switch (_grade)
60  {
61  case GraphiteGrade::H_451:
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 
72 Real
74 {
75  switch (_grade)
76  {
77  case GraphiteGrade::H_451:
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 
87 Real
89 {
90  switch (_grade)
91  {
92  case GraphiteGrade::H_451:
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 
99 void
100 ThermalGraphiteProperties::k_from_T(const Real & T, Real & k, Real & dk_dT) const
101 {
102  k = k_from_T(T);
103 
104  switch (_grade)
105  {
106  case GraphiteGrade::H_451:
107  {
108  dk_dT = 6.56496e-5 * T - 1.24890e-1;
109  break;
110  }
111  default:
112  mooseError("Unhandled GraphiteGrade enum!");
113  }
114 }
115 
116 Real
117 ThermalGraphiteProperties::rho_from_T(const Real & /* T */) const
118 {
119  return _rho_const;
120 }
121 
122 void
123 ThermalGraphiteProperties::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 }
ThermalGraphiteProperties(const InputParameters &parameters)
virtual Real cp_integral(const Real &T) const override
virtual Real k_from_T(const Real &T) const override
registerMooseObject("SolidPropertiesApp", ThermalGraphiteProperties)
GraphiteGrade
enumeration for selecting the graphite grade
Common class for solid properties that are a function of temperature.
const Real & _rho_const
constant density
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
static const std::string cp
Definition: NS.h:121
virtual Real rho_from_T(const Real &T) const override
Graphite thermal properties as a function of temperature.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
enum ThermalGraphiteProperties::GraphiteGrade _grade
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
virtual Real cp_from_T(const Real &T) const override
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
static const std::string k
Definition: NS.h:130