https://mooseframework.inl.gov
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 
11 #include "ThermalSolidProperties.h"
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 
40 void
42 {
43 }
44 
45 void
47 {
48 }
49 
52 {
53  switch (_property)
54  {
55  case Property::DENSITY:
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 }
const PostprocessorValue & _T
Temperature.
Computes a property from a ThermalSolidProperties object.
Common class for solid properties that are a function of temperature.
ThermalSolidPropertiesPostprocessor(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
registerMooseObject("SolidPropertiesApp", ThermalSolidPropertiesPostprocessor)
Real PostprocessorValue
virtual PostprocessorValue getValue() const override
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
const ThermalSolidProperties & _solid_properties
Solid properties.