LCOV - code coverage report
Current view: top level - src/bcs - HeatStructure2DCouplerBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 14 15 93.3 %
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 "HeatStructure2DCouplerBC.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", HeatStructure2DCouplerBC);
      14             : 
      15             : InputParameters
      16         390 : HeatStructure2DCouplerBC::validParams()
      17             : {
      18         390 :   InputParameters params = HeatStructure2DCouplerBCBase::validParams();
      19             : 
      20         780 :   params.addRequiredParam<FunctionName>("heat_transfer_coefficient",
      21             :                                         "Heat transfer coefficient function");
      22         780 :   params.addRequiredParam<Real>("coupling_area_fraction", "Coupling area fraction");
      23             : 
      24         390 :   params.addClassDescription("Applies BC for HeatStructure2DCoupler for plate heat structure");
      25             : 
      26         390 :   return params;
      27           0 : }
      28             : 
      29         210 : HeatStructure2DCouplerBC::HeatStructure2DCouplerBC(const InputParameters & parameters)
      30             :   : HeatStructure2DCouplerBCBase(parameters),
      31             : 
      32         210 :     _htc(getFunction("heat_transfer_coefficient")),
      33         630 :     _coupling_area_fraction(getParam<Real>("coupling_area_fraction"))
      34             : {
      35         210 : }
      36             : 
      37             : ADReal
      38      160000 : HeatStructure2DCouplerBC::computeQpResidual()
      39             : {
      40      160000 :   const auto T_coupled = computeCoupledTemperature();
      41      320000 :   return _htc.value(_t, _q_point[_qp]) * (_u[_qp] - T_coupled) * _coupling_area_fraction *
      42      160000 :          _test[_i][_qp];
      43             : }

Generated by: LCOV version 1.14