using IStation.Model;
|
|
namespace IStation.Common
|
{
|
public class DimensionlessCurvesHelper
|
{
|
#region 无量纲参数
|
static double[] h35 ={106.48,107.45,108.14,108.45,108.4,108.12,107.43,
|
106.22,104.69,102.55,100,96.31,91.62,85.72,82.32},
|
q35 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 135 },
|
p35 ={29.35,36.95,44.29,51.63,59.05,66.29,73.53,80.3,87.16,
|
93.57,100,106.03,111.56,116.53,118.91},
|
ef35 ={0,32.016,51.9786,66.5992,77.5766,85.9643,92.2565,96.3363,98.7294,
|
99.7017,100,99.2818,97.2984,93.5774,91.1162},
|
npsh35y = { 8.13, 7.78, 7.75 },
|
npsh35x = { 3.02, 5.56, 7.002 };
|
static double[] q50 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 135 },
|
h50 ={107.74,108.68,109.21,109.35,109.31,108.93,108.16,107.01,105.37,
|
103.07,100,95.7,90.43,84.41,81.03},
|
p50 ={31,38.73,46.27,53.73,60.9,68.04,74.89,81.73,87.93,
|
93.91,100,105.78,111.04,115.82,118.09},
|
ef50 ={0,31.171,50.2947,64.4423,75.5681,84.4261,91.0346,95.6539,98.5048,
|
99.8446,100,99.1393,96.7859,92.732,90.1212},
|
npsh50x = { 8.32, 13.9, 16.68 },
|
npsh50y = { 8.5, 7.6, 5.6 };
|
static double[] h70 ={109.98,110.47,110.88,111.04,111,110.4,109.5,107.98,
|
106.03,103.38,100,95.35,89.62,83.27,78.73},
|
q70 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 135 },
|
p70 ={32.95,40.6,48.06,55.35,62.2,68.96,75.62,82.1,88.09,
|
93.94,100,105.34,110.45,115.04,117.17},
|
ef70 ={0,29.3813,48.6052,62.9238,74.3451,83.2073,89.925,94.9372,98.3296,
|
99.7797,100,99.0413,96.2992,91.8033,89.0156},
|
npsh70x = { 1.6, 3, 3.9 },
|
npsh70y = { 6.6, 6.7, 6.0 };
|
static double[] h85 ={112,112.51,112.79,112.75,112.36,111.62,110.58,108.95,
|
106.76,103.82,100,95.02,89.19,82.22,78.27},
|
q85 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 135 },
|
p85 ={35.35,42.54,49.4,56.33,63.13,69.85,76.41,82.59,88.61,
|
94.38,100,105.15,109.83,114.25,116.26},
|
ef85 ={0,27.9416,46.721,61.37,72.91,81.9,88.82,94.1319,97.9261,
|
99.6572,100,98.8662,95.8912,91.0496,88.0017},
|
npsh85x = { 30.6, 47.2, 55.6 },
|
npsh85y = { 6.6, 5.9, 5.2 };
|
static double[] h100 ={114.5,114.41,114.26,114.02,113.54,112.77,111.47,
|
109.67,107.37,103.87,100,94.55,87.95,80,75.78},
|
q100 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 135 },
|
p100 ={37.83,44.66,51.51,58.26,64.74,71.18,77.41,83.4,89.02,
|
94.71,100,104.96,109.34,113.25,115.1},
|
ef100 ={0,26.4816,45.1972,60.00,71.7881,80.8615,87.9351,93.497,97.617,
|
99.5495,100,98.6925,95.3254,90.2162,87.1612},
|
npsh100x = { 27.5, 45, 67.5 },
|
npsh100y = { 8.5, 8, 7.5 };
|
static double[] h130 ={116.7,116.49,116.13,115.64,114.92,113.79,112.38,
|
110.51,107.8,104.2,100,93.98,86.55,78.18,73.52},
|
q130 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 135 },
|
p130 ={40.45,47.29,53.97,60.5,67,73.14,78.98,84.54,89.91,
|
94.75,100,104.52,108.62,111.91,113.49},
|
ef130 ={0,23.9926,42.4301,57.3886,69.6333,79.22,86.7537,92.6697,97.0876,
|
99.4481,100,98.6268,94.9244,89.3389,85.8424},
|
npsh130x = { 22.5, 40, 50 },
|
npsh130y = { 8, 7.5, 7.02 };
|
static double[] h150 ={119.43,118.96,118.5,117.82,116.75,115.37,
|
113.64,111.3,108.29,104.61,100,93.73,85.72,76.43,71.17},
|
q150 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 135 },
|
p150 ={44.65,51.28,57.8,63.98,70.12,76.04,81.7,86.72,91.46,
|
95.94,100,103.66,106.94,109.48,110.71},
|
ef150 ={0,21.2608,39.5384,54.7678,67.4627,77.7696,85.8892,92.3006,96.9549,
|
99.3641,100,98.5555,94.4991,87.961,84.0969},
|
npsh150x = { 79.2, 73, 62.4 },
|
npsh150y = { 6.37, 6.5, 6.79 };
|
static double[] h180 ={124.19,123.69,122.8,121.6,120.05,118.14,
|
115.76,113.02,109.58,105.3,100,92.81,84.49,74.32,68.43},
|
q180 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 135 },
|
p180 ={48.77,54.89,60.84,66.52,72.5,78.17,83.44,88.16,92.64,
|
96.74,100,102.56,104.96,106.9,107.72},
|
ef180 ={0,19.3777,37.2247,52.6365,65.4778,76.2215,84.9525,91.7184,96.6465,99.2273,
|
100,98.391,93.9028,86.7286,82.3607},
|
npsh180x = { 18, 25, 30.6 },
|
npsh180y = { 5.5, 6, 6.6 };
|
static double[] h200 ={130.34,129.52,128.5,127.08,125.32,123.04,
|
119.98,116.18,111.88,106.52,100,91.84,82.68,71.57,65.09},
|
q200 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 135 },
|
p200 ={52.27,58.05,63.79,69.42,74.91,80.2,85.25,89.91,93.89,97.4,
|
100,101.92,103.39,104.5,104.97},
|
ef200 ={0,18.2632,35.3759,50.7,63.6248,75,84.1399,91.2574,96.4082,99.0917,100,
|
98.2559,93.4036,86.7286,82.3607},
|
npsh200x = { 50.06, 76.64, 92 },
|
npsh200y = { 5.65, 6.29, 7.16 };
|
static double[] h281 ={152.5,150.47,148.14,145.17,141.39,136.75,
|
131.22,124.79,117.49,109.27,100,81.43,62.75},
|
q281 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120 },
|
p281 ={90.5,90.88,91.4,92.2,93.32,94.52,95.58,96.62,97.86,
|
99.13,100,99.97,99.95},
|
ef281 ={0,16.6501,32.5298,47.0981,60.0777,71.375,80.9615,88.7511,94.8283,98.8591,
|
100,97.5118,91.1817},
|
npsh281x = { 50.06, 76.64, 92 },
|
npsh281y = { 5.65, 6.29, 7.16 };
|
static double[] h401 ={197.5,189.21,180.68,171.67,162.17,152.5,
|
142.93,133.24,123.1,112.17,100,85.93,69.24},
|
q401 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120 },
|
p401 ={189,171.97,155.93,141.55,129.84,121.5,115.98,111.86,
|
108.15,104.31,100,94.96,89.39},
|
ef401 ={0,11.8388,23.8006,36.2394,48.6959,60.5,71.1767,81.0133,90.331,
|
97.5211,100,96.6122,86.3745},
|
npsh401x = { 50.06, 76.64, 92 },
|
npsh401y = { 5.65, 6.29, 7.16 };
|
static double[] h642 ={290,272,252,232,212,192.91,174.04,155.29,136.77,118.4,
|
100,81.43,62.75},
|
q642 = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120 },
|
p642 ={219.6,219.6,219.6,219.6,196.61,177.5,161.78,147.3,132.44,
|
116.55,100,83.25,66.42},
|
ef642 ={0,10.5237,21.1346,31.9149,42.8347,53.75,64.6001,75.7284,87.3088,
|
96.8113,100,93.9925,76.3024},
|
npsh642x = { 50.06, 76.64, 92 },
|
npsh642y = { 5.65, 6.29, 7.16 };
|
#endregion
|
|
|
//计算(带修正 )
|
public static bool CalcPoints(IStation.Model.GroupPoint ratedParas, double n,
|
ref List<IStation.Model.CurvePoint> pointsQH,
|
ref List<IStation.Model.CurvePoint> pointsQE,
|
ref List<IStation.Model.CurvePoint> pointsQP,
|
ref List<IStation.Model.CurvePoint> pointsNPSH, bool isSxp, int stageNumber)
|
{
|
Create(ratedParas, n, ref pointsQH, ref pointsQE, ref pointsQP, ref pointsNPSH, isSxp, stageNumber);
|
|
#region 修正流量扬程曲线 保证额定点在曲线下:这样额定点型谱选型才能选中
|
var expQH = new IStation.Model.CurveExpress(pointsQH);
|
double fitH = IStation.Model.FitCurveHelper.GetFitPointY(expQH, ratedParas.Q);
|
if (fitH < ratedParas.H * 1.002)
|
{
|
int jdP = 1;
|
if (ratedParas.P < 2)
|
jdP = 3;
|
else if (ratedParas.P < 10)
|
jdP = 2;
|
else
|
jdP = 1;
|
|
double spaceH = (ratedParas.H * 1.002 - fitH) * 1.01;
|
List<IStation.Model.CurvePoint> corTestQHpoint = new List<IStation.Model.CurvePoint>();
|
List<IStation.Model.CurvePoint> corTestQPpoint = new List<IStation.Model.CurvePoint>();
|
for (int i = 0; i < pointsQH.Count; i++)
|
{
|
double q = pointsQH[i].X;
|
double h = IStation.Model.FitCurveHelper.GetFitPointY(expQH, q);
|
double corH = h + spaceH;
|
if (Math.Abs(q - ratedParas.Q) < 0.0001)
|
{
|
corH = ratedParas.H;// phQH.Y + spaceH * 0.1;
|
}
|
corTestQHpoint.Add(new IStation.Model.CurvePoint() { X = q, Y = corH });
|
double corP = IStation.Common.PumpParaHelper.CalculateP(q, corH, pointsQE[i].Y);
|
corTestQPpoint.Add(new IStation.Model.CurvePoint() { X = q, Y = Math.Round(corP, jdP) });
|
}
|
|
//当Q=0点时,P不为0,但计算的结果是P=0,所以0点时,需要用插值法
|
double Q0 = pointsQP[0].X;
|
double P0 = IStation.Model.CurveLineHelper.GetYbyX(corTestQPpoint[1].X, corTestQPpoint[1].Y, corTestQPpoint[2].X, corTestQPpoint[2].Y, 0);
|
if (P0 > pointsQP[1].Y * 0.98)
|
P0 = pointsQP[1].Y * 0.98;
|
corTestQPpoint[0] = new IStation.Model.CurvePoint(Q0, P0);
|
|
//
|
pointsQH = corTestQHpoint;
|
pointsQP = corTestQPpoint;
|
|
//fitH = IStation.Model.FitCurveHelper.GetFitPointY(pointsQH, ratedParas.Q);
|
}
|
#endregion
|
|
|
#region 修正效率线 高效点 有时不是ratedParas.Q
|
var pointsQE_jiami_1 = IStation.Model.FitCurveHelper.GetFitPoints(pointsQE, 500);
|
IStation.Model.CurvePoint currentMaxEffPt_1 = IStation.Model.CurvePointList.GetMaxPointY(pointsQE_jiami_1);//当前高效点
|
if (Math.Abs(currentMaxEffPt_1.X - ratedParas.Q) / ratedParas.Q > 0.02)
|
{
|
var pointsQE_xiuzheng1 = GetMoveBSP(currentMaxEffPt_1.X, ratedParas.Q, pointsQE_jiami_1);
|
//if (pointsQE_xiuzheng1.Last().X < pointsQE.Last().X)
|
{
|
var xpre_e = new IStation.Model.CurveExpress(pointsQE_xiuzheng1);
|
foreach (var pt in pointsQE)
|
{
|
if (pt.X < 0.1)
|
pt.Y = 0;
|
else
|
pt.Y = Math.Round(IStation.Model.FitCurveHelper.GetFitPointY(xpre_e, pt.X), 3);
|
}
|
}
|
}
|
#endregion
|
|
return true;
|
}
|
|
private static List<IStation.Model.CurvePoint> GetMoveBSP(double maxEtaQ_old, double maxEtaQ_new, List<IStation.Model.CurvePoint> points_curve_old)
|
{
|
List<IStation.Model.CurvePoint> points_new = new List<IStation.Model.CurvePoint>();
|
|
if (maxEtaQ_new < maxEtaQ_old)
|
{//向左移动
|
foreach (var pt_old in points_curve_old)
|
{
|
double new_x = 0;
|
if (pt_old.X < maxEtaQ_old)
|
{
|
new_x = pt_old.X * maxEtaQ_new / maxEtaQ_old;
|
}
|
else
|
{
|
new_x = pt_old.X - maxEtaQ_old + maxEtaQ_new;
|
}
|
|
points_new.Add(new IStation.Model.CurvePoint(new_x, pt_old.Y));
|
}
|
}
|
else
|
{//向右移动
|
foreach (var pt_old in points_curve_old)
|
{
|
double new_x = 0;
|
|
if (pt_old.X < maxEtaQ_old)
|
{
|
new_x = pt_old.X * maxEtaQ_new / maxEtaQ_old;
|
}
|
else
|
{
|
new_x = pt_old.X - maxEtaQ_old + maxEtaQ_new;
|
}
|
|
points_new.Add(new IStation.Model.CurvePoint(new_x, pt_old.Y));
|
}
|
}
|
|
return points_new;
|
}
|
|
|
public static bool CalcPoints(IStation.Model.GroupPoint ratedParas, double n,
|
ref List<IStation.Model.GroupPoint> correctPoints, bool isSxp, int stageNumber)
|
{
|
List<IStation.Model.CurvePoint> pointsQH = null;
|
List<IStation.Model.CurvePoint> pointsQE = null;
|
List<IStation.Model.CurvePoint> pointsQP = null;
|
List<IStation.Model.CurvePoint> pointsNPSH = null;
|
bool re = CalcPoints(ratedParas, n, ref pointsQH, ref pointsQE, ref pointsQP, ref pointsNPSH, isSxp, stageNumber);
|
if (!re)
|
return false;
|
int iCout = pointsQH.Count;
|
|
correctPoints = new List<GroupPoint>();
|
for (int i = 0; i < iCout; i++)
|
{
|
correctPoints.Add(new GroupPoint()
|
{
|
ID = i,
|
Q = pointsQH[i].X,
|
H = pointsQH[i].Y,
|
E = pointsQE[i].Y,
|
P = pointsQP[i].Y
|
});
|
}
|
//
|
return true;
|
}
|
|
//计算(带修正)
|
public static bool CalcPoints(IStation.Model.GroupPoint ratedParas, double n, double? K0,
|
ref List<IStation.Model.CurvePoint> pointsQH,
|
ref List<IStation.Model.CurvePoint> pointsQE,
|
ref List<IStation.Model.CurvePoint> pointsQP,
|
ref List<IStation.Model.CurvePoint> pointsNPSH, bool isSxp, int stageNumber)
|
{
|
bool re = CalcPoints(ratedParas, n, ref pointsQH, ref pointsQE, ref pointsQP, ref pointsNPSH, isSxp, stageNumber);
|
if (!re)
|
return false;
|
|
if (K0 == null)
|
{
|
return re;
|
}
|
if (K0 < 1.001)
|
{
|
return re;
|
}
|
|
var pointsOri = pointsQH;
|
double ori_zeroPtH = pointsOri[0].Y;
|
double zeroPtH = (double)K0 * ratedParas.H;
|
|
//去掉前面几个点
|
int removePtNum = 3;
|
List<IStation.Model.CurvePoint> pointsRemove = pointsOri.GetRange(removePtNum, pointsOri.Count - removePtNum);
|
pointsRemove.Insert(0, new IStation.Model.CurvePoint(0, ori_zeroPtH));
|
//重新获取拟合点
|
List<IStation.Model.CurvePoint> pointsRemove2 = IStation.Model.FitCurveHelper.GetFitPoints(pointsRemove, pointsOri.Count);
|
//进行修正
|
var pointsAmend = IStation.Common.AmendCurveHelper.ByZeroPointY(
|
pointsRemove2,
|
ratedParas.Q, zeroPtH);
|
List<IStation.Model.CurvePoint> pointsReturn = new List<IStation.Model.CurvePoint>();
|
foreach (var oriPt in pointsOri)
|
{
|
if (oriPt.X < 1)
|
{
|
pointsReturn.Add(new IStation.Model.CurvePoint()
|
{
|
X = oriPt.X,
|
Y = zeroPtH
|
});
|
}
|
else if (Math.Abs(oriPt.X - ratedParas.Q) < 1)
|
{
|
pointsReturn.Add(new IStation.Model.CurvePoint()
|
{
|
X = ratedParas.Q,
|
Y = ratedParas.H
|
});
|
}
|
else
|
{
|
pointsReturn.Add(new IStation.Model.CurvePoint()
|
{
|
X = oriPt.X,
|
Y = Math.Round(IStation.Common.FitCurveHelper.GetFitPointY(pointsAmend, oriPt.X), 3)
|
});
|
}
|
}
|
//
|
pointsQH = pointsReturn;
|
|
pointsQP = IStation.Common.PumpParaHelper.CalculateP(pointsQH, pointsQE);
|
|
return true;
|
}
|
|
|
|
//修正QE线(由于用原始点,拟合曲线有偏差,所以去掉一些小流量点,这样拟合好些)
|
private static List<IStation.Model.CurvePoint> AmendPointQE(List<IStation.Model.CurvePoint> pointsQE)
|
{
|
int removePtNum = 5;
|
List<IStation.Model.CurvePoint> amendQEpoint = pointsQE.GetRange(removePtNum, pointsQE.Count - removePtNum);
|
amendQEpoint.Insert(0, new IStation.Model.CurvePoint(0, 0));
|
|
IStation.Model.CurveExpress exp = new IStation.Model.CurveExpress(amendQEpoint);
|
for (int i = 1; i < removePtNum; i++)
|
{
|
amendQEpoint.Insert(i, new IStation.Model.CurvePoint(pointsQE[i].X, IStation.Model.FitCurveHelper.GetFitPointY(exp, pointsQE[i].X)));
|
|
}
|
|
return amendQEpoint;
|
}
|
|
//原始(不修正)
|
private static bool Create(IStation.Model.GroupPoint ratedParas1, double n,
|
ref List<IStation.Model.CurvePoint> pointsQH, ref List<IStation.Model.CurvePoint> pointsQE, ref List<IStation.Model.CurvePoint> pointsQP, ref List<IStation.Model.CurvePoint> pointsNPSH, bool isSxp, int stageNumber)
|
{
|
pointsQH = null;
|
pointsQE = null;
|
pointsQP = null;
|
pointsNPSH = null;
|
|
if (ratedParas1 == null)
|
return false;
|
if (stageNumber < 1)
|
stageNumber = 1;
|
pointsQH = new List<IStation.Model.CurvePoint>();
|
pointsQE = new List<IStation.Model.CurvePoint>();
|
pointsQP = new List<IStation.Model.CurvePoint>();
|
pointsNPSH = new List<IStation.Model.CurvePoint>();
|
|
double Q = 0, H = 0;
|
double P = 0, E = 0;
|
int count = 0;
|
int i = 0;
|
|
double calcP = ratedParas1.P;
|
double calcE = ratedParas1.E;
|
double calcQ = ratedParas1.Q;
|
if (isSxp)
|
calcQ = ratedParas1.Q / 2;
|
|
//计算比转速
|
double calcH = ratedParas1.H / stageNumber;
|
double ns = 3.65 * n * Math.Sqrt(calcQ / 3600) / Math.Pow(calcH, 0.75);
|
|
#region 根据比转速计算
|
if (ns < 35.1)
|
{//为0-35之间的
|
count = q35.Count();
|
for (i = 0; i < count; i++)
|
{//VB代码中 小于35不用等比例换算
|
Q = calcQ * q35[i] / 100;
|
H = calcH * h35[i] / 100;
|
E = calcE * ef35[i] / 100;
|
P = calcP * p35[i] / 100;
|
if (H < 0.1)
|
continue;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
}
|
}
|
else if (ns < 50.1)
|
{
|
count = Math.Min(q35.Count(), q50.Count());
|
double ratio = (ns - 35) / (50 - 35);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q35[i] / 100.0;
|
|
H = h35[i] + (h50[i] - h35[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef35[i] + (ef50[i] - ef35[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 70.1)
|
{
|
count = Math.Min(q50.Count(), q70.Count());
|
double ratio = (ns - 50) / (70 - 50);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q50[i] / 100.0;
|
|
H = h50[i] + (h70[i] - h50[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef50[i] + (ef70[i] - ef50[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 85.1)
|
{
|
count = Math.Min(q70.Count(), q85.Count());
|
double ratio = (ns - 70) / (85 - 70);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q70[i] / 100.0;
|
|
H = h70[i] + (h85[i] - h70[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef70[i] + (ef85[i] - ef70[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 100.1)
|
{
|
count = Math.Min(q85.Count(), q100.Count());
|
double ratio = (ns - 85) / (100 - 85);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q85[i] / 100.0;
|
|
H = h85[i] + (h100[i] - h85[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef85[i] + (ef100[i] - ef85[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 130.1)
|
{
|
count = Math.Min(q100.Count(), q130.Count());
|
double ratio = (ns - 100) / (130 - 100);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q100[i] / 100.0;
|
|
H = h100[i] + (h130[i] - h100[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef100[i] + (ef130[i] - ef100[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 150.1)
|
{
|
count = Math.Min(q130.Count(), q150.Count());
|
double ratio = (ns - 130) / (150 - 130);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q130[i] / 100.0;
|
|
H = h130[i] + (h150[i] - h130[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef130[i] + (ef150[i] - ef130[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 180.1)
|
{
|
count = Math.Min(q150.Count(), q180.Count());
|
double ratio = (ns - 150) / (180 - 150);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q150[i] / 100.0;
|
|
H = h150[i] + (h180[i] - h150[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef150[i] + (ef180[i] - ef150[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 200.1)
|
{
|
count = Math.Min(q200.Count(), q180.Count());
|
double ratio = (ns - 180) / (200 - 180);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q180[i] / 100.0;
|
|
H = h180[i] + (h200[i] - h180[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef180[i] + (ef200[i] - ef180[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 281.1)
|
{
|
count = Math.Min(q200.Count(), q281.Count());
|
double ratio = (ns - 200) / (281 - 200);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q200[i] / 100.0;
|
|
H = h200[i] + (h281[i] - h200[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef200[i] + (ef281[i] - ef200[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 401.1)
|
{
|
count = Math.Min(q401.Count(), q281.Count());
|
double ratio = (ns - 281) / (401 - 281);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q281[i] / 100.0;
|
|
H = h281[i] + (h401[i] - h281[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef281[i] + (ef401[i] - ef281[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else if (ns < 642.1)
|
{
|
count = Math.Min(q401.Count(), q642.Count());
|
double ratio = (ns - 401) / (642 - 401);
|
for (i = 0; i < count; i++)
|
{
|
Q = calcQ * q401[i] / 100.0;
|
|
H = h401[i] + (h642[i] - h401[i]) * ratio;
|
H = H * calcH / 100;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
|
E = ef401[i] + (ef642[i] - ef401[i]) * ratio;
|
E = E * calcE / 100;
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
|
//计算功率
|
P = IStation.Common.PumpParaHelper.CalculateP(Q, H, E);
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
else //(ns > 642)
|
{
|
count = q642.Count();
|
for (i = 0; i < count; i++)
|
{//VB代码中 不用等比例换算
|
Q = calcQ * q642[i] / 100;
|
H = calcH * h642[i] / 100;
|
E = calcE * ef642[i] / 100;
|
P = calcP * p642[i] / 100;
|
//MathFunc.Regulate(IStation.Common.Calculate.CalculateP(Q, H, Eff),2);
|
if (H < 0.1)
|
continue;
|
pointsQH.Add(new IStation.Model.CurvePoint(Q, H));
|
pointsQE.Add(new IStation.Model.CurvePoint(Q, E));
|
pointsQP.Add(new IStation.Model.CurvePoint(Q, P));
|
}
|
}
|
#endregion
|
|
//当Q=0点时,P不为0,但计算的结果是P=0,所以0点时,需要用插值法
|
double Q0 = pointsQP[0].X;
|
double P0 = IStation.Model.CurveLineHelper.GetYbyX(pointsQP[1].X, pointsQP[1].Y, pointsQP[2].X, pointsQP[2].Y, 0);
|
if (P0 > pointsQP[1].Y * 0.98)
|
P0 = pointsQP[1].Y * 0.98;
|
pointsQP[0] = new IStation.Model.CurvePoint(Q0, P0);
|
|
|
|
|
if (isSxp)
|
{
|
if (pointsQH != null && pointsQE != null)
|
{
|
foreach (var pt in pointsQH)
|
{
|
pt.X = pt.X * 2;
|
}
|
foreach (var pt in pointsQE)
|
{
|
pt.X = pt.X * 2;
|
}
|
pointsQP = IStation.Common.PumpParaHelper.CalculateP(pointsQH, pointsQE);
|
}
|
|
if (pointsNPSH != null)
|
{
|
foreach (var pt in pointsNPSH)
|
{
|
pt.X = pt.X * 2;
|
}
|
}
|
}
|
|
if (stageNumber > 1)
|
{
|
if (pointsQH != null && pointsQE != null)
|
{
|
foreach (var pt in pointsQH)
|
{
|
pt.Y = pt.Y * stageNumber;
|
}
|
pointsQP = IStation.Common.PumpParaHelper.CalculateP(pointsQH, pointsQE);
|
}
|
}
|
|
|
return true;
|
}
|
|
|
}
|
}
|