34 virtual void execute()
override;
DualNumber< Real, DNDerivativeType, true > ADReal
Base class for computing numerical fluxes for FlowModelSinglePhase.
Interface class for user objects that are connected to a shaft.
Computes and caches flux and residual vectors for a 1-phase compressor.
const std::string & _compressor_name
Compressor name.
static InputParameters validParams()
ADReal _speed_rel_corr
relative corrected shaft speed
const std::vector< Real > & _tau_fr_coeff
Compressor friction coefficients.
ADReal _dissipation_torque
Compressor dissipation torque.
ADReal _isentropic_torque
Compressor isentropic torque.
ADReal getCompressorDeltaP() const
Compressor head computed in the 1-phase shaft-connected compressor.
std::vector< DenseMatrix< Real > > _residual_jacobian_omega_var
Jacobian entries of junction variables wrt shaft variables.
const bool _treat_as_turbine
Treat the compressor as a turbine?
ADReal getEfficiency() const
Gets the efficiency.
const Real & _inertia_const
Compressor inertia constant.
virtual void execute() override
const Real & _omega_rated
Rated compressor speed.
const Real & _speed_cr_I
Compressor speed threshold for inertia.
ADReal getFrictionTorque() const
Friction torque computed in the 1-phase shaft-connected compressor.
ADReal getDissipationTorque() const
Dissipation torque computed in the 1-phase shaft-connected compressor.
virtual void initialize() override
const Real & _speed_cr_fr
Compressor speed threshold for friction.
const Real & _rho0_rated
Rated compressor inlet stagnation fluid density.
ADReal getRelativeCorrectedSpeed() const
Gets the elative corrected shaft speed.
const Real & _Rp_min
Minimum pressure ratio.
ADReal getPressureRatio() const
Gets the pressure ratio.
virtual void finalize() override
const Real & _mdot_rated
Rated compressor mass flow rate.
ADReal _friction_torque
Compressor friction torque.
const Real & _tau_fr_const
Compressor friction constant.
const ADVariableValue & _omega
Point _di_out
Direction of the compressor outlet.
std::vector< const Function * > _Rp_functions
Pressure ratio functions.
const std::vector< Real > & _speeds
Compressor speeds which correspond to Rp and eff function order.
ADReal _delta_p
Compressor delta p.
virtual void computeFluxesAndResiduals(const unsigned int &c) override
Computes and stores the fluxes, the scalar residuals, and their Jacobians.
std::vector< const Function * > _eff_functions
Adiabatic efficiency functions.
const Real & _c0_rated
Rated compressor inlet stagnation sound speed.
ADReal _Rp
Pressure ratio.
virtual void threadJoin(const UserObject &uo) override
const std::vector< Real > & _inertia_coeff
Compressor inertia coefficients.
const unsigned int _n_speeds
Size of vector _speeds.
const Real & _Rp_max
Maximum pressure ratio.
ADReal getRelativeCorrectedMassFlowRate() const
Gets the relative corrected mass flow rate.
ADReal _flow_rel_corr
relative corrected mass flow rate
const std::vector< FunctionName > & _Rp_function_names
Names of the pressure ratio functions.
ADReal getIsentropicTorque() const
Isentropic torque computed in the 1-phase shaft-connected compressor.
virtual void initialSetup() override
const std::vector< FunctionName > & _eff_function_names
Names of the adiabatic efficiency functions.
Computes and caches flux and residual vectors for a 1-phase volume junction.
Common class for single phase fluid properties.
VariableValueTempl< true > ADVariableValue