Beispiel #1
0
        /// <summary>
        /// 计算给定档距下各个工况的应力
        /// </summary>
        /// <param name="span"></param>
        /// <returns></returns>
        protected Dictionary <string, double> CalFTable(double span)
        {
            if (bGrd == 0)
            {
                EffectPara = SideParas.IndEffectPara;
                SafePara   = SideParas.IndSafePara;
                AvePara    = SideParas.IndAnPara;
            }
            else if (bGrd == 1)
            {
                EffectPara = SideParas.GrdEffectPara;
                SafePara   = SideParas.GrdSafePara;
                AvePara    = SideParas.GrdAnPara;
            }
            else
            {
                //为什么单独给OPGW列出来呢,这样使用还不方便
                OPGWEffectPara = SideParas.OPGWEffectPara;
                OPGWSafePara   = SideParas.OPGWSafePara;
                OPGWAnPara     = SideParas.OPGWAnPara;

                EffectPara = SideParas.OPGWEffectPara;
                SafePara   = SideParas.OPGWSafePara;
                AvePara    = SideParas.OPGWAnPara;
            }

            #region  照Excel的算法
            var maxWindWkCdt = WeatherParas.WeathComm.Where(item => item.Name == "换算最大风速").First();
            var minTempWkCdt = WeatherParas.WeathComm.Where(item => item.Name == "最低气温").First();
            var maxIceWkCdt  = WeatherParas.WeathComm.Where(item => item.Name == "最大覆冰").First();
            var aveTempWkCdt = WeatherParas.WeathComm.Where(item => item.Name == "平均气温").First();

            List <ElecCalsWorkCondition> wkCdtList = new List <ElecCalsWorkCondition>();
            wkCdtList.Add(maxWindWkCdt);
            wkCdtList.Add(minTempWkCdt);
            wkCdtList.Add(maxIceWkCdt);
            wkCdtList.Add(aveTempWkCdt);

            CtrlStress = Math.Round(Fore / Sec / CommParas.GraAcc * EffectPara / SafePara, 3);
            AvaStress  = Math.Round(Fore / Sec / CommParas.GraAcc * EffectPara * AvePara / 100, 3);

            CtrlGkName   = ElecCalsToolBox2.GetCtrlWorkConditionName(BzDic, wkCdtList, span, Elas, CtrlStress, AvaStress, Coef);
            CtrlGkStress = CtrlGkName == "平均气温" ? AvaStress : CtrlStress;
            CtrlGk       = WeatherParas.WeathComm.Where(item => item.Name == CtrlGkName).First();

            YLTableXls = new Dictionary <string, double>();
            foreach (var wd in WeatherParas.WeathComm)
            {
                double stress = ElecCalsToolBox2.StressNew(CtrlGkStress, BzDic[CtrlGkName].BiZai, CtrlGk.Temperature, Math.Round(Elas / CommParas.GraAcc, 0), Coef, span, BzDic[wd.Name].BiZai, wd.Temperature);
                YLTableXls.Add(wd.Name, stress);
            }
            #endregion

            //最大允许应力
            double maxPerFor = Fore * CommParas.NewPerPara / SafePara / Sec;
            MaxPerFor = maxPerFor / CommParas.GraAcc;
            //年均应力
            double avePerFor = Fore * CommParas.NewPerPara * AvePara / Sec;
            AvePerFor = avePerFor / CommParas.GraAcc / 100;

            //控制工况计算

            //存储中间计算结果
            Dictionary <string, double> YLCalDic  = new Dictionary <string, double>();
            Dictionary <string, double> ForCalDic = new Dictionary <string, double>();

            foreach (var nameWd in WeatherParas.NameOfCtrWkCdt)
            {
                double calFor = nameWd != "平均气温" ? maxPerFor : avePerFor;

                //均采用综合比载计算
                double calBz  = BzDic[nameWd].g7;
                double temVal = WeatherParas.WeathComm.Where(item => item.Name == nameWd).First().Temperature;
                double fm     = (Elas * Math.Pow(calBz, 2) * Math.Pow(span, 2) / 24 / Math.Pow(calFor, 2)) - (calFor + Coef * Elas * temVal);
                YLCalDic.Add(nameWd, fm);
                //存储每个工况初始控制应力取值
                ForCalDic.Add(nameWd, calFor);
            }

            //确定控制工况
            //存储各个工况应力,采用字典模式
            Dictionary <string, double> ForDic = new Dictionary <string, double>();

            YLCalDic = (from entry in YLCalDic orderby entry.Value descending select entry).ToDictionary(pair => pair.Key, pair => pair.Value);

            string CtrName = YLCalDic.First().Key;
            double CtrFm   = YLCalDic.First().Value;

            ForDic.Add(CtrName, ForCalDic[CtrName]);

            //将控制工况存储下来
            CtrNaSave = CtrName;
            CtrYLSave = CtrFm;

            foreach (var wd in WeatherParas.WeathComm)
            {
                if (wd.Name == CtrName)
                {
                    continue;
                }

                double calBz  = BzDic[wd.Name].g7;
                double temVal = WeatherParas.WeathComm.Where(item => item.Name == wd.Name).First().Temperature;
                double temA   = CtrFm + Coef * Elas * temVal;
                double temB   = Elas * Math.Pow(calBz, 2) * Math.Pow(span, 2) / 24;
                double calFor = ElecCalsToolBox.caculateCurDelta(temA, temB);
                ForDic.Add(wd.Name, calFor);
            }

            return(ForDic);
        }