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

Generated by: LCOV version 1.14