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
33#ifndef TOOLS_SUITE_COMPRESSORS_H
34#define TOOLS_SUITE_COMPRESSORS_H
35
36#include <math.h>
37
38#include <iostream>
39#include <stdexcept>
40
41#include "util/CurveFitVal.h"
42
44 public:
45 enum CompressorType { Centrifugal, Screw, Reciprocating };
46
47 enum ControlType {
48 LoadUnload,
49 ModulationUnload,
50 BlowOff,
51 ModulationWOUnload,
52 StartStop,
53 VariableDisplacementUnload,
54 MultiStepUnloading,
55 VFD
56 };
57
58 enum Stage { Single, Two, Multiple };
59
60 enum Lubricant { Injected, Free, None };
61
62 enum Modulation { Throttle, VariableDisplacement };
63
64 enum ComputeFrom { PercentagePower, PercentageCapacity, PowerMeasured, CapacityMeasured, PowerFactor };
65
66 struct Output {
67 Output(double kW_Calc, double C_Calc, double PerkW, double C_Per)
68 : kW_Calc(kW_Calc), C_Calc(C_Calc), PerkW(PerkW), C_Per(C_Per) {}
69
70 Output() = default;
71 double kW_Calc = 0, C_Calc = 0, PerkW = 0, C_Per = 0;
72 };
73
75 OutputBlowOff(double kW_Calc, double C_Calc, double PerkW, double C_Per, double C_blow, double blowPer)
76 : kW_Calc(kW_Calc), C_Calc(C_Calc), PerkW(PerkW), C_Per(C_Per), C_blow(C_blow), blowPer(blowPer) {}
77
78 OutputBlowOff() = default;
79 double kW_Calc = 0, C_Calc = 0, PerkW = 0, C_Per = 0, C_blow = 0, blowPer = 0;
80 };
81
82 public:
83 int getC_fl_Adjusted() const { return C_fl_Adjusted; }
84 int getkW_fl_Adjusted() const { return kW_fl_Adjusted; }
85 int getC_max_Adjusted() const { return C_max_Adjusted; }
86 int getkW_max_Adjusted() const { return kW_max_Adjusted; }
87
88 protected:
89 CompressorsBase(const double kW_fl, const double C_fl)
90 : 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),
91 C_max_Adjusted(0), kW_max_Adjusted(0) {}
92
93 double kW_fl, C_fl;
94 const double C_fl_raw, kW_fl_raw;
95
96 public:
97 double kW_fl_Adjusted;
98 double C_fl_Adjusted;
99 double C_max_Adjusted;
100 double kW_max_Adjusted;
101
102 private:
103 virtual CompressorsBase::OutputBlowOff calculateFromPerkW_BlowOff(double, double) { return OutputBlowOff(); }
104 virtual CompressorsBase::OutputBlowOff calculateFromPerC_BlowOff(double) { return OutputBlowOff(); }
105 virtual CompressorsBase::OutputBlowOff calculateFromkWMeasured_BlowOff(double, double) { return OutputBlowOff(); }
106 virtual CompressorsBase::OutputBlowOff calculateFromCMeasured_BlowOff(double) { return OutputBlowOff(); }
107 virtual CompressorsBase::OutputBlowOff calculateFromVIPFMeasured_BlowOff(double, double, double, double) {
108 return OutputBlowOff();
109 }
110
111 virtual CompressorsBase::Output calculateFromPerkW(double) { return Output(); }
112 virtual CompressorsBase::Output calculateFromPerC(double) { return Output(); }
113 virtual CompressorsBase::Output calculateFromkWMeasured(double) { return Output(); }
114 virtual CompressorsBase::Output calculateFromCMeasured(double) { return Output(); }
115 virtual CompressorsBase::Output calculateFromVIPFMeasured(double, double, double) { return Output(); }
116
117 virtual void AdjustDischargePressure(std::vector<double>, std::vector<double>, double, double) {}
118
119 protected:
120 void PressureInletCorrection(CompressorType CompType, const double capacity, const double full_load_bhp,
121 const double poly_exponent, const double P_ratedDischarge, const double P_RatedIn,
122 const double Eff, const double P_fl, const double P_max, const double P_in,
123 const bool PresAdj, const double P_atm) {
124 double kW = 0, Cap = 0;
125
126 PressureInletCorrection(Cap, kW, CompType, capacity, full_load_bhp, poly_exponent, P_ratedDischarge, P_RatedIn,
127 Eff, P_fl, P_in, PresAdj, P_atm);
128 kW_fl_Adjusted = kW_fl = kW;
129 C_fl_Adjusted = C_fl = Cap;
130
131 PressureInletCorrection(Cap, kW, CompType, capacity, full_load_bhp, poly_exponent, P_ratedDischarge, P_RatedIn,
132 Eff, P_max, P_in, PresAdj, P_atm);
133 kW_max_Adjusted = kW;
134 C_max_Adjusted = Cap;
135 }
136
137 double roundDouble(double value) const;
138
139 private:
140 void PressureInletCorrection(double& cap, double& kW, CompressorType CompType, const double capacity,
141 const double full_load_bhp, const double poly_exponent, const double P_ratedDischarge,
142 const double P_RatedIn, const double Eff, const double dischargePres,
143 const double P_in, const bool PresAdj, const double P_atm) {
144 if (CompType == CompressorType::Centrifugal)
145 return;
146
147 double Pres_kW = 1, Pres_Flow = 1;
148 if (PresAdj) {
149 Pres_kW = -0.0000577 * pow(P_atm, 3) + 0.000251 * pow(P_atm, 2) + 0.0466 * P_atm + 0.4442;
150 Pres_Flow = 0.000258 * pow(P_atm, 3) - 0.0116 * pow(P_atm, 2) + 0.176 * P_atm + 0.09992;
151 }
152
153 kW = (Pres_kW * (P_atm / P_in) * full_load_bhp * 0.746 / Eff *
154 PressureInletCorrection_PressRatio(poly_exponent, (P_ratedDischarge + P_RatedIn) / P_RatedIn,
155 dischargePres, CompType == CompressorType::Screw ? P_RatedIn : P_atm));
156 cap = (Pres_Flow * capacity * (1 - 0.00075 * (dischargePres - P_ratedDischarge)));
157 }
158
159 double PressureInletCorrection_PressRatio(double poly_exponent, double PressRatio1, double OpPress,
160 double P_PressRatio2) {
161 double PressRatio2 = (OpPress + P_PressRatio2) / P_PressRatio2;
162 double PolyPower = ((poly_exponent - 1) / poly_exponent);
163 return (pow(PressRatio2, PolyPower) - 1) / (pow(PressRatio1, PolyPower) - 1);
164 }
165};
166
168 public:
169 Compressors(const double kW_fl, const double C_fl) : CompressorsBase(kW_fl, C_fl) {}
170};
171
173 public:
182 Compressors_Centrifugal_BlowOff(const double kW_fl, const double C_fl, const double kW_blow, const double C_blow)
183 : CompressorsBase(kW_fl, C_fl), C_blow(C_blow) {
184 CPer_blow = C_blow / C_fl;
185 kWPer_blow = kW_blow / kW_fl;
186 }
187
201 CompressorsBase::OutputBlowOff calculateFromPerkW_BlowOff(double PerkW, double blowPer) override;
202
216
231
261 double blowPer) override;
262
272 void AdjustDischargePressure(std::vector<double> Capacity, std::vector<double> DischargePressure, double P_fl,
273 double P_max = 0) override {
274 P_max = P_max; // keep or fix unused variable
275 if (P_fl > 0) {
276 CurveFitVal curveFitValCap(DischargePressure, Capacity, 2);
277 C_fl_Adjusted = C_fl = curveFitValCap.calculate(P_fl);
278
279 CPer_blow = C_blow / C_fl;
280 }
281 }
282
283 private:
284 double C_blow = 1;
285 double CPer_blow = 1;
286 double kWPer_blow = 0;
287};
288
290 public:
298 Compressors_Centrifugal_LoadUnload(const double kW_fl, const double C_fl, const double kW_nl)
299 : CompressorsBase(kW_fl, C_fl) {
300 kWPer_nl = kW_nl / kW_fl;
301 }
302
315
328
341
354
369 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
370
380 void AdjustDischargePressure(std::vector<double> Capacity, std::vector<double> DischargePressure, double P_fl,
381 double P_max = 0) override {
382 P_max = P_max; // keep or fix unused variable
383 if (P_fl > 0) {
384 CurveFitVal curveFitValCap(DischargePressure, Capacity, 2);
385 C_fl_Adjusted = C_fl = curveFitValCap.calculate(P_fl);
386 }
387 }
388
389 private:
390 const double CPer_fl = 1;
391 const double CPer_nl = 0;
392 double kWPer_nl = 0;
393};
394
396 public:
407 Compressors_Centrifugal_ModulationUnload(const double kW_fl, const double C_fl, const double kW_nl,
408 const double C_max, const double kW_ul, const double C_ul)
409 : CompressorsBase(kW_fl, C_fl), C_max(C_max), C_max_raw(C_max), C_ul(C_ul) {
410 C_max_Adjusted = C_max;
411
412 kWPer_nl = kW_nl / kW_fl;
413 kWPer_ul = kW_ul / kW_fl;
414 CPer_max = C_max / C_fl;
415 CPer_ul = C_ul / C_fl;
416 CPer_ulB = C_ul / C_max;
417 }
418
431
456
469
484 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
485
495 void AdjustDischargePressure(std::vector<double> Capacity, std::vector<double> DischargePressure, double P_fl,
496 double P_max) override {
497 if (P_fl > 0 || P_max > 0) {
498 CurveFitVal curveFitValCap(DischargePressure, Capacity, 2);
499
500 if (P_fl > 0)
501 C_fl_Adjusted = C_fl = curveFitValCap.calculate(P_fl);
502 if (P_max > 0)
503 C_max_Adjusted = C_max = curveFitValCap.calculate(P_max);
504
505 CPer_max = C_max / C_fl;
506 CPer_ul = C_ul / C_fl;
507 CPer_ulB = C_ul / C_max;
508 }
509 }
510
511 private:
512 double C_max = 1;
513 const double kWPer_max = 1, C_max_raw = 1, C_ul = 1;
514 double kWPer_nl = 0;
515 double kWPer_ul = 1;
516 double CPer_max = 1;
517 double CPer_ul = 1;
518 double CPer_ulB = 1;
519 const double CPer_nl = 0;
520};
521
523 public:
536 Compressors_ModulationWOUnload(const double kW_fl, const double C_fl, const double kW_nl, const double mod_exp = 1,
537 const bool woUnload = true, const CompressorType CompType = CompressorType::Screw,
538 double noLoadPowerFM = .7, const double kW_max = 0)
539 : CompressorsBase(kW_fl, C_fl), kW_nl(kW_nl), mod_exp(mod_exp), woUnload(woUnload), CompType(CompType),
540 noLoadPowerFM(noLoadPowerFM), kW_max(kW_max) {
541 lf_nl = kW_nl / kW_fl;
542 }
543
556
569
582
595
610 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
611
628 void Pressure_InletCorrection(const double capacity, const double full_load_bhp, const double poly_exponent,
629 const double P_ratedDischarge, const double P_RatedIn, const double Eff,
630 const double P_fl, const double P_max, const double P_in, const bool PresAdj,
631 const double P_atm = 14.69) {
632 PressureInletCorrection(CompType, capacity, full_load_bhp, poly_exponent, P_ratedDischarge, P_RatedIn, Eff,
633 P_fl, P_max, P_in, PresAdj, P_atm);
634 }
635
636 private:
637 const double kW_nl = 1;
638 const double mod_exp = 1;
639 const bool woUnload = true;
640 const CompressorType CompType;
641 double lf_nl = 0;
642 double noLoadPowerFM;
643 double kW_max;
644};
645
647 public:
656 Compressors_StartStop(const double kW_fl, const double C_fl, const double kWPer_max, const double kWPer_fl)
657 : CompressorsBase(kW_fl, C_fl), kWPer_max(kWPer_max), kWPer_fl(kWPer_fl) {
658 kW_max = kWPer_max * kW_fl;
659 }
660
673
686
699
712
727 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
728
745 void Pressure_InletCorrection(const double capacity, const double full_load_bhp, const double poly_exponent,
746 const double P_ratedDischarge, const double P_RatedIn, const double Eff,
747 const double P_fl, const double P_max, const double P_in, const bool PresAdj,
748 const double P_atm = 14.69) {
749 PressureInletCorrection(CompressorType::Screw, capacity, full_load_bhp, poly_exponent, P_ratedDischarge,
750 P_RatedIn, Eff, P_fl, P_max, P_in, PresAdj, P_atm);
751
752 kW_max = kWPer_max * kW_fl;
753 //???? kW_max = kW_max_Adjusted;
754 }
755
756 private:
757 const double kWPer_max = 1, kWPer_fl = 1;
758 double kW_max;
759};
760
762 public:
787 Compressors_LoadUnload(const double kW_fl, const double C_fl, const double C_storage, const double kW_max,
788 const double P_fl, const double P_max, const double P_mod, const double lf_ul,
789 const double P_atm = 14.7, const CompressorType CompType = CompressorType::Reciprocating,
790 const Lubricant LubricantType = Lubricant::None,
791 ControlType CntrlType = ControlType::LoadUnload, const double kW_nl = 1,
792 const double PerC_ul = 100, double t_blowdown = .003, double P_sump_ul = 15,
793 double noLoadPowerFM = .7, double kW_ul = 0, double P_ul = 0, double C_ul = 0)
794 : 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),
795 CompType(CompType), LubricantType(LubricantType), CntrlType(CntrlType), lf_nl(kW_nl / kW_fl),
796 C_storage(C_storage), kW_nl(kW_nl), PerC_ul(PerC_ul), t_blowdown(t_blowdown), P_sump_ul(P_sump_ul),
797 noLoadPowerFM(noLoadPowerFM), kW_ul(kW_ul), P_ul(P_ul), C_ul(C_ul) {
798 double lf_ul_ = lf_ul;
799 lf_ul_ = lf_ul_; // keep or fix unused variable
800 if (CompType == CompressorType::Screw && LubricantType == Lubricant::None)
801 throw std::invalid_argument("Lubricant needs to be Injected or free for Screw Compressor Type");
802
803 setNoLoadPowerFM(noLoadPowerFM, LubricantType, CntrlType);
804 setModExp(CntrlType);
805 if (CompType == CompressorType::Screw) {
806 if (LubricantType == Lubricant::Injected) {
807 t_sdt = 2;
808 t_reload = 3;
809 }
810 else if (LubricantType == Lubricant::Free) {
811 t_sdt = .004;
812 t_reload = .001;
813 setBlowdown(.003);
814 setUnloadSumpPressure(15);
815 }
816 }
817 else if (CompType == CompressorType::Reciprocating) {
818 t_sdt = .004;
819 t_reload = .001;
820 setBlowdown(.003);
821 setUnloadSumpPressure(15);
822 }
823
824 // if not modulation unload set unload points
825 if (CntrlType != ControlType::ModulationUnload) {
826 setC_ul();
827 setKW_ul();
828 setP_ul();
829 }
830 }
831
832 void setBlowdown(double blowdown) { t_blowdown = blowdown; }
833
834 void setUnloadSumpPressure(double sumpPressure) { P_sump_ul = sumpPressure; }
835
836 void setNoLoadPowerFM(double noLoadPowerFM, Lubricant LubricantType, ControlType ControlType) {
837 if (LubricantType == Lubricant::Injected && ControlType == ControlType::LoadUnload) {
838 lf_fl = .92;
839 }
840 else {
841 lf_fl = noLoadPowerFM;
842 }
843 }
844
845 void setC_ul() { C_ul = C_fl * PerC_ul / 100; }
846
847 void setKW_ul() {
848 double kW_maxmod = lf_fl * kW_max;
849 kW_ul = (kW_max - kW_maxmod) * pow(C_ul / C_fl, mod_exp) + kW_maxmod;
850 }
851
852 void setP_ul() { P_ul = P_max + (1 - (C_ul / C_fl)) * P_mod; }
853
854 void setModExp(ControlType ControlType) {
855 /*Throttle=1, Variable Displacement=2*/;
856 if (ControlType == ControlType::VariableDisplacementUnload) {
857 mod_exp = 2;
858 }
859 else {
860 mod_exp = 1;
861 }
862 }
863
875
887
899
911
925 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
926
942 void Pressure_InletCorrection(const double capacity, const double full_load_bhp, const double poly_exponent,
943 const double P_ratedDischarge, const double P_RatedIn, const double Eff,
944 const double P_fl, const double P_max, const double P_in, const bool PresAdj,
945 const double P_atm = 14.69) {
946 PressureInletCorrection(CompressorType::Screw, capacity, full_load_bhp, poly_exponent, P_ratedDischarge,
947 P_RatedIn, Eff, P_fl, P_max, P_in, PresAdj, P_atm);
948
949 kW_max = kW_max_Adjusted;
950 }
951
952 private:
953 double kW_max;
954 const double P_atm, P_fl, P_max, P_mod;
955 const double P_range = 0;
956 CompressorType CompType;
957 Lubricant LubricantType;
958 ControlType CntrlType;
959 const double lf_nl, C_storage, kW_nl = 1;
960
961 double PerC_ul = 100, t_blowdown = 0.003, P_sump_ul = 15, t_sdt = 0.004, a_tol = 0.02, t_reload = 0.001,
962 lf_fl = 0.7;
963 double noLoadPowerFM, kW_ul, P_ul, C_ul, mod_exp /*Throttle=1, Variable Displacement=2*/;
964
965 double CurveFit(double, bool) const;
966};
967
969 public:
991 Compressors_ModulationWithUnload(const double kW_fl, const double C_fl, const double C_storage, const double kW_max,
992 const double kW_nl, const double P_fl, const double P_max, const double P_mod,
993 const double P_atm = 14.7, const double PerC_ul = 100,
994 Compressors::ControlType CntrlType = Compressors::VariableDisplacementUnload,
995 const double t_blowdown = .003, const double P_sump_ul = 15,
996 const double noLoadPowerFM = .7, double kW_ul = 0, double P_ul = 0,
997 double C_ul = 0)
998 : Compressors_LoadUnload(kW_fl, C_fl, C_storage, kW_max, P_fl, P_max, P_mod, 1, P_atm, Compressors::Screw,
999 Compressors::Injected, CntrlType, kW_nl, PerC_ul, t_blowdown, P_sump_ul, noLoadPowerFM,
1000 kW_ul, P_ul, C_ul) {}
1001};
1002
1004 public:
1005 Compressor_VFD(const double fullLoadPower, const double midTurndownPower, const double turndownPower,
1006 const double noLoadPower, const double capacityFullFload, const double midTurndownAirflow,
1007 const double turndownAirflow)
1008 : CompressorsBase(fullLoadPower, capacityFullFload), noLoadPower(noLoadPower) {
1009 turndownPercentPower = turndownPower / fullLoadPower;
1010 noLoadPercentPower = noLoadPower / fullLoadPower;
1011 midTurndownPercentPower = midTurndownPower / fullLoadPower;
1012
1013 turndownPercentCapacity = turndownAirflow / capacityFullFload;
1014 midTurndownPercentCapacity = midTurndownAirflow / capacityFullFload;
1015 }
1016
1029
1054
1067
1082 CompressorsBase::Output calculateFromVIPFMeasured(double V, double I, double PF) override;
1083
1084 private:
1085 double turndownPercentPower;
1086 double noLoadPercentPower;
1087 double midTurndownPercentPower;
1088 double turndownPercentCapacity;
1089 double midTurndownPercentCapacity;
1090 double noLoadPower;
1091};
1092
1094 public:
1096 ReduceAirLeaksOutput(double C_lkred, double C_usage_lkred, double PerC_lkred)
1097 : C_lkred(C_lkred), C_usage_lkred(C_usage_lkred), PerC_lkred(PerC_lkred) {}
1098
1099 ReduceAirLeaksOutput() = default;
1100 double C_lkred = 0, C_usage_lkred = 0, PerC_lkred = 0;
1101 };
1102
1104 ImproveEndUseEfficiencyOutput(double C_af_red, double CPer_af_red)
1105 : C_af_red(C_af_red), CPer_af_red(CPer_af_red) {}
1106
1108 double C_af_red = 0, CPer_af_red = 0;
1109 };
1110
1112 ReduceSystemAirPressureOutput(double P_fl_rpred, double kW_fl_rpadj, double C_usage_rpred, double PerC_rpred)
1113 : P_fl_rpred(P_fl_rpred), kW_fl_rpadj(kW_fl_rpadj), C_usage_rpred(C_usage_rpred), PerC_rpred(PerC_rpred) {}
1114
1116 double P_fl_rpred = 0, kW_fl_rpadj = 0, C_usage_rpred = 0, PerC_rpred = 0;
1117 };
1118
1120 AdjustCascadingSetPointOutput(double kW_fl_adj, double C_usage_adj, double PerC_adj)
1121 : kW_fl_adj(kW_fl_adj), C_usage_adj(C_usage_adj), PerC_adj(PerC_adj) {}
1122
1124 double kW_fl_adj = 0, C_usage_adj = 0, PerC_adj = 0;
1125 };
1126
1128 PressureReductionSavingOutput(double kW_savings, double kWh_savings, double cost_savings)
1129 : kW_savings(kW_savings), kWh_savings(kWh_savings), cost_savings(cost_savings) {}
1130
1132 double kW_savings = 0, kWh_savings = 0, cost_savings = 0;
1133 };
1134
1148 static ReduceAirLeaksOutput ReduceAirLeaks(double C_fl, double C_usage, double C_lk, double PerC_lkred) {
1149 const double C_lkred = PerC_lkred * C_lk;
1150 const double C_usage_lkred = C_usage - C_lkred;
1151
1152 return ReduceAirLeaksOutput(C_lkred, C_usage_lkred, C_usage_lkred / C_fl);
1153 }
1154
1166 static ImproveEndUseEfficiencyOutput ImproveEndUseEfficiency(double C_fl, double C_usage, double C_avgaf_red) {
1167 const double C_af_red = C_usage - C_avgaf_red;
1168 return ImproveEndUseEfficiencyOutput(C_af_red, C_af_red / C_fl);
1169 }
1170
1188 static ReduceSystemAirPressureOutput ReduceSystemAirPressure(double C_fl, double C_usage, double P_fl, double kW_fl,
1189 double P_rpred, double P_alt = 14.69,
1190 double P_atm = 14.69) {
1191 const double P_fl_rpred = P_fl - P_rpred;
1192 const double kW_fl_rpadj =
1193 kW_fl * ((pow((P_fl_rpred + P_alt) / P_alt, 0.283) - 1) / (pow((P_fl + P_atm) / P_atm, 0.283) - 1));
1194 const double C_usage_rpred = (C_usage - (C_usage - (C_usage * ((P_fl_rpred + P_alt) / (P_fl + P_atm)))) * 0.6);
1195
1196 return ReduceSystemAirPressureOutput(P_fl_rpred, kW_fl_rpadj, C_usage_rpred, C_usage_rpred / C_fl);
1197 }
1198
1215 static AdjustCascadingSetPointOutput AdjustCascadingSetPoint(double C_fl, double C_usage, double P_fl, double kW_fl,
1216 double P_fl_adj, double P_alt = 14.69,
1217 double P_atm = 14.69) {
1218 const double kW_fl_adj =
1219 kW_fl * ((pow((P_fl_adj + P_alt) / P_alt, 0.283) - 1) / (pow((P_fl + P_atm) / P_atm, 0.283) - 1));
1220 const double C_usage_adj = (C_usage - (C_usage - (C_usage * ((P_fl_adj + P_alt) / (P_fl + P_atm)))) * 0.6);
1221
1222 return AdjustCascadingSetPointOutput(kW_fl_adj, C_usage_adj, C_usage_adj / C_fl);
1223 }
1224
1242 static PressureReductionSavingOutput PressureReductionSaving(double operatingHours, double costPerkWh,
1243 double kW_fl_rated, double P_fl_rated,
1244 double dischargePresBaseline, double dischargePresMod,
1245 double P_alt = 14.69, double P_atm = 14.69) {
1246 const double kW_savings = kWAdjusted(kW_fl_rated, P_fl_rated, dischargePresBaseline, P_alt, P_atm) -
1247 kWAdjusted(kW_fl_rated, P_fl_rated, dischargePresMod, P_alt, P_atm);
1248 const double kWh_savings = kW_savings * operatingHours;
1249 return PressureReductionSavingOutput(kW_savings, kWh_savings, kWh_savings * costPerkWh);
1250 }
1251
1263 static double kWAdjusted(double kW_fl_rated, double P_fl_rated, double P_discharge, double P_alt = 14.69,
1264 double P_atm = 14.69) {
1265 return kW_fl_rated *
1266 ((pow((P_discharge + P_alt) / P_alt, 0.283) - 1) / (pow((P_fl_rated + P_atm) / P_atm, 0.283) - 1));
1267 }
1268};
1269#endif // TOOLS_SUITE_COMPRESSORS_H
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:20
double calculate() const