https://mooseframework.inl.gov
HeatRateDirectFlowChannel.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 
13 #include "metaphysicl/raw_type.h"
14 
15 registerMooseObject("ThermalHydraulicsApp", HeatRateDirectFlowChannel);
16 registerMooseObject("ThermalHydraulicsApp", ADHeatRateDirectFlowChannel);
17 
18 template <bool is_ad>
21 {
23 
24  params.addRequiredParam<MaterialPropertyName>("q_wall_prop", "Wall heat flux material property");
25  params.addRequiredParam<FunctionName>("P_hf", "Heat flux perimeter");
26 
27  params.addClassDescription(
28  "Computes the heat rate into a flow channel from heat flux material property");
29 
30  return params;
31 }
32 
33 template <bool is_ad>
35  const InputParameters & parameters)
36  : ElementIntegralPostprocessor(parameters),
37 
38  _q_wall(getGenericMaterialProperty<Real, is_ad>("q_wall_prop")),
39  _P_hf_fn(getFunction("P_hf"))
40 {
41 }
42 
43 template <bool is_ad>
44 Real
46 {
47  return MetaPhysicL::raw_value(_q_wall[_qp]) * _P_hf_fn.value(_t, _q_point[_qp]);
48 }
49 
virtual Real computeQpIntegral() override
HeatRateDirectFlowChannelTempl(const InputParameters &parameters)
auto raw_value(const Eigen::Map< T > &in)
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObject("ThermalHydraulicsApp", HeatRateDirectFlowChannel)
static InputParameters validParams()
Computes the heat rate into a flow channel from heat flux material property.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)