AMO-Tools-Suite  v.0.9.0
Set of tools for calculating energy efficiency in industrial equipment
All Classes Namespaces Files Functions Variables Enumerations Friends Macros Pages
FluidPower.h
1 
11 #ifndef AMO_LIBRARY_FLUIDPOWER_H
12 #define AMO_LIBRARY_FLUIDPOWER_H
13 
14 class FluidPower {
15 public:
22  FluidPower(double specificGravity, double flowRate, double head)
23  : specificGravity(specificGravity), flowRate(flowRate), head(head), isPump(true)
24  {};
25 
33  FluidPower(double flowRate, const double inletPressure, const double outletPressure, const double compressibilityFactor)
34  : flowRate(flowRate), inletPressure(inletPressure), outletPressure(outletPressure),
35  compressibilityFactor(compressibilityFactor), isPump(false)
36  {};
37 
42  double calculate() {
43  if (isPump) {
44  return 0.746 * flowRate * head * specificGravity / 3961.38;
45  }
46  return 0.746 * flowRate * (outletPressure - inletPressure) * compressibilityFactor / 6362;
47  }
48 
49 private:
50  const double specificGravity = 0, flowRate, head = 0;
51 
52  // used only for fan fluid power calculations
53  const double inletPressure = 0, outletPressure = 0, compressibilityFactor = 0;
54 
55  const bool isPump;
56 
57 
58 };
59 
60 #endif //AMO_LIBRARY_FLUIDPOWER_H
Contains the skeleton of FluidPower class. calculate(): Calculates the fluid power.
Definition: FluidPower.h:14
FluidPower(double flowRate, const double inletPressure, const double outletPressure, const double compressibilityFactor)
Definition: FluidPower.h:33
double calculate()
Definition: FluidPower.h:42
FluidPower(double specificGravity, double flowRate, double head)
Definition: FluidPower.h:22