Пример #1
0
        /// <summary>
        /// 输出所有截面的验算结果
        /// 按截面进行归并
        /// </summary>
        /// <param name="mm">模型对像</param>
        /// <param name="cr">验算结果数据对像</param>
        /// <param name="FileOut">输出文件路径</param>
        public static void WriteAllCheckRes(ref Bmodel mm, ref CheckRes cr, string FileOut)
        {
            FileStream   stream = File.Open(FileOut, FileMode.Create);
            StreamWriter writer = new StreamWriter(stream);

            writer.WriteLine("截面名称\t控制单元号(截面)\t控制组合\tN(kN)\tMy(kN*m)\tMz(kN*m)\t强度(MPa)\t稳定(MPa)\t应力比");

            foreach (BSections sec in mm.sections.Values)
            {
                List <int> curElems = cr.GetElemsBySec(ref mm, sec.Num);//当前截面信息
                if (curElems.Count == 0)
                {
                    continue;
                }
                int num_control             = cr.GetControlElem(curElems);//控制单元号
                SingleEleCheckResData secrd = cr.CheckResTable[num_control].GetControlData();

                writer.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}",
                                 sec.Name, num_control.ToString() + "(" + secrd.Sec_contral + ")",
                                 secrd.ComName, (secrd.N / 1e3).ToString("0.0"),
                                 (secrd.My / 1e3).ToString("0.0"), (secrd.Mz / 1e3).ToString("0.0"),
                                 (secrd.Strength / 1e6).ToString("0.0"), (secrd.Stability / 1e6).ToString("0.0"),
                                 secrd.Ratio.ToString("0.00"));
            }

            writer.Close();
            stream.Close();
        }
Пример #2
0
        /// <summary>
        /// 取得控制验算结果
        /// </summary>
        /// <returns></returns>
        public SingleEleCheckResData GetControlData()
        {
            SingleEleCheckResData Res = new SingleEleCheckResData();

            //对字典进行遍历
            foreach (DictionaryEntry DE in _SingleEleCheckRes)
            {
                Res = Res.TheMaxRatio(DE.Value as SingleEleCheckResData);
            }
            return(Res);
        }
Пример #3
0
 /// <summary>
 /// 比较两个截面应力比,返回控制应力比
 /// </summary>
 /// <param name="SECRD">另一个截面验算结果</param>
 /// <returns>应力比最大的一个验算结果</returns>
 public SingleEleCheckResData TheMaxRatio(SingleEleCheckResData SECRD)
 {
     if (this.Ratio >= SECRD.Ratio)
     {
         return(this);
     }
     else
     {
         return(SECRD);
     }
 }
Пример #4
0
        /// <summary>
        /// 根据应力比范围取得单元号集合
        /// </summary>
        /// <param name="R_min">最小应力比</param>
        /// <param name="R_max">最大应力比</param>
        /// <returns>单元号集合</returns>
        public List <int> GetElemsByRatio(double R_min, double R_max)
        {
            List <int> Res = new List <int>();

            foreach (int key in _CheckResTable.Keys)
            {
                SingleEleCheckResData secrd = _CheckResTable[key].GetControlData();
                if (secrd.Ratio > R_min && secrd.Ratio < R_max)
                {
                    Res.Add(key);
                }
            }
            return(Res);
        }
Пример #5
0
        /// <summary>
        /// 取得单元中的控制单元
        /// </summary>
        /// <param name="iElems">单元号集合</param>
        /// <returns>起控制作用的单元号</returns>
        public int GetControlElem(List <int> iElems)
        {
            int Res = iElems[0];

            for (int i = 1; i < iElems.Count; i++)
            {
                SingleEleCheckResData temp  = this.CheckResTable[Res].GetControlData();
                SingleEleCheckResData temp1 = this.CheckResTable[iElems[i]].GetControlData();
                if (temp.Ratio < temp1.Ratio)
                {
                    Res = iElems[i];
                }
            }
            return(Res);
        }
