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