static void Main(string[] args)
        {
            ConcreteAASHTO C50      = new ConcreteAASHTO("C50", 50);
            Reinforcement  Grade400 = new Reinforcement("", 400, 20, 6, 50 + 20, 0);
            RectSection    ptm2     = new RectSection("f", 1000, 1000);

            ptm2.thisConcrete = C50;
            ptm2.RebarY0      = Grade400;
            //    RoundRecSection cpm1 = new RoundRecSection(2500, 1100, C35, Grade500, 64, 32, 50 + 32, 25);
            //    RoundRecSection pme2main = new RoundRecSection(2500, 1000, C35, Grade500, 40, 32, 50 + 32, 25);
            //    RoundRecSection pme2ramp = new RoundRecSection(1400,1000, C35, Grade500, 32, 32, 50 + 32, 250);
            //    RoundRecSection pe14 = new RoundRecSection(1600, 900, C35, Grade500, 28, 32, 50 + 32, 225);

            //    RoundRecSection ptl1 = new RoundRecSection(1000, 1400, C35, Grade500, 24, 32, 50 + 32, 225);


            //    Column PM1 = new Column(25000, cpm1, cpm1);
            //    PM1.SetDesignLoad(15295e3, 1281e6, 9963e6, 15295e3, 1281e6, 9963e6);
            //    PM1.PrintReport();

            ptm2.SectionAnalysis();

            Console.WriteLine("分析完成.");
            Console.ReadKey();
        }
Exemplo n.º 2
0
        public static double GetNBalance(double B, double H, ConcreteAASHTO Conc, Reinforcement TensRebar, Reinforcement CompRebar, double DepthT, double DepthC)
        {
            double a_balance = GetABalance(Conc, TensRebar, DepthT);
            var    cb        = a_balance / Conc.Beta1;
            var    dcomp     = H - DepthC;
            var    eps_comp  = Conc.Epsu * (cb - dcomp) / cb;
            double fs        = eps_comp * CompRebar.Es;

            fs = fs >= CompRebar.Fy ? CompRebar.Fy : fs;
            double N_balance = 0.85 * Conc.Fck_cylinder * B * a_balance - TensRebar.AsTotal * TensRebar.Fy + CompRebar.AsTotal * fs;

            return(N_balance);
        }
 public RoundRecSection(double b, double h, ConcreteAASHTO concProperty, Reinforcement rebarProperty, int numRebars, double ds, double cc = 50, double cr = 100)
 {
     B             = b;
     H             = h;
     ConcProperty  = concProperty;
     RebarProperty = rebarProperty;
     NumRebars     = numRebars;
     Ds            = ds;
     Cc            = cc;
     Cr            = cr;
     GenerateOutline();
     GenerateRebars();
     PlasticCenter = CalPC();
 }
Exemplo n.º 4
0
        public static double GetEBalance(double B, double H, ConcreteAASHTO Conc, Reinforcement TensRebar, Reinforcement CompRebar, double DepthT, double DepthC)
        {
            double a_balance = GetABalance(Conc, TensRebar, DepthT);
            double N_balance = GetNBalance(B, H, Conc, TensRebar, CompRebar, DepthT, DepthC);
            var    cb        = a_balance / Conc.Beta1;
            var    dcomp     = H - DepthC;
            var    eps_comp  = Conc.Epsu * (cb - dcomp) / cb;
            double fs        = eps_comp * CompRebar.Es;

            if (fs > CompRebar.Fy)
            {
                fs = CompRebar.Fy;
            }
            return((0.85 * Conc.Fck_cylinder * B * a_balance * (DepthT - 0.5 * a_balance) + CompRebar.AsTotal * fs * (DepthT - (H - DepthC))) / N_balance);
        }
