Line data Source code
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 : #include "ThermalUCProperties.h" 11 : #include "libmesh/utility.h" 12 : 13 : registerMooseObject("SolidPropertiesApp", ThermalUCProperties); 14 : 15 : InputParameters 16 16 : ThermalUCProperties::validParams() 17 : 18 : { 19 16 : InputParameters params = ThermalSolidProperties::validParams(); 20 : 21 32 : params.addRangeCheckedParam<Real>("density", 13824.7, "density > 0.0", "(Constant) density"); 22 16 : params.addClassDescription("Uranium Carbide (UC) thermal properties (SI units)."); 23 16 : return params; 24 0 : } 25 : 26 8 : ThermalUCProperties::ThermalUCProperties(const InputParameters & parameters) 27 : : ThermalSolidProperties(parameters), 28 8 : _rho_const(getParam<Real>("density")), 29 8 : _c1(239.7), 30 8 : _c2(5.068e-3), 31 8 : _c3(1.7604e-5), 32 8 : _c4(3488100) 33 : { 34 8 : } 35 : 36 : Real 37 12 : ThermalUCProperties::cp_from_T(const Real & T) const 38 : { 39 12 : if ((T < 298) || (T > 2838)) 40 0 : flagInvalidSolution( 41 : "UC specific heat evaluated outside of UC cp temperature range [298, 2838] K"); 42 12 : return _c1 - _c2 * T + _c3 * Utility::pow<2>(T) - _c4 / Utility::pow<2>(T); 43 : } 44 : 45 : void 46 2 : ThermalUCProperties::cp_from_T(const Real & T, Real & cp, Real & dcp_dT) const 47 : { 48 : 49 2 : if ((T < 298) || (T > 2838)) 50 0 : flagInvalidSolution( 51 : "UC specific heat evaluated outside of UC cp temperature range [298, 2838] K"); 52 : 53 2 : cp = cp_from_T(T); 54 2 : dcp_dT = -_c2 + 2 * _c3 * T + 2 * _c4 / Utility::pow<3>(T); 55 2 : } 56 : 57 : Real 58 14 : ThermalUCProperties::cp_integral(const Real & T) const 59 : { 60 14 : return _c1 * T - 0.5 * _c2 * Utility::pow<2>(T) + _c3 / 3.0 * Utility::pow<3>(T) + _c4 / T; 61 : } 62 : 63 : Real 64 10 : ThermalUCProperties::k_from_T(const Real & T) const 65 : { 66 10 : if ((323 < T) && (T < 924)) 67 : { 68 10 : return 21.7 - 3.04e-3 * T + 3.61e-6 * Utility::pow<2>(T); 69 : } 70 0 : else if ((924 < T) && (T < 2573)) 71 : { 72 0 : return 20.2 + 1.48e-3 * T; 73 : } 74 : else 75 : { 76 : return 21.0; 77 : } 78 : } 79 : 80 : void 81 2 : ThermalUCProperties::k_from_T(const Real & T, Real & k, Real & dk_dT) const 82 : { 83 2 : if ((323 < T) && (T < 924)) 84 : { 85 2 : k = k_from_T(T); 86 2 : dk_dT = -3.04e-3 + 7.22e-6 * T; 87 : } 88 0 : else if ((924 < T) && (T < 2573)) 89 : { 90 0 : k = k_from_T(T); 91 0 : dk_dT = 1.48e-3; 92 : } 93 : else 94 : { 95 0 : k = k_from_T(T); 96 0 : dk_dT = 0.0; 97 : } 98 2 : } 99 : 100 : Real 101 10 : ThermalUCProperties::rho_from_T(const Real & /* T */) const 102 : { 103 10 : return _rho_const; 104 : } 105 : 106 : void 107 2 : ThermalUCProperties::rho_from_T(const Real & T, Real & rho, Real & drho_dT) const 108 : { 109 2 : rho = rho_from_T(T); 110 2 : drho_dT = 0.0; 111 2 : }