Flow meter Directory

The Comprehensive Flowmeters Resource

Pipe Flow Calculator

Pipe Flow Calculator

{source}

<?php
/* Program name: FlowCalculator.php
* Description: Calculates a resultant value out of any 2 of the 3 values (Inside Diameter, Velocity, Volumetric Flowrate)
* Last Updated: 15 Oct 05
*/

// define default values
$Unit_index = 0;
$Diameter_value = “”;
$DiameterUnit_value = $Unit_index;
$PrevDiameterUnit_value = $Unit_index;
$Velocity_value = “”;
$PrevVelocityUnit_value = $Unit_index;
$VelocityUnit_value = $Unit_index;
$Flowrate_value = “”;
$PrevFlowrateUnit_value = $Unit_index;
$FlowrateUnit_value = $Unit_index;

//define constants
$FlowRateConst = 0.002827;

// define units
$DiameterUnits = array(“inches”, “mm”);
$DiameterUnitsNo = 1;
$VelocityUnits = array(“inches/sec”, “ft/sec”, “cm/sec”, “m/sec”);
$VelocityUnitsNo = 3;
$FlowrateUnits = array(“cubic feet/sec”, “cubic feet/minute”, “cubic feet/hour”, “cubic feet/day”,
“US gallon/sec”, “US gallon/minute”, “US gallon/hour”, “US gallon/day”, “millon US gallon/day”,
“liter/sec”, “liter/minute”, “liter/hour”, “liter/day”,
“cubic meter/sec”, “cubic meter/minute”, “cubic meter/hour”, “cubic meter/day”,
“imperial gallon/sec”, “imperial gallon/minute”, “imperial gallon/hour”, “imperial gallon/day”,
“UK Barrels/sec”, “UK Barrels/minute”, “UK Barrels/hour”, “UK Barrels/day”,
“UK Liquid Barrels/sec”, “UK Liquid Barrels/minute”, “UK Liquid Barrels/hour”, “UK Liquid Barrels/day”,
“UK Oil Barrels/sec”, “UK Oil Barrels/minute”, “UK Oil Barrels/hour”, “UK Oil Barrels/day”,
“UK Federal Barrels/sec”, “UK Federal Barrels/minute”, “UK Federal Barrels/hour”, “UK Federal Barrels/day”);
$FlowrateUnitsNo = 36;

