LCOV - code coverage report
Current view: top level - src/bcs - ExternalAppConvectionHeatTransferBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 18 19 94.7 %
Date: 2026-05-29 20:41:18 Functions: 4 4 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 "ExternalAppConvectionHeatTransferBC.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", ExternalAppConvectionHeatTransferBC);
      13             : 
      14             : InputParameters
      15           8 : ExternalAppConvectionHeatTransferBC::validParams()
      16             : {
      17           8 :   InputParameters params = IntegratedBC::validParams();
      18             : 
      19          16 :   params.addRequiredCoupledVar("T_ext", "Temperature from external application");
      20          16 :   params.addRequiredCoupledVar("htc_ext", "Heat transfer coefficient from external application");
      21          16 :   params.addParam<PostprocessorName>(
      22          16 :       "scale_pp", 1.0, "Post-processor by which to scale boundary condition");
      23             : 
      24           8 :   params.addClassDescription("Convection BC from an external application");
      25             : 
      26           8 :   return params;
      27           0 : }
      28             : 
      29           4 : ExternalAppConvectionHeatTransferBC::ExternalAppConvectionHeatTransferBC(
      30           4 :     const InputParameters & parameters)
      31             :   : IntegratedBC(parameters),
      32             : 
      33           4 :     _T_ext(coupledValue("T_ext")),
      34           4 :     _htc_ext(coupledValue("htc_ext")),
      35           8 :     _scale_pp(getPostprocessorValue("scale_pp"))
      36             : {
      37           4 : }
      38             : 
      39             : Real
      40         288 : ExternalAppConvectionHeatTransferBC::computeQpResidual()
      41             : {
      42         288 :   return _scale_pp * _htc_ext[_qp] * (_u[_qp] - _T_ext[_qp]) * _test[_i][_qp];
      43             : }
      44             : 
      45             : Real
      46         128 : ExternalAppConvectionHeatTransferBC::computeQpJacobian()
      47             : {
      48         128 :   return _scale_pp * _htc_ext[_qp] * _phi[_j][_qp] * _test[_i][_qp];
      49             : }

Generated by: LCOV version 1.14