| | |
| | | private readonly double _sel_opt_reasonable_flow_deviation_ratio = 0.005;//合理的方案的流量偏差比 |
| | | |
| | | private readonly Service.AnalysisParameter _service_analysis_parameter = new(); |
| | | private readonly Service.AnalysisDeviation _service_analysis_deviation = new(); |
| | | private readonly Service.AnalysisFactor _service_analysis_factor = new(); |
| | | |
| | | private int _min_open_count;//最小开泵数量 |
| | | private int _max_open_count;//最大开泵数量 |
| | |
| | | |
| | | //组合偏差系数 |
| | | var combine_deviation_factor = combine_deviation_factor_dict[flag]; |
| | | var current_pressure_diff = target_pressure - inlet_water_level + combine_deviation_factor + _sel_opt_pump_pressure_excess; |
| | | var current_pressure_diff = target_pressure - inlet_water_level - combine_deviation_factor + _sel_opt_pump_pressure_excess; |
| | | |
| | | current_pressure_diff = Math.Round(current_pressure_diff, 1); |
| | | |
| | | //频率限制 |
| | |
| | | } |
| | | else |
| | | { |
| | | conclusion_list = new List<Model.AnalysisParameter>() { min_pressure_diff_conclusion }; |
| | | var list = _service_analysis_parameter.GetList(run_flag); |
| | | conclusion_list = _service_analysis_parameter.GetList(run_flag, current_pressure_diff); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (GlobalHelper.IsStation1(combine)) |
| | | { |
| | | _sel_opt_flow_excess = 0.995; |
| | | _sel_opt_flow_excess = 0.97; |
| | | } |
| | | else |
| | | { |
| | | //人为修正 |
| | | if (combine.Count() < 3) |
| | | { |
| | | _sel_opt_flow_excess = 0.92; |
| | | _sel_opt_flow_deviation_ratio = 0.08; |
| | | } |
| | | } |
| | | |
| | | var flow_excess = target_flow * _sel_opt_flow_excess; |
| | | if (max_supply_flow < flow_excess) |
| | | return default; |
| | | |
| | | } |
| | | |
| | | var opt_ana_combine = GetOptAnaCombine(conclusion_ex_list_dict, pump_nr_dict, pump_bp_dict, target_flow); |
| | |
| | | } |
| | | if (!ana_combine_list.Any()) |
| | | return default; |
| | | var opt_ana_combine = ana_combine_list.OrderBy(x => x.TotalPower).First(); |
| | | var opt_ana_combine = ana_combine_list.OrderBy(x=>x.TotalFlow).OrderBy(x => x.TotalPower).First(); |
| | | return opt_ana_combine; |
| | | } |
| | | |
| | |
| | | |
| | | return ana_fre_pump_list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取变频泵列表 根据工况计算 |
| | | /// </summary> |
| | | /// <param name="pumps"></param> |
| | | /// <param name="flag_rpm_dic"></param> |
| | | /// <param name="flag_inlet_water_level_dict"></param> |
| | | /// <param name="flag_flow_dic"></param> |
| | | /// <param name="flag_head_dic"></param> |
| | | /// <param name="flag_curve_head_dic"></param> |
| | | /// <param name="total_flow"></param> |
| | | /// <param name="ues_deviation_factor"></param> |
| | | /// <returns></returns> |
| | | public List<AnaFrePump> GetAnaFrePumpListByWorking( |
| | | List<Model.Pump> pumps, |
| | | Dictionary<int, double> flag_rpm_dic, |
| | | Dictionary<int, double> flag_inlet_water_level_dict, |
| | | Dictionary<int, double> flag_flow_dic, |
| | | Dictionary<int, double> flag_head_dic, |
| | | double total_flow, |
| | | out Dictionary<int, double> flag_curve_head_dic, |
| | | bool ues_deviation_factor = false |
| | | ) |
| | | { |
| | | flag_curve_head_dic = new Dictionary<int, double>(); |
| | | if (pumps == null || !pumps.Any()) |
| | | { |
| | | return default; |
| | | } |
| | | |
| | | if (flag_rpm_dic == null || !flag_rpm_dic.Any()) |
| | | { |
| | | return default; |
| | | } |
| | | |
| | | var run_flag_list = flag_rpm_dic.Where(x => x.Value > 1).Select(x => x.Key).OrderBy(x => x).ToList(); |
| | | var ana_fre_pump_list = new List<AnaFrePump>(); |
| | | foreach (var flag in run_flag_list) |
| | | { |
| | | var pump = pumps.Find(x => x.Flag == flag); |
| | | if (pump == null) |
| | | continue; |
| | | var rpm = flag_rpm_dic[flag]; |
| | | if (rpm < 1) |
| | | continue; |
| | | |
| | | var hz = Math.Round(rpm / pump.Nr * 50, 1); |
| | | |
| | | |
| | | var CurveQH50 = pump.CurveQH; |
| | | var CurveQP50 = pump.CurveQP; |
| | | |
| | | |
| | | var curveQH = Curve.PumpCalculateHelper.CalculateSimilarQH(CurveQH50, pump.Nr, rpm); |
| | | var curveQP = Curve.PumpCalculateHelper.CalculateSimilarQP(CurveQP50, pump.Nr, rpm); |
| | | |
| | | double flow = 0, head = 0; |
| | | if (flag_head_dic != null && flag_head_dic.ContainsKey(pump.Flag)) |
| | | { |
| | | head = flag_head_dic[pump.Flag]; |
| | | } |
| | | |
| | | if (flag_inlet_water_level_dict != null && flag_inlet_water_level_dict.ContainsKey(pump.Flag)) |
| | | { |
| | | head -= flag_inlet_water_level_dict[pump.Flag]; |
| | | } |
| | | |
| | | if (ues_deviation_factor) |
| | | { |
| | | //var combine_deviation_factor_dict = GetCombineDeviationFactorDict(total_flow, run_flag_list);//修正组合曲线和模型的偏差扬程 |
| | | //if (combine_deviation_factor_dict != null && combine_deviation_factor_dict.ContainsKey(flag)) |
| | | //{ |
| | | // var combine_deviation_factor = combine_deviation_factor_dict[flag]; //组合偏差系数 |
| | | // head -= combine_deviation_factor; |
| | | //} |
| | | } |
| | | |
| | | flow = curveQH.GetInterPointLastX(head) ?? 0; |
| | | if (flow < 0) |
| | | continue; |
| | | |
| | | var working_flow = flag_flow_dic[flag]; |
| | | flag_curve_head_dic[flag] = curveQH.GetFitPointY(working_flow); |
| | | |
| | | var fre_pump = new AnaFrePump(); |
| | | fre_pump.Flag = flag; |
| | | fre_pump.Flow = flow; |
| | | fre_pump.Head = head; |
| | | fre_pump.Power = curveQP.GetFitPointY(flow); |
| | | fre_pump.PressureDiff = head - Curve.PumpCalculateHelper.CalculateOtherPress(flow, pump.Ic, pump.Oc, null, null); |
| | | fre_pump.Eff = Curve.PumpCalculateHelper.CalculateE(fre_pump.Flow, fre_pump.Head, fre_pump.Power); |
| | | fre_pump.Frequency = rpm / pump.Nr * 50; |
| | | fre_pump.Speed = rpm; |
| | | |
| | | ana_fre_pump_list.Add(fre_pump); |
| | | } |
| | | |
| | | |
| | | return ana_fre_pump_list; |
| | | } |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |