LCOV - code coverage report
Current view: top level - include/components - ShaftConnectedTurbine1Phase.h (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 2 2 100.0 %
Date: 2025-07-30 13:02:48 Functions: 1 1 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             : #pragma once
      11             : 
      12             : #include "VolumeJunction1Phase.h"
      13             : #include "ShaftConnectable.h"
      14             : 
      15             : /**
      16             :  * 1-phase turbine that must be connected to a Shaft component
      17             :  */
      18             : class ShaftConnectedTurbine1Phase : public VolumeJunction1Phase, public ShaftConnectable
      19             : {
      20             : public:
      21             :   ShaftConnectedTurbine1Phase(const InputParameters & params);
      22             : 
      23             :   virtual void addVariables() override;
      24             :   virtual void addMooseObjects() override;
      25         344 :   virtual UserObjectName getShaftConnectedUserObjectName() const override
      26             :   {
      27         344 :     return _junction_uo_name;
      28             :   }
      29             : 
      30             : protected:
      31             :   virtual void check() const override;
      32             :   virtual void buildVolumeJunctionUserObject() override;
      33             : 
      34             :   /// Turbine inlet
      35             :   const BoundaryName & _inlet;
      36             :   /// Turbine outlet
      37             :   const BoundaryName & _outlet;
      38             :   /// Rated turbine speed
      39             :   const Real & _omega_rated;
      40             :   /// Turbine wheel diameter
      41             :   const Real & _D_wheel;
      42             :   /// Turbine speed threshold for friction
      43             :   const Real & _speed_cr_fr;
      44             :   /// Turbine friction constant
      45             :   const Real & _tau_fr_const;
      46             :   /// Turbine friction coefficients
      47             :   const std::vector<Real> & _tau_fr_coeff;
      48             :   /// Turbine speed threshold for inertia
      49             :   const Real & _speed_cr_I;
      50             :   /// Turbine inertia constant
      51             :   const Real & _inertia_const;
      52             :   /// Turbine inertia coefficients
      53             :   const std::vector<Real> & _inertia_coeff;
      54             : 
      55             :   /// Name of function to compute data for turbine head
      56             :   const FunctionName & _head_coefficient;
      57             :   /// Name of function to compute data for turbine power
      58             :   const FunctionName & _power_coefficient;
      59             :   /// Name of turbine pressure drop variable
      60             :   const VariableName _delta_p_var_name;
      61             :   /// Name of turbine power variable
      62             :   const VariableName _power_var_name;
      63             :   /// Name of turbine driving torque variable
      64             :   const VariableName _driving_torque_var_name;
      65             :   /// Name of turbine friction torque variable
      66             :   const VariableName _friction_torque_var_name;
      67             :   /// Name of turbine flow_coeff torque variable
      68             :   const VariableName _flow_coeff_var_name;
      69             :   /// Name of turbine inertia variable
      70             :   const VariableName _moi_var_name;
      71             : 
      72             : public:
      73             :   static InputParameters validParams();
      74             : };

Generated by: LCOV version 1.14