// define conversion rates
$Inch_to_mm = 25.4;
//inches/sec to others
$VelocityConv[0][0] = 1; //inches/sec
$VelocityConv[0][1] = 0.0833333; //foot/sec
$VelocityConv[0][2] = 2.54; //cm/sec
$VelocityConv[0][3] = 0.0254; //m/sec
//foot/sec to others
$VelocityConv[1][0] = 12;
$VelocityConv[1][1] = 1;
$VelocityConv[1][2] = 30.48;
$VelocityConv[1][3] = 0.3048;
//cm/sec to others
$VelocityConv[2][0] = 0.3937007874;
$VelocityConv[2][1] = 0.03280839895;
$VelocityConv[2][2] = 1;
$VelocityConv[2][3] = 0.01;
//m/sec to others
$VelocityConv[3][0] = 39.37007874;
$VelocityConv[3][1] = 3.280839895;
$VelocityConv[3][2] = 100;
$VelocityConv[3][3] = 1;
//Cubic Feet/sec to others
$FlowrateConv[0][0] = 1;
$FlowrateConv[0][1] = 60;
$FlowrateConv[0][2] = 3600;
$FlowrateConv[0][3] = 86400;
$FlowrateConv[0][4] = 7.48052;
$FlowrateConv[0][5] = 448.831178;
$FlowrateConv[0][6] = 26929.869835;
$FlowrateConv[0][7] = 646316.898166;
$FlowrateConv[0][8] = 0.646316898166;
$FlowrateConv[0][9] = 28.316847;
$FlowrateConv[0][10] = 1699.01082;
$FlowrateConv[0][11] = 101940.6492;
$FlowrateConv[0][12] = 2446575.596458;
$FlowrateConv[0][13] = 0.028317;
$FlowrateConv[0][14] = 1.699011;
$FlowrateConv[0][15] = 101.940649;
$FlowrateConv[0][16] = 2446.575581;
$FlowrateConv[0][17] = 6.228836;
$FlowrateConv[0][18] = 373.730131;
$FlowrateConv[0][19] = 22423.807581;
$FlowrateConv[0][20] = 538171.395582;
$FlowrateConv[0][21] = 0.173023;
$FlowrateConv[0][22] = 10.381393;
$FlowrateConv[0][23] = 622.883555;
$FlowrateConv[0][24] = 14949.205054;
$FlowrateConv[0][25] = 0.237477;
$FlowrateConv[0][26] = 14.248609;
$FlowrateConv[0][27] = 854.916527;
$FlowrateConv[0][28] = 20517.99766;
$FlowrateConv[0][29] = 0.178108;
$FlowrateConv[0][30] = 10.686456;
$FlowrateConv[0][31] = 641.187386;
$FlowrateConv[0][32] = 15388.497676;
$FlowrateConv[0][33] = 0.241307;
$FlowrateConv[0][34] = 14.478425;
$FlowrateConv[0][35] = 868.705487;
$FlowrateConv[0][36] = 20848.932445;
//Cubic Feet/min to others
$FlowrateConv[1][0] = 0.016667;
$FlowrateConv[1][1] = 1;
$FlowrateConv[1][2] = 60;
$FlowrateConv[1][3] = 1440;
$FlowrateConv[1][4] = 0.124675;
$FlowrateConv[1][5] = 7.480519;
$FlowrateConv[1][6] = 448.831154;
$FlowrateConv[1][7] = 10771.948075;
$FlowrateConv[1][8] = 0.010771948075;
$FlowrateConv[1][9] = 0.471947;
$FlowrateConv[1][10] = 28.316846;
$FlowrateConv[1][11] = 1699.010784;
$FlowrateConv[1][12] = 40776.259077;
$FlowrateConv[1][13] = 0.000472;
$FlowrateConv[1][14] = 0.028317;
$FlowrateConv[1][15] = 1.699011;
$FlowrateConv[1][16] = 40.776259;
$FlowrateConv[1][17] = 0.103814;
$FlowrateConv[1][18] = 6.228835;
$FlowrateConv[1][19] = 373.730118;
$FlowrateConv[1][20] = 8969.52307;
$FlowrateConv[1][21] = 0.002884;
$FlowrateConv[1][22] = 0.173023;
$FlowrateConv[1][23] = 10.381392;
$FlowrateConv[1][24] = 249.153412;
$FlowrateConv[1][25] = 0.003958;
$FlowrateConv[1][26] = 0.237477;
$FlowrateConv[1][27] = 14.248608;
$FlowrateConv[1][28] = 341.96662;
$FlowrateConv[1][29] = 0.002968;
$FlowrateConv[1][30] = 0.178108;
$FlowrateConv[1][31] = 10.686456;
$FlowrateConv[1][32] = 256.474956;
$FlowrateConv[1][33] = 0.004022;
$FlowrateConv[1][34] = 0.241307;
$FlowrateConv[1][35] = 14.478424;
$FlowrateConv[1][36] = 347.4822;
//Cubic Feet/hour to others
$FlowrateConv[2][0] = 0.000278;
$FlowrateConv[2][1] = 0.016667;
$FlowrateConv[2][2] = 1;
$FlowrateConv[2][3] = 24;
$FlowrateConv[2][4] = 0.002078;
$FlowrateConv[2][5] = 0.124675;
$FlowrateConv[2][6] = 7.480519;
$FlowrateConv[2][7] = 179.532469;
$FlowrateConv[2][8] = 0.000179532469;
$FlowrateConv[2][9] = 0.007866;
$FlowrateConv[2][10] = 0.471947;
$FlowrateConv[2][11] = 28.316847;
$FlowrateConv[2][12] = 679.604321;
$FlowrateConv[2][13] = 0.000008;
$FlowrateConv[2][14] = 0.000472;
$FlowrateConv[2][15] = 0.028317;
$FlowrateConv[2][16] = 0.679604;
$FlowrateConv[2][17] = 0.00173;
$FlowrateConv[2][18] = 0.103814;
$FlowrateConv[2][19] = 6.228835;
$FlowrateConv[2][20] = 149.492052;
$FlowrateConv[2][21] = 0.000048;
$FlowrateConv[2][22] = 0.002884;
$FlowrateConv[2][23] = 0.173023;
$FlowrateConv[2][24] = 4.152557;
$FlowrateConv[2][25] = 0.000066;
$FlowrateConv[2][26] = 0.003958;
$FlowrateConv[2][27] = 0.237477;
$FlowrateConv[2][28] = 5.699444;
$FlowrateConv[2][29] = 0.000049;
$FlowrateConv[2][30] = 0.002968;
$FlowrateConv[2][31] = 0.178108;
$FlowrateConv[2][32] = 4.274583;
$FlowrateConv[2][33] = 0.000067;
$FlowrateConv[2][34] = 0.004022;
$FlowrateConv[2][35] = 0.241307;
$FlowrateConv[2][36] = 5.79137;
//Cubic Feet/day to others
$FlowrateConv[3][0] = 0.000012;
$FlowrateConv[3][1] = 0.000694;
$FlowrateConv[3][2] = 0.041667;
$FlowrateConv[3][3] = 1;
$FlowrateConv[3][4] = 0.000087;
$FlowrateConv[3][5] = 0.005195;
$FlowrateConv[3][6] = 0.311688;
$FlowrateConv[3][7] = 7.48052;
$FlowrateConv[3][8] = 0.00000748052;
$FlowrateConv[3][9] = 0.000328;
$FlowrateConv[3][10] = 0.019664;
$FlowrateConv[3][11] = 1.179869;
$FlowrateConv[3][12] = 28.316847;
$FlowrateConv[3][13] = 0.0000003;
$FlowrateConv[3][14] = 0.00002;
$FlowrateConv[3][15] = 0.00118;
$FlowrateConv[3][16] = 0.028317;
$FlowrateConv[3][17] = 0.000072;
$FlowrateConv[3][18] = 0.004326;
$FlowrateConv[3][19] = 0.259535;
$FlowrateConv[3][20] = 6.228836;
$FlowrateConv[3][21] = 0.000002;
$FlowrateConv[3][22] = 0.00012;
$FlowrateConv[3][23] = 0.007209;
$FlowrateConv[3][24] = 0.173023;
$FlowrateConv[3][25] = 0.000003;
$FlowrateConv[3][26] = 0.000165;
$FlowrateConv[3][27] = 0.009895;
$FlowrateConv[3][28] = 0.237477;
$FlowrateConv[3][29] = 0.000002;
$FlowrateConv[3][30] = 0.000124;
$FlowrateConv[3][31] = 0.007421;
$FlowrateConv[3][32] = 0.178108;
$FlowrateConv[3][33] = 0.000003;
$FlowrateConv[3][34] = 0.000168;
$FlowrateConv[3][35] = 0.010054;
$FlowrateConv[3][36] = 0.241307;
//US Gallon/sec to others
$FlowrateConv[4][0] = 0.133681;
$FlowrateConv[4][1] = 8.020833;
$FlowrateConv[4][2] = 481.250003;
$FlowrateConv[4][3] = 11550.000049;
$FlowrateConv[4][4] = 1;
$FlowrateConv[4][5] = 60;
$FlowrateConv[4][6] = 3600;
$FlowrateConv[4][7] = 86400.001132;
$FlowrateConv[4][8] = 0.086400001132;
$FlowrateConv[4][9] = 3.785412;
$FlowrateConv[4][10] = 227.124708;
$FlowrateConv[4][11] = 13627.48248;
$FlowrateConv[4][12] = 327059.581613;
$FlowrateConv[4][13] = 0.003785;
$FlowrateConv[4][14] = 0.227125;
$FlowrateConv[4][15] = 13.627482;
$FlowrateConv[4][16] = 327.05958;
$FlowrateConv[4][17] = 0.832674;
$FlowrateConv[4][18] = 49.960451;
$FlowrateConv[4][19] = 2997.627025;
$FlowrateConv[4][20] = 71943.050413;
$FlowrateConv[4][21] = 0.02313;
$FlowrateConv[4][22] = 1.38779;
$FlowrateConv[4][23] = 83.267419;
$FlowrateConv[4][24] = 1998.418016;
$FlowrateConv[4][25] = 0.031746;
$FlowrateConv[4][26] = 1.904762;
$FlowrateConv[4][27] = 114.285715;
$FlowrateConv[4][28] = 2742.857298;
$FlowrateConv[4][29] = 0.02381;
$FlowrateConv[4][30] = 1.428571;
$FlowrateConv[4][31] = 85.714285;
$FlowrateConv[4][32] = 2057.142898;
$FlowrateConv[4][33] = 0.032258;
$FlowrateConv[4][34] = 1.935484;
$FlowrateConv[4][35] = 116.129031;
$FlowrateConv[4][36] = 2787.096844;
//US Gallon/min to other
$FlowrateConv[5][0] = 0.002228;
$FlowrateConv[5][1] = 0.133681;
$FlowrateConv[5][2] = 8.020833;
$FlowrateConv[5][3] = 192.499999;
$FlowrateConv[5][4] = 0.016667;
$FlowrateConv[5][5] = 1;
$FlowrateConv[5][6] = 60;
$FlowrateConv[5][7] = 1440;
$FlowrateConv[5][8] = 0.00144;
$FlowrateConv[5][9] = 0.06309;
$FlowrateConv[5][10] = 3.785412;
$FlowrateConv[5][11] = 227.124706;
$FlowrateConv[5][12] = 5450.992969;
$FlowrateConv[5][13] = 0.000063;
$FlowrateConv[5][14] = 0.003785;
$FlowrateConv[5][15] = 0.227125;
$FlowrateConv[5][16] = 5.450993;
$FlowrateConv[5][17] = 0.013878;
$FlowrateConv[5][18] = 0.832674;
$FlowrateConv[5][19] = 49.96045;
$FlowrateConv[5][20] = 1199.050828;
$FlowrateConv[5][21] = 0.000385;
$FlowrateConv[5][22] = 0.02313;
$FlowrateConv[5][23] = 1.38779;
$FlowrateConv[5][24] = 33.306967;
$FlowrateConv[5][25] = 0.000529;
$FlowrateConv[5][26] = 0.031746;
$FlowrateConv[5][27] = 1.904762;
$FlowrateConv[5][28] = 45.714288;
$FlowrateConv[5][29] = 0.000397;
$FlowrateConv[5][30] = 0.02381;
$FlowrateConv[5][31] = 1.428571;
$FlowrateConv[5][32] = 34.285715;
$FlowrateConv[5][33] = 0.000538;
$FlowrateConv[5][34] = 0.032258;
$FlowrateConv[5][35] = 1.935484;
$FlowrateConv[5][36] = 46.451614;
//US Gallon/hr to others
$FlowrateConv[6][0] = 0.000037;
$FlowrateConv[6][1] = 0.002228;
$FlowrateConv[6][2] = 0.133681;
$FlowrateConv[6][3] = 3.208333;
$FlowrateConv[6][4] = 0.000278;
$FlowrateConv[6][5] = 0.016667;
$FlowrateConv[6][6] = 1;
$FlowrateConv[6][7] = 24;
$FlowrateConv[6][8] = 0.000024;
$FlowrateConv[6][9] = 0.001052;
$FlowrateConv[6][10] = 0.06309;
$FlowrateConv[6][11] = 3.785412;
$FlowrateConv[6][12] = 90.849886;
$FlowrateConv[6][13] = 0.000001;
$FlowrateConv[6][14] = 0.000063;
$FlowrateConv[6][15] = 0.003785;
$FlowrateConv[6][16] = 0.09085;
$FlowrateConv[6][17] = 0.000231;
$FlowrateConv[6][18] = 0.013878;
$FlowrateConv[6][19] = 0.832674;
$FlowrateConv[6][20] = 19.984181;
$FlowrateConv[6][21] = 0.000006;
$FlowrateConv[6][22] = 0.000385;
$FlowrateConv[6][23] = 0.02313;
$FlowrateConv[6][24] = 0.555116;
$FlowrateConv[6][25] = 0.000009;
$FlowrateConv[6][26] = 0.000529;
$FlowrateConv[6][27] = 0.031746;
$FlowrateConv[6][28] = 0.761905;
$FlowrateConv[6][29] = 0.000007;
$FlowrateConv[6][30] = 0.000397;
$FlowrateConv[6][31] = 0.02381;
$FlowrateConv[6][32] = 0.571429;
$FlowrateConv[6][33] = 0.000009;
$FlowrateConv[6][34] = 0.000538;
$FlowrateConv[6][35] = 0.032258;
$FlowrateConv[6][36] = 0.774194;
//US Gallon/day to others
$FlowrateConv[7][0] = 0.000002;
$FlowrateConv[7][1] = 0.000093;
$FlowrateConv[7][2] = 0.00557;
$FlowrateConv[7][3] = 0.133681;
$FlowrateConv[7][4] = 0.000012;
$FlowrateConv[7][5] = 0.000694;
$FlowrateConv[7][6] = 0.041667;
$FlowrateConv[7][7] = 1;
$FlowrateConv[7][8] = 0.000001;
$FlowrateConv[7][9] = 0.000044;
$FlowrateConv[7][10] = 0.002629;
$FlowrateConv[7][11] = 0.157725;
$FlowrateConv[7][12] = 3.785412;
$FlowrateConv[7][13] = 0.000000044;
$FlowrateConv[7][14] = 0.000003;
$FlowrateConv[7][15] = 0.000158;
$FlowrateConv[7][16] = 0.03785;
$FlowrateConv[7][17] = 0.00001;
$FlowrateConv[7][18] = 0.000578;
$FlowrateConv[7][19] = 0.034695;
$FlowrateConv[7][20] = 0.832674;
$FlowrateConv[7][21] = 0.000000268;
$FlowrateConv[7][22] = 0.000016;
$FlowrateConv[7][23] = 0.000964;
$FlowrateConv[7][24] = 0.02313;
$FlowrateConv[7][25] = 0.000000367;
$FlowrateConv[7][26] = 0.000022;
$FlowrateConv[7][27] = 0.001323;
$FlowrateConv[7][28] = 0.031746;
$FlowrateConv[7][29] = 0.000000276;
$FlowrateConv[7][30] = 0.000017;
$FlowrateConv[7][31] = 0.000992;
$FlowrateConv[7][32] = 0.02381;
$FlowrateConv[7][33] = 0.000000373;
$FlowrateConv[7][34] = 0.000022;
$FlowrateConv[7][35] = 0.001344;
$FlowrateConv[7][36] = 0.032258;
//Million gallon/day to others
$FlowrateConv[8][0] = 1.547229;
$FlowrateConv[8][1] = 92.833719;
$FlowrateConv[8][2] = 5570.023113;
$FlowrateConv[8][3] = 133680.554369;
$FlowrateConv[8][4] = 11.574074;
$FlowrateConv[8][5] = 694.444443;
$FlowrateConv[8][6] = 41666.66524;
$FlowrateConv[8][7] = 1000000;
$FlowrateConv[8][8] = 1;
$FlowrateConv[8][9] = 43.812636;
$FlowrateConv[8][10] = 2628.75816;
$FlowrateConv[8][11] = 157725.4896;
$FlowrateConv[8][12] = 3785411.774627;
$FlowrateConv[8][13] = 0.043813;
$FlowrateConv[8][14] = 2.628758;
$FlowrateConv[8][15] = 157.72549;
$FlowrateConv[8][16] = 3785.41175;
$FlowrateConv[8][17] = 9.637433;
$FlowrateConv[8][18] = 578.245954;
$FlowrateConv[8][19] = 34694.756774;
$FlowrateConv[8][20] = 832674.183685;
$FlowrateConv[8][21] = 0.267706;
$FlowrateConv[8][22] = 16.062388;
$FlowrateConv[8][23] = 963.743261;
$FlowrateConv[8][24] = 23129.83785;
$FlowrateConv[8][25] = 0.367431;
$FlowrateConv[8][26] = 22.045855;
$FlowrateConv[8][27] = 1322.751315;
$FlowrateConv[8][28] = 31746.033128;
$FlowrateConv[8][29] = 0.275573;
$FlowrateConv[8][30] = 16.534391;
$FlowrateConv[8][31] = 992.063472;
$FlowrateConv[8][32] = 23809.523965;
$FlowrateConv[8][33] = 0.373357;
$FlowrateConv[8][34] = 22.401433;
$FlowrateConv[8][35] = 1344.085988;
$FlowrateConv[8][36] = 32258.064896;
//Liter/second to others
$FlowrateConv[9][0] = 0.035315;
$FlowrateConv[9][1] = 2.11888;
$FlowrateConv[9][2] = 127.132801;
$FlowrateConv[9][3] = 3051.187205;
$FlowrateConv[9][4] = 0.264172;
$FlowrateConv[9][5] = 15.850323;
$FlowrateConv[9][6] = 951.019364;
$FlowrateConv[9][7] = 22824.465526;
$FlowrateConv[9][8] = 0.022824465526;
$FlowrateConv[9][9] = 1;
$FlowrateConv[9][10] = 60;
$FlowrateConv[9][11] = 3600;
$FlowrateConv[9][12] = 86400;
$FlowrateConv[9][13] = 0.001;
$FlowrateConv[9][14] = 0.06;
$FlowrateConv[9][15] = 3.6;
$FlowrateConv[9][16] = 86.4;
$FlowrateConv[9][17] = 0.219969;
$FlowrateConv[9][18] = 13.198155;
$FlowrateConv[9][19] = 791.88928;
$FlowrateConv[9][20] = 19005.3432;
$FlowrateConv[9][21] = 0.00611;
$FlowrateConv[9][22] = 0.366615;
$FlowrateConv[9][23] = 21.996925;
$FlowrateConv[9][24] = 527.926187;
$FlowrateConv[9][25] = 0.008386;
$FlowrateConv[9][26] = 0.503185;
$FlowrateConv[9][27] = 30.191092;
$FlowrateConv[9][28] = 724.586239;
$FlowrateConv[9][29] = 0.00629;
$FlowrateConv[9][30] = 0.377389;
$FlowrateConv[9][31] = 22.643319;
$FlowrateConv[9][32] = 543.439659;
$FlowrateConv[9][33] = 0.008522;
$FlowrateConv[9][34] = 0.511301;
$FlowrateConv[9][35] = 30.678044;
$FlowrateConv[9][36] = 736.27309;
//Liter/min to others
$FlowrateConv[10][0] = 0.000589;
$FlowrateConv[10][1] = 0.035315;
$FlowrateConv[10][2] = 2.11888;
$FlowrateConv[10][3] = 50.85312;
$FlowrateConv[10][4] = 0.004403;
$FlowrateConv[10][5] = 0.264172;
$FlowrateConv[10][6] = 15.850323;
$FlowrateConv[10][7] = 380.407759;
$FlowrateConv[10][8] = 0.000380407759;
$FlowrateConv[10][9] = 0.016667;
$FlowrateConv[10][10] = 1;
$FlowrateConv[10][11] = 60;
$FlowrateConv[10][12] = 1440;
$FlowrateConv[10][13] = 0.000017;
$FlowrateConv[10][14] = 0.001;
$FlowrateConv[10][15] = 0.06;
$FlowrateConv[10][16] = 1.44;
$FlowrateConv[10][17] = 0.003666;
$FlowrateConv[10][18] = 0.219969;
$FlowrateConv[10][19] = 13.198155;
$FlowrateConv[10][20] = 316.75572;
$FlowrateConv[10][21] = 0.000102;
$FlowrateConv[10][22] = 0.00611;
$FlowrateConv[10][23] = 0.366615;
$FlowrateConv[10][24] = 8.79877;
$FlowrateConv[10][25] = 0.00014;
$FlowrateConv[10][26] = 0.008386;
$FlowrateConv[10][27] = 0.503185;
$FlowrateConv[10][28] = 12.076437;
$FlowrateConv[10][29] = 0.000105;
$FlowrateConv[10][30] = 0.00629;
$FlowrateConv[10][31] = 0.377389;
$FlowrateConv[10][32] = 9.057328;
$FlowrateConv[10][33] = 0.000142;
$FlowrateConv[10][34] = 0.008522;
$FlowrateConv[10][35] = 0.511301;
$FlowrateConv[10][36] = 12.271218;
//Liter/hour to others
$FlowrateConv[11][0] = 0;
$FlowrateConv[11][1] = 0.000589;
$FlowrateConv[11][2] = 0.035315;
$FlowrateConv[11][3] = 0.847552;
$FlowrateConv[11][4] = 0.000073;
$FlowrateConv[11][5] = 0.004403;
$FlowrateConv[11][6] = 0.264172;
$FlowrateConv[11][7] = 6.340129;
$FlowrateConv[11][8] = 0.000006340129;
$FlowrateConv[11][9] = 0.000278;
$FlowrateConv[11][10] = 0.016667;
$FlowrateConv[11][11] = 1;
$FlowrateConv[11][12] = 24;
$FlowrateConv[11][13] = 0.000000278;
$FlowrateConv[11][14] = 0.000017;
$FlowrateConv[11][15] = 0.001;
$FlowrateConv[11][16] = 0.024;
$FlowrateConv[11][17] = 0.000061;
$FlowrateConv[11][18] = 0.003666;
$FlowrateConv[11][19] = 0.219969;
$FlowrateConv[11][20] = 5.279262;
$FlowrateConv[11][21] = 0.000002;
$FlowrateConv[11][22] = 0.000102;
$FlowrateConv[11][23] = 0.00611;
$FlowrateConv[11][24] = 0.146646;
$FlowrateConv[11][25] = 0.000002;
$FlowrateConv[11][26] = 0.00014;
$FlowrateConv[11][27] = 0.008386;
$FlowrateConv[11][28] = 0.201274;
$FlowrateConv[11][29] = 0.000002;
$FlowrateConv[11][30] = 0.000105;
$FlowrateConv[11][31] = 0.00629;
$FlowrateConv[11][32] = 0.150955;
$FlowrateConv[11][33] = 0.000002;
$FlowrateConv[11][34] = 0.000142;
$FlowrateConv[11][35] = 0.008522;
$FlowrateConv[11][36] = 0.20452;
//Liter/day to other
$FlowrateConv[12][0] = 0.000000409;
$FlowrateConv[12][1] = 0.000025;
$FlowrateConv[12][2] = 0.001471;
$FlowrateConv[12][3] = 0.035315;
$FlowrateConv[12][4] = 0.000003;
$FlowrateConv[12][5] = 0.000183;
$FlowrateConv[12][6] = 0.011007;
$FlowrateConv[12][7] = 0.264172;
$FlowrateConv[12][8] = 0.000000264172;
$FlowrateConv[12][9] = 0.000012;
$FlowrateConv[12][10] = 0.000694;
$FlowrateConv[12][11] = 0.041667;
$FlowrateConv[12][12] = 1;
$FlowrateConv[12][13] = 0.000000011574;
$FlowrateConv[12][14] = 0.000000694;
$FlowrateConv[12][15] = 0.000042;
$FlowrateConv[12][16] = 0.001;
$FlowrateConv[12][17] = 0.000003;
$FlowrateConv[12][18] = 0.000153;
$FlowrateConv[12][19] = 0.009165;
$FlowrateConv[12][20] = 0.219969;
$FlowrateConv[12][21] = 0.000000071;
$FlowrateConv[12][22] = 0.000004;
$FlowrateConv[12][23] = 0.000255;
$FlowrateConv[12][24] = 0.00611;
$FlowrateConv[12][25] = 0.000000097;
$FlowrateConv[12][26] = 0.000006;
$FlowrateConv[12][27] = 0.000349;
$FlowrateConv[12][28] = 0.008386;
$FlowrateConv[12][29] = 0.000000073;
$FlowrateConv[12][30] = 0.000004;
$FlowrateConv[12][31] = 0.000262;
$FlowrateConv[12][32] = 0.00629;
$FlowrateConv[12][33] = 0.000000099;
$FlowrateConv[12][34] = 0.000006;
$FlowrateConv[12][35] = 0.000355;
$FlowrateConv[12][36] = 0.008522;
//Cubic meter/sec to other
$FlowrateConv[13][0] = 35.314666;
$FlowrateConv[13][1] = 2118.880018;
$FlowrateConv[13][2] = 127132.800521;
$FlowrateConv[13][3] = 3051187.204737;
$FlowrateConv[13][4] = 264.172051;
$FlowrateConv[13][5] = 15850.323242;
$FlowrateConv[13][6] = 951019.364371;
$FlowrateConv[13][7] = 22824465.526338;
$FlowrateConv[13][8] = 22.824465526338;
$FlowrateConv[13][9] = 1000;
$FlowrateConv[13][10] = 60000;
$FlowrateConv[13][11] = 3600000;
$FlowrateConv[13][12] = 86400000;
$FlowrateConv[13][13] = 1;
$FlowrateConv[13][14] = 60;
$FlowrateConv[13][15] = 3600;
$FlowrateConv[13][16] = 86400;
$FlowrateConv[13][17] = 219.969248;
$FlowrateConv[13][18] = 13198.15484;
$FlowrateConv[13][19] = 791889.279941;
$FlowrateConv[13][20] = 19005343.200198;
$FlowrateConv[13][21] = 6.110257;
$FlowrateConv[13][22] = 366.615414;
$FlowrateConv[13][23] = 21996.92483;
$FlowrateConv[13][24] = 527926.186628;
$FlowrateConv[13][25] = 8.386414;
$FlowrateConv[13][26] = 503.184858;
$FlowrateConv[13][27] = 30191.091798;
$FlowrateConv[13][28] = 724586.238724;
$FlowrateConv[13][29] = 6.289811;
$FlowrateConv[13][30] = 377.388639;
$FlowrateConv[13][31] = 22643.318507;
$FlowrateConv[13][32] = 543439.658933;
$FlowrateConv[13][33] = 8.521679;
$FlowrateConv[13][34] = 511.300743;
$FlowrateConv[13][35] = 30678.044294;
$FlowrateConv[13][36] = 736273.090168;
//Cubic meter/min to other
$FlowrateConv[14][0] = 0.588578;
$FlowrateConv[14][1] = 35.314667;
$FlowrateConv[14][2] = 2118.880009;
$FlowrateConv[14][3] = 50853.120079;
$FlowrateConv[14][4] = 4.402868;
$FlowrateConv[14][5] = 264.172054;
$FlowrateConv[14][6] = 15850.32274;
$FlowrateConv[14][7] = 380407.758772;
$FlowrateConv[14][8] = 0.380407758772;
$FlowrateConv[14][9] = 16.666667;
$FlowrateConv[14][10] = 1000;
$FlowrateConv[14][11] = 60000;
$FlowrateConv[14][12] = 1440000.009216;
$FlowrateConv[14][13] = 0.016667;
$FlowrateConv[14][14] = 1;
$FlowrateConv[14][15] = 60;
$FlowrateConv[14][16] = 1440;
$FlowrateConv[14][17] = 3.666154;
$FlowrateConv[14][18] = 219.969247;
$FlowrateConv[14][19] = 13198.154666;
$FlowrateConv[14][20] = 316755.720003;
$FlowrateConv[14][21] = 0.101838;
$FlowrateConv[14][22] = 6.110257;
$FlowrateConv[14][23] = 366.615414;
$FlowrateConv[14][24] = 8798.769777;
$FlowrateConv[14][25] = 0.139774;
$FlowrateConv[14][26] = 8.386414;
$FlowrateConv[14][27] = 503.184863;
$FlowrateConv[14][28] = 12076.437312;
$FlowrateConv[14][29] = 0.10483;
$FlowrateConv[14][30] = 6.289811;
$FlowrateConv[14][31] = 377.388642;
$FlowrateConv[14][32] = 9057.327649;
$FlowrateConv[14][33] = 0.142028;
$FlowrateConv[14][34] = 8.521679;
$FlowrateConv[14][35] = 511.300738;
$FlowrateConv[14][36] = 12271.218169; ;
//Cubic meter/hour to other
$FlowrateConv[15][0] = 0.00981;
$FlowrateConv[15][1] = 0.58858;
$FlowrateConv[15][2] = 35.314667;
$FlowrateConv[15][3] = 847.552001;
$FlowrateConv[15][4] = 0.073381;
$FlowrateConv[15][5] = 4.40287;
$FlowrateConv[15][6] = 264.17204;
$FlowrateConv[15][7] = 6340.12889;
$FlowrateConv[15][8] = 0.00634;
$FlowrateConv[15][9] = 0.27778;
$FlowrateConv[15][10] = 16.66667;
$FlowrateConv[15][11] = 1000;
$FlowrateConv[15][12] = 24000;
$FlowrateConv[15][13] = 0.000278;
$FlowrateConv[15][14] = 0.016667;
$FlowrateConv[15][15] = 1;
$FlowrateConv[15][16] = 24;
$FlowrateConv[15][17] = 0.061103;
$FlowrateConv[15][18] = 3.66623;
$FlowrateConv[15][19] = 219.9736;
$FlowrateConv[15][20] = 5279.36648;
$FlowrateConv[15][21] = 0.001697;
$FlowrateConv[15][22] = 0.101838;
$FlowrateConv[15][23] = 6.110257;
$FlowrateConv[15][24] = 146.646163;
$FlowrateConv[15][25] = 0.00233;
$FlowrateConv[15][26] = 0.139774;
$FlowrateConv[15][27] = 8.386414;
$FlowrateConv[15][28] = 201.273955;
$FlowrateConv[15][29] = 0.001747;
$FlowrateConv[15][30] = 0.10483;
$FlowrateConv[15][31] = 6.289811;
$FlowrateConv[15][32] = 150.955461;
$FlowrateConv[15][33] = 0.002367;
$FlowrateConv[15][34] = 0.142028;
$FlowrateConv[15][35] = 8.521679;
$FlowrateConv[15][36] = 204.520303;
//Cubic meter/day to other
$FlowrateConv[16][0] = 0.000409;
$FlowrateConv[16][1] = 0.024524;
$FlowrateConv[16][2] = 1.471444;
$FlowrateConv[16][3] = 35.314667;
$FlowrateConv[16][4] = 0.003058;
$FlowrateConv[16][5] = 0.183453;
$FlowrateConv[16][6] = 11.007169;
$FlowrateConv[16][7] = 264.172055;
$FlowrateConv[16][8] = 0.000264172055;
$FlowrateConv[16][9] = 0.011574;
$FlowrateConv[16][10] = 0.694444;
$FlowrateConv[16][11] = 41.666667;
$FlowrateConv[16][12] = 1000.000006;
$FlowrateConv[16][13] = 0.000012;
$FlowrateConv[16][14] = 0.000694;
$FlowrateConv[16][15] = 0.041667;
$FlowrateConv[16][16] = 1;
$FlowrateConv[16][17] = 0.002546;
$FlowrateConv[16][18] = 0.152756;
$FlowrateConv[16][19] = 9.165385;
$FlowrateConv[16][20] = 219.96925;
$FlowrateConv[16][21] = 0.000071;
$FlowrateConv[16][22] = 0.004243;
$FlowrateConv[16][23] = 0.254594;
$FlowrateConv[16][24] = 6.110257;
$FlowrateConv[16][25] = 0.000097;
$FlowrateConv[16][26] = 0.005824;
$FlowrateConv[16][27] = 0.349434;
$FlowrateConv[16][28] = 8.386415;
$FlowrateConv[16][29] = 0.000073;
$FlowrateConv[16][30] = 0.004368;
$FlowrateConv[16][31] = 0.262075;
$FlowrateConv[16][32] = 6.289811;
$FlowrateConv[16][33] = 0.000099;
$FlowrateConv[16][34] = 0.005918;
$FlowrateConv[16][35] = 0.35507;
$FlowrateConv[16][36] = 8.521679;
//UK gallon/sec to other
$FlowrateConv[17][0] = 0.160544;
$FlowrateConv[17][1] = 9.632619;
$FlowrateConv[17][2] = 577.957153;
$FlowrateConv[17][3] = 13870.97164;
$FlowrateConv[17][4] = 1.20095;
$FlowrateConv[17][5] = 72.056996;
$FlowrateConv[17][6] = 4323.419622;
$FlowrateConv[17][7] = 103762.074485;
$FlowrateConv[17][8] = 0.103762074485;
$FlowrateConv[17][9] = 4.54609;
$FlowrateConv[17][10] = 272.7654;
$FlowrateConv[17][11] = 16365.924;
$FlowrateConv[17][12] = 392782.178514;
$FlowrateConv[17][13] = 0.004546;
$FlowrateConv[17][14] = 0.272765;
$FlowrateConv[17][15] = 16.365924;
$FlowrateConv[17][16] = 392.782176;
$FlowrateConv[17][17] = 1;
$FlowrateConv[17][18] = 60;
$FlowrateConv[17][19] = 3600;
$FlowrateConv[17][20] = 86400;
$FlowrateConv[17][21] = 0.027778;
$FlowrateConv[17][22] = 1.666667;
$FlowrateConv[17][23] = 100;
$FlowrateConv[17][24] = 2400;
$FlowrateConv[17][25] = 0.038125;
$FlowrateConv[17][26] = 2.287524;
$FlowrateConv[17][27] = 137.251421;
$FlowrateConv[17][28] = 3294.034254;
$FlowrateConv[17][29] = 0.028594;
$FlowrateConv[17][30] = 1.715643;
$FlowrateConv[17][31] = 102.938564;
$FlowrateConv[17][32] = 2470.525599;
$FlowrateConv[17][33] = 0.03874;
$FlowrateConv[17][34] = 2.324419;
$FlowrateConv[17][35] = 139.46515;
$FlowrateConv[17][36] = 3347.163732;
//UK Gallon/min to other
$FlowrateConv[18][0] = 0.002676;
$FlowrateConv[18][1] = 0.160544;
$FlowrateConv[18][2] = 9.632619;
$FlowrateConv[18][3] = 231.182862;
$FlowrateConv[18][4] = 0.020016;
$FlowrateConv[18][5] = 1.20095;
$FlowrateConv[18][6] = 72.056994;
$FlowrateConv[18][7] = 1729.367916;
$FlowrateConv[18][8] = 0.001729367916;
$FlowrateConv[18][9] = 0.075768;
$FlowrateConv[18][10] = 4.54609;
$FlowrateConv[18][11] = 272.765401;
$FlowrateConv[18][12] = 6546.369671;
$FlowrateConv[18][13] = 0.000076;
$FlowrateConv[18][14] = 0.004546;
$FlowrateConv[18][15] = 0.272765;
$FlowrateConv[18][16] = 6.54637;
$FlowrateConv[18][17] = 0.016667;
$FlowrateConv[18][18] = 1;
$FlowrateConv[18][19] = 60;
$FlowrateConv[18][20] = 1440;
$FlowrateConv[18][21] = 0.000463;
$FlowrateConv[18][22] = 0.027778;
$FlowrateConv[18][23] = 1.666667;
$FlowrateConv[18][24] = 40;
$FlowrateConv[18][25] = 0.000635;
$FlowrateConv[18][26] = 0.038125;
$FlowrateConv[18][27] = 2.287524;
$FlowrateConv[18][28] = 54.900571;
$FlowrateConv[18][29] = 0.000477;
$FlowrateConv[18][30] = 0.028594;
$FlowrateConv[18][31] = 1.715643;
$FlowrateConv[18][32] = 41.175427;
$FlowrateConv[18][33] = 0.000646;
$FlowrateConv[18][34] = 0.03874;
$FlowrateConv[18][35] = 2.324419;
$FlowrateConv[18][36] = 55.786062;
//UK gallon/hour to other
$FlowrateConv[19][0] = 0.000045;
$FlowrateConv[19][1] = 0.002676;
$FlowrateConv[19][2] = 0.160544;
$FlowrateConv[19][3] = 3.853048;
$FlowrateConv[19][4] = 0.000334;
$FlowrateConv[19][5] = 0.020016;
$FlowrateConv[19][6] = 1.20095;
$FlowrateConv[19][7] = 28.822799;
$FlowrateConv[19][8] = 0.000028822799;
$FlowrateConv[19][9] = 0.001263;
$FlowrateConv[19][10] = 0.075768;
$FlowrateConv[19][11] = 4.54609;
$FlowrateConv[19][12] = 109.106163;
$FlowrateConv[19][13] = 0.000001263;
$FlowrateConv[19][14] = 0.000075768;
$FlowrateConv[19][15] = 0.004546;
$FlowrateConv[19][16] = 0.109106;
$FlowrateConv[19][17] = 0.000278;
$FlowrateConv[19][18] = 0.016667;
$FlowrateConv[19][19] = 1;
$FlowrateConv[19][20] = 24;
$FlowrateConv[19][21] = 0.000008;
$FlowrateConv[19][22] = 0.000463;
$FlowrateConv[19][23] = 0.027778;
$FlowrateConv[19][24] = 0.666667;
$FlowrateConv[19][25] = 0.000009;
$FlowrateConv[19][26] = 0.000538;
$FlowrateConv[19][27] = 0.032258;
$FlowrateConv[19][28] = 0.774194;
$FlowrateConv[19][29] = 0.000007;
$FlowrateConv[19][30] = 0.000397;
$FlowrateConv[19][31] = 0.02381;
$FlowrateConv[19][32] = 0.571429;
$FlowrateConv[19][33] = 0.000009;
$FlowrateConv[19][34] = 0.000538;
$FlowrateConv[19][35] = 0.032258;
$FlowrateConv[19][36] = 0.774194;
//UK gallon/day to other
$FlowrateConv[20][0] = 0.000001858;
$FlowrateConv[20][1] = 0.000111;
$FlowrateConv[20][2] = 0.006689;
$FlowrateConv[20][3] = 0.160544;
$FlowrateConv[20][4] = 0.000014;
$FlowrateConv[20][5] = 0.000834;
$FlowrateConv[20][6] = 0.05004;
$FlowrateConv[20][7] = 1.20095;
$FlowrateConv[20][8] = 0.00000120095;
$FlowrateConv[20][9] = 0.000053;
$FlowrateConv[20][10] = 0.003157;
$FlowrateConv[20][11] = 0.18942;
$FlowrateConv[20][12] = 4.54609;
$FlowrateConv[20][13] = 0.0000000053;
$FlowrateConv[20][14] = 0.000076;
$FlowrateConv[20][15] = 0.000189;
$FlowrateConv[20][16] = 0.004546;
$FlowrateConv[20][17] = 0.000011574;
$FlowrateConv[20][18] = 0.000694;
$FlowrateConv[20][19] = 0.041667;
$FlowrateConv[20][20] = 1;
$FlowrateConv[20][21] = 0.000000322;
$FlowrateConv[20][22] = 0.000019;
$FlowrateConv[20][23] = 0.001157;
$FlowrateConv[20][24] = 0.027778;
$FlowrateConv[20][25] = 0.000000441;
$FlowrateConv[20][26] = 0.000026476;
$FlowrateConv[20][27] = 0.001589;
$FlowrateConv[20][28] = 0.038125;
$FlowrateConv[20][29] = 0.000000331;
$FlowrateConv[20][30] = 0.000019857;
$FlowrateConv[20][31] = 0.001191419;
$FlowrateConv[20][32] = 0.028594046;
$FlowrateConv[20][33] = 0.000000448;
$FlowrateConv[20][34] = 0.000026903;
$FlowrateConv[20][35] = 0.001614;
$FlowrateConv[20][36] = 0.03874;
//Barrels/sec to other
$FlowrateConv[21][0] = 5.779571;
$FlowrateConv[21][1] = 346.774293;
$FlowrateConv[21][2] = 20806.457512;
$FlowrateConv[21][3] = 499354.979025;
$FlowrateConv[21][4] = 43.234197;
$FlowrateConv[21][5] = 2594.051856;
$FlowrateConv[21][6] = 155643.106398;
$FlowrateConv[21][7] = 3735434.681447;
$FlowrateConv[21][8] = 3.735434681447;
$FlowrateConv[21][9] = 163.65924;
$FlowrateConv[21][10] = 9819.5544;
$FlowrateConv[21][11] = 589173.264;
$FlowrateConv[21][12] = 14140158.426497;
$FlowrateConv[21][13] = 0.163659;
$FlowrateConv[21][14] = 9.819554;
$FlowrateConv[21][15] = 589.173264;
$FlowrateConv[21][16] = 14140.158336;
$FlowrateConv[21][17] = 36;
$FlowrateConv[21][18] = 2159.99999;
$FlowrateConv[21][19] = 129599.997719;
$FlowrateConv[21][20] = 3110400.024084;
$FlowrateConv[21][21] = 1;
$FlowrateConv[21][22] = 60;
$FlowrateConv[21][23] = 3600;
$FlowrateConv[21][24] = 86400;
$FlowrateConv[21][25] = 1.372514;
$FlowrateConv[21][26] = 82.350851;
$FlowrateConv[21][27] = 4941.051138;
$FlowrateConv[21][28] = 118585.233144;
$FlowrateConv[21][29] = 1.029386;
$FlowrateConv[21][30] = 61.763138;
$FlowrateConv[21][31] = 3705.788298;
$FlowrateConv[21][32] = 88938.921567;
$FlowrateConv[21][33] = 1.394651;
$FlowrateConv[21][34] = 83.679091;
$FlowrateConv[21][35] = 5020.745414;
$FlowrateConv[21][36] = 120497.894369;
//Barrels/min to other
$FlowrateConv[22][0] = 0.096326;
$FlowrateConv[22][1] = 5.779572;
$FlowrateConv[22][2] = 346.774292;
$FlowrateConv[22][3] = 8322.582984;
$FlowrateConv[22][4] = 0.72057;
$FlowrateConv[22][5] = 43.234198;
$FlowrateConv[22][6] = 2594.051773;
$FlowrateConv[22][7] = 62257.244691;
$FlowrateConv[22][8] = 0.062257244691;
$FlowrateConv[22][9] = 2.727654;
$FlowrateConv[22][10] = 163.65924;
$FlowrateConv[22][11] = 9819.5544;
$FlowrateConv[22][12] = 235669.307108;
$FlowrateConv[22][13] = 0.002728;
$FlowrateConv[22][14] = 0.163659;
$FlowrateConv[22][15] = 9.819554;
$FlowrateConv[22][16] = 235.669306;
$FlowrateConv[22][17] = 0.72057;
$FlowrateConv[22][18] = 43.234198;
$FlowrateConv[22][19] = 2594.051773;
$FlowrateConv[22][20] = 62257.244691;
$FlowrateConv[22][21] = 0.016667;
$FlowrateConv[22][22] = 1;
$FlowrateConv[22][23] = 60;
$FlowrateConv[22][24] = 1440;
$FlowrateConv[22][25] = 0.022875;
$FlowrateConv[22][26] = 1.372514;
$FlowrateConv[22][27] = 82.350852;
$FlowrateConv[22][28] = 1976.420552;
$FlowrateConv[22][29] = 0.017156;
$FlowrateConv[22][30] = 1.029386;
$FlowrateConv[22][31] = 61.763138;
$FlowrateConv[22][32] = 1482.315359;
$FlowrateConv[22][33] = 0.023244;
$FlowrateConv[22][34] = 1.394652;
$FlowrateConv[22][35] = 83.67909;
$FlowrateConv[22][36] = 2008.298239;
//Barrels/hr to other
$FlowrateConv[23][0] = 0.001605;
$FlowrateConv[23][1] = 0.096326;
$FlowrateConv[23][2] = 5.779572;
$FlowrateConv[23][3] = 138.709716;
$FlowrateConv[23][4] = 0.012009;
$FlowrateConv[23][5] = 0.72057;
$FlowrateConv[23][6] = 43.234196;
$FlowrateConv[23][7] = 1037.620745;
$FlowrateConv[23][8] = 0.001037620745;
$FlowrateConv[23][9] = 0.045461;
$FlowrateConv[23][10] = 2.727654;
$FlowrateConv[23][11] = 163.65924;
$FlowrateConv[23][12] = 3927.821785;
$FlowrateConv[23][13] = 0.000045;
$FlowrateConv[23][14] = 0.002728;
$FlowrateConv[23][15] = 0.163659;
$FlowrateConv[23][16] = 3.927822;
$FlowrateConv[23][17] = 0.01;
$FlowrateConv[23][18] = 0.6;
$FlowrateConv[23][19] = 36;
$FlowrateConv[23][20] = 864.000007;
$FlowrateConv[23][21] = 0.000278;
$FlowrateConv[23][22] = 0.016667;
$FlowrateConv[23][23] = 1;
$FlowrateConv[23][24] = 24;
$FlowrateConv[23][25] = 0.000381;
$FlowrateConv[23][26] = 0.022875;
$FlowrateConv[23][27] = 1.372514;
$FlowrateConv[23][28] = 32.940343;
$FlowrateConv[23][29] = 0.000286;
$FlowrateConv[23][30] = 0.017156;
$FlowrateConv[23][31] = 1.029386;
$FlowrateConv[23][32] = 24.705256;
$FlowrateConv[23][33] = 0.000387;
$FlowrateConv[23][34] = 0.023244;
$FlowrateConv[23][35] = 1.394652;
$FlowrateConv[23][36] = 33.471637;
//Barrels/day to other
$FlowrateConv[24][0] = 0.000067;
$FlowrateConv[24][1] = 0.004014;
$FlowrateConv[24][2] = 0.240815;
$FlowrateConv[24][3] = 5.779572;
$FlowrateConv[24][4] = 0.0005;
$FlowrateConv[24][5] = 0.030024;
$FlowrateConv[24][6] = 1.801425;
$FlowrateConv[24][7] = 43.234198;
$FlowrateConv[24][8] = 0.000043234198;
$FlowrateConv[24][9] = 0.001894;
$FlowrateConv[24][10] = 0.113652;
$FlowrateConv[24][11] = 6.819135;
$FlowrateConv[24][12] = 163.659244;
$FlowrateConv[24][13] = 0.000002;
$FlowrateConv[24][14] = 0.000114;
$FlowrateConv[24][15] = 0.006819;
$FlowrateConv[24][16] = 0.163659;
$FlowrateConv[24][17] = 0.000417;
$FlowrateConv[24][18] = 0.025;
$FlowrateConv[24][19] = 1.5;
$FlowrateConv[24][20] = 36;
$FlowrateConv[24][21] = 0.000012;
$FlowrateConv[24][22] = 0.000694;
$FlowrateConv[24][23] = 0.041667;
$FlowrateConv[24][24] = 1;
$FlowrateConv[24][25] = 0.000016;
$FlowrateConv[24][26] = 0.000953;
$FlowrateConv[24][27] = 0.057188;
$FlowrateConv[24][28] = 1.372514;
$FlowrateConv[24][29] = 0.000012;
$FlowrateConv[24][30] = 0.000715;
$FlowrateConv[24][31] = 0.042891;
$FlowrateConv[24][32] = 1.029386;
$FlowrateConv[24][33] = 0.000016;
$FlowrateConv[24][34] = 0.000969;
$FlowrateConv[24][35] = 0.05811;
$FlowrateConv[24][36] = 1.394652;
//Barrels (US liquid)/sec to other
$FlowrateConv[25][0] = 4.210937;
$FlowrateConv[25][1] = 252.656249;
$FlowrateConv[25][2] = 15159.374886;
$FlowrateConv[25][3] = 363824.996351;
$FlowrateConv[25][4] = 31.5;
$FlowrateConv[25][5] = 1889.999993;
$FlowrateConv[25][6] = 113399.995987;
$FlowrateConv[25][7] = 2721599.996859;
$FlowrateConv[25][8] = 2.721599996859;
$FlowrateConv[25][9] = 119.24047;
$FlowrateConv[25][10] = 7154.4282;
$FlowrateConv[25][11] = 429265.692;
$FlowrateConv[25][12] = 10302376.673935;
$FlowrateConv[25][13] = 0.11924;
$FlowrateConv[25][14] = 7.154428;
$FlowrateConv[25][15] = 429.265692;
$FlowrateConv[25][16] = 10302.376608;
$FlowrateConv[25][17] = 26.229237;
$FlowrateConv[25][18] = 1573.754186;
$FlowrateConv[25][19] = 94425.249928;
$FlowrateConv[25][20] = 2266206.055703;
$FlowrateConv[25][21] = 0.72859;
$FlowrateConv[25][22] = 43.715394;
$FlowrateConv[25][23] = 2622.923655;
$FlowrateConv[25][24] = 62950.166619;
$FlowrateConv[25][25] = 1;
$FlowrateConv[25][26] = 60;
$FlowrateConv[25][27] = 3600;
$FlowrateConv[25][28] = 86400;
$FlowrateConv[25][29] = 0.75;
$FlowrateConv[25][30] = 45;
$FlowrateConv[25][31] = 2699.999941;
$FlowrateConv[25][32] = 64800.000348;
$FlowrateConv[25][33] = 1.016129;
$FlowrateConv[25][34] = 60.967741;
$FlowrateConv[25][35] = 3658.06442;
$FlowrateConv[25][36] = 87793.54932;
//Barrels (US liquid)/min to other
$FlowrateConv[26][0] = 0.070182;
$FlowrateConv[26][1] = 4.210938;
$FlowrateConv[26][2] = 252.656252;
$FlowrateConv[26][3] = 6063.750041;
$FlowrateConv[26][4] = 0.525;
$FlowrateConv[26][5] = 31.5;
$FlowrateConv[26][6] = 1889.999965;
$FlowrateConv[26][7] = 45360.000708;
$FlowrateConv[26][8] = 0.045360000708;
$FlowrateConv[26][9] = 1.987341;
$FlowrateConv[26][10] = 119.240472;
$FlowrateConv[26][11] = 7154.42832;
$FlowrateConv[26][12] = 171706.280779;
$FlowrateConv[26][13] = 0.001987;
$FlowrateConv[26][14] = 0.11924;
$FlowrateConv[26][15] = 7.154428;
$FlowrateConv[26][16] = 171.70628;
$FlowrateConv[26][17] = 0.437154;
$FlowrateConv[26][18] = 26.229237;
$FlowrateConv[26][19] = 1573.754192;
$FlowrateConv[26][20] = 37770.101562;
$FlowrateConv[26][21] = 0.012143;
$FlowrateConv[26][22] = 0.72859;
$FlowrateConv[26][23] = 43.715395;
$FlowrateConv[26][24] = 1049.169461;
$FlowrateConv[26][25] = 0.016667;
$FlowrateConv[26][26] = 1;
$FlowrateConv[26][27] = 60;
$FlowrateConv[26][28] = 1440;
$FlowrateConv[26][29] = 0.0125;
$FlowrateConv[26][30] = 0.75;
$FlowrateConv[26][31] = 45;
$FlowrateConv[26][32] = 1080.000024;
$FlowrateConv[26][33] = 0.016935;
$FlowrateConv[26][34] = 1.016129;
$FlowrateConv[26][35] = 60.967741;
$FlowrateConv[26][36] = 1463.225847;
//Barrels (US liquid)/hr to other
$FlowrateConv[27][0] = 0.00117;
$FlowrateConv[27][1] = 0.070182;
$FlowrateConv[27][2] = 4.210937;
$FlowrateConv[27][3] = 101.0625;
$FlowrateConv[27][4] = 0.00875;
$FlowrateConv[27][5] = 0.525;
$FlowrateConv[27][6] = 34.5;
$FlowrateConv[27][7] = 756.000004;
$FlowrateConv[27][8] = 0.000756000004;
$FlowrateConv[27][9] = 0.033122;
$FlowrateConv[27][10] = 1.987341;
$FlowrateConv[27][11] = 119.240471;
$FlowrateConv[27][12] = 2861.771318;
$FlowrateConv[27][13] = 0.000033;
$FlowrateConv[27][14] = 0.001987;
$FlowrateConv[27][15] = 0.11924;
$FlowrateConv[27][16] = 2.861771;
$FlowrateConv[27][17] = 0.007286;
$FlowrateConv[27][18] = 0.437154;
$FlowrateConv[27][19] = 26.229236;
$FlowrateConv[27][20] = 629.501686;
$FlowrateConv[27][21] = 0.000202;
$FlowrateConv[27][22] = 0.012143;
$FlowrateConv[27][23] = 0.72859;
$FlowrateConv[27][24] = 17.486158;
$FlowrateConv[27][25] = 0.000278;
$FlowrateConv[27][26] = 0.016667;
$FlowrateConv[27][27] = 1;
$FlowrateConv[27][28] = 24;
$FlowrateConv[27][29] = 0.000208;
$FlowrateConv[27][30] = 0.0125;
$FlowrateConv[27][31] = 0.75;
$FlowrateConv[27][32] = 18;
$FlowrateConv[27][33] = 0.000282;
$FlowrateConv[27][34] = 0.016935;
$FlowrateConv[27][35] = 1.016129;
$FlowrateConv[27][36] = 24.387097;
//Barrels (US liquid)/day to other
$FlowrateConv[28][0] = 0.000049;
$FlowrateConv[28][1] = 0.002924;
$FlowrateConv[28][2] = 0.175456;
$FlowrateConv[28][3] = 4.210937;
$FlowrateConv[28][4] = 0.000365;
$FlowrateConv[28][5] = 0.021875;
$FlowrateConv[28][6] = 1.3125;
$FlowrateConv[28][7] = 31.5;
$FlowrateConv[28][8] = 0.0000315;
$FlowrateConv[28][9] = 0.00138;
$FlowrateConv[28][10] = 0.082806;
$FlowrateConv[28][11] = 4.968353;
$FlowrateConv[28][12] = 119.240466;
$FlowrateConv[28][13] = 0.000001;
$FlowrateConv[28][14] = 0.000083;
$FlowrateConv[28][15] = 0.004968;
$FlowrateConv[28][16] = 0.11924;
$FlowrateConv[28][17] = 0.000304;
$FlowrateConv[28][18] = 0.018215;
$FlowrateConv[28][19] = 1.092885;
$FlowrateConv[28][20] = 26.229236;
$FlowrateConv[28][21] = 0.000008;
$FlowrateConv[28][22] = 0.000506;
$FlowrateConv[28][23] = 0.030358;
$FlowrateConv[28][24] = 0.72859;
$FlowrateConv[28][25] = 0.000012;
$FlowrateConv[28][26] = 0.000694;
$FlowrateConv[28][27] = 0.041667;
$FlowrateConv[28][28] = 1;
$FlowrateConv[28][29] = 0.000008681;
$FlowrateConv[28][30] = 0.000521;
$FlowrateConv[28][31] = 0.03125;
$FlowrateConv[28][32] = 0.75;
$FlowrateConv[28][33] = 0.000012;
$FlowrateConv[28][34] = 0.000706;
$FlowrateConv[28][35] = 0.042339;
$FlowrateConv[28][36] = 1.016129;
//Barrels (US oil)/sec to other
$FlowrateConv[29][0] = 5.614583;
$FlowrateConv[29][1] = 336.875013;
$FlowrateConv[29][2] = 20212.500696;
$FlowrateConv[29][3] = 485100.015476;
$FlowrateConv[29][4] = 42;
$FlowrateConv[29][5] = 2520.000096;
$FlowrateConv[29][6] = 151200.000989;
$FlowrateConv[29][7] = 3628800.147976;
$FlowrateConv[29][8] = 3.628800147976;
$FlowrateConv[29][9] = 158.9873;
$FlowrateConv[29][10] = 9539.238;
$FlowrateConv[29][11] = 572354.28;
$FlowrateConv[29][12] = 13736502.807914;
$FlowrateConv[29][13] = 0.158987;
$FlowrateConv[29][14] = 9.539238;
$FlowrateConv[29][15] = 572.35428;
$FlowrateConv[29][16] = 13736.50272;
$FlowrateConv[29][17] = 34.972317;
$FlowrateConv[29][18] = 2098.339003;
$FlowrateConv[29][19] = 125900.338517;
$FlowrateConv[29][20] = 3021608.200973;
$FlowrateConv[29][21] = 0.971453;
$FlowrateConv[29][22] = 58.287195;
$FlowrateConv[29][23] = 3497.231687;
$FlowrateConv[29][24] = 83933.559011;
$FlowrateConv[29][25] = 1.333333;
$FlowrateConv[29][26] = 80.000002;
$FlowrateConv[29][27] = 4800.000169;
$FlowrateConv[29][28] = 115200.009712;
$FlowrateConv[29][29] = 1;
$FlowrateConv[29][30] = 60;
$FlowrateConv[29][31] = 3600;
$FlowrateConv[29][32] = 86400;
$FlowrateConv[29][33] = 1.354839;
$FlowrateConv[29][34] = 81.290325;
$FlowrateConv[29][35] = 4877.419432;
$FlowrateConv[29][36] = 117058.070669;
//Barrels (US oil)/min to other
$FlowrateConv[30][0] = 0.093576;
$FlowrateConv[30][1] = 5.614583;
$FlowrateConv[30][2] = 336.875007;
$FlowrateConv[30][3] = 8085.000156;
$FlowrateConv[30][4] = 0.7;
$FlowrateConv[30][5] = 4;
$FlowrateConv[30][6] = 151200.000989;
$FlowrateConv[30][7] = 3628800.147976;
$FlowrateConv[30][8] = 3.628800147976;
$FlowrateConv[30][9] = 158.9873;
$FlowrateConv[30][10] = 9539.238;
$FlowrateConv[30][11] = 572354.28;
$FlowrateConv[30][12] = 13736502.807914;
$FlowrateConv[30][13] = 0.158987;
$FlowrateConv[30][14] = 9.539238;
$FlowrateConv[30][15] = 572.35428;
$FlowrateConv[30][16] = 13736.50272;
$FlowrateConv[30][17] = 0.582872;
$FlowrateConv[30][18] = 34.972316;
$FlowrateConv[30][19] = 2098.338949;
$FlowrateConv[30][20] = 50360.136049;
$FlowrateConv[30][21] = 0.016191;
$FlowrateConv[30][22] = 0.971453;
$FlowrateConv[30][23] = 58.287194;
$FlowrateConv[30][24] = 1398.892633;
$FlowrateConv[30][25] = 0.022222;
$FlowrateConv[30][26] = 1.333333;
$FlowrateConv[30][27] = 80.000002;
$FlowrateConv[30][28] = 1920.000138;
$FlowrateConv[30][29] = 0.016667;
$FlowrateConv[30][30] = 1;
$FlowrateConv[30][31] = 60;
$FlowrateConv[30][32] = 1440;
$FlowrateConv[30][33] = 0.022581;
$FlowrateConv[30][34] = 1.354839;
$FlowrateConv[30][35] = 81.290323;
$FlowrateConv[30][36] = 1950.96782;
//Barrels (US oil)/hr to other
$FlowrateConv[31][0] = 0.00156;
$FlowrateConv[31][1] = 0.093576;
$FlowrateConv[31][2] = 5.614583;
$FlowrateConv[31][3] = 134.750002;
$FlowrateConv[31][4] = 0.011667;
$FlowrateConv[31][5] = 0.7;
$FlowrateConv[31][6] = 42;
$FlowrateConv[31][7] = 1008;
$FlowrateConv[31][8] = 0.001008;
$FlowrateConv[31][9] = 0.044163;
$FlowrateConv[31][10] = 2.649788;
$FlowrateConv[31][11] = 158.987297;
$FlowrateConv[31][12] = 3815.695148;
$FlowrateConv[31][13] = 0.000044;
$FlowrateConv[31][14] = 0.00265;
$FlowrateConv[31][15] = 0.158987;
$FlowrateConv[31][16] = 3.815695;
$FlowrateConv[31][17] = 0.009715;
$FlowrateConv[31][18] = 0.582872;
$FlowrateConv[31][19] = 34.972316;
$FlowrateConv[31][20] = 839.335594;
$FlowrateConv[31][21] = 0.00027;
$FlowrateConv[31][22] = 0.016191;
$FlowrateConv[31][23] = 0.971453;
$FlowrateConv[31][24] = 23.314877;
$FlowrateConv[31][25] = 0.00037;
$FlowrateConv[31][26] = 0.022222;
$FlowrateConv[31][27] = 1.333333;
$FlowrateConv[31][28] = 32.000002;
$FlowrateConv[31][29] = 0.000278;
$FlowrateConv[31][30] = 0.016667;
$FlowrateConv[31][31] = 1;
$FlowrateConv[31][32] = 24;
$FlowrateConv[31][33] = 0.000376;
$FlowrateConv[31][34] = 0.022581;
$FlowrateConv[31][35] = 1.354839;
$FlowrateConv[31][36] = 32.51613;
//Barrels (US oil)/day to other
$FlowrateConv[32][0] = 0.000065;
$FlowrateConv[32][1] = 0.003899;
$FlowrateConv[32][2] = 0.233941;
$FlowrateConv[32][3] = 5.614583;
$FlowrateConv[32][4] = 0.000486;
$FlowrateConv[32][5] = 0.029167;
$FlowrateConv[32][6] = 1.75;
$FlowrateConv[32][7] = 42;
$FlowrateConv[32][8] = 0.000042;
$FlowrateConv[32][9] = 0.00184;
$FlowrateConv[32][10] = 0.110408;
$FlowrateConv[32][11] = 6.624471;
$FlowrateConv[32][12] = 158.987293;
$FlowrateConv[32][13] = 0.000002;
$FlowrateConv[32][14] = 0.00011;
$FlowrateConv[32][15] = 0.006624;
$FlowrateConv[32][16] = 0.158987;
$FlowrateConv[32][17] = 0.000405;
$FlowrateConv[32][18] = 0.024286;
$FlowrateConv[32][19] = 1.45718;
$FlowrateConv[32][20] = 34.972315;
$FlowrateConv[32][21] = 0.000011;
$FlowrateConv[32][22] = 0.000675;
$FlowrateConv[32][23] = 0.040477;
$FlowrateConv[32][24] = 0.971453;
$FlowrateConv[32][25] = 0.000015;
$FlowrateConv[32][26] = 0.000926;
$FlowrateConv[32][27] = 0.055556;
$FlowrateConv[32][28] = 1.333333;
$FlowrateConv[32][29] = 0.000012;
$FlowrateConv[32][30] = 0.000694;
$FlowrateConv[32][31] = 0.041667;
$FlowrateConv[32][32] = 1;
$FlowrateConv[32][33] = 0.000015681;
$FlowrateConv[32][34] = 0.000941;
$FlowrateConv[32][35] = 0.056452;
$FlowrateConv[32][36] = 1.354839;
//Barrels (US federal)/sec to other
$FlowrateConv[33][0] = 4.144097;
$FlowrateConv[33][1] = 248.645845;
$FlowrateConv[33][2] = 14918.750635;
$FlowrateConv[33][3] = 358050.014328;
$FlowrateConv[33][4] = 31.000001;
$FlowrateConv[33][5] = 1860.000086;
$FlowrateConv[33][6] = 111600.001636;
$FlowrateConv[33][7] = 2678400.130958;
$FlowrateConv[33][8] = 2.678400130958;
$FlowrateConv[33][9] = 117.34777;
$FlowrateConv[33][10] = 7040.8662;
$FlowrateConv[33][11] = 422451.972;
$FlowrateConv[33][12] = 10138847.392889;
$FlowrateConv[33][13] = 0.117348;
$FlowrateConv[33][14] = 7.040866;
$FlowrateConv[33][15] = 422.451972;
$FlowrateConv[33][16] = 10138.847328;
$FlowrateConv[33][17] = 25.812901;
$FlowrateConv[33][18] = 1548.774039;
$FlowrateConv[33][19] = 92926.441088;
$FlowrateConv[33][20] = 2230234.642628;
$FlowrateConv[33][21] = 0.717025;
$FlowrateConv[33][22] = 43.021501;
$FlowrateConv[33][23] = 2581.290076;
$FlowrateConv[33][24] = 61950.960725;
$FlowrateConv[33][25] = 0.984127;
$FlowrateConv[33][26] = 59.047621;
$FlowrateConv[33][27] = 3542.857296;
$FlowrateConv[33][28] = 85028.579287;
$FlowrateConv[33][29] = 0.738095;
$FlowrateConv[33][30] = 44.285715;
$FlowrateConv[33][31] = 2657.142932;
$FlowrateConv[33][32] = 63771.432105;
$FlowrateConv[33][33] = 1;
$FlowrateConv[33][34] = 60;
$FlowrateConv[33][35] = 3600;
$FlowrateConv[33][36] = 86400;
//Barrels (US federal)/min to other
$FlowrateConv[34][0] = 0.069068;
$FlowrateConv[34][1] = 4.144097;
$FlowrateConv[34][2] = 248.645835;
$FlowrateConv[34][3] = 5967.500035;
$FlowrateConv[34][4] = 0.516667;
$FlowrateConv[34][5] = 31;
$FlowrateConv[34][6] = 1859.999964;
$FlowrateConv[34][7] = 44640.000661;
$FlowrateConv[34][8] = 0.044640000661;
$FlowrateConv[34][9] = 1.955796;
$FlowrateConv[34][10] = 117.347766;
$FlowrateConv[34][11] = 7040.86596;
$FlowrateConv[34][12] = 168980.784121;
$FlowrateConv[34][13] = 0.001956;
$FlowrateConv[34][14] = 0.117348;
$FlowrateConv[34][15] = 7.040866;
$FlowrateConv[34][16] = 168.980783;
$FlowrateConv[34][17] = 0.430215;
$FlowrateConv[34][18] = 25.8129;
$FlowrateConv[34][19] = 1548.773965;
$FlowrateConv[34][20] = 37170.57611;
$FlowrateConv[34][21] = 0.01195;
$FlowrateConv[34][22] = 0.717025;
$FlowrateConv[34][23] = 43.0215;
$FlowrateConv[34][24] = 1032.515977;
$FlowrateConv[34][25] = 0.016402;
$FlowrateConv[34][26] = 0.984127;
$FlowrateConv[34][27] = 59.04762;
$FlowrateConv[34][28] = 1417.14294;
$FlowrateConv[34][29] = 0.012302;
$FlowrateConv[34][30] = 0.738095;
$FlowrateConv[34][31] = 44.285714;
$FlowrateConv[34][32] = 1062.857166;
$FlowrateConv[34][33] = 0.016667;
$FlowrateConv[34][34] = 1;
$FlowrateConv[34][35] = 60;
$FlowrateConv[34][36] = 1440;
//Barrels (US federal)/hr to other
$FlowrateConv[35][0] = 0.001151;
$FlowrateConv[35][1] = 0.069068;
$FlowrateConv[35][2] = 4.144097;
$FlowrateConv[35][3] = 99.458335;
$FlowrateConv[35][4] = 0.008611;
$FlowrateConv[35][5] = 0.516667;
$FlowrateConv[35][6] = 31;
$FlowrateConv[35][7] = 744.000019;
$FlowrateConv[35][8] = 0.000744000019;
$FlowrateConv[35][9] = 0.032597;
$FlowrateConv[35][10] = 1.955796;
$FlowrateConv[35][11] = 117.347767;
$FlowrateConv[35][12] = 2816.346431;
$FlowrateConv[35][13] = 0.000033;
$FlowrateConv[35][14] = 0.001956;
$FlowrateConv[35][15] = 0.117348;
$FlowrateConv[35][16] = 2.816346;
$FlowrateConv[35][17] = 0.00717;
$FlowrateConv[35][18] = 0.430215;
$FlowrateConv[35][19] = 25.8129;
$FlowrateConv[35][20] = 619.509608;
$FlowrateConv[35][21] = 0.000199;
$FlowrateConv[35][22] = 0.01195;
$FlowrateConv[35][23] = 0.717025;
$FlowrateConv[35][24] = 17.2086;
$FlowrateConv[35][25] = 0.000273;
$FlowrateConv[35][26] = 0.016402;
$FlowrateConv[35][27] = 0.984127;
$FlowrateConv[35][28] = 23.619049;
$FlowrateConv[35][29] = 0.000205;
$FlowrateConv[35][30] = 0.012302;
$FlowrateConv[35][31] = 0.738095;
$FlowrateConv[35][32] = 17.714286;
$FlowrateConv[35][33] = 0.000278;
$FlowrateConv[35][34] = 0.016667;
$FlowrateConv[35][35] = 1;
$FlowrateConv[35][36] = 24;
//Barrels (US federal)/day to other
$FlowrateConv[36][0] = 0.000048;
$FlowrateConv[36][1] = 0.002878;
$FlowrateConv[36][2] = 0.172671;
$FlowrateConv[36][3] = 4.144097;
$FlowrateConv[36][4] = 0.000359;
$FlowrateConv[36][5] = 0.021528;
$FlowrateConv[36][6] = 1.291667;
$FlowrateConv[36][7] = 31;
$FlowrateConv[36][8] = 0.000031;
$FlowrateConv[36][9] = 0.001358;
$FlowrateConv[36][10] = 0.081492;
$FlowrateConv[36][11] = 4.88949;
$FlowrateConv[36][12] = 117.347764;
$FlowrateConv[36][13] = 0.000001358;
$FlowrateConv[36][14] = 0.000081;
$FlowrateConv[36][15] = 0.004889;
$FlowrateConv[36][16] = 0.117348;
$FlowrateConv[36][17] = 0.000299;
$FlowrateConv[36][18] = 0.017926;
$FlowrateConv[36][19] = 1.075537;
$FlowrateConv[36][20] = 25.812899;
$FlowrateConv[36][21] = 0.000008;
$FlowrateConv[36][22] = 0.000498;
$FlowrateConv[36][23] = 0.029876;
$FlowrateConv[36][24] = 0.717025;
$FlowrateConv[36][25] = 0.000011;
$FlowrateConv[36][26] = 0.000683;
$FlowrateConv[36][27] = 0.041005;
$FlowrateConv[36][28] = 0.984127;
$FlowrateConv[36][29] = 0.000009;
$FlowrateConv[36][30] = 0.000513;
$FlowrateConv[36][31] = 0.030754;
$FlowrateConv[36][32] = 0.738095;
$FlowrateConv[36][33] = 0.000012;
$FlowrateConv[36][34] = 0.000694;
$FlowrateConv[36][35] = 0.041667;
$FlowrateConv[36][36] = 1;

