20 #ifndef AMO_TOOLS_SUITE_COMPRESSEDAIRCENTRIFUGAL_H 21 #define AMO_TOOLS_SUITE_COMPRESSEDAIRCENTRIFUGAL_H 23 #include "CurveFitVal.h" 43 Output(
double kW_Calc,
double C_Calc,
double PerkW,
double C_Per) : kW_Calc(kW_Calc), C_Calc(C_Calc), PerkW(PerkW), C_Per(C_Per){}
46 double kW_Calc = 0, C_Calc = 0, PerkW = 0, C_Per = 0;
51 OutputBlowOff(
double kW_Calc,
double C_Calc,
double PerkW,
double C_Per,
double C_blow,
double blowPer) : kW_Calc(kW_Calc), C_Calc(C_Calc), PerkW(PerkW), C_Per(C_Per), C_blow(C_blow), blowPer(blowPer){}
53 OutputBlowOff() =
default;
54 double kW_Calc = 0, C_Calc = 0, PerkW = 0, C_Per = 0, C_blow = 0, blowPer = 0;
57 static double Round(
double value) {
return (
float)((int)(value * 100 + .5)) / 100; }
62 const double kW_fl, C_fl_raw;
78 virtual void AdjustDischargePressure(std::vector<double>, std::vector<double>,
double,
double) {}
88 double C_fl_Adjusted = 0;
92 CPer_blow = C_blow / C_fl;
93 kWPer_blow = kW_blow / kW_fl;
102 void AdjustDischargePressure(std::vector<double> Capacity, std::vector<double> DischargePressure,
double P_fl,
double P_max = 0)
override {
104 CurveFitVal curveFitValCap(DischargePressure, Capacity, 2);
105 C_fl_Adjusted = C_fl = curveFitValCap.calculate(P_fl);
107 CPer_blow = C_blow / C_fl;
113 double CPer_blow = 1;
114 double kWPer_blow = 0;
119 double C_fl_Adjusted = 0;
123 kWPer_nl = kW_nl / kW_fl;
132 void AdjustDischargePressure(std::vector<double> Capacity, std::vector<double> DischargePressure,
double P_fl,
double P_max = 0)
override {
134 CurveFitVal curveFitValCap(DischargePressure, Capacity, 2);
135 C_fl_Adjusted = C_fl = curveFitValCap.calculate(P_fl);
140 const double CPer_fl = 1;
141 const double CPer_nl = 0;
147 double C_fl_Adjusted = 0;
148 double C_max_Adjusted = 0;
150 CompressedAirCentrifugal_ModulationUnload(
const double kW_fl,
const double C_fl,
const double kW_nl,
const double C_max,
const double kW_ul,
const double C_ul):
CompressedAirCentrifugalBase(kW_fl, C_fl), C_max(C_max), C_max_raw(C_max), C_ul(C_ul), C_fl_Adjusted(C_fl), C_max_Adjusted(C_max)
152 kWPer_nl = kW_nl / kW_fl;
153 kWPer_ul = kW_ul / kW_fl;
154 CPer_max = C_max / C_fl;
155 CPer_ul = C_ul / C_fl;
156 CPer_ulB = C_ul / C_max;
165 void AdjustDischargePressure(std::vector<double> Capacity, std::vector<double> DischargePressure,
double P_fl,
double P_max)
override {
166 if(P_fl > 0 || P_max > 0) {
167 CurveFitVal curveFitValCap(DischargePressure, Capacity, 2);
169 if(P_fl > 0) C_fl_Adjusted = C_fl = curveFitValCap.calculate(P_fl);
170 if(P_max > 0) C_max_Adjusted = C_max = curveFitValCap.calculate(P_max);
172 CPer_max = C_max / C_fl;
173 CPer_ul = C_ul / C_fl;
174 CPer_ulB = C_ul / C_max;
179 const double kWPer_max = 1, C_max_raw = 1, C_ul = 1;
186 const double CPer_nl = 0;
188 #endif //AMO_TOOLS_SUITE_COMPRESSEDAIRCENTRIFUGAL_H