LCOV - code coverage report
Current view: top level - src/auxkernels - ADVectorVelocityComponentAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 17 19 89.5 %
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 "ADVectorVelocityComponentAux.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", ADVectorVelocityComponentAux);
      13             : 
      14             : InputParameters
      15       20034 : ADVectorVelocityComponentAux::validParams()
      16             : {
      17       20034 :   InputParameters params = AuxKernel::validParams();
      18       40068 :   params.addRequiredCoupledVar("arhoA", "alpha*rho*A");
      19       40068 :   params.addRequiredCoupledVar("arhouA", "alpha*rho*u*A");
      20       40068 :   params.addRequiredParam<MaterialPropertyName>("direction",
      21             :                                                 "Directional vector of 1D elements in 3D space");
      22       40068 :   params.addRequiredParam<unsigned int>("component", "The vector component of interest");
      23       20034 :   params.addClassDescription("Computes the velocity from the 1D phase-fraction and area weighted "
      24             :                              "momentum and density variables.");
      25       20034 :   return params;
      26           0 : }
      27             : 
      28       10950 : ADVectorVelocityComponentAux::ADVectorVelocityComponentAux(const InputParameters & parameters)
      29             :   : AuxKernel(parameters),
      30       10950 :     _arhoA(coupledValue("arhoA")),
      31       10950 :     _arhouA(coupledValue("arhouA")),
      32       10950 :     _dir(getMaterialProperty<RealVectorValue>("direction")),
      33       32850 :     _component(getParam<unsigned int>("component"))
      34             : {
      35       10950 :   if (isNodal())
      36           0 :     mooseError(name(), ": Does not support nodal variables.");
      37       10950 : }
      38             : 
      39             : Real
      40     1027830 : ADVectorVelocityComponentAux::computeValue()
      41             : {
      42     1027830 :   return _dir[_qp](_component) * _arhouA[_qp] / _arhoA[_qp];
      43             : }

Generated by: LCOV version 1.14