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
FluidPower.h
1
11#ifndef TOOLS_SUITE_FLUIDPOWER_H
12#define TOOLS_SUITE_FLUIDPOWER_H
13
15 public:
22 FluidPower(double specificGravity, double flowRate, double head)
23 : specificGravity(specificGravity), flowRate(flowRate), head(head), isPump(true) {};
24
32 FluidPower(double flowRate, const double inletPressure, const double outletPressure,
33 const double compressibilityFactor, const double velocityPressure)
34 : flowRate(flowRate), inletPressure(inletPressure), outletPressure(outletPressure),
35 compressibilityFactor(compressibilityFactor), isPump(false), velocityPressure(velocityPressure) {};
36
41 double calculate() {
42 if (isPump) {
43 return 0.746 * flowRate * head * specificGravity / 3961.38;
44 }
45 return 0.746 * flowRate * (outletPressure - inletPressure - velocityPressure) * compressibilityFactor / 6362;
46 }
47
48 private:
49 const double specificGravity = 0, flowRate, head = 0;
50
51 // used only for fan fluid power calculations
52 const double inletPressure = 0, outletPressure = 0, compressibilityFactor = 0;
53
54 const bool isPump;
55
56 const double velocityPressure = 0;
57};
58
59#endif // TOOLS_SUITE_FLUIDPOWER_H
Contains the skeleton of FluidPower class. calculateThermalResistance(): Calculates the fluid power.
Definition FluidPower.h:14
double calculate()
Definition FluidPower.h:41
FluidPower(double flowRate, const double inletPressure, const double outletPressure, const double compressibilityFactor, const double velocityPressure)
Definition FluidPower.h:32
FluidPower(double specificGravity, double flowRate, double head)
Definition FluidPower.h:22