LCOV - code coverage report
Current view: top level - src/kernels - ADOneD3EqnMomentumGravity.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 16 17 94.1 %
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 "ADOneD3EqnMomentumGravity.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", ADOneD3EqnMomentumGravity);
      13             : 
      14             : InputParameters
      15        8918 : ADOneD3EqnMomentumGravity::validParams()
      16             : {
      17        8918 :   InputParameters params = ADKernel::validParams();
      18       17836 :   params.addRequiredCoupledVar("A", "Cross-sectional area");
      19       17836 :   params.addRequiredParam<MaterialPropertyName>(
      20             :       "direction", "The direction of the flow channel material property");
      21       17836 :   params.addRequiredParam<MaterialPropertyName>("rho", "Density property");
      22       17836 :   params.addRequiredParam<RealVectorValue>("gravity_vector", "Gravitational acceleration vector");
      23        8918 :   params.addClassDescription("Computes gravity term for the momentum equation for 1-phase flow");
      24        8918 :   return params;
      25           0 : }
      26             : 
      27        4870 : ADOneD3EqnMomentumGravity::ADOneD3EqnMomentumGravity(const InputParameters & parameters)
      28             :   : ADKernel(parameters),
      29        4870 :     _A(adCoupledValue("A")),
      30        9740 :     _rho(getADMaterialProperty<Real>("rho")),
      31        9740 :     _dir(getMaterialProperty<RealVectorValue>("direction")),
      32       14610 :     _gravity_vector(getParam<RealVectorValue>("gravity_vector"))
      33             : {
      34        4870 : }
      35             : 
      36             : ADReal
      37     5233252 : ADOneD3EqnMomentumGravity::computeQpResidual()
      38             : {
      39    15699756 :   return -_rho[_qp] * _A[_qp] * _gravity_vector * _dir[_qp] * _test[_i][_qp];
      40             : }

Generated by: LCOV version 1.14