private void CreateHeatExchanger() { string newRoomName = ""; string newRoomId = ""; double newRoomFreshAir = 0; string powerSelected = ""; double airFlow = 0; double ESP = 0; Indoor inItem = null; var fanspeedLevel = (int)_sfanspeed; if (UserSelSeries != null && SelectedPower != null) { _indoorBll = new JCHVRF.BLL.IndoorBLL(JCHVRF.Model.Project.CurrentProject.SubRegionCode, JCHVRF.Model.Project.CurrentProject.BrandCode); DataTable dt = _indoorBll.GetExchnagerListStd(UserSelSeries, "", SelectedPower.Code); dt.DefaultView.Sort = "AirFlow"; if (dt.Rows.Count > 0) { DataRow dr = dt.Rows[0]; //DataRow dr = GetAutoModel(dt.DefaultView.ToTable().Rows); _indoorBll = new JCHVRF.BLL.IndoorBLL(JCHVRF.Model.Project.CurrentProject.SubRegionCode, JCHVRF.Model.Project.CurrentProject.BrandCode); string ProductType = string.Empty; if (thisProject.RegionCode == "EU_W" || thisProject.RegionCode == "EU_S" || thisProject.RegionCode == "EU_E") { ProductType = "Universal IDU"; } else { ProductType = UserSelSeries; } inItem = _indoorBll.GetItem(dr["ModelFull"].ToString(), UserSelSeries, ProductType, UserSelSeries); if (inItem != null) { inItem.Series = UserSelSeries; //Required field for Report inItem.DisplayName = UserSelSeries; } } } if (SelectedRoom != null) { newRoomName = SelectedRoom.Name; newRoomId = SelectedRoom.Id; newRoomFreshAir = SelectedRoom.FreshAir; SelectedRoom.FreshAir = FreshAir; SelectedRoom.StaticPressure = ESPVal; SelectedRoom.Area = Area; SelectedRoom.PeopleNumber = NoOfPeople; } else { newRoomName = ""; newRoomId = null; newRoomFreshAir = FreshAir; } if (SelectedPower != null) { powerSelected = SelectedPower.SelectedValues; } airFlow = newRoomFreshAir; ESP = ESPVal; Project.CurrentProject.ExchangerList.Add(new RoomIndoor { IndoorName = UnitName, IndoorItem = inItem, Power = powerSelected, FanSpeedLevel = fanspeedLevel, RqFreshAir = airFlow, RqAirflow = airFlow, Area = Area, RqStaticPressure = ESP, NumberOfPeople = NoOfPeople, DBCooling = outdoorCoolingDB, WBCooling = outdoorCoolingWB, DBHeating = outdoorHeatingDB, RHCooling = outdoorHeatingRH, RoomName = newRoomName, RoomID = newRoomId, SelectedFloor = _sIndex, SystemID = WorkFlowContext.NewSystem.Id, IsExchanger = true, HECanvFreshAirUnit = SystemSetting.UserSetting.unitsSetting.settingAIRFLOW, HECanvAreaUnit = SystemSetting.UserSetting.unitsSetting.settingAREA, HECanvTempUnit = SystemSetting.UserSetting.unitsSetting.settingTEMPERATURE }); }
private void BatchCalculateEstValue(List <IDUEquipmentModel> IDUEquipmentModelList, ref List <IDUEquipmentModel> objEquipmentList) { if (SelectedFanSpeed != -1) { _fanSpeedLevel = SelectedFanSpeed - 1; } double outdoorCoolingDB = SystemSetting.UserSetting.defaultSetting.OutdoorCoolingDB; double outdoorHeatingWB = SystemSetting.UserSetting.defaultSetting.OutdoorHeatingWB; double outdoorCoolingIW = SystemSetting.UserSetting.defaultSetting.OutdoorCoolingIW; double outdoorHeatingIW = SystemSetting.UserSetting.defaultSetting.OutdoorHeatingIW; double wb_c = Unit.ConvertToSource(Convert.ToDouble(LblWbCool), UnitType.TEMPERATURE, SystemSetting.UserSetting.unitsSetting.settingTEMPERATURE); double db_h = Unit.ConvertToSource(Convert.ToDouble(LblDBHeat), UnitType.TEMPERATURE, SystemSetting.UserSetting.unitsSetting.settingTEMPERATURE); double fa = 0; double airflow = 0; double staticPressure = 0; for (int i = 0; i < IDUEquipmentModelList.Count; ++i) { Indoor inItem = indoorBLL.GetItem(IDUEquipmentModelList[i].ModelFull, null, IDUEquipmentModelList[i].ProductType, null); if (inItem == null) { continue; } double est_cool = 0; double est_heat = 0; double est_sh = 0; string type = inItem.Type; if (type.Contains("YDCF") || (type.Contains("Fresh Air") && JCHVRF.Model.Project.CurrentProject.SubRegionCode != "LA_BR") || type.Contains("Ventilation")) { est_cool = inItem.CoolingCapacity; est_heat = inItem.HeatingCapacity; est_sh = inItem.SensibleHeat; } else if (type.Contains("Hydro Free") || type == "DX-Interface") { est_cool = inItem.CoolingCapacity; est_heat = inItem.HeatingCapacity; est_sh = 0d; } else { double db_c = inItem.ProductType.Contains("Water Source") ? outdoorCoolingIW : outdoorCoolingDB; double wb_h = inItem.ProductType.Contains("Water Source") ? outdoorHeatingIW : outdoorHeatingWB; est_cool = indoorBLL.CalIndoorEstCapacity(inItem, db_c, wb_c, false); double shf = inItem.GetSHF(_fanSpeedLevel); est_sh = est_cool * shf; if (!inItem.ProductType.Contains(", CO")) { est_heat = indoorBLL.CalIndoorEstCapacity(inItem, wb_h, db_h, true); } } if (IndoorBLL.IsFreshAirUnit(type)) { fa = inItem.AirFlow; } else if (!type.Contains("Hydro Free") && type != "DX-Interface") { airflow = inItem.GetAirFlow(_fanSpeedLevel); if (type.Contains("Ducted") || type.Contains("Total Heat Exchanger")) { staticPressure = inItem.GetStaticPressure(); } } objEquipmentList.Add(new IDUEquipmentModel { Model = IDUEquipmentModelList[i].Model, ModelFull = IDUEquipmentModelList[i].ModelFull, ModelYork = IDUEquipmentModelList[i].ModelYork, ModelHitachi = IDUEquipmentModelList[i].ModelHitachi, CoolCapacity = Math.Round(est_cool, 1), SensibleHeat = Math.Round(est_sh, 1), HeatCapacity = Math.Round(est_heat, 1), AirFlow = Math.Round(airflow, 1, MidpointRounding.AwayFromZero), Type = IDUEquipmentModelList[i].Type, ESP = staticPressure }); } }
// 将选择的室内机预添加到已选室内机 /// <summary> /// 将选择的室内机预添加到已选室内机,并执行容量估算 /// </summary> /// <param name="stdRow">标准表记录行</param> /// <param name="isAppend">是否附加到已选记录行,true则附加且count值可修改;false则添加唯一记录且count值不可修改</param> private void DoCalculateEstValue(DataRow stdRow) { string type = _unitType; //this.jccmbType.Text.Trim(); //由于untTypeList中的值含有厂名,所以在取出来的时候需要去掉 20161118 by Yunxiao Lin int i = type.IndexOf("-"); if (i > 0) { if (thisProject.RegionCode != "EU_W" && thisProject.RegionCode != "EU_S" && thisProject.RegionCode != "EU_E") //EU区域的 暂时不取厂名 20180302 by xyj { type = type.Substring(0, i); } } string modelFull = stdRow["ModelFull"].ToString(); Indoor inItem = bll.GetItem(modelFull, type, _productType, _series); if (inItem != null) { inItem.Series = _series; //将当前的series封装室内机列表 add on 20161027 } if (type.Contains("YDCF")) { est_cool = Convert.ToDouble(stdRow["CoolCapacity"].ToString()); est_heat = Convert.ToDouble(stdRow["HeatCapacity"].ToString()); est_sh = Convert.ToDouble(stdRow["SensibleHeat"].ToString()); } else { // 执行容量估算 double wb_c = rq_wb_c; double db_c = rq_db_c; double db_h = rq_db_h; double wb_h = rq_wb_h; //double est_sh_h = 0; //est_cool = bll.CalIndoorEstCapacity(inItem, db_c, wb_c, out est_sh, false); //估算室内机容量不再返回显热 20161111 by Yunxiao Lin est_cool = bll.CalIndoorEstCapacity(inItem, db_c, wb_c, false); if (!ValidateEstCapacity(est_cool, inItem.PartLoadTableName)) { return; } //显热由估算容量乘以SHF系数得到 20161112 by Yunxiao Lin //double shf = 0d; //if (_shf_mode == "High") // shf = inItem.SHF_Hi; //else if (_shf_mode == "Medium") // shf = inItem.SHF_Med; //else // shf = inItem.SHF_Lo; //if (shf == 0d) // shf = inItem.SHF_Hi; double shf = inItem.GetSHF(_fanSpeedLevel); est_sh = est_cool * shf; if (!inItem.ProductType.Contains(", CO")) { //估算室内机容量不再返回显热 20161111 by Yunxiao Lin //est_heat = bll.CalIndoorEstCapacity(inItem, wb_h, db_h, out est_sh_h, true); est_heat = bll.CalIndoorEstCapacity(inItem, wb_h, db_h, true); if (!ValidateEstCapacity(est_heat, inItem.PartLoadTableName)) { return; } } } airflow = Convert.ToDouble(stdRow["AirFlow"].ToString()); }