LCOV - code coverage report
Current view: top level - src/postprocessors - EnergyFluxIntegral.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 15 16 93.8 %
Date: 2025-07-30 13:02:48 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 "EnergyFluxIntegral.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", EnergyFluxIntegral);
      13             : 
      14             : InputParameters
      15         513 : EnergyFluxIntegral::validParams()
      16             : {
      17         513 :   InputParameters params = SideIntegralPostprocessor::validParams();
      18         513 :   params.addClassDescription("Computes the integral of the energy flux over a boundary");
      19        1026 :   params.addRequiredCoupledVar("arhouA", "alpha*rho*u*A");
      20        1026 :   params.addRequiredCoupledVar("H", "Specific total enthalpy");
      21         513 :   return params;
      22           0 : }
      23             : 
      24         189 : EnergyFluxIntegral::EnergyFluxIntegral(const InputParameters & parameters)
      25             :   : SideIntegralPostprocessor(parameters),
      26         189 :     _arhouA(coupledValue("arhouA")),
      27         378 :     _enthalpy(coupledValue("H"))
      28             : {
      29         189 : }
      30             : 
      31             : void
      32          18 : EnergyFluxIntegral::threadJoin(const UserObject & y)
      33             : {
      34             :   const auto & pps = static_cast<const EnergyFluxIntegral &>(y);
      35          18 :   _integral_value += pps._integral_value;
      36          18 : }
      37             : 
      38             : Real
      39          48 : EnergyFluxIntegral::computeQpIntegral()
      40             : {
      41          48 :   return _arhouA[_qp] * _enthalpy[_qp];
      42             : }

Generated by: LCOV version 1.14