8 #ifndef AMO_TOOLS_SUITE_PLANAR_H 9 #define AMO_TOOLS_SUITE_PLANAR_H 16 double getPv3Value()
const {
20 double get75percentRule()
const {
26 std::vector< std::vector< double > > traverseHoleData)
27 : pitotTubeCoefficient(pitotTubeCoefficient), traverseHoleData(
std::move(traverseHoleData))
31 for (
auto & row : this->traverseHoleData) {
32 for (
double & val : row) {
37 val *= std::pow(pitotTubeCoefficient, 2);
41 sumPv3r += std::sqrt(val);
45 pv3 = std::pow(sumPv3r / (this->traverseHoleData.size() * this->traverseHoleData[0].size()), 2);
47 std::size_t count = 0;
48 for (
auto & row : this->traverseHoleData) {
49 for (
auto & val : row) {
50 if (val > (0.1 * maxPv3r)) count++;
54 percent75Rule = count /
static_cast<double>(this->traverseHoleData.size() * this->traverseHoleData[0].size());
57 const double pitotTubeCoefficient;
58 double pv3 = 0, percent75Rule = 0;
60 std::vector< std::vector< double > > traverseHoleData;
67 Planar(
const double area,
const double tdx,
const double pbx,
const double psx)
68 : dryBulbTemperature(tdx), barometricPressure(pbx), area(area), staticPressure(psx)
78 const double dryBulbTemperature, barometricPressure, area;
79 double gasDensity = 0, gasVelocity = 0, gasVolumeFlowRate = 0, gasVelocityPressure = 0, gasTotalPressure = 0;
80 double staticPressure = 0;
88 FlangePlane(
const double area,
const double tdx,
const double pbx)
89 :
Planar(area, tdx, pbx, 0) {}
94 TraversePlane(
const double area,
const double tdx,
const double pbx,
const double psx,
95 const double pitotTubeCoefficient, std::vector< std::vector< double > > traverseHoleData)
96 :
Planar(area, tdx, pbx, psx),
103 MstPlane(
const double area,
const double tdx,
const double pbx,
const double psx)
104 :
Planar(area, tdx, pbx, psx) {}
107 #endif //AMO_TOOLS_SUITE_PLANAR_H