Example #1
0
        public static List <double[]> zhengjinxuanjin(double space, int n, List <double> As, double[] h, double[] M, double cs, int C, double rg)
        {
            List <double[]> A = new List <double[]>();

            for (int i = 0; i < n; i++)
            {
                double varAsMiddle = As[2 * i + 1];//AB跨中计算配筋
                for (int j = 0; j < 7; j++)
                {
                    double[] arrAsData = zhengjinshuchu(space, j);
                    if (arrAsData[2] > varAsMiddle)
                    {
                        double[] d = { arrAsData[0], Math.Floor(1000 / space), 0, 0 };
                        double   w = Zuhezhengfujin.liefeng1(M[2 * i + 1], cs, d, arrAsData[2], h[i], C, rg);
                        if (w <= 0.2)
                        {
                            A.Add(new double[] { arrAsData[0], arrAsData[1], 0, 0, arrAsData[2], w });
                            break;
                        }
                    }
                }
            }

            if (A.Count < n)
            {
                //MessageBox.Show("正筋选筋时,超出选筋库!" + h);
                Util.ShowWarning("正筋选筋时,超出选筋库!" + h);
                return(new List <double[]>());
            }

            return(A);
        }
Example #2
0
        private void btnChengben_Click(object sender, EventArgs e)
        {
            RefreshInput();

            List <double[]> wallWidths = WallWidth.Genereate(input.m_FloorCount);

            Output[] outputs = new Output[wallWidths.Count];

            for (int i = 0; i < wallWidths.Count; i++)
            {
                input.SetWallWidth(wallWidths[i]);
                outputs[i] = new Output();
                outputs[i].SetWallWidth(wallWidths[i]);

                outputs[i].m_K = StiffnessMatrix.zonggangjuzhen(input.m_FloorCount, input.m_E, input.m_A, input.m_I, input.m_FloorHeights);
                outputs[i].m_Q = LoadCalculation.hezaijisuan(input.m_FloorCount, input.m_FloorHeights, input.m_r, input.m_FutuHeight, input.m_p0, input.m_rg, input.m_rq);
                double[] f01 = LoadCalculation.dengxiaojiedianhezai01(input.m_FloorCount, input.m_FloorHeights, outputs[i].m_Q);
                double[] f02 = LoadCalculation.dengxiaojiedianhezai02(input.m_FloorCount, input.m_FloorHeights, outputs[i].m_Q);
                outputs[i].m_f01 = new Vector(f01, VectorType.Column);
                outputs[i].m_f02 = new Vector(f02, VectorType.Column);
                outputs[i].m_K01 = BoundaryCondition.weiyibianjie01(input.m_FloorCount, outputs[i].m_K);
                outputs[i].m_K02 = BoundaryCondition.weiyibianjie02(input.m_FloorCount, outputs[i].m_K);
                outputs[i].m_M01 = InnerForceCalculation.neilijisuan(false,
                                                                     input.m_E, input.m_A, input.m_I, outputs[i].m_K01, outputs[i].m_f01, input.m_FloorCount, outputs[i].m_Q, input.m_FloorHeights);
                outputs[i].m_M02 = InnerForceCalculation.neilijisuan(true,
                                                                     input.m_E, input.m_A, input.m_I, outputs[i].m_K02, outputs[i].m_f02, input.m_FloorCount, outputs[i].m_Q, input.m_FloorHeights);

                outputs[i].m_MM   = InnerForceCalculation.neilitiaofu(outputs[i].m_M01, outputs[i].m_M02, input.m_T);
                outputs[i].m_Mmax = InnerForceCalculation.kuazhongzuidaM(outputs[i].m_MM, input.m_FloorCount, outputs[i].m_Q, input.m_FloorHeights);

                outputs[i].m_M = InnerForceCalculation.neilizuhe(input.m_FloorCount, outputs[i].m_MM, outputs[i].m_Mmax);

                List <double>[] As = ReinforcementCalculation.peijinjisuan(
                    outputs[i].m_M, input.m_cs, input.m_FloorCount, input.m_WallWidths, input.m_fy, input.m_fc, input.m_ft);
                outputs[i].m_As = As;

                List <double[]> zuhejin = Zuhezhengfujin.zuhezhengfujin(input.m_FloorCount, outputs[i].m_As[0], input.m_ft, input.m_fy, input.m_WallWidths, outputs[i].m_M, input.m_cs, input.m_ConcreteGrade, input.m_rg);
                outputs[i].m_Zuhejin = zuhejin;

                List <double[]> shuipingjin = Shuipingjin.shuipingjin(input.m_FloorCount, input.m_WallWidths);
                outputs[i].m_Shuipingjin = shuipingjin;

                double[] cb = Chengben.chengben(outputs[i].m_Zuhejin, outputs[i].m_Shuipingjin, input.m_FloorCount, input.m_ConcretePrice,
                                                input.m_RebarPrice, input.m_WallWidths, input.m_FloorHeights, input.m_cs, input.m_RoofThickness,
                                                input.m_SeismicGrade, input.m_ConcreteGrade, input.m_RebarGrade);
                outputs[i].m_Chengben = cb;

                if (cbxShowDetial.Checked == true)
                {
                    string strWidths   = Util.ToString(wallWidths[i]);
                    string strChengben = Util.ToString(cb);
                    rtbBrowser.AppendText(strWidths);
                    rtbBrowser.AppendText(strChengben);
                    rtbBrowser.AppendText("\n");
                }
            }

            pritResult(outputs);
        }