// get selected units – Diameters
if (@$_POST[‘DiameterUnit’] != “”)
{
$DiameterUnit_value = $_POST[‘DiameterUnit’];
}
else
{
$_POST[‘DiameterUnit’] = $Unit_index;
}
if (@$_POST[‘PrevDiameterUnit’] != “”)
{
$PrevDiameterUnit_value = $_POST[‘PrevDiameterUnit’];
}
else
{
$_POST[‘PrevDiameterUnit’] = $Unit_index;
}

// get selected units – Velocity
if (@$_POST[‘VelocityUnit’] != “”)
{
$VelocityUnit_value = $_POST[‘VelocityUnit’];
}
else
{
$_POST[‘VelocityUnit’] = $Unit_index;
}

if (@$_POST[‘PrevVelocityUnit’] != “”)
{
$PrevVelocityUnit_value = $_POST[‘PrevVelocityUnit’];
}
else
{
$_POST[‘PrevVelocityUnit’] = $Unit_index;
}

// get selected units – flow rate
if (@$_POST[‘FlowrateUnit’] != “”)
{
$FlowrateUnit_value = $_POST[‘FlowrateUnit’];
}
else
{
$_POST[‘FlowrateUnit’] = $Unit_index;
}
if (@$_POST[‘PrevFlowrateUnit’] != “”)
{
$PrevFlowrateUnit_value = $_POST[‘PrevFlowrateUnit’];
}
else
{
$_POST[‘PrevFlowrateUnit’] = $Unit_index;
}

