LCOV - code coverage report
Current view: top level - src/bcs - ADExternalAppConvectionHeatTransferBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 16 17 94.1 %
Date: 2026-05-29 20:41:18 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 "ADExternalAppConvectionHeatTransferBC.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", ADExternalAppConvectionHeatTransferBC);
      14             : 
      15             : InputParameters
      16          17 : ADExternalAppConvectionHeatTransferBC::validParams()
      17             : {
      18          17 :   InputParameters params = ADIntegratedBC::validParams();
      19             : 
      20          34 :   params.addRequiredCoupledVar("T_ext", "Temperature from external application");
      21          34 :   params.addRequiredCoupledVar("htc_ext", "Heat transfer coefficient from external application");
      22          34 :   params.addParam<FunctionName>("scale", 1.0, "Function by which to scale the boundary condition");
      23             : 
      24          17 :   params.addClassDescription("Convection BC from an external application");
      25             : 
      26          17 :   return params;
      27           0 : }
      28             : 
      29           9 : ADExternalAppConvectionHeatTransferBC::ADExternalAppConvectionHeatTransferBC(
      30           9 :     const InputParameters & parameters)
      31             :   : ADIntegratedBC(parameters),
      32             : 
      33           9 :     _T_ext(adCoupledValue("T_ext")),
      34           9 :     _htc_ext(adCoupledValue("htc_ext")),
      35          18 :     _scale_fn(getFunction("scale"))
      36             : {
      37           9 : }
      38             : 
      39             : ADReal
      40      107200 : ADExternalAppConvectionHeatTransferBC::computeQpResidual()
      41             : {
      42      214400 :   return _scale_fn.value(_t, _q_point[_qp]) * _htc_ext[_qp] * (_u[_qp] - _T_ext[_qp]) *
      43      107200 :          _test[_i][_qp];
      44             : }

Generated by: LCOV version 1.14