MEASUR-Tools-Suite v1.0.11
The MEASUR Tools Suite is a collection of industrial efficiency calculations written in C++ and with bindings for compilation to WebAssembly.
Loading...
Searching...
No Matches
Compressors.h
Go to the documentation of this file.
1#pragma once
2
35#include <math.h>
36
37#include <iostream>
38#include <stdexcept>
39
40#include "util/CurveFitVal.h"
41
43 public:
44 enum CompressorType { Centrifugal, Screw, Reciprocating };
45
46 enum ControlType {
47 LoadUnload,
48 ModulationUnload,
49 BlowOff,
50 ModulationWOUnload,
51 StartStop,
52 VariableDisplacementUnload,
53 MultiStepUnloading,
54 VFD
55 };
56
57 enum Stage { Single, Two, Multiple };
58
59 enum Lubricant { Injected, Free, None };
60
61 enum Modulation { Throttle, VariableDisplacement };
62
63 enum ComputeFrom { PercentagePower, PercentageCapacity, PowerMeasured, CapacityMeasured, PowerFactor };
64
65 struct Output {
66 Output(double kW_Calc, double C_Calc, double PerkW, double C_Per)
67 : kW_Calc(kW_Calc), C_Calc(C_Calc), PerkW(PerkW), C_Per(C_Per) {}
68
69 Output() = default;
70 double kW_Calc = 0, C_Calc = 0, PerkW = 0, C_Per = 0;
71 };
72
74 OutputBlowOff(double kW_Calc, double C_Calc, double PerkW, double C_Per, double C_blow, double blowPer)
75 : kW_Calc(kW_Calc), C_Calc(C_Calc), PerkW(PerkW), C_Per(C_Per), C_blow(C_blow), blowPer(blowPer) {}
76
77 OutputBlowOff() = default;
78 double kW_Calc = 0, C_Calc = 0, PerkW = 0, C_Per = 0, C_blow = 0, blowPer = 0;
79 };
80
81 public:
82 int getC_fl_Adjusted() const { return C_fl_Adjusted; }
83 int getkW_fl_Adjusted() const { return kW_fl_Adjusted; }
84 int getC_max_Adjusted() const { return C_max_Adjusted; }
85 int getkW_max_Adjusted() const { return kW_max_Adjusted; }
86
87 protected:
88 CompressorsBase(const double kW_fl, const double C_fl)
89 : kW_fl(kW_fl), C_fl(C_fl), C_fl_raw(C_fl), kW_fl_raw(kW_fl), kW_fl_Adjusted(kW_fl), C_fl_Adjusted(C_fl),
90 C_max_Adjusted(0), kW_max_Adjusted(0) {}
91
92 double kW_fl, C_fl;
93 const double C_fl_raw, kW_fl_raw;
94
95 public:
96 double kW_fl_Adjusted;
97 double C_fl_Adjusted;
98 double C_max_Adjusted;
99 double kW_max_Adjusted;
100
101 private:
102 virtual CompressorsBase::OutputBlowOff calculateFromPerkW_BlowOff(double, double) { return OutputBlowOff(); }
103 virtual CompressorsBase::OutputBlowOff calculateFromPerC_BlowOff(double) { return OutputBlowOff(); }
104 virtual CompressorsBase::OutputBlowOff calculateFromkWMeasured_BlowOff(double, double) { return OutputBlowOff(); }
105 virtual CompressorsBase::OutputBlowOff calculateFromCMeasured_BlowOff(double) { return OutputBlowOff(); }
106 virtual CompressorsBase::OutputBlowOff calculateFromVIPFMeasured_BlowOff(double, double, double, double) {
107 return OutputBlowOff();
108 }
109
110 virtual CompressorsBase::Output calculateFromPerkW(double) { return Output(); }
111 virtual CompressorsBase::Output calculateFromPerC(double) { return Output(); }
112 virtual CompressorsBase::Output calculateFromkWMeasured(double) { return Output(); }
113 virtual CompressorsBase::Output calculateFromCMeasured(double) { return Output(); }
114 virtual CompressorsBase::Output calculateFromVIPFMeasured(double, double, double) { return Output(); }
115
116 virtual void AdjustDischargePressure(std::vector<double>, std::vector<double>, double, double) {}
117
118 protected:
119 void PressureInletCorrection(CompressorType CompType, const double capacity, const double full_load_bhp,
120 const double poly_exponent, const double P_ratedDischarge, const double P_RatedIn,
121 const double Eff, const double P_fl, const double P_max, const double P_in,
122 const bool PresAdj, const double P_atm) {
123 double kW = 0, Cap = 0;
124
125 PressureInletCorrection(Cap, kW, CompType, capacity, full_load_bhp, poly_exponent, P_ratedDischarge, P_RatedIn,
126 Eff, P_fl, P_in, PresAdj, P_atm);
127 kW_fl_Adjusted = kW_fl = kW;
128 C_fl_Adjusted = C_fl = Cap;
129
130 PressureInletCorrection(Cap, kW, CompType, capacity, full_load_bhp, poly_exponent, P_ratedDischarge, P_RatedIn,
131 Eff, P_max, P_in, PresAdj, P_atm);
132 kW_max_Adjusted = kW;
133 C_max_Adjusted = Cap;
134 }
135
136 double roundDouble(double value) const;
137
138 private:
139 void PressureInletCorrection(double& cap, double& kW, CompressorType CompType, const double capacity,
140 const double full_load_bhp, const double poly_exponent, const double P_ratedDischarge,
141 const double P_RatedIn, const double Eff, const double dischargePres,
142 const double P_in, const bool PresAdj, const double P_atm) {
143 if (CompType == CompressorType::Centrifugal)
144 return;
145
146 double Pres_kW = 1, Pres_Flow = 1;
147 if (PresAdj) {
148 Pres_kW = -0.0000577 * pow(P_atm, 3) + 0.000251 * pow(P_atm, 2) + 0.0466 * P_atm + 0.4442;
149 Pres_Flow = 0.000258 * pow(P_atm, 3) - 0.0116 * pow(P_atm, 2) + 0.176 * P_atm + 0.09992;
150 }
151
152 kW = (Pres_kW * (P_atm / P_in) * full_load_bhp * 0.746 / Eff *
153 PressureInletCorrection_PressRatio(poly_exponent, (P_ratedDischarge + P_RatedIn) / P_RatedIn,
154 dischargePres, CompType == CompressorType::Screw ? P_RatedIn : P_atm));
155 cap = (Pres_Flow * capacity * (1 - 0.00075 * (dischargePres - P_ratedDischarge)));
156 }
157
158 double PressureInletCorrection_PressRatio(double poly_exponent, double PressRatio1, double OpPress,
159 double P_PressRatio2) {
160 double PressRatio2 = (OpPress + P_PressRatio2) / P_PressRatio2;
161 double PolyPower = ((poly_exponent - 1) / poly_exponent);
162 return (pow(PressRatio2, PolyPower) - 1) / (pow(PressRatio1, PolyPower) - 1);
163 }
164};
165
167 public:
168 Compressors(const double kW_fl, const double C_fl) : CompressorsBase(kW_fl, C_fl) {}
169};
170
172 public:
181 Compressors_Centrifugal_BlowOff(const double kW_fl, const double C_fl, const double kW_blow, const double C_blow)
182 : CompressorsBase(kW_fl, C_fl), C_blow(C_blow) {
183 CPer_blow = C_blow / C_fl;
184 kWPer_blow = kW_blow / kW_fl;
185 }
186
200 CompressorsBase::OutputBlowOff calculateFromPerkW_BlowOff(double PerkW, double blowPer) override;
201
215
230
260 double blowPer) override;
261
271 void AdjustDischargePressure(std::vector<double> Capacity, std::vector<double> DischargePressure, double P_fl,
272 double P_max = 0) override {
273 P_max = P_max; // keep or fix unused variable
274 if (P_fl > 0) {
275 CurveFitVal curveFitValCap(DischargePressure, Capacity, 2);
276 C_fl_Adjusted = C_fl = curveFitValCap.calculate(P_fl);
277
278 CPer_blow = C_blow / C_fl;
279 }
280 }
281
282 private:
283 double C_blow = 1;
284 double CPer_blow = 1;
285 double kWPer_blow = 0;
286};
287
289 public:
297 Compressors_Centrifugal_LoadUnload(const double kW_fl, const double C_fl, const double kW_nl)
298 : CompressorsBase(kW_fl, C_fl) {
299 kWPer_nl = kW_nl / kW_fl;
300 }
301
314
327
340
353
368 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
369
379 void AdjustDischargePressure(std::vector<double> Capacity, std::vector<double> DischargePressure, double P_fl,
380 double P_max = 0) override {
381 P_max = P_max; // keep or fix unused variable
382 if (P_fl > 0) {
383 CurveFitVal curveFitValCap(DischargePressure, Capacity, 2);
384 C_fl_Adjusted = C_fl = curveFitValCap.calculate(P_fl);
385 }
386 }
387
388 private:
389 const double CPer_fl = 1;
390 const double CPer_nl = 0;
391 double kWPer_nl = 0;
392};
393
395 public:
406 Compressors_Centrifugal_ModulationUnload(const double kW_fl, const double C_fl, const double kW_nl,
407 const double C_max, const double kW_ul, const double C_ul)
408 : CompressorsBase(kW_fl, C_fl), C_max(C_max), C_max_raw(C_max), C_ul(C_ul) {
409 C_max_Adjusted = C_max;
410
411 kWPer_nl = kW_nl / kW_fl;
412 kWPer_ul = kW_ul / kW_fl;
413 CPer_max = C_max / C_fl;
414 CPer_ul = C_ul / C_fl;
415 CPer_ulB = C_ul / C_max;
416 }
417
430
455
468
483 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
484
494 void AdjustDischargePressure(std::vector<double> Capacity, std::vector<double> DischargePressure, double P_fl,
495 double P_max) override {
496 if (P_fl > 0 || P_max > 0) {
497 CurveFitVal curveFitValCap(DischargePressure, Capacity, 2);
498
499 if (P_fl > 0)
500 C_fl_Adjusted = C_fl = curveFitValCap.calculate(P_fl);
501 if (P_max > 0)
502 C_max_Adjusted = C_max = curveFitValCap.calculate(P_max);
503
504 CPer_max = C_max / C_fl;
505 CPer_ul = C_ul / C_fl;
506 CPer_ulB = C_ul / C_max;
507 }
508 }
509
510 private:
511 double C_max = 1;
512 const double kWPer_max = 1, C_max_raw = 1, C_ul = 1;
513 double kWPer_nl = 0;
514 double kWPer_ul = 1;
515 double CPer_max = 1;
516 double CPer_ul = 1;
517 double CPer_ulB = 1;
518 const double CPer_nl = 0;
519};
520
522 public:
535 Compressors_ModulationWOUnload(const double kW_fl, const double C_fl, const double kW_nl, const double mod_exp = 1,
536 const bool woUnload = true, const CompressorType CompType = CompressorType::Screw,
537 double noLoadPowerFM = .7, const double kW_max = 0)
538 : CompressorsBase(kW_fl, C_fl), kW_nl(kW_nl), mod_exp(mod_exp), woUnload(woUnload), CompType(CompType),
539 noLoadPowerFM(noLoadPowerFM), kW_max(kW_max) {
540 lf_nl = kW_nl / kW_fl;
541 }
542
555
568
581
594
609 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
610
627 void Pressure_InletCorrection(const double capacity, const double full_load_bhp, const double poly_exponent,
628 const double P_ratedDischarge, const double P_RatedIn, const double Eff,
629 const double P_fl, const double P_max, const double P_in, const bool PresAdj,
630 const double P_atm = 14.69) {
631 PressureInletCorrection(CompType, capacity, full_load_bhp, poly_exponent, P_ratedDischarge, P_RatedIn, Eff,
632 P_fl, P_max, P_in, PresAdj, P_atm);
633 }
634
635 private:
636 const double kW_nl = 1;
637 const double mod_exp = 1;
638 const bool woUnload = true;
639 const CompressorType CompType;
640 double lf_nl = 0;
641 double noLoadPowerFM;
642 double kW_max;
643};
644
646 public:
655 Compressors_StartStop(const double kW_fl, const double C_fl, const double kWPer_max, const double kWPer_fl)
656 : CompressorsBase(kW_fl, C_fl), kWPer_max(kWPer_max), kWPer_fl(kWPer_fl) {
657 kW_max = kWPer_max * kW_fl;
658 }
659
672
685
698
711
726 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
727
744 void Pressure_InletCorrection(const double capacity, const double full_load_bhp, const double poly_exponent,
745 const double P_ratedDischarge, const double P_RatedIn, const double Eff,
746 const double P_fl, const double P_max, const double P_in, const bool PresAdj,
747 const double P_atm = 14.69) {
748 PressureInletCorrection(CompressorType::Screw, capacity, full_load_bhp, poly_exponent, P_ratedDischarge,
749 P_RatedIn, Eff, P_fl, P_max, P_in, PresAdj, P_atm);
750
751 kW_max = kWPer_max * kW_fl;
752 //???? kW_max = kW_max_Adjusted;
753 }
754
755 private:
756 const double kWPer_max = 1, kWPer_fl = 1;
757 double kW_max;
758};
759
761 public:
786 Compressors_LoadUnload(const double kW_fl, const double C_fl, const double C_storage, const double kW_max,
787 const double P_fl, const double P_max, const double P_mod, const double lf_ul,
788 const double P_atm = 14.7, const CompressorType CompType = CompressorType::Reciprocating,
789 const Lubricant LubricantType = Lubricant::None,
790 ControlType CntrlType = ControlType::LoadUnload, const double kW_nl = 1,
791 const double PerC_ul = 100, double t_blowdown = .003, double P_sump_ul = 15,
792 double noLoadPowerFM = .7, double kW_ul = 0, double P_ul = 0, double C_ul = 0)
793 : CompressorsBase(kW_fl, C_fl), kW_max(kW_max), P_atm(P_atm), P_fl(P_fl), P_max(P_max), P_mod(P_mod),
794 CompType(CompType), LubricantType(LubricantType), CntrlType(CntrlType), lf_nl(kW_nl / kW_fl),
795 C_storage(C_storage), kW_nl(kW_nl), PerC_ul(PerC_ul), t_blowdown(t_blowdown), P_sump_ul(P_sump_ul),
796 noLoadPowerFM(noLoadPowerFM), kW_ul(kW_ul), P_ul(P_ul), C_ul(C_ul) {
797 double lf_ul_ = lf_ul;
798 lf_ul_ = lf_ul_; // keep or fix unused variable
799 if (CompType == CompressorType::Screw && LubricantType == Lubricant::None)
800 throw std::invalid_argument("Lubricant needs to be Injected or free for Screw Compressor Type");
801
802 setNoLoadPowerFM(noLoadPowerFM, LubricantType, CntrlType);
803 setModExp(CntrlType);
804 if (CompType == CompressorType::Screw) {
805 if (LubricantType == Lubricant::Injected) {
806 t_sdt = 2;
807 t_reload = 3;
808 }
809 else if (LubricantType == Lubricant::Free) {
810 t_sdt = .004;
811 t_reload = .001;
812 setBlowdown(.003);
813 setUnloadSumpPressure(15);
814 }
815 }
816 else if (CompType == CompressorType::Reciprocating) {
817 t_sdt = .004;
818 t_reload = .001;
819 setBlowdown(.003);
820 setUnloadSumpPressure(15);
821 }
822
823 // if not modulation unload set unload points
824 if (CntrlType != ControlType::ModulationUnload) {
825 setC_ul();
826 setKW_ul();
827 setP_ul();
828 }
829 }
830
831 void setBlowdown(double blowdown) { t_blowdown = blowdown; }
832
833 void setUnloadSumpPressure(double sumpPressure) { P_sump_ul = sumpPressure; }
834
835 void setNoLoadPowerFM(double noLoadPowerFM, Lubricant LubricantType, ControlType ControlType) {
836 if (LubricantType == Lubricant::Injected && ControlType == ControlType::LoadUnload) {
837 lf_fl = .92;
838 }
839 else {
840 lf_fl = noLoadPowerFM;
841 }
842 }
843
844 void setC_ul() { C_ul = C_fl * PerC_ul / 100; }
845
846 void setKW_ul() {
847 double kW_maxmod = lf_fl * kW_max;
848 kW_ul = (kW_max - kW_maxmod) * pow(C_ul / C_fl, mod_exp) + kW_maxmod;
849 }
850
851 void setP_ul() { P_ul = P_max + (1 - (C_ul / C_fl)) * P_mod; }
852
853 void setModExp(ControlType ControlType) {
854 /*Throttle=1, Variable Displacement=2*/;
855 if (ControlType == ControlType::VariableDisplacementUnload) {
856 mod_exp = 2;
857 }
858 else {
859 mod_exp = 1;
860 }
861 }
862
874
886
898
910
924 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
925
941 void Pressure_InletCorrection(const double capacity, const double full_load_bhp, const double poly_exponent,
942 const double P_ratedDischarge, const double P_RatedIn, const double Eff,
943 const double P_fl, const double P_max, const double P_in, const bool PresAdj,
944 const double P_atm = 14.69) {
945 PressureInletCorrection(CompressorType::Screw, capacity, full_load_bhp, poly_exponent, P_ratedDischarge,
946 P_RatedIn, Eff, P_fl, P_max, P_in, PresAdj, P_atm);
947
948 kW_max = kW_max_Adjusted;
949 }
950
951 private:
952 double kW_max;
953 const double P_atm, P_fl, P_max, P_mod;
954 const double P_range = 0;
955 CompressorType CompType;
956 Lubricant LubricantType;
957 ControlType CntrlType;
958 const double lf_nl, C_storage, kW_nl = 1;
959
960 double PerC_ul = 100, t_blowdown = 0.003, P_sump_ul = 15, t_sdt = 0.004, a_tol = 0.02, t_reload = 0.001,
961 lf_fl = 0.7;
962 double noLoadPowerFM, kW_ul, P_ul, C_ul, mod_exp /*Throttle=1, Variable Displacement=2*/;
963
964 double CurveFit(double, bool) const;
965};
966
968 public:
990 Compressors_ModulationWithUnload(const double kW_fl, const double C_fl, const double C_storage, const double kW_max,
991 const double kW_nl, const double P_fl, const double P_max, const double P_mod,
992 const double P_atm = 14.7, const double PerC_ul = 100,
993 Compressors::ControlType CntrlType = Compressors::VariableDisplacementUnload,
994 const double t_blowdown = .003, const double P_sump_ul = 15,
995 const double noLoadPowerFM = .7, double kW_ul = 0, double P_ul = 0,
996 double C_ul = 0)
997 : Compressors_LoadUnload(kW_fl, C_fl, C_storage, kW_max, P_fl, P_max, P_mod, 1, P_atm, Compressors::Screw,
998 Compressors::Injected, CntrlType, kW_nl, PerC_ul, t_blowdown, P_sump_ul, noLoadPowerFM,
999 kW_ul, P_ul, C_ul) {}
1000};
1001
1003 public:
1004 Compressor_VFD(const double fullLoadPower, const double midTurndownPower, const double turndownPower,
1005 const double noLoadPower, const double capacityFullFload, const double midTurndownAirflow,
1006 const double turndownAirflow)
1007 : CompressorsBase(fullLoadPower, capacityFullFload), noLoadPower(noLoadPower) {
1008 turndownPercentPower = turndownPower / fullLoadPower;
1009 noLoadPercentPower = noLoadPower / fullLoadPower;
1010 midTurndownPercentPower = midTurndownPower / fullLoadPower;
1011
1012 turndownPercentCapacity = turndownAirflow / capacityFullFload;
1013 midTurndownPercentCapacity = midTurndownAirflow / capacityFullFload;
1014 }
1015
1028
1053
1066
1081 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
1082
1083 private:
1084 double turndownPercentPower;
1085 double noLoadPercentPower;
1086 double midTurndownPercentPower;
1087 double turndownPercentCapacity;
1088 double midTurndownPercentCapacity;
1089 double noLoadPower;
1090};
1091
1093 public:
1095 ReduceAirLeaksOutput(double C_lkred, double C_usage_lkred, double PerC_lkred)
1096 : C_lkred(C_lkred), C_usage_lkred(C_usage_lkred), PerC_lkred(PerC_lkred) {}
1097
1098 ReduceAirLeaksOutput() = default;
1099 double C_lkred = 0, C_usage_lkred = 0, PerC_lkred = 0;
1100 };
1101
1103 ImproveEndUseEfficiencyOutput(double C_af_red, double CPer_af_red)
1104 : C_af_red(C_af_red), CPer_af_red(CPer_af_red) {}
1105
1107 double C_af_red = 0, CPer_af_red = 0;
1108 };
1109
1111 ReduceSystemAirPressureOutput(double P_fl_rpred, double kW_fl_rpadj, double C_usage_rpred, double PerC_rpred)
1112 : P_fl_rpred(P_fl_rpred), kW_fl_rpadj(kW_fl_rpadj), C_usage_rpred(C_usage_rpred), PerC_rpred(PerC_rpred) {}
1113
1115 double P_fl_rpred = 0, kW_fl_rpadj = 0, C_usage_rpred = 0, PerC_rpred = 0;
1116 };
1117
1119 AdjustCascadingSetPointOutput(double kW_fl_adj, double C_usage_adj, double PerC_adj)
1120 : kW_fl_adj(kW_fl_adj), C_usage_adj(C_usage_adj), PerC_adj(PerC_adj) {}
1121
1123 double kW_fl_adj = 0, C_usage_adj = 0, PerC_adj = 0;
1124 };
1125
1127 PressureReductionSavingOutput(double kW_savings, double kWh_savings, double cost_savings)
1128 : kW_savings(kW_savings), kWh_savings(kWh_savings), cost_savings(cost_savings) {}
1129
1131 double kW_savings = 0, kWh_savings = 0, cost_savings = 0;
1132 };
1133
1147 static ReduceAirLeaksOutput ReduceAirLeaks(double C_fl, double C_usage, double C_lk, double PerC_lkred) {
1148 const double C_lkred = PerC_lkred * C_lk;
1149 const double C_usage_lkred = C_usage - C_lkred;
1150
1151 return ReduceAirLeaksOutput(C_lkred, C_usage_lkred, C_usage_lkred / C_fl);
1152 }
1153
1165 static ImproveEndUseEfficiencyOutput ImproveEndUseEfficiency(double C_fl, double C_usage, double C_avgaf_red) {
1166 const double C_af_red = C_usage - C_avgaf_red;
1167 return ImproveEndUseEfficiencyOutput(C_af_red, C_af_red / C_fl);
1168 }
1169
1187 static ReduceSystemAirPressureOutput ReduceSystemAirPressure(double C_fl, double C_usage, double P_fl, double kW_fl,
1188 double P_rpred, double P_alt = 14.69,
1189 double P_atm = 14.69) {
1190 const double P_fl_rpred = P_fl - P_rpred;
1191 const double kW_fl_rpadj =
1192 kW_fl * ((pow((P_fl_rpred + P_alt) / P_alt, 0.283) - 1) / (pow((P_fl + P_atm) / P_atm, 0.283) - 1));
1193 const double C_usage_rpred = (C_usage - (C_usage - (C_usage * ((P_fl_rpred + P_alt) / (P_fl + P_atm)))) * 0.6);
1194
1195 return ReduceSystemAirPressureOutput(P_fl_rpred, kW_fl_rpadj, C_usage_rpred, C_usage_rpred / C_fl);
1196 }
1197
1214 static AdjustCascadingSetPointOutput AdjustCascadingSetPoint(double C_fl, double C_usage, double P_fl, double kW_fl,
1215 double P_fl_adj, double P_alt = 14.69,
1216 double P_atm = 14.69) {
1217 const double kW_fl_adj =
1218 kW_fl * ((pow((P_fl_adj + P_alt) / P_alt, 0.283) - 1) / (pow((P_fl + P_atm) / P_atm, 0.283) - 1));
1219 const double C_usage_adj = (C_usage - (C_usage - (C_usage * ((P_fl_adj + P_alt) / (P_fl + P_atm)))) * 0.6);
1220
1221 return AdjustCascadingSetPointOutput(kW_fl_adj, C_usage_adj, C_usage_adj / C_fl);
1222 }
1223
1241 static PressureReductionSavingOutput PressureReductionSaving(double operatingHours, double costPerkWh,
1242 double kW_fl_rated, double P_fl_rated,
1243 double dischargePresBaseline, double dischargePresMod,
1244 double P_alt = 14.69, double P_atm = 14.69) {
1245 const double kW_savings = kWAdjusted(kW_fl_rated, P_fl_rated, dischargePresBaseline, P_alt, P_atm) -
1246 kWAdjusted(kW_fl_rated, P_fl_rated, dischargePresMod, P_alt, P_atm);
1247 const double kWh_savings = kW_savings * operatingHours;
1248 return PressureReductionSavingOutput(kW_savings, kWh_savings, kWh_savings * costPerkWh);
1249 }
1250
1262 static double kWAdjusted(double kW_fl_rated, double P_fl_rated, double P_discharge, double P_alt = 14.69,
1263 double P_atm = 14.69) {
1264 return kW_fl_rated *
1265 ((pow((P_discharge + P_alt) / P_alt, 0.283) - 1) / (pow((P_fl_rated + P_atm) / P_atm, 0.283) - 1));
1266 }
1267};
static ReduceAirLeaksOutput ReduceAirLeaks(double C_fl, double C_usage, double C_lk, double PerC_lkred)
static ReduceSystemAirPressureOutput ReduceSystemAirPressure(double C_fl, double C_usage, double P_fl, double kW_fl, double P_rpred, double P_alt=14.69, double P_atm=14.69)
static ImproveEndUseEfficiencyOutput ImproveEndUseEfficiency(double C_fl, double C_usage, double C_avgaf_red)
static double kWAdjusted(double kW_fl_rated, double P_fl_rated, double P_discharge, double P_alt=14.69, double P_atm=14.69)
static AdjustCascadingSetPointOutput AdjustCascadingSetPoint(double C_fl, double C_usage, double P_fl, double kW_fl, double P_fl_adj, double P_alt=14.69, double P_atm=14.69)
static PressureReductionSavingOutput PressureReductionSaving(double operatingHours, double costPerkWh, double kW_fl_rated, double P_fl_rated, double dischargePresBaseline, double dischargePresMod, double P_alt=14.69, double P_atm=14.69)
CompressorsBase::Output calculateFromCMeasured(double C) override
CompressorsBase::Output calculateFromPerC(double C_Per) override
CompressorsBase::Output calculateFromkWMeasured(double kW) override
CompressorsBase::Output calculateFromPerkW(double PerkW) override
CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override
CompressorsBase::OutputBlowOff calculateFromPerkW_BlowOff(double PerkW, double blowPer) override
CompressorsBase::OutputBlowOff calculateFromCMeasured_BlowOff(double C) override
void AdjustDischargePressure(std::vector< double > Capacity, std::vector< double > DischargePressure, double P_fl, double P_max=0) override
CompressorsBase::OutputBlowOff calculateFromkWMeasured_BlowOff(double kW, double blowPer) override
CompressorsBase::OutputBlowOff calculateFromVIPFMeasured_BlowOff(double V, double I, double PF, double blowPer) override
Compressors_Centrifugal_BlowOff(const double kW_fl, const double C_fl, const double kW_blow, const double C_blow)
CompressorsBase::OutputBlowOff calculateFromPerC_BlowOff(double C_Per) override
Compressors_Centrifugal_LoadUnload(const double kW_fl, const double C_fl, const double kW_nl)
void AdjustDischargePressure(std::vector< double > Capacity, std::vector< double > DischargePressure, double P_fl, double P_max=0) override
CompressorsBase::Output calculateFromCMeasured(double C) override
CompressorsBase::Output calculateFromPerkW(double PerkW) override
CompressorsBase::Output calculateFromPerC(double C_Per) override
CompressorsBase::Output calculateFromkWMeasured(double kW) override
CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override
CompressorsBase::Output calculateFromPerkW(double PerkW) override
void AdjustDischargePressure(std::vector< double > Capacity, std::vector< double > DischargePressure, double P_fl, double P_max) override
CompressorsBase::Output calculateFromPerC(double C_Per) override
CompressorsBase::Output calculateFromCMeasured(double C) override
CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override
CompressorsBase::Output calculateFromkWMeasured(double kW) override
Compressors_Centrifugal_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)
CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override
void Pressure_InletCorrection(const double capacity, const double full_load_bhp, const double poly_exponent, const double P_ratedDischarge, const double P_RatedIn, const double Eff, const double P_fl, const double P_max, const double P_in, const bool PresAdj, const double P_atm=14.69)
CompressorsBase::Output calculateFromCMeasured(double C) override
CompressorsBase::Output calculateFromkWMeasured(double kW) override
CompressorsBase::Output calculateFromPerkW(double PerkW) override
Compressors_LoadUnload(const double kW_fl, const double C_fl, const double C_storage, const double kW_max, const double P_fl, const double P_max, const double P_mod, const double lf_ul, const double P_atm=14.7, const CompressorType CompType=CompressorType::Reciprocating, const Lubricant LubricantType=Lubricant::None, ControlType CntrlType=ControlType::LoadUnload, const double kW_nl=1, const double PerC_ul=100, double t_blowdown=.003, double P_sump_ul=15, double noLoadPowerFM=.7, double kW_ul=0, double P_ul=0, double C_ul=0)
CompressorsBase::Output calculateFromPerC(double C_Per) override
CompressorsBase::Output calculateFromCMeasured(double C) override
CompressorsBase::Output calculateFromPerC(double C_Per) override
CompressorsBase::Output calculateFromkWMeasured(double kW) override
Compressors_ModulationWOUnload(const double kW_fl, const double C_fl, const double kW_nl, const double mod_exp=1, const bool woUnload=true, const CompressorType CompType=CompressorType::Screw, double noLoadPowerFM=.7, const double kW_max=0)
CompressorsBase::Output calculateFromPerkW(double PerkW) override
void Pressure_InletCorrection(const double capacity, const double full_load_bhp, const double poly_exponent, const double P_ratedDischarge, const double P_RatedIn, const double Eff, const double P_fl, const double P_max, const double P_in, const bool PresAdj, const double P_atm=14.69)
CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override
Compressors_ModulationWithUnload(const double kW_fl, const double C_fl, const double C_storage, const double kW_max, const double kW_nl, const double P_fl, const double P_max, const double P_mod, const double P_atm=14.7, const double PerC_ul=100, Compressors::ControlType CntrlType=Compressors::VariableDisplacementUnload, const double t_blowdown=.003, const double P_sump_ul=15, const double noLoadPowerFM=.7, double kW_ul=0, double P_ul=0, double C_ul=0)
void Pressure_InletCorrection(const double capacity, const double full_load_bhp, const double poly_exponent, const double P_ratedDischarge, const double P_RatedIn, const double Eff, const double P_fl, const double P_max, const double P_in, const bool PresAdj, const double P_atm=14.69)
CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override
CompressorsBase::Output calculateFromCMeasured(double C) override
CompressorsBase::Output calculateFromkWMeasured(double kW) override
CompressorsBase::Output calculateFromPerkW(double PerkW) override
CompressorsBase::Output calculateFromPerC(double C_Per) override
Compressors_StartStop(const double kW_fl, const double C_fl, const double kWPer_max, const double kWPer_fl)
Curve Fit class.
Definition CurveFitVal.h:19
double calculate() const