Example #3
0
        public static List <double[]> fujinxuanjin(int space, int n, List <double> As, double ft, double fy, double[] h, double[] M, double cs, int C, double rg)
        {
            //本子函数用于负筋自动选筋,按照此子程序计算得到的配筋为最节省配筋
            //本子函数即根据裂缝选筋liefeng1(M, cs, d, As, h, C, rg)
            //n为挡墙层数
            //As为peijinjisuan(M, cs, n, fy, fc, ft)中计算得到各点的计算配筋
            //As =[A      AB      B       BC       C        CD        D       DE       E]
            //As(1)   As(2)   As(3)   As(4)   As(5)     As(6)     As(7)    As(8)   As(9)
            //受力钢筋最小直径为12mm,间距最大为150mm
            double roumin = Math.Max(0.002, 0.45 * ft / (100 * fy)); //最小配筋率

            if (n == 1)                                              //1层挡墙
            {
                double AsmaxA = As[0];                               //A点计算配筋
                if (AsmaxA > 6544 || AsmaxA <= 0)
                {
                    throw new Exception("A点选筋超出选筋库");
                }

                double   Astong = roumin * h[0] * 1000;                              //另通长筋 = 构造钢筋
                double[] AssA   = Zuhezhengfujin.fujinshuchu(space, AsmaxA, Astong); //调用函数,输出A点的配筋,[直径 间距 直径 间距 实选面积]
                double[] Asss   = { AssA[0], AssA[1], AssA[2], AssA[3], AssA[4] };   //B点配筋为负筋通长筋,裂缝不用验算

                //A点的选筋
                double[] d = { Asss[0], Math.Floor(1000 / Asss[1]), Asss[2], Math.Floor(1000 / Asss[3]) }; //A点的配筋直径、数量
                double   w = Zuhezhengfujin.liefeng1(M[0], cs, d, Asss[4], h[0], C, rg);                   //计算A点裂缝

                double[] A1 = new double[6];
                if (w <= 0.2)
                {
                    A1 = new double[] { Asss[0], Asss[1], Asss[2], Asss[3], Asss[4], w };//A配筋输出格式统一为[直径 间距 直径 间距 实选面积]
                }
                else
                {
                    double Asss0 = Asss[4]; //Asss0用于做标记,判断后面增加面积是否超过1000mm2
                    Asss[4] = Asss[4] + 10; //裂缝计算不够时,实配钢筋面积增加10mm2,选筋后,再进行裂缝验算

                    if (Asss[4] > 6544)
                    {
                        throw new Exception("A点选筋超出选筋库");
                    }

                    for (int j = 1; j <= 200; j++)                                        //嵌套循环增加配筋面积,最多增加2000mm2
                    {
                        double[] AA = Zuhezhengfujin.fujinshuchu(space, Asss[4], Astong); //再次选筋

                        Asss = new double[] { AA[0], AA[1], AA[2], AA[3], AA[4] };        //将选筋结果填入Asss矩阵中
                        d    = new double[] { Asss[0], Math.Floor(1000 / Asss[1]), Asss[2], Math.Floor(1000 / Asss[3]) };
                        w    = Zuhezhengfujin.liefeng1(M[0], cs, d, Asss[4], h[0], C, rg);
                        if (w <= 0.2)
                        {
                            A1 = new double[] { Asss[0], Asss[1], Asss[2], Asss[3], Asss[4], w };//计算得到A点配筋和裂缝宽度
                            break;
                        }
                        else
                        {
                            Asss[4] = Asss[4] + 10;
                            if (Asss[4] > 6544)
                            {
                                throw new Exception("A点选筋超出选筋库");
                            }

                            if (Asss[4] - Asss0 > 1000)
                            {
                                throw new Exception("A点按裂缝选筋增加钢筋过大,请修改挡墙参数");
                            }
                        }
                    }
                }

                List <double[]> A = new List <double[]>();
                A.Add(new double[] { A1[0], A1[1], A1[2], A1[3], A1[4], A1[5] });
                A.Add(new double[] { A1[0], A1[1], 0, 0, Math.PI * Math.Pow(A1[0], 2) * 1000 / (4 * A1[1]), 0 });
                return(A);
            }
            else if (n == 2)
            {
                double[][] Ak     = new double[2][];
                double     AsmaxA = As[0]; //A点计算配筋
                double     AsmaxB = As[2]; //B点计算配筋

                if (Math.Max(AsmaxA, AsmaxB) > 6544 || Math.Min(AsmaxA, AsmaxB) <= 0)
                {
                    throw new Exception("选筋超出选筋库");
                }

                double     Astong = Math.Max(roumin * h[0] * 1000, roumin * h[1] * 1000); //1层通长筋 = 构造钢筋,AB两点都用此值
                double[]   AssA   = Zuhezhengfujin.fujinshuchu(space, AsmaxA, Astong);    //调用函数,输出A点的配筋,[直径 间距 直径 间距 实选面积]
                double[]   AssB   = Zuhezhengfujin.fujinshuchu(space, AsmaxB, Astong);    //调用函数,输出B点的配筋,[直径 间距 直径 间距 实选面积]
                double[][] Asss   = new double[][] {
                    new double[] { AssA[0], AssA[1], AssA[2], AssA[3], AssA[4] },
                    new double[] { AssB[0], AssB[1], AssB[2], AssB[3], AssB[4] }
                };
                //C点配筋为负筋通长筋,裂缝不用验算

                //A点配筋
                for (int i = 0; i < 2; i++)
                {
                    double[] d  = new double[] { Asss[i][0], Math.Floor(1000 / Asss[i][1]), Asss[i][2], Math.Floor(1000 / Asss[i][3]) }; //A点的配筋直径、数量
                    double   wl = i == 0 ? 0 : Zuhezhengfujin.liefeng1(M[2 * i], cs, d, Asss[i][4], h[i - 1], C, rg);                    //计算A点裂缝
                    double   wr = Zuhezhengfujin.liefeng1(M[2 * i], cs, d, Asss[i][4], h[i], C, rg);                                     //计算A点裂缝
                    double   w  = Math.Max(wl, wr);
                    if (w <= 0.2)
                    {
                        Ak[i] = new double[] { Asss[i][0], Asss[i][1], Asss[i][2], Asss[i][3], Asss[i][4], w };//A配筋输出格式统一为[直径 间距 直径 间距 实选面积]
                    }
                    else
                    {
                        double Asss0 = Asss[i][4];    //Asss0用于做标记,判断后面增加面积是否超过1000mm2
                        Asss[i][4] = Asss[i][4] + 10; //裂缝计算不够时,实配钢筋面积增加10mm2,选筋后,再进行裂缝验算
                        if (Asss[i][4] > 6544)
                        {
                            throw new Exception("选筋超出选筋库");
                        }

                        for (int j = 1; j <= 200; j++)                                           //嵌套循环增加配筋面积,最多增加2000mm2
                        {
                            double[] AA = Zuhezhengfujin.fujinshuchu(space, Asss[i][4], Astong); //再次选筋
                            Asss[i] = new double[] { AA[0], AA[1], AA[2], AA[3], AA[4] };        //将选筋结果填入Asss矩阵中
                            d       = new double[] { Asss[i][0], Math.Floor(1000 / Asss[i][1]), Asss[i][2], Math.Floor(1000 / Asss[i][3]) };
                            if (i == 0)
                            {
                                w = Zuhezhengfujin.liefeng1(M[0], cs, d, Asss[i][4], h[0], C, rg);
                            }
                            else
                            {
                                wl = Zuhezhengfujin.liefeng1(M[2 * i], cs, d, Asss[i][4], h[i - 1], C, rg);
                                wr = Zuhezhengfujin.liefeng1(M[2 * i], cs, d, Asss[i][4], h[i], C, rg);
                                w  = Math.Max(wl, wr);
                            }

                            if (w <= 0.2)
                            {
                                Ak[i] = new double[] { Asss[i][0], Asss[i][1], Asss[i][2], Asss[i][3], Asss[i][4], w };//计算得到A点配筋和裂缝宽度
                                break;
                            }
                            else
                            {
                                Asss[i][4] = Asss[i][4] + 10;
                                if (Asss[i][4] > 6544)
                                {
                                    throw new Exception("选筋超出选筋库");
                                }

                                if (Asss[i][4] - Asss0 > 1000)
                                {
                                    throw new Exception("A点按裂缝选筋增加钢筋过大,请修改挡墙参数");
                                }
                            }
                        }
                    }
                }

                List <double[]> A = new List <double[]>();
                A = peijinxietiao(space, Ak, M, cs, h, C, rg);
                A.Add(tongchang(space, ft, fy, h[1]));
                return(A);
            }
            else
            {
                List <double[]> A = new List <double[]>();

                double[][] Ak = new double[n][];

                double[]        arrAsNeed = new double[n];
                double[]        arrAsTong = new double[n];
                List <double[]> arrAs     = new List <double[]>();
                for (int i = 0; i < n; i++)
                {
                    arrAsNeed[i] = As[2 * i];
                    if (arrAsNeed[i] > 6544 || arrAsNeed[i] <= 0)
                    {
                        throw new Exception("选筋超出选筋库");
                    }
                    arrAsTong[i] = i == 0 ? Math.Max(roumin * h[i] * 1000, roumin * h[i + 1] * 1000)
                        : Math.Max(roumin * h[i - 1] * 1000, roumin * h[i] * 1000);

                    arrAs.Add(fujinshuchu(space, arrAsNeed[i], arrAsTong[i]));
                }

                for (int i = 0; i < n; i++)
                {
                    double[] d  = new double[] { arrAs[i][0], Math.Floor(1000 / arrAs[i][1]), arrAs[i][2], Math.Floor(1000 / arrAs[i][3]) }; //A点的配筋直径、数量
                    double   wl = i == 0 ? 0 : liefeng1(M[2 * i], cs, d, arrAs[i][4], h[i - 1], C, rg);                                      //计算A点裂缝
                    double   wr = liefeng1(M[2 * i], cs, d, arrAs[i][4], h[i], C, rg);                                                       //计算A点裂缝
                    double   w  = Math.Max(wl, wr);
                    if (w <= 0.2)
                    {
                        Ak[i] = new double[] { arrAs[i][0], arrAs[i][1], arrAs[i][2], arrAs[i][3], arrAs[i][4], w };//A配筋输出格式统一为[直径 间距 直径 间距 实选面积]
                    }
                    else
                    {
                        double Asss0 = arrAs[i][4];     //Asss0用于做标记,判断后面增加面积是否超过1000mm2
                        arrAs[i][4] = arrAs[i][4] + 10; //裂缝计算不够时,实配钢筋面积增加10mm2,选筋后,再进行裂缝验算
                        if (arrAs[i][4] > 6544)
                        {
                            throw new Exception("选筋超出选筋库");
                        }

                        for (int j = 1; j <= 200; j++)                                //嵌套循环增加配筋面积,最多增加2000mm2
                        {
                            arrAs[i] = fujinshuchu(space, arrAs[i][4], arrAsTong[i]); //再次选筋
                            d        = new double[] { arrAs[i][0], Math.Floor(1000 / arrAs[i][1]), arrAs[i][2], Math.Floor(1000 / arrAs[i][3]) };
                            if (i == 0)
                            {
                                w = Zuhezhengfujin.liefeng1(M[0], cs, d, arrAs[i][4], h[0], C, rg);
                            }
                            else
                            {
                                wl = Zuhezhengfujin.liefeng1(M[2 * i], cs, d, arrAs[i][4], h[i - 1], C, rg);
                                wr = Zuhezhengfujin.liefeng1(M[2 * i], cs, d, arrAs[i][4], h[i], C, rg);
                                w  = Math.Max(wl, wr);
                            }

                            if (w <= 0.2)
                            {
                                Ak[i] = new double[] { arrAs[i][0], arrAs[i][1], arrAs[i][2], arrAs[i][3], arrAs[i][4], w };//计算得到A点配筋和裂缝宽度
                                break;
                            }
                            else
                            {
                                arrAs[i][4] = arrAs[i][4] + 10;
                                if (arrAs[i][4] > 6544)
                                {
                                    throw new Exception("选筋超出选筋库");
                                }

                                if (arrAs[i][4] - Asss0 > 1000)
                                {
                                    //throw new Exception("A点按裂缝选筋增加钢筋过大,请修改挡墙参数");
                                    //MessageBox.Show("A点按裂缝选筋增加钢筋过大,请修改挡墙参数");
                                    Util.ShowWarning("A点按裂缝选筋增加钢筋过大,请修改挡墙参数。");
                                    return(new List <double[]>());
                                }
                            }
                        }
                    }

                    if (i == 0)
                    {
                        //continue;
                    }
                    else if (i == 1)
                    {
                        if (Ak[0] != null && Ak[1] != null)
                        {
                            A = peijinxietiao(space, Ak, M, cs, h, C, rg);
                        }
                    }
                    else
                    {
                        A.Add(Ak[i]);
                    }
                }
                A.Add(tongchang(space, ft, fy, h[n - 1]));

                if (A.Count < n + 1)
                {
                    return(new List <double[]>());
                }

                return(A);
            }
        }
