LCOV - code coverage report
Current view: top level - src/kernels - ADOneD3EqnEnergyHeatFluxFromHeatStructure3D.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 18 19 94.7 %
Date: 2025-07-30 13:02:48 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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 "ADOneD3EqnEnergyHeatFluxFromHeatStructure3D.h"
      11             : #include "ADHeatFluxFromHeatStructureBaseUserObject.h"
      12             : #include "THMIndicesVACE.h"
      13             : #include "FlowModelSinglePhase.h"
      14             : #include "HeatConductionModel.h"
      15             : 
      16             : registerMooseObject("ThermalHydraulicsApp", ADOneD3EqnEnergyHeatFluxFromHeatStructure3D);
      17             : 
      18             : InputParameters
      19          87 : ADOneD3EqnEnergyHeatFluxFromHeatStructure3D::validParams()
      20             : {
      21          87 :   InputParameters params = ADKernel::validParams();
      22         174 :   params.addRequiredParam<UserObjectName>("user_object",
      23             :                                           "Layered average wall temperature user object");
      24         174 :   params.addRequiredParam<MaterialPropertyName>("T", "Fluid temperature");
      25         174 :   params.addRequiredParam<MaterialPropertyName>("Hw", "Convective heat transfer coefficient");
      26         174 :   params.addRequiredCoupledVar("P_hf", "Heat flux perimeter");
      27          87 :   params.addClassDescription(
      28             :       "Computes a heat flux term from a 3D heat structure in the energy equation for 1-phase flow");
      29          87 :   return params;
      30           0 : }
      31             : 
      32          50 : ADOneD3EqnEnergyHeatFluxFromHeatStructure3D::ADOneD3EqnEnergyHeatFluxFromHeatStructure3D(
      33          50 :     const InputParameters & parameters)
      34             :   : ADKernel(parameters),
      35          50 :     _user_object(getUserObjectBase("user_object")),
      36         100 :     _Hw(getADMaterialProperty<Real>("Hw")),
      37         100 :     _T(getADMaterialProperty<Real>("T")),
      38         100 :     _P_hf(adCoupledValue("P_hf"))
      39             : {
      40          50 : }
      41             : 
      42             : ADReal
      43       98916 : ADOneD3EqnEnergyHeatFluxFromHeatStructure3D::computeQpResidual()
      44             : {
      45       98916 :   const Real T_wall = _user_object.spatialValue(_current_elem->vertex_average());
      46      197832 :   return _Hw[_qp] * (_T[_qp] - T_wall) * _P_hf[_qp] * _test[_i][_qp];
      47             : }

Generated by: LCOV version 1.14