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

Generated by: LCOV version 1.14