9 #ifndef AMO_TOOLS_SUITE_COMPRESSEDAIR_H 10 #define AMO_TOOLS_SUITE_COMPRESSEDAIR_H 26 enum class PistonType {
42 PneumaticAirRequirement(PistonType pistonType,
double cylinderDiameter,
double cylinderStroke,
double pistonRodDiameter,
43 double airPressure,
double cyclesPerMin);
55 PneumaticAirRequirement(PistonType pistonType,
double cylinderDiameter,
double cylinderStroke,
double airPressure,
69 Output(
const double volumeAirIntakePiston,
const double compressionRatio,
70 const double airRequirementPneumaticCylinder)
71 : volumeAirIntakePiston(volumeAirIntakePiston),
72 compressionRatio(compressionRatio),
73 airRequirementPneumaticCylinder(airRequirementPneumaticCylinder)
76 const double volumeAirIntakePiston, compressionRatio, airRequirementPneumaticCylinder;
86 PistonType pistonType;
87 double cylinderDiameter, cylinderStroke, pistonRodDiameter = 0, airPressure, cyclesPerMin;
96 BridgingCompressorReactionDelay
111 ReceiverTank(Method method,
double airDemand,
double allowablePressureDrop,
double atmosphericPressure);
125 ReceiverTank(Method method,
double lengthOfDemandOrDistanceToCompressorRoom,
double airFlowRequirementOrSpeedOfAir,
126 double atmosphericPressure,
double initialTankPressureOrAirDemand,
double finalTankPressureOrAllowablePressureDrop);
141 ReceiverTank(Method method,
double lengthOfDemand,
double airFlowRequirement,
double atmosphericPressure,
142 double initialTankPressure,
double finalTankPressure,
double meteredFlowControl);
152 return (tankSize / 7.48) * (airPressureIn - airPressureOut) / 14.7;
159 double calculateSize();
163 double airDemand, allowablePressureDrop, atmosphericPressure;
165 double lengthOfDemandOrDistanceToCompressorRoom, airFlowRequirementOrSpeedOfAir, initialTankPressureOrAirDemand;
166 double finalTankPressureOrAllowablePressureDrop;
168 double meteredFlowControl;
178 PipeData(
const double oneHalf,
const double threeFourths,
const double one,
const double oneAndOneFourth,
179 const double oneAndOneHalf,
const double two,
const double twoAndOneHalf,
const double three,
180 const double threeAndOneHalf,
const double four,
const double five,
const double six,
const double eight,
181 const double ten,
const double twelve,
const double fourteen,
const double sixteen,
const double eighteen,
182 const double twenty,
const double twentyFour)
183 : oneHalf(oneHalf * 0.0021), threeFourths(threeFourths * 0.0037), one(one * 0.006),
184 oneAndOneFourth(oneAndOneFourth * 0.0104), oneAndOneHalf(oneAndOneHalf * 0.0141),
185 two(two * 0.0233), twoAndOneHalf(twoAndOneHalf * 0.0333), three(three * 0.0513),
186 threeAndOneHalf(threeAndOneHalf * 0.0687), four(four * 0.0884), five(five * 0.1389),
187 six(six * 0.2006), eight(eight * 0.3442), ten(ten * 0.5476), twelve(twelve * 0.7763), fourteen(fourteen * 0.9354),
188 sixteen(sixteen * 1.223), eighteen(eighteen * 1.555), twenty(twenty * 1.926), twentyFour(twentyFour * 2.793),
189 totalPipeVolume(this->oneHalf + this->threeFourths + this->one + this->oneAndOneFourth
190 + this->oneAndOneHalf + this->two + this->twoAndOneHalf + this->three
191 + this->threeAndOneHalf + this->four + this->five + this->six
192 + this->eight + this->ten + this->twelve + this->fourteen + this->sixteen
193 + this->eighteen + this->twenty + this->twentyFour)
202 explicit PipeData(std::function<
double (
const double)>
const & compVel)
203 : oneHalf(compVel(0.3)), threeFourths(compVel(0.53)), one(compVel(0.86)),
204 oneAndOneFourth(compVel(1.5)), oneAndOneHalf(compVel(2.04)),
205 two(compVel(3.36)), twoAndOneHalf(compVel(4.79)), three(compVel(7.39)),
206 threeAndOneHalf(compVel(9.89)), four(compVel(12.73)), five(compVel(20)),
207 six(compVel(28.89)), eight(compVel(50.02)), ten(compVel(78.85)), twelve(compVel(111.9)),
208 fourteen(compVel(135.3)), sixteen(compVel(176.7)), eighteen(compVel(224)), twenty(compVel(278)),
209 twentyFour(compVel(402.10))
212 const double oneHalf, threeFourths, one, oneAndOneFourth, oneAndOneHalf, two;
213 const double twoAndOneHalf, three, threeAndOneHalf, four, five, six;
214 const double eight, ten, twelve, fourteen, sixteen, eighteen, twenty, twentyFour;
215 const double totalPipeVolume = 0;
232 OperatingCost(
double motorBhp,
double bhpUnloaded,
double annualOperatingHours,
double runTimeLoaded,
233 double efficiencyLoaded,
double efficiencyUnloaded,
double costOfElectricity);
236 Output(
const double runTimeUnloaded,
const double costForLoaded,
const double costForUnloaded,
237 const double totalAnnualCost)
238 : runTimeUnloaded(runTimeUnloaded), costForLoaded(costForLoaded),
239 costForUnloaded(costForUnloaded), totalAnnualCost(totalAnnualCost)
242 const double runTimeUnloaded, costForLoaded, costForUnloaded, totalAnnualCost;
248 double motorBhp, bhpUnloaded, annualOperatingHours, runTimeLoaded, efficiencyLoaded;
249 double efficiencyUnloaded, costOfElectricity;
256 Output(
const double totalPipeVolume, std::vector<double> receiverCapacities,
257 const double totalReceiverVol,
const double totalCapacityOfCompressedAirSystem,
259 : totalPipeVolume(totalPipeVolume), totalReceiverVol(totalReceiverVol),
260 totalCapacityOfCompressedAirSystem(totalCapacityOfCompressedAirSystem),
261 receiverCapacities(std::move(receiverCapacities)), pipeLengths(pipeLengths)
264 const double totalPipeVolume, totalReceiverVol, totalCapacityOfCompressedAirSystem;
265 const std::vector<double> receiverCapacities;
281 std::vector<double> receivers;
296 AirVelocity(
double airFlow,
double pipePressure,
double atmosphericPressure);
301 double airFlow, pipePressure, atmosphericPressure;
307 Output(
const double crossSectionalArea,
const double pipeDiameter)
308 : crossSectionalArea(crossSectionalArea), pipeDiameter(pipeDiameter)
310 const double crossSectionalArea, pipeDiameter;
322 PipeSizing(
double airflow,
double airlinePressure,
double designVelocity,
double atmosphericPressure);
331 double airflow, airlinePressure, designVelocity, atmosphericPressure;
348 PneumaticValve(
double inletPressure,
double outletPressure,
double flowRate);
356 double inletPressure, outletPressure, flowRate;
364 Output(
const double flowRate,
const double annualConsumption)
365 : flowRate(flowRate), annualConsumption(annualConsumption)
368 const double flowRate, annualConsumption;
380 BagMethod(
double operatingTime,
double bagFillTime,
double heightOfBag,
double diameterOfBag,
int numberOfUnits);
388 double operatingTime, bagFillTime, heightOfBag, diameterOfBag, numberOfUnits;
396 Output(
const double annualConsumption) : annualConsumption(annualConsumption)
399 const double annualConsumption;
407 EstimateMethod(
const double operatingTime,
const double leakRateEstimate);
415 double operatingTime, leakRateEstimate;
421 Output(
const double leakRateEstimate,
const double annualConsumption)
422 : leakRateEstimate(leakRateEstimate), annualConsumption(annualConsumption)
425 const double leakRateEstimate, annualConsumption;
442 DecibelsMethod(
const double operatingTime,
const double linePressure,
const double decibels,
const double decibelRatingA,
443 const double pressureA,
const double firstFlowA,
const double secondFlowA,
const double decibelRatingB,
const double pressureB,
444 const double firstFlowB,
const double secondFlowB);
452 double operatingTime;
455 double decibelRatingA;
459 double decibelRatingB;
468 Output(
const double standardDensity,
const double sonicDensity,
const double leakVelocity,
const double leakRateLBMmin,
469 const double leakRateScfm,
const double leakRateEstimate,
const double annualConsumption)
470 : standardDensity(standardDensity), sonicDensity(sonicDensity), leakVelocity(leakVelocity),
471 leakRateLBMmin(leakRateLBMmin), leakRateScfm(leakRateScfm), leakRateEstimate(leakRateEstimate),
472 annualConsumption(annualConsumption)
475 const double standardDensity, sonicDensity, leakVelocity, leakRateLBMmin, leakRateScfm, leakRateEstimate, annualConsumption;
488 OrificeMethod(
const double operatingTime,
const double airTemp,
const double atmPressure,
const double dischargeCoef,
489 const double diameter,
const double supplyPressure,
const int numOrifices);
497 double operatingTime, airTemp, atmPressure, dischargeCoef, diameter, supplyPressure;
507 enum class MethodType
528 #endif //AMO_TOOLS_SUITE_COMPRESSEDAIR_H
static double calculateUsableCapacity(const double tankSize, const double airPressureIn, const double airPressureOut)
PipeData(std::function< double(const double)> const &compVel)
PipeData(const double oneHalf, const double threeFourths, const double one, const double oneAndOneFourth, const double oneAndOneHalf, const double two, const double twoAndOneHalf, const double three, const double threeAndOneHalf, const double four, const double five, const double six, const double eight, const double ten, const double twelve, const double fourteen, const double sixteen, const double eighteen, const double twenty, const double twentyFour)
Contains all the implementations of the various components of a compressed air system.
Output(const double volumeAirIntakePiston, const double compressionRatio, const double airRequirementPneumaticCylinder)