https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ThermalFunctionSolidProperties.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 "Function.h"
12
14
17{
19 params.addRequiredParam<FunctionName>("k", "Thermal conductivity");
20 params.addRequiredParam<FunctionName>("cp", "Isobaric specific heat");
21 params.addRequiredParam<FunctionName>("rho", "Density");
22 params.addClassDescription("Function-based thermal properties.");
23 return params;
24}
25
27 : ThermalSolidProperties(parameters),
28 _k_function(getFunction("k")),
29 _cp_function(getFunction("cp")),
30 _rho_function(getFunction("rho"))
31{
32}
33
34Real
36{
37 return _cp_function.value(T);
38}
39
40void
41ThermalFunctionSolidProperties::cp_from_T(const Real & T, Real & cp, Real & dcp_dT) const
42{
43 cp = cp_from_T(T);
45}
46
47Real
49{
50 return _cp_function.timeIntegral(_T_zero_e, T, Point(0, 0, 0));
51}
52
53Real
55{
56 return _k_function.value(T);
57}
58
59void
60ThermalFunctionSolidProperties::k_from_T(const Real & T, Real & k, Real & dk_dT) const
61{
62 k = k_from_T(T);
64}
65
66Real
68{
69 return _rho_function.value(T);
70}
71
72void
73ThermalFunctionSolidProperties::rho_from_T(const Real & T, Real & rho, Real & drho_dT) const
74{
75 rho = rho_from_T(T);
77}
const double rho
const double T
registerMooseObject("SolidPropertiesApp", ThermalFunctionSolidProperties)
virtual Real timeIntegral(Real t1, Real t2, const Point &p) const
virtual Real value(Real t, const Point &p) const
virtual Real timeDerivative(Real t, const Point &p) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Thermal material properties as a function of temperature from function inputs.
const Function & _rho_function
Function providing the density as a function of temperature.
virtual Real cp_from_T(const Real &T) const override
virtual Real rho_from_T(const Real &T) const override
ThermalFunctionSolidProperties(const InputParameters &parameters)
virtual Real cp_integral(const Real &T) const override
const Function & _cp_function
Function providing the isobaric specific heat as a function of temperature.
const Function & _k_function
Function providing the thermal conductivity as a function of temperature.
virtual Real k_from_T(const Real &T) const override
Common class for solid properties that are a function of temperature.
static InputParameters validParams()