/// <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(); }
/// <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(); }
/// <summary> /// 输出所有截面验算参数设置 /// </summary> /// <param name="mm"></param> /// <param name="cr"></param> /// <param name="FileOut"></param> public static void WriteCheckPara(ref Bmodel mm, ref CheckRes cr, string FileOut) { FileStream stream = File.Open(FileOut, FileMode.Create); StreamWriter writer = new StreamWriter(stream); writer.WriteLine("截面号\t截面名称\t平面内计算长度\t平面外计算长度\t材料设计强度\t净毛面积比\t塑性发展系数γx\t" + "塑性发展系数γy\t等效弯矩系数βmx\t等效弯矩系数βmy\t等效弯矩系数βtx\t等效弯矩系数βty\t" + "受弯稳定系数ψbx\t受弯稳定系数ψby\t平面内长细比\t平面外长细比" + "\t截面类别\t抗震承力调整系数γre\t截面影响系数η"); foreach (BSections sec in mm.sections.Values) { List <int> tempElem = mm.getElemBySec(sec.Num); if (tempElem.Count == 0) { continue; } int eNum = tempElem[0]; double eLeng = mm.getFrameLength(eNum); FrameElement fe = mm.elements[eNum] as FrameElement; DesignParameters DP = fe.DPs; double ly = DP.Lk_y * eLeng; double lz = DP.Lk_z * eLeng; writer.Write("{0}\t{1}\t{2}\t{3}", sec.Num.ToString(), sec.Name, ly.ToString("0.00"), lz.ToString("0.00")); writer.Write("\t{0}\t{1}\t{2}", DP.fy.ToString("0"), DP.Ratio_Anet.ToString("0.00"), DP.Gamma_y.ToString("0.00")); writer.Write("\t{0}\t{1}\t{2}", DP.Gamma_z.ToString("0.00"), DP.Belta_my.ToString("0.00"), DP.Belta_mz.ToString("0.00")); writer.Write("\t{0}\t{1}", DP.Belta_ty.ToString("0.00"), DP.Belta_tz.ToString("0.00")); writer.Write("\t{0}\t{1}", DP.Phi_by.ToString("0.00"), DP.Phi_bz.ToString("0.00")); writer.Write("\t{0}\t{1}", DP.Lemda_y.ToString("0.00"), DP.Lemda_z.ToString("0.00")); writer.Write("\t{0}\t{1}", DP.SecCat.ToString(), DP.Gamma_re.ToString("0.00")); writer.Write("\t{0}", DP.Yita.ToString("0.00")); writer.Write("\n"); } writer.Close(); stream.Close(); }
/// <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(); }
/// <summary> /// 读入截面验算的设置参数 /// </summary> /// <param name="mm"></param> /// <param name="cr"></param> /// <param name="FileIn"></param> public static void ReadCheckPara(ref Bmodel mm, ref CheckRes cr, string FileIn) { string line = null; //行文本 string[] curdata = null; //当前行数据变量 int curNum = 0; //当前截面号 FileStream stream = File.Open(FileIn, FileMode.Open, FileAccess.Read); StreamReader reader = new StreamReader(stream); line = reader.ReadLine(); for (line = reader.ReadLine(); line != null; line = reader.ReadLine()) { curdata = line.Split("\t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); //字符串分割 curNum = Convert.ToInt32(curdata[0]); //当前截面号 List <int> eles = mm.getElemBySec(curNum); //当前截面的单元集 foreach (int ele in eles) { if (!(mm.elements[ele] is FrameElement)) { continue; } FrameElement fe = mm.elements[ele] as FrameElement; double len_y = Convert.ToDouble(curdata[2]); double len_z = Convert.ToDouble(curdata[3]); double Net_r = Convert.ToDouble(curdata[5]); double Gamma_y = Convert.ToDouble(curdata[6]); double Gamma_z = Convert.ToDouble(curdata[7]); double Betla_my = Convert.ToDouble(curdata[8]); double Betal_mz = Convert.ToDouble(curdata[9]); double Betal_ty = Convert.ToDouble(curdata[10]); double Betal_tz = Convert.ToDouble(curdata[11]); double Phi_by = Convert.ToDouble(curdata[12]); double Phi_bz = Convert.ToDouble(curdata[13]); double F = Convert.ToDouble(curdata[4]); //强度设计值 double Gamma_re = Convert.ToDouble(curdata[17]); //承载力调整系数 SecCategory cat = SecCategory.b; switch (curdata[16]) { case "a": cat = SecCategory.a; break; case "b": cat = SecCategory.b; break; case "c": cat = SecCategory.c; break; case "d": cat = SecCategory.d; break; default: cat = SecCategory.b; break; } double Yita = Convert.ToDouble(curdata[18]);//截面影响系数 //更新长细比 CodeCheck.CalDesignPara_lemda(ref mm, ele, len_y, len_z); //更新受压稳定系数 CodeCheck.CalDesignPara_phi(ref mm, ele, 1, cat); CodeCheck.CalDesignPara_phi(ref mm, ele, 2, cat); fe.DPs.SecCat = cat; fe.DPs.Ratio_Anet = Net_r; fe.DPs.Gamma_y = Gamma_y; fe.DPs.Gamma_z = Gamma_z; fe.DPs.Belta_my = Betla_my; fe.DPs.Belta_mz = Betal_mz; fe.DPs.Belta_ty = Betal_ty; fe.DPs.Belta_tz = Betal_tz; fe.DPs.fy = F;//强度设计值 fe.DPs.Gamma_re = Gamma_re; fe.DPs.Yita = Yita; } } reader.Close(); }