Пример #6
0
        /// <summary>
        /// 按截面输出验算结构表格
        /// </summary>
        /// <param name="mm">模型对像</param>
        /// <param name="FileOut">输出文件路径</param>
        /// <param name="iSec">截面号</param>
        public static void WriteSecCheckRes(ref Bmodel mm, ref CheckRes cr, string FileOut, int iSec)
        {
            List <int>   Elems  = mm.getElemBySec(iSec);//单元号表
            FileStream   stream = File.Open(FileOut, FileMode.Create);
            StreamWriter writer = new StreamWriter(stream);

            writer.WriteLine("截面名称\t单元号(控制位置)\t控制组合\tN(kN)\tMy(kN*m)\tMz(kN*m)\t强度(MPa)\t稳定(MPa)\t应力比");

            foreach (int ele in Elems)
            {
                SingleEleCheckResData SECR = cr.CheckResTable[ele].GetControlData();
                writer.WriteLine(mm.sections[iSec].Name + "\t" + ele.ToString() + "(" + SECR.Sec_contral + ")\t" +
                                 SECR.ComName + "\t" + (SECR.N / 1e3).ToString("0.0") + "\t" + (SECR.My / 1e3).ToString("0.0") +
                                 "\t" + (SECR.Mz / 1e3).ToString("0.0") + "\t" +
                                 (SECR.Strength / 1e6).ToString("0.0") + "\t" + (SECR.Stability / 1e6).ToString("0.0") + "\t" +
                                 SECR.Ratio.ToString("0.00"));
            }

            writer.WriteLine("\n\n*********控制单元号**********: {0}", cr.GetControlElem(Elems).ToString());
            writer.Close();
            stream.Close();
        }
Пример #7
0
        /// <summary>
        /// 输出单个单元的验算结果表格
        /// </summary>
        /// <param name="mm">模型对像</param>
        /// <param name="FileOut">输出文件路径</param>
        /// <param name="cr">截面验算结果</param>
        /// <param name="iElem">单元号</param>
        public static void WriteElemCheckRes(ref Bmodel mm, ref CheckRes cr, string FileOut, int iElem)
        {
            FileStream   stream = File.Open(FileOut, FileMode.Create);
            StreamWriter writer = new StreamWriter(stream);

            writer.WriteLine("单元号\t截面位置\t荷载组合\tN(kN)\tMy(kN*m)\tMz(kN*m)\t强度(MPa)\t稳定(MPa)\t应力比");

            List <string> coms = mm.LoadCombTable.ComSteel;

            foreach (string com in coms)
            {
                //如果组合未激活,则跳过
                if (mm.LoadCombTable[com].bACTIVE == false)
                {
                    continue;
                }

                SingleEleCheckResData serd = cr.CheckResTable[iElem].GetCheckResByCom(com);
                writer.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}", iElem.ToString(), serd.Sec_contral, com,
                                 (serd.N / 1e3).ToString("0.0"), (serd.My / 1e3).ToString("0.0"),
                                 (serd.Mz / 1e3).ToString("0.0"), (serd.Strength / 1e6).ToString("0.0"),
                                 (serd.Stability / 1e6).ToString("0.0"), serd.Ratio.ToString("0.00"));
                //writer.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}", iElem.ToString(), "1/2", com,
                //    EFcom.Force_48.N.ToString("0.0"), EFcom.Force_48.My.ToString("0.0"),
                //    EFcom.Force_48.Mz.ToString("0.0"), Strength_2.ToString("0.0"),
                //    Stability_2.ToString("0.0"), Ratio_2.ToString("0.00"));
                //writer.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}", iElem.ToString(), "J", com,
                //    EFcom.Force_j.N.ToString("0.0"), EFcom.Force_j.My.ToString("0.0"),
                //    EFcom.Force_j.Mz.ToString("0.0"), Strength_j.ToString("0.0"),
                //    Stability_j.ToString("0.0"), Ratio_j.ToString("0.00"));
            }
            //输出控制组合
            writer.WriteLine("\n\n******控制组合*******: {0}", cr.CheckResTable[iElem].GetControlData().ComName);
            writer.Close();
            stream.Close();
        }
Пример #8
0
 /// <summary>
 /// 向啥希表中添加验算数据
 /// </summary>
 /// <param name="com">组合名称</param>
 /// <param name="ComData">组合验算结果</param>
 public void Add(string com, SingleEleCheckResData ComData)
 {
     _SingleEleCheckRes.Add(com, ComData);
 }