switch (@$_POST[‘Calculate’])
{
case “0”: // conversion for Diameter
if (@$_POST[‘Diameter’] != “”)
{
if ($DiameterUnit_value != $PrevDiameterUnit_value)
{
echo $Diameter_value;
if ($DiameterUnit_value == 0)
{
$Diameter_value = $_POST[‘Diameter’] / $Inch_to_mm;
}
elseif ($DiameterUnit_value == 1)
{
$Diameter_value = $_POST[‘Diameter’] * $Inch_to_mm;
}
$_POST[‘Diameter’] = sprintf(‘%0.8f’, $Diameter_value);
}
$_POST[‘PrevDiameterUnit’] = $DiameterUnit_value;
}
break;

case “1”: // conversion for Velocity
if (@$_POST[‘Velocity’] != “”)
{
if ($VelocityUnit_value != $PrevVelocityUnit_value)
{
$Velocity_value = $VelocityConv[$PrevVelocityUnit_value][$VelocityUnit_value] * $_POST[‘Velocity’];
$_POST[‘Velocity’] = sprintf(‘%0.8f’, $Velocity_value);
}
$_POST[‘PrevVelocityUnit’] = $VelocityUnit_value;
}
break;

case “2”: // conversion for Flowrate
if (@$_POST[‘Flowrate’] != “”)
{
if ($FlowrateUnit_value != $PrevFlowrateUnit_value)
{
$Flowrate_value = $FlowrateConv[$PrevFlowrateUnit_value][$FlowrateUnit_value] * $_POST[‘Flowrate’];
$_POST[‘Flowrate’] = sprintf(‘%0.8f’, $Flowrate_value);
}
$_POST[‘PrevFlowrateUnit’] = $FlowrateUnit_value;
}
break;

case “Calculate”: // calculate
// Calculate Flowrate
if (@$_POST[‘Diameter’] != “” and @$_POST[‘Velocity’] != “”)
{
// Convert Diameter to base unit
if ($DiameterUnit_value == 0)
{
$Diameter_value = $_POST[‘Diameter’] * $Inch_to_mm;
}
elseif ($DiameterUnit_value == 1)
{
$Diameter_value = $_POST[‘Diameter’];
}
// Convert Velocity to base unit
$Velocity_value = $VelocityConv[$VelocityUnit_value][3] * $_POST[‘Velocity’];
// Calculate Flowrate
$Flowrate_value = $FlowRateConst * $Diameter_value * $Diameter_value * $Velocity_value;
$Flowrate_value = $FlowrateConv[15][$FlowrateUnit_value] * $Flowrate_value;
$_POST[‘Flowrate’] = sprintf(‘%0.8f’, $Flowrate_value);
}

// Calculate Diameter
elseif (@$_POST[‘Flowrate’] != “” and @$_POST[‘Velocity’] != “”)
{
// Convert Flowrate to base unit
$Flowrate_value = $FlowrateConv[$FlowrateUnit_value][15] * $_POST[‘Flowrate’];
//Convert Velocity to base unit
$Velocity_value = $VelocityConv[$VelocityUnit_value][3] * $_POST[‘Velocity’];
// Calculate Diameter
$Diameter_value = SQRT($Flowrate_value / ($Velocity_value * $FlowRateConst));
if ($DiameterUnit_value == 0)
{
$Diameter_value = $Diameter_value / $Inch_to_mm;
}
$_POST[‘Diameter’] = sprintf(‘%0.8f’, $Diameter_value);
}

// Calculate Velocity
elseif (@$_POST[‘Flowrate’] != “” and @$_POST[‘Diameter’] != “”)
{
// Convert Diameter to base unit
if ($DiameterUnit_value == 0)
{
$Diameter_value = $_POST[‘Diameter’] * $Inch_to_mm;
}
elseif ($DiameterUnit_value == 1)
{
$Diameter_value = $_POST[‘Diameter’];
}
// Convert Flowrate to base unit
$Flowrate_value = $FlowrateConv[$FlowrateUnit_value][15] * $_POST[‘Flowrate’];
// Calculate Velocity
$Velocity_value = $Flowrate_value / ($Diameter_value * $Diameter_value * $FlowRateConst);
$Velocity_value = $VelocityConv[3][$VelocityUnit_value] * $Velocity_value;
$_POST[‘Velocity’] = sprintf(‘%0.8f’, $Velocity_value);
}
break;

case “Reset”: // reset
$_POST[‘Diameter’] = “”;
$_POST[‘Velocity’] = “”;
$_POST[‘Flowrate’] = “”;
break;
}
?>
<html>
<head>
<TITLE>Volume Flow rate Calculation</TITLE>

