https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ThermalSolidPropertiesPostprocessor.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
14
17{
19
20 params.addRequiredParam<UserObjectName>("solid_properties", "Solid properties object to query");
21 params.addRequiredParam<PostprocessorName>(
22 "T", "Temperature post-processor at which to evaluate property");
23 MooseEnum property("density=0 specific_heat=1 thermal_conductivity=2");
24 params.addRequiredParam<MooseEnum>("property", property, "Which property to compute.");
25
26 params.addClassDescription("Computes a property from a ThermalSolidProperties object.");
27
28 return params;
29}
30
32 const InputParameters & parameters)
33 : GeneralPostprocessor(parameters),
34 _solid_properties(getUserObject<ThermalSolidProperties>("solid_properties")),
35 _T(getPostprocessorValue("T")),
36 _property(getParam<MooseEnum>("property").getEnum<Property>())
37{
38}
39
40void
44
45void
49
52{
53 switch (_property)
54 {
56 return _solid_properties.rho_from_T(_T);
57 break;
59 return _solid_properties.cp_from_T(_T);
60 break;
62 return _solid_properties.k_from_T(_T);
63 break;
64 default:
65 mooseError("Invalid property option.");
66 }
67}
Real PostprocessorValue
registerMooseObject("SolidPropertiesApp", ThermalSolidPropertiesPostprocessor)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void mooseError(Args &&... args) const
Computes a property from a ThermalSolidProperties object.
ThermalSolidPropertiesPostprocessor(const InputParameters &parameters)
const ThermalSolidProperties & _solid_properties
Solid properties.
virtual PostprocessorValue getValue() const override
Common class for solid properties that are a function of temperature.