LCOV - code coverage report
Current view: top level - src/kernels - ADOneD3EqnMomentumFriction.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 19 20 95.0 %
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 "ADOneD3EqnMomentumFriction.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", ADOneD3EqnMomentumFriction);
      13             : 
      14             : InputParameters
      15        8918 : ADOneD3EqnMomentumFriction::validParams()
      16             : {
      17        8918 :   InputParameters params = ADKernel::validParams();
      18       17836 :   params.addRequiredCoupledVar("A", "Cross-sectional area");
      19       17836 :   params.addRequiredParam<MaterialPropertyName>("D_h", "Hydraulic diameter");
      20       17836 :   params.addRequiredParam<MaterialPropertyName>("rho", "Density property");
      21       17836 :   params.addRequiredParam<MaterialPropertyName>("vel", "Velocity property");
      22       17836 :   params.addRequiredParam<MaterialPropertyName>("f_D",
      23             :                                                 "Darcy friction factor coefficient property");
      24        8918 :   params.addClassDescription("Computes wall friction term for single phase flow.");
      25        8918 :   return params;
      26           0 : }
      27             : 
      28        4870 : ADOneD3EqnMomentumFriction::ADOneD3EqnMomentumFriction(const InputParameters & parameters)
      29             :   : ADKernel(parameters),
      30        4870 :     _A(adCoupledValue("A")),
      31        9740 :     _D_h(getADMaterialProperty<Real>("D_h")),
      32        9740 :     _rho(getADMaterialProperty<Real>("rho")),
      33        9740 :     _vel(getADMaterialProperty<Real>("vel")),
      34       14610 :     _f_D(getADMaterialProperty<Real>("f_D"))
      35             : {
      36        4870 : }
      37             : 
      38             : ADReal
      39     5233252 : ADOneD3EqnMomentumFriction::computeQpResidual()
      40             : {
      41     5233252 :   return 0.5 * _f_D[_qp] * _rho[_qp] * _vel[_qp] * std::abs(_vel[_qp]) * _A[_qp] / _D_h[_qp] *
      42    10466504 :          _test[_i][_qp];
      43             : }

Generated by: LCOV version 1.14