<META name=”title” content=”Flow meters- Directory of manufacturers of flowmeters.”>
<META NAME=”description” CONTENT=”Directory of manufacturers and suppliers of vortex,turbine,orifice and other flow meters used for measuring thermal mass, air, gas water and other liquids. “>

<META NAME=”keywords” CONTENT=”flow meters,flowmeter.flowmeters,flow meter,air flow meter,ultrasonic flow meters,thermal mass flow meters,mass flow meters,turbine flow meters,magnetic flow meters,electromagnetic flow meters,water flow meters,liquid flow meters,repair,bulk solids,gas,HVAC,mass,medical,OEM,precision,propeller,radar,sanitary,Telfon,batching,blending,coriolis,Cryogenic,Custom,Differential pressure,disposable,Doppler,electronic,fuel,high pressure,high temperature,in-line,insertion,laminar,liquid,low flow,multifunction,oil,open channel,panel mounting,plastic,portable,positive displacement,rental,sanitary,steam,transit time,ultrasonic ,variable area,volumetric,vortex shedding,capillary type,inert gas,paddlewheel,water,portable,digital,TU,shuttle type,mag,electronic mass,wedge type,bi directional,flow control,peak,carbon dioxide,coriolis effect mass flow meters,mass air,universal “>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<style type=”text/css”>
<!–
body { margin: 0px 0px; padding: 0px 0px}

