Line data Source code
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 "ADHeatRateConvection1Phase.h" 11 : #include "FlowModelSinglePhase.h" 12 : 13 : registerMooseObject("ThermalHydraulicsApp", ADHeatRateConvection1Phase); 14 : 15 : InputParameters 16 436 : ADHeatRateConvection1Phase::validParams() 17 : { 18 436 : InputParameters params = ElementIntegralPostprocessor::validParams(); 19 : 20 872 : params.addParam<MaterialPropertyName>( 21 : "T_wall", FlowModelSinglePhase::TEMPERATURE_WALL, "Wall temperature"); 22 872 : params.addParam<MaterialPropertyName>( 23 : "T", FlowModelSinglePhase::TEMPERATURE, "Temperature of the fluid on the channel side"); 24 872 : params.addParam<MaterialPropertyName>( 25 : "Hw", FlowModelSinglePhase::HEAT_TRANSFER_COEFFICIENT_WALL, "Wall heat transfer coefficient"); 26 872 : params.addRequiredCoupledVar("P_hf", "heat flux perimeter"); 27 : 28 436 : params.addClassDescription("Computes convective heat rate into a 1-phase flow channel"); 29 : 30 436 : return params; 31 0 : } 32 : 33 164 : ADHeatRateConvection1Phase::ADHeatRateConvection1Phase(const InputParameters & parameters) 34 : : ElementIntegralPostprocessor(parameters), 35 : 36 164 : _T_wall(getADMaterialProperty<Real>("T_wall")), 37 328 : _T(getADMaterialProperty<Real>("T")), 38 328 : _Hw(getADMaterialProperty<Real>("Hw")), 39 328 : _P_hf(adCoupledValue("P_hf")) 40 : { 41 164 : } 42 : 43 : Real 44 32170 : ADHeatRateConvection1Phase::computeQpIntegral() 45 : { 46 32170 : return -MetaPhysicL::raw_value(_Hw[_qp]) * MetaPhysicL::raw_value(_P_hf[_qp]) * 47 32170 : (MetaPhysicL::raw_value(_T[_qp]) - MetaPhysicL::raw_value(_T_wall[_qp])); 48 : }