https://mooseframework.inl.gov
Loading...
Searching...
No Matches
thermal_hydraulics
src
postprocessors
ADHeatStructureEnergyBase.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
10
#include "
ADHeatStructureEnergyBase.h
"
11
#include "
HeatConductionModel.h
"
12
13
InputParameters
14
ADHeatStructureEnergyBase::validParams
()
15
{
16
InputParameters
params =
ElementIntegralPostprocessor::validParams
();
17
18
params.
addClassDescription
(
"Computes the total energy for a heat structure."
);
19
20
params.
addParam
<Real>(
"n_units"
, 1.,
"Number of units of heat structure represents"
);
21
params.
addParam
<Real>(
"T_ref"
, 0,
"Reference temperature"
);
22
23
return
params;
24
}
25
26
ADHeatStructureEnergyBase::ADHeatStructureEnergyBase
(
const
InputParameters
& parameters)
27
:
ElementIntegralPostprocessor
(parameters),
28
_n_units(getParam<Real>(
"n_units"
)),
29
_T_ref(getParam<Real>(
"T_ref"
)),
30
_rho(getADMaterialPropertyByName<Real>(
HeatConductionModel
::DENSITY)),
31
_cp(getADMaterialPropertyByName<Real>(
HeatConductionModel
::SPECIFIC_HEAT_CONSTANT_PRESSURE)),
32
_T_var(&_fe_problem.getStandardVariable(_tid,
HeatConductionModel
::TEMPERATURE)),
33
_T(_T_var->sln())
34
{
35
addMooseVariableDependency
(
_T_var
);
36
}
37
38
Real
39
ADHeatStructureEnergyBase::computeQpIntegral
()
40
{
41
return
MetaPhysicL::raw_value
(
_rho
[
_qp
]) *
MetaPhysicL::raw_value
(
_cp
[
_qp
]) * (
_T
[
_qp
] -
_T_ref
) *
42
_n_units
;
43
}
ADHeatStructureEnergyBase.h
HeatConductionModel.h
ADHeatStructureEnergyBase::_cp
const ADMaterialProperty< Real > & _cp
Isobaric specific heat capacity.
Definition
ADHeatStructureEnergyBase.h:35
ADHeatStructureEnergyBase::validParams
static InputParameters validParams()
Definition
ADHeatStructureEnergyBase.C:14
ADHeatStructureEnergyBase::_T_var
MooseVariable * _T_var
Temperature variable.
Definition
ADHeatStructureEnergyBase.h:38
ADHeatStructureEnergyBase::ADHeatStructureEnergyBase
ADHeatStructureEnergyBase(const InputParameters ¶meters)
Definition
ADHeatStructureEnergyBase.C:26
ADHeatStructureEnergyBase::_n_units
const Real _n_units
Number of units that heat structure is multiplied by.
Definition
ADHeatStructureEnergyBase.h:26
ADHeatStructureEnergyBase::_rho
const ADMaterialProperty< Real > & _rho
Density of the heat structure.
Definition
ADHeatStructureEnergyBase.h:32
ADHeatStructureEnergyBase::_T
const VariableValue & _T
Temperature variable value.
Definition
ADHeatStructureEnergyBase.h:40
ADHeatStructureEnergyBase::computeQpIntegral
virtual Real computeQpIntegral() override
Definition
ADHeatStructureEnergyBase.C:39
ADHeatStructureEnergyBase::_T_ref
const Real & _T_ref
Reference temperature.
Definition
ADHeatStructureEnergyBase.h:29
ElementIntegralPostprocessor
ElementIntegralPostprocessor::_qp
unsigned int _qp
ElementIntegralPostprocessor::validParams
static InputParameters validParams()
HeatConductionModel
Provides functions to setup the heat conduction model.
Definition
HeatConductionModel.h:28
InputParameters::addParam
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
InputParameters::addClassDescription
void addClassDescription(const std::string &doc_string)
ElementIntegralPostprocessor::addMooseVariableDependency
void addMooseVariableDependency(MooseVariableFieldBase *var)
MetaPhysicL::raw_value
auto raw_value(const Eigen::Map< T > &in)
InputParameters
Generated on Fri Aug 21 2026 13:42:00 for https://mooseframework.inl.gov by
1.9.8