.size10pt { font-family: Arial, Helvetica, sans-serif; font-size: 10px}
.size12pt { font-family: Arial, Helvetica, sans-serif; font-size: 12px}
.size14pt { font-family: Arial, Helvetica, sans-serif; font-size: 14px}
.size16pt { font-family: Arial, Helvetica, sans-serif; font-size: 16px}
–>
</style>

<script src=”Scripts/AC_RunActiveContent.js” type=”text/javascript”></script>
<script src=”Scripts/swfobject_modified.js” type=”text/javascript”></script></head>

<body bgcolor=”#FFFFFF”>
<table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”5″>
<tr bgcolor=”#ffffff”>
<td bgcolor=”#FFFFFF” class=”size12pt”><table width=”100%” border=”0″ cellspacing=”0″ cellpadding=”5″>
<tr>
<td width=”30%”><img src=”images/rate-of-flow.jpg” alt=”rate of flow” width=”366″ ></td>
<td width=”70%” class=”size12pt”>Flow calculator is a small, compact and useful tool which helps the user make very fast flow related calculations . &nbsp;It is a simple calculation without too many options for users who only want to see what they might expect . The simple interface only contains three text boxes. These text boxes correspond to the inside diameter of the cylindrical pipe, velocity and the volumetric flow rate</td>
</tr>
</table>
Any two quantities when filled in the text boxes can be used to calculate the third one. Inside diameter can be provided in any one two units ie. inches and milimeters. Similarly, velocity can also be provided in any of four units such as inches/second, feets/second, meters/second and centimeters/second. The third quantity can be expressed in any of the units such as cubic feet/sec, cubic feet/min cubic feet/day, US gallon/sec, US gallon/sec, UK Barrels/sec, UK Barrels/sec, US Oil Barrels/sec and US Federal Barrels/sec </td>
</tr>
<tr>
<td valign=”top” class=”size12pt”><form name=”Calculator” method=”POST”>
<input type=”hidden” name=”Calculate” value=”Calculate”>
<table border=”0″ cellspacing=”0″ cellpadding=”2″>
<tr>
<td><b>Inside Diameter:</b></td>
<td><input type=”text” name=”Diameter” value=”<?php echo @$_POST[‘Diameter’]?>”></td>
<td><input type=”hidden” name=”PrevDiameterUnit” value=”<?php echo @$_POST[‘PrevDiameterUnit’]?>”>
<select name=”DiameterUnit” onChange=”self.document.Calculator.Calculate.value=’0′;self.document.Calculator.submit()” style=”width: 180; “>
<?php
for ($i=0;$i<=$DiameterUnitsNo;$i++)
{
echo “<option value=’$i'”;
if (@$_POST[‘DiameterUnit’] == $i)
{
echo ” selected”;
}
echo “>$DiameterUnits[$i]</option>\n”;
}
?>
</select></td>
</tr>
<tr>
<td><b>Velocity:</b></td>
<td><input type=”text” name=”Velocity” value=”<?php echo @$_POST[‘Velocity’]?>”></td>
<td><input type=”hidden” name=”PrevVelocityUnit” value=”<?php echo @$_POST[‘PrevVelocityUnit’]?>”>
<select name=”VelocityUnit” onChange=”self.document.Calculator.Calculate.value=’1′;self.document.Calculator.submit()” style=”width: 180; “>
<?php
for ($i=0;$i<=$VelocityUnitsNo;$i++)
{
echo “<option value=’$i'”;
if (@$_POST[‘VelocityUnit’] == $i)
{
echo ” selected”;
}
echo “>$VelocityUnits[$i]</option>\n”;
}
?>
</select></td>
</tr>
<tr>
<td><b>Volumetric Flowrate:</b></td>
<td><input type=”text” name=”Flowrate” value=”<?php echo @$_POST[‘Flowrate’]?>”></td>
<td><input type=”hidden” name=”PrevFlowrateUnit” value=”<?php echo @$_POST[‘PrevFlowrateUnit’]?>”>
<select name=”FlowrateUnit” onChange=”self.document.Calculator.Calculate.value=’2′;self.document.Calculator.submit()” style=”width: 180; “>
<?php
for ($i=0;$i<=$FlowrateUnitsNo;$i++)
{
echo “<option value=’$i'”;
if (@$_POST[‘FlowrateUnit’]== $i)
{
echo ” selected”;
}
echo “>$FlowrateUnits[$i]</option>\n”;
}
?>
</select></td>
</tr>
</table>
<p>
<input type=”submit” value=”Calculate”>
&nbsp;&nbsp;
<input type=”button” value=”Reset” onClick=”self.document.Calculator.Calculate.value=’Reset’;self.document.Calculator.submit()”>
</p>

</form></td>
</tr>
</table>
</body>
</html>

{/source}

Solve for either pipe diameter, velocity or volumetric flow rate
Basic Equation Formula for Velocity Pipe and Flow Rate

Pipe Flow Calculator

Scroll to Top