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

Generated by: LCOV version 1.14