Example #4
0
        public static List <double[]> peijinxietiao(double space, double[][] A, double[] M, double cs, double[] h, int C, double rg)
        {
            double[] d = { 12, 14, 16, 18, 20, 22, 25 };
            double[,] indexs =
            {
                { 1, 1, 1, 0, 0, 0, 0 },
                { 1, 1, 1, 1, 0, 0, 0 },
                { 1, 1, 1, 1, 1, 0, 0 },
                { 0, 1, 1, 1, 1, 1, 0 },
                { 0, 0, 1, 1, 1, 1, 1 },
                { 0, 0, 0, 1, 1, 1, 1 },
                { 0, 0, 0, 0, 1, 1, 1 }
            };

            double[] amax     = A[0];
            double[] amin     = A[1];
            double   pm       = M[2];
            bool     isSingle = false;

            if (A[0][0] < A[1][0])
            {
                amax     = A[1];
                amin     = A[0];
                pm       = M[0];
                isSingle = true;
            }

            amin[0] = amax[0];
            for (int i = 0; i < 7; i++)
            {
                if (amin[0] == d[i])
                {
                    double delta = 1000;
                    double area  = amin[4];
                    for (int j = 0; j < 7; j++)
                    {
                        if (indexs[i, j] == 1)
                        {
                            double area1 = Math.PI * Math.Pow(d[i], 2) / 4 * 1000 / space + Math.PI * Math.Pow(d[j], 2) / 4 * 1000 / space;
                            double area2 = Math.PI * Math.Pow(d[i], 2) / 4 * 1000 / space + Math.PI * Math.Pow(d[j], 2) / 4 * 1000 / (2 * space);

                            double[] dd = { amin[0], Math.Floor(1000 / amin[1]), d[j], Math.Floor(1000 / (2 * space)) };
                            double   w1 = Zuhezhengfujin.liefeng1(pm, cs, dd, area2, h[0], C, rg);
                            double   w2 = Zuhezhengfujin.liefeng1(pm, cs, dd, area2, h[1], C, rg);
                            double   w  = isSingle ? w1 : Math.Max(w1, w2);

                            if (area2 - area > -0.001 && area2 - area < delta)
                            {
                                delta   = area2 - area;
                                amin[2] = d[j];
                                amin[3] = 2 * space;
                                amin[4] = area2;
                                amin[5] = w;
                            }
                            else if (area2 - area < -0.001 && w < 0.2)
                            {
                                delta   = area2 - area;
                                amin[2] = d[j];
                                amin[3] = 2 * space;
                                amin[4] = area2;
                                amin[5] = w;
                            }

                            dd = new double[] { amin[0], Math.Floor(1000 / amin[1]), d[j], Math.Floor(1000 / space) };
                            w1 = Zuhezhengfujin.liefeng1(pm, cs, dd, area1, h[0], C, rg);
                            w2 = Zuhezhengfujin.liefeng1(pm, cs, dd, area1, h[1], C, rg);
                            w  = isSingle ? w1 : Math.Max(w1, w2);

                            if (area1 - area > -0.001 && area1 - area < delta)
                            {
                                delta   = area1 - area;
                                amin[2] = d[j];
                                amin[3] = space;
                                amin[4] = area1;
                                amin[5] = w;
                            }
                            else if (area1 - area < -0.001 && w < 0.2)
                            {
                                delta   = area1 - area;
                                amin[2] = d[j];
                                amin[3] = space;
                                amin[4] = area1;
                                amin[5] = w;
                            }
                        }
                    }
                    break;
                }
            }

            List <double[]> result = isSingle ? new List <double[]> {
                amin, amax
            } : new List <double[]> {
                amax, amin
            };

            return(result);
        }