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 compressor that must be connected to a Shaft component 17 : */ 18 : class ShaftConnectedCompressor1Phase : public VolumeJunction1Phase, public ShaftConnectable 19 : { 20 : public: 21 : ShaftConnectedCompressor1Phase(const InputParameters & params); 22 : 23 : virtual void addVariables() override; 24 : virtual void addMooseObjects() override; 25 1188 : virtual UserObjectName getShaftConnectedUserObjectName() const override 26 : { 27 1188 : return _junction_uo_name; 28 : } 29 : 30 : protected: 31 : virtual void check() const override; 32 : virtual void buildVolumeJunctionUserObject() override; 33 : 34 : /// Compressor inlet 35 : const BoundaryName & _inlet; 36 : /// Compressor outlet 37 : const BoundaryName & _outlet; 38 : /// Rated compressor speed 39 : const Real & _omega_rated; 40 : /// Rated compressor mass flow rate 41 : const Real & _mdot_rated; 42 : /// Rated compressor inlet stagnation fluid density 43 : const Real & _rho0_rated; 44 : /// Rated compressor inlet stagnation sound speed 45 : const Real & _c0_rated; 46 : /// Compressor speed threshold for friction 47 : const Real & _speed_cr_fr; 48 : /// Compressor friction constant 49 : const Real & _tau_fr_const; 50 : /// Compressor friction coefficients 51 : const std::vector<Real> & _tau_fr_coeff; 52 : /// Compressor speed threshold for inertia 53 : const Real & _speed_cr_I; 54 : /// Compressor inertia constant 55 : const Real & _inertia_const; 56 : /// Compressor inertia coefficients 57 : const std::vector<Real> & _inertia_coeff; 58 : 59 : /// Compressor speeds which correspond to Rp and eff function order 60 : const std::vector<Real> & _speeds; 61 : /// Names of the pressure ratio functions 62 : const std::vector<FunctionName> & _Rp_functions; 63 : /// Names of the adiabatic efficiency functions 64 : const std::vector<FunctionName> & _eff_functions; 65 : /// Name of compressor delta_p variable 66 : const VariableName _delta_p_var_name; 67 : /// Name of compressor isentropic torque variable 68 : const VariableName _isentropic_torque_var_name; 69 : /// Name of compressor dissipation torque variable 70 : const VariableName _dissipation_torque_var_name; 71 : /// Name of compressor friction torque variable 72 : const VariableName _friction_torque_var_name; 73 : /// Name of compressor inertia variable 74 : const VariableName _moi_var_name; 75 : 76 : public: 77 : static InputParameters validParams(); 78 : };