Exemplo n.º 5
0
        public void GetMNCurveY(out List <Tuple <double, double> > MN_Y, int npts = 20)
        {
            DataTable Summary = new DataTable("Y方向MN曲线");

            Summary.Gen(120, new string[] { "M", "N", "a", "e", "fst", "fsc", "Ncal" });

            MN_Y = new List <Tuple <double, double> >();
            double         h         = LengthY;
            double         b         = LengthZ;
            double         Nn        = 0.0;
            double         Mu        = 0.0;
            Reinforcement  CompRebar = RebarY1;
            Reinforcement  TensRebar = RebarY0;
            ConcreteAASHTO Conc      = thisConcrete;
            double         DepthT    = h - TensRebar.locY;
            double         DepthC    = Math.Abs(CompRebar.locY);

            double a_balance = GetABalance(Conc, TensRebar, DepthT);
            double e_balance = GetEBalance(b, h, Conc, TensRebar, CompRebar, DepthT, DepthC);
            double N_balance = GetNBalance(b, h, Conc, TensRebar, CompRebar, DepthT, DepthC);



            double Nstep = N_balance / (npts - 1);
            Tuple <double, double> fsa = new Tuple <double, double>(0, 0);

            for (int i = 0; i < npts; i++)
            {
                Nn  = N_balance - Nstep * i;
                fsa = PubFuncs.GetCompRebarFs(1, LengthY, LengthZ, LengthY, DepthC, thisConcrete, RebarY0, RebarY1, -Nn);
                Mu  = 0.85 * thisConcrete.Fck_cylinder * LengthZ * fsa.Item2 * (DepthT - 0.5 * fsa.Item2) - RebarY1.AsTotal * fsa.Item1 * (DepthT - (LengthY - DepthC));
                MN_Y.Add(new Tuple <double, double>(Mu, Nn));
                double Ncal = 0.85 * Conc.Fck_cylinder * b * fsa.Item2 - RebarY0.AsTotal * RebarY0.Fy - RebarY1.AsTotal * fsa.Item1;
                Summary.WriteLine(i, new double[] { Mu, Nn, fsa.Item2, Mu / Nn, RebarY0.Fy, fsa.Item1, Ncal });
            }

            double Estep = e_balance / (5 * npts);
            double e     = 0;

            for (int i = 0; i < 5 * npts; i++)
            {
                e   = e_balance - Estep * (i + 1);
                fsa = PubFuncs.GetTensRebarFs(a_balance, Conc.Beta1 * h, b, h, DepthT, DepthC, Conc, TensRebar, CompRebar, e);
                Mu  = 0.85 * thisConcrete.Fck_cylinder * b * fsa.Item2 * (DepthT - 0.5 * fsa.Item2) + CompRebar.AsTotal * CompRebar.Fy * (DepthT - (LengthY - DepthC));
                //Nn = 0.85 * thisConcrete.Fck_cylinder * b * fsa.Item2 - TensRebar.AsTotal * fsa.Item1 + CompRebar.AsTotal * CompRebar.Fy;
                Summary.WriteLine(npts + i, new double[] { Mu, Mu / e, fsa.Item2, e, fsa.Item1, -RebarY1.Fy });
            }
        }
Exemplo n.º 6
0
        public OctagonSection(double b, double h, ConcreteAASHTO concProperty, Reinforcement rebarProperty, int numRebars, double ds, double cc = 50, double cb = 0, double ch = 0)
        {
            B             = b;
            H             = h;
            ConcProperty  = concProperty;
            RebarProperty = rebarProperty;
            NumRebars     = numRebars;
            Ds            = ds;
            Cc            = cc;
            Cb            = cb;
            Ch            = ch;

            GenerateOutline(0.0);
            GenerateRebars();

            PlasticCenter = CalPC();
        }
Exemplo n.º 7
0
 public static double GetABalance(ConcreteAASHTO Conc, Reinforcement TensRebar, double DepthT)
 {
     return(Conc.Beta1 * DepthT * Conc.Epsu / (Conc.Epsu + TensRebar.Epsy));
 }
Exemplo n.º 8
0
 public NameViewModel()
 {
     //_userName = new Name() { UserName = "******", CompanyName = "SoftEasy" };
     _C4 = new ConcreteAASHTO("f**k", 22);
 }