Пример #9
0
        /// <summary>
        /// 验算单个单元
        /// </summary>
        /// <param name="mm">模型对像</param>
        /// <param name="iElem">单元号</param>
        public void CheckElemByNum(ref Bmodel mm, int iElem)
        {
            EleCheckResData EleData = new EleCheckResData(iElem); //单元组合验算表

            List <string> coms = mm.LoadCombTable.ComSteel;

            foreach (string com in coms)
            {
                double gamma_re = 1.0;//承载力抗震调整系数
                //如果未激活则不验算
                if (mm.LoadCombTable[com].bACTIVE == false)
                {
                    continue;
                }
                FrameElement ele = mm.elements[iElem] as FrameElement;

                //若为地震组合则取存储的承载力抗震调整系数
                if (mm.LoadCombTable[com].hasLC_ANAL(ANAL.ES) ||
                    mm.LoadCombTable[com].hasLC_ANAL(ANAL.RS))
                {
                    gamma_re = ele.DPs.Gamma_re;
                }

                //先进行单元内力组合
                ElemForce EFcom = mm.CalElemForceComb(mm.LoadCombTable[com], iElem);

                //计算强度
                double Strength_i = CodeCheck.CalSecMaxStrength_YW(EFcom.Force_i,
                                                                   mm.sections[ele.iPRO],
                                                                   ele.DPs) * gamma_re;//i截面计算强度
                double Strength_2 = CodeCheck.CalSecMaxStrength_YW(EFcom.Force_48,
                                                                   mm.sections[ele.iPRO],
                                                                   ele.DPs) * gamma_re;
                double Strength_j = CodeCheck.CalSecMaxStrength_YW(EFcom.Force_j,
                                                                   mm.sections[ele.iPRO],
                                                                   ele.DPs) * gamma_re;
                //计算稳定性强度
                //double Stability_i = CodeCheck.CalStability_YW(EFcom.Force_i, mm.sections[ele.iPRO],
                //    ele.DPs, mm.mats[ele.iMAT].Elast)*gamma_re;
                //double Stability_2 =CodeCheck. CalStability_YW(EFcom.Force_48, mm.sections[ele.iPRO],
                //    ele.DPs, mm.mats[ele.iMAT].Elast)*gamma_re;
                //double Stability_j =CodeCheck. CalStability_YW(EFcom.Force_j, mm.sections[ele.iPRO],
                //    ele.DPs, mm.mats[ele.iMAT].Elast)*gamma_re;
                double Stability_i = CodeCheck.CalSecMaxStability_YW(EFcom.Force_i, mm.sections[ele.iPRO],
                                                                     ele.DPs, mm.mats[ele.iMAT].Elast) * gamma_re;
                double Stability_2 = CodeCheck.CalSecMaxStability_YW(EFcom.Force_48, mm.sections[ele.iPRO],
                                                                     ele.DPs, mm.mats[ele.iMAT].Elast) * gamma_re;
                double Stability_j = CodeCheck.CalSecMaxStability_YW(EFcom.Force_j, mm.sections[ele.iPRO],
                                                                     ele.DPs, mm.mats[ele.iMAT].Elast) * gamma_re;

                double Ratio   = Math.Max(Strength_i, Stability_i) / ele.DPs.fy;
                double Ratio_2 = Math.Max(Strength_2, Stability_2) / ele.DPs.fy;
                double Ratio_j = Math.Max(Strength_j, Stability_j) / ele.DPs.fy;

                //加入到数据库
                SingleEleCheckResData Secrd =
                    new SingleEleCheckResData("I", com, EFcom.Force_i.N, EFcom.Force_i.My, EFcom.Force_i.Mz,
                                              Strength_i, Stability_i, Ratio);
                SingleEleCheckResData Secrd_2 =
                    new SingleEleCheckResData("1/2", com, EFcom.Force_48.N, EFcom.Force_48.My, EFcom.Force_48.Mz,
                                              Strength_2, Stability_2, Ratio_2);
                SingleEleCheckResData Secrd_j =
                    new SingleEleCheckResData("J", com, EFcom.Force_j.N, EFcom.Force_j.My, EFcom.Force_j.Mz,
                                              Strength_j, Stability_j, Ratio_j);

                Secrd = Secrd.TheMaxRatio(Secrd_2);//取得控制内力
                Secrd = Secrd.TheMaxRatio(Secrd_j);

                EleData.Add(com, Secrd);//添加到单元验算结果数据中
            }

            //添加到数据表
            if (this._CheckResTable.ContainsKey(iElem))
            {
                this._CheckResTable.Remove(iElem);
                this._CheckResTable.Add(iElem, EleData);
            }
            else
            {
                this._CheckResTable.Add(iElem, EleData);
            }
        }