Exemplo n.º 9
0
 public MaterialViewModel()
 {
     _concrete = new ConcreteAASHTO("B40", 40);
 }
        static List <double> GetErrCompA(double a0, double a1, double B, double H, double DepthC, ConcreteAASHTO Conc, Reinforcement TensRebar, Reinforcement CompRebar, double Nn = 0.0)
        {
            List <double> res    = new List <double>();
            List <double> inputs = new List <double>()
            {
                a0, a1
            };
            double AsC = CompRebar.AsTotal;
            double AsT = TensRebar.AsTotal;
            double a_ret, err, fs = 0.0;
            double c, epsComp;

            foreach (var item in inputs)
            {
                c       = item / Conc.Beta1;
                epsComp = -Conc.Epsu * (c - (H - DepthC)) / c;

                if (epsComp <= -CompRebar.Epsy)
                {
                    fs = -CompRebar.Fy;
                }
                else if (epsComp < CompRebar.Epsy)
                {
                    fs = CompRebar.Es * epsComp;
                }
                else
                {
                    fs = CompRebar.Fy;
                }

                a_ret = (AsT * TensRebar.Fy + AsC * fs - Nn) / (0.85 * Conc.Fck_cylinder * B);
                err   = item - a_ret;
                res.Add(err);
            }
            res.Add(fs);

            return(res);
        }
        public static Tuple <double, double> GetTensRebarFs(double a0, double a1, double B, double H, double DepthT, double DepthC, ConcreteAASHTO Conc, Reinforcement TensRebar, Reinforcement CompRebar, double e, double error = 1e-6)
        {
            List <double> testA = new List <double>();
            List <double> testB = new List <double>();
            double        amid;
            double        fs = 0.0;

            amid = (a0 + a1) * 0.5;
            for (int i = 0; i < 50; i++)
            {
                testA = GetErrTensA2(a0, a1, B, H, DepthT, DepthC, Conc, TensRebar, CompRebar, e);
                testB = GetErrTensA2(a0, amid, B, H, DepthT, DepthC, Conc, TensRebar, CompRebar, e);
                if (testA[0] * testA[1] >= 0)
                {
                    break;
                }
                else if (testB[0] * testB[1] >= 0)
                {
                    a0   = amid;
                    amid = (a0 + a1) * 0.5;
                }
                else
                {
                    a1   = amid;
                    amid = (a0 + a1) * 0.5;
                }

                if (Math.Abs(testA[0]) <= error)
                {
                    fs = (testA[2] + testB[2]) * 0.5;
                    //Console.WriteLine(string.Format("#  {0}次迭代,计算收敛。", i));
                    break;
                }
            }
            return(new Tuple <double, double>(fs, amid));
        }
        /// <summary>
        /// 返回ft,fc,a,failmode;
        /// </summary>
        /// <param name="Nn"></param>
        /// <param name="a_blance"></param>
        /// <param name="B"></param>
        /// <param name="H"></param>
        /// <param name="Conc"></param>
        /// <param name="TensRebar"></param>
        /// <param name="CompRebar"></param>
        /// <param name="depthT"></param>
        /// <param name="DepthC"></param>
        /// <param name="error"></param>
        /// <returns>0-纯弯曲;1-受拉破坏;2-平衡破坏;3-受压且c<h4-受压且c>h;5-纯压</returns>
        internal static double[] GetFFA(double Nn, double a_blance, double B, double H, ConcreteAASHTO Conc, Reinforcement TensRebar, Reinforcement CompRebar, double depthT, double DepthC, double error = 1e-6)
        {
            double St     = 0;
            double Sc     = 0;
            double a      = 0;
            double Fail   = -1;//0-纯弯曲;1-受拉破坏;2-平衡破坏;3-受压且c<h;4-受压且c>h;5-纯压
            bool   isConv = false;

            // 按受拉破坏
            double        a0    = 1;
            double        a1    = a_blance;
            List <double> testA = new List <double>();
            List <double> testB = new List <double>();
            double        amid  = (a0 + a1) * 0.5;
            double        fs    = 0.0;

            for (int i = 0; i < 50; i++)
            {
                testA = GetErrCompA(a0, a1, B, H, DepthC, Conc, TensRebar, CompRebar, Nn);
                testB = GetErrCompA(a0, amid, B, H, DepthC, Conc, TensRebar, CompRebar, Nn);
                if (testA[0] * testA[1] >= 0)
                {
                    break;
                }
                else if (testB[0] * testB[1] >= 0)
                {
                    a0   = amid;
                    amid = (a0 + a1) * 0.5;
                }
                else
                {
                    a1   = amid;
                    amid = (a0 + a1) * 0.5;
                }

                if (Math.Abs(testA[0]) <= error)
                {
                    fs     = (testA[2] + testB[2]) * 0.5;
                    isConv = true;
                    //Console.WriteLine(string.Format("#  {0}次迭代,计算收敛。", i));
                    break;
                }
            }
            if (isConv)
            {
                St   = TensRebar.Fy;
                Sc   = fs;
                a    = amid;
                Fail = 1;
                return(new double[] { St, Sc, a, Fail });
            }


            // 按受压破坏
            a0    = a_blance;
            a1    = H * Conc.Beta1;
            testA = new List <double>();
            testB = new List <double>();
            amid  = (a0 + a1) * 0.5;
            fs    = 0.0;
            for (int i = 0; i < 50; i++)
            {
                testA = GetErrTensA(a0, a1, B, H, DepthC, Conc, TensRebar, CompRebar, Nn);
                testB = GetErrTensA(a0, amid, B, H, DepthC, Conc, TensRebar, CompRebar, Nn);
                if (testA[0] * testA[1] >= 0)
                {
                    break;
                }
                else if (testB[0] * testB[1] >= 0)
                {
                    a0   = amid;
                    amid = (a0 + a1) * 0.5;
                }
                else
                {
                    a1   = amid;
                    amid = (a0 + a1) * 0.5;
                }

                if (Math.Abs(testA[0]) <= error)
                {
                    fs     = (testA[2] + testB[2]) * 0.5;
                    isConv = true;
                    //Console.WriteLine(string.Format("#  {0}次迭代,计算收敛。", i));
                    break;
                }
            }
            if (isConv)
            {
                St   = fs;
                Sc   = -CompRebar.Fy;
                a    = amid;
                Fail = 3;
                return(new double[] { St, Sc, a, Fail });
            }



            return(new double[] { St, Sc, a, Fail });
        }
        static List <double> GetErrTensA2(double a0, double a1, double B, double H, double DepthT, double DepthC, ConcreteAASHTO Conc, Reinforcement TensRebar, Reinforcement CompRebar, double e)
        {
            List <double> res    = new List <double>();
            List <double> inputs = new List <double>()
            {
                a0, a1
            };
            double AsC = CompRebar.AsTotal;
            double AsT = TensRebar.AsTotal;
            double a_ret, err, fs = 0.0;
            double c, epsTens;

            foreach (var item in inputs)
            {
                c       = item / Conc.Beta1;
                epsTens = Conc.Epsu * (DepthT - c) / c;

                if (epsTens <= -TensRebar.Epsy)
                {
                    fs = -CompRebar.Fy;
                }
                else if (epsTens < TensRebar.Epsy)
                {
                    fs = TensRebar.Es * epsTens;
                }
                else
                {
                    fs = TensRebar.Fy;
                }
                double Nn = ((0.85 * Conc.Fck_cylinder * B * item) * (DepthT - 0.5 * item) + AsC * CompRebar.Fy * (DepthT - (H - DepthC))) / e;
                a_ret = (Nn + AsT * fs - AsC * CompRebar.Fy) / (0.85 * Conc.Fck_cylinder * B);
                err   = item - a_ret;
                res.Add(err);
            }
            res.Add(fs);

            return(res);
        }