Exemplo n.º 1
0
        public static double SectionModulus(CompositeBeam compositeBeam, double modRatio, bool composite, bool positiveMoment, double location)
        {
            double NA        = NeutralAxis(compositeBeam, modRatio, composite, positiveMoment);
            double I_Elastic = MomentOfInertia(compositeBeam, modRatio, composite, positiveMoment);

            return(I_Elastic / Math.Abs(NA - location));
        }
Exemplo n.º 2
0
 // need to handle stress in reinforcing
 public static double Stress(double moment, CompositeBeam compositeBeam, double modRatio, bool composite, bool positiveMoment, double location)
 {
     if (location > compositeBeam.TopFlange.TopLocation)
     {
         return(moment * 12 / SectionModulus(compositeBeam, modRatio, composite, positiveMoment, location) / modRatio);
     }
     else
     {
         return(moment * 12 / SectionModulus(compositeBeam, modRatio, composite, positiveMoment, location));
     }
 }
Exemplo n.º 3
0
        public static double BeamArea(CompositeBeam compositeBeam, double modRatio, bool composite, bool positiveMoment)
        {
            double[] array     = CompositeAndPositiveMoment(composite, positiveMoment);
            double   reinfArea = 0;

            foreach (Reinforcing reinf in compositeBeam.Reinforcing)
            {
                reinfArea += reinf.Area * (1 - array[1] / modRatio); //remove slab area where reinf exists with (1 - 1/modRatio)
            }
            return(compositeBeam.BotFlange.Area() + compositeBeam.Web.Area() + compositeBeam.TopFlange.Area() + (compositeBeam.Bolster.Area(modRatio)
                                                                                                                 + compositeBeam.Slab.Area(modRatio)) * array[0] * array[1] + reinfArea * array[0]);
        }
Exemplo n.º 4
0
        public static double NeutralAxis(CompositeBeam compositeBeam, double modRatio, bool composite, bool positiveMoment)
        {
            double[] array         = CompositeAndPositiveMoment(composite, positiveMoment);
            double   beamAndSlabNA = NeutralAxis(compositeBeam.BotFlange, compositeBeam.Web, compositeBeam.TopFlange, compositeBeam.Bolster,
                                                 compositeBeam.Slab, modRatio, composite, positiveMoment);
            double beamAndSlabArea = BeamArea(compositeBeam.BotFlange, compositeBeam.Web, compositeBeam.TopFlange, compositeBeam.Bolster,
                                              compositeBeam.Slab, modRatio, composite, positiveMoment);
            double reinfAreaTimesLocation = 0;
            double reinfArea = 0;

            foreach (Reinforcing reinf in compositeBeam.Reinforcing)
            {
                reinfAreaTimesLocation += reinf.Area * (1 - array[1] / modRatio) * reinf.Location; //remove slab area where reinf exists with (1 - 1/modRatio)
                reinfArea += reinf.Area * (1 - array[1] / modRatio);                               //remove slab area where reinf exists with (1 - 1/modRatio)
            }
            return((beamAndSlabArea * beamAndSlabNA + reinfAreaTimesLocation * array[0]) / (beamAndSlabArea + reinfArea * array[0]));
        }
Exemplo n.º 5
0
        public static double MomentOfInertia(CompositeBeam compositeBeam, double modRatio, bool composite, bool positiveMoment)
        {
            double[] array   = CompositeAndPositiveMoment(composite, positiveMoment);
            double   NA      = NeutralAxis(compositeBeam, modRatio, composite, positiveMoment);
            double   reinf_I = 0;

            foreach (Reinforcing reinf in compositeBeam.Reinforcing)
            {
                reinf_I += reinf.Area * (1 - array[1] / modRatio) * Math.Pow(reinf.Location - NA, 2);
            }
            return(compositeBeam.BotFlange.I_x() + compositeBeam.BotFlange.Area() * Math.Pow(compositeBeam.BotFlange.CG - NA, 2)
                   + compositeBeam.Web.I_x() + compositeBeam.Web.Area() * Math.Pow(compositeBeam.Web.CG - NA, 2)
                   + compositeBeam.TopFlange.I_x() + compositeBeam.TopFlange.Area() * Math.Pow(compositeBeam.TopFlange.CG - NA, 2)
                   + (compositeBeam.Bolster.I_x(modRatio) + compositeBeam.Bolster.Area(modRatio) * Math.Pow(compositeBeam.Bolster.CG - NA, 2)
                      + compositeBeam.Slab.I_x(modRatio) + compositeBeam.Slab.Area(modRatio) * Math.Pow(compositeBeam.Slab.CG - NA, 2)) * array[0] * array[1]
                   + reinf_I * array[0]);
        }
Exemplo n.º 6
0
        public static double[] BeamStresses(List <Force> forces, CompositeBeam compositeBeam)
        {
            double f_bf = 0, f_wb = 0, f_wt = 0, f_tf = 0, f_slab = 0;

            double[] stresses;
            foreach (Force force in forces)
            {
                stresses = BeamStresses(force.Moment, compositeBeam, force.ModRatio, force.Composite);
                f_bf    += stresses[0];
                f_wb    += stresses[1];
                f_wt    += stresses[2];
                f_tf    += stresses[3];
                f_slab  += stresses[4];
            }
            stresses = new double[5] {
                f_bf, f_wb, f_wt, f_tf, f_slab
            };
            return(stresses);
        }
Exemplo n.º 7
0
        public static double WebCompression_Dc(double moment, CompositeBeam compositeBeam, double modRatio, bool composite, bool positiveMoment)
        {
            bool posMom;

            if (moment >= 0 && positiveMoment)
            {
                posMom = true;
            }
            else
            {
                posMom = false;
            }

            double NA = NeutralAxis(compositeBeam, modRatio, composite, posMom);

            double[] array = CompositeAndPositiveMoment(composite, posMom);
            double   f_c, f_t, D_c, d = compositeBeam.TopFlange.TopLocation - compositeBeam.BotFlange.BotLocation, t_fc;

            if (posMom)
            {
                t_fc = compositeBeam.TopFlange.y;
                f_c  = compositeBeam.f_Elastic(moment, modRatio, composite, positiveMoment, compositeBeam.TopFlange.TopLocation);
                f_t  = compositeBeam.f_Elastic(moment, modRatio, composite, positiveMoment, compositeBeam.BotFlange.BotLocation);
                if (NA > compositeBeam.Web.TopLocation)
                {
                    D_c = 0;
                }
                else
                {
                    D_c = f_c * d / (f_t + f_c) - t_fc;
                }
            }
            else
            {
                t_fc = compositeBeam.BotFlange.y;
                f_c  = compositeBeam.f_Elastic(moment, modRatio, composite, positiveMoment, compositeBeam.BotFlange.BotLocation);
                f_t  = compositeBeam.f_Elastic(moment, modRatio, composite, positiveMoment, compositeBeam.TopFlange.TopLocation);
                D_c  = f_c * d / (f_t + f_c) - t_fc;
            }

            return(Math.Max(0, D_c));
        }
Exemplo n.º 8
0
        public static double[] BeamStresses(double moment, CompositeBeam compositeBeam, double modRatio, bool composite)
        {
            double f_bf, f_wb, f_wt, f_tf, f_slab, posNeg;

            bool posMom;

            if (moment >= 0)
            {
                posMom = true;
                posNeg = 1;
            }
            else
            {
                posMom = false;
                posNeg = -1;
            }

            double NA = NeutralAxis(compositeBeam, modRatio, composite, posMom);

            if (compositeBeam.BotFlange.BotLocation <= NA)
            {
                f_bf = posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.BotFlange.BotLocation);
            }
            else
            {
                f_bf = -1 * posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.BotFlange.BotLocation);
            }

            if (compositeBeam.Web.BotLocation <= NA)
            {
                f_wb = posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.Web.BotLocation);
            }
            else
            {
                f_wb = -1 * posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.Web.BotLocation);
            }

            if (compositeBeam.Web.TopLocation <= NA)
            {
                f_wt = posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.Web.TopLocation);
            }
            else
            {
                f_wt = -1 * posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.Web.TopLocation);
            }

            if (compositeBeam.TopFlange.TopLocation <= NA)
            {
                f_tf = posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.TopFlange.TopLocation);
            }
            else
            {
                f_tf = -1 * posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.TopFlange.TopLocation);
            }

            if (compositeBeam.Slab.TopLocation <= NA)
            {
                f_slab = posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.Slab.TopLocation);
            }
            else
            {
                f_slab = -1 * posNeg * Stress(Math.Abs(moment), compositeBeam, modRatio, composite, posMom, compositeBeam.Slab.TopLocation);
            }

            double[] stresses = new double[5] {
                f_bf, f_wb, f_wt, f_tf, f_slab
            };
            return(stresses);
        }
Exemplo n.º 9
0
        public static double FirstMoment_Q(CompositeBeam compositeBeam, double modRatio, bool composite, bool positiveMoment, double location)
        {
            double[] array = CompositeAndPositiveMoment(composite, positiveMoment);
            double   NA = NeutralAxis(compositeBeam, modRatio, composite, positiveMoment);
            Plate    botFlange = compositeBeam.BotFlange, web = compositeBeam.Web, topFlange = compositeBeam.TopFlange, bolster = compositeBeam.Bolster, slab = compositeBeam.Slab;

            // component {area, dist to location}
            double[] slabC            = { 0, 0 }, bolstC = { 0, 0 }, tFlangeC = { 0, 0 }, webC = { 0, 0 }, bFlangeC = { 0, 0 };
            double[] tFlangeT         = { 0, 0 }, webT = { 0, 0 }, bFlangeT = { 0, 0 };
            double   reinfFirstMoment = 0;

            if (NA <= location)
            {
                foreach (Reinforcing reinf in compositeBeam.Reinforcing)
                {
                    if (location >= reinf.Location)
                    {
                        reinfFirstMoment += reinf.Area * (1 - array[1] / modRatio) * (reinf.Location - NA);
                    }
                }

                if (location >= compositeBeam.Slab.BotLocation)
                {
                    slabC[0] = slab.Area(modRatio) * (slab.TopLocation - location) / slab.y * array[0] * array[1];
                    slabC[1] = (slab.TopLocation - NA) / 2;
                }
                else if (location >= bolster.BotLocation)
                {
                    slabC[0]  = slab.Area(modRatio) * array[0] * array[1];
                    slabC[1]  = slab.CG - NA;
                    bolstC[0] = bolster.Area(modRatio) * (bolster.TopLocation - location) / bolster.y * array[0] * array[1];
                    bolstC[1] = (bolster.TopLocation - NA) / 2;
                }
                else if (location >= topFlange.BotLocation)
                {
                    slabC[0]    = slab.Area(modRatio) * array[0] * array[1];
                    slabC[1]    = slab.CG - NA;
                    bolstC[0]   = bolster.Area(modRatio) * array[0] * array[1];
                    bolstC[1]   = bolster.CG - NA;
                    tFlangeC[0] = topFlange.Area() * (topFlange.TopLocation - location) / topFlange.y;
                    tFlangeC[1] = (topFlange.TopLocation - NA) / 2;
                }
                else if (location >= web.BotLocation)
                {
                    slabC[0]    = slab.Area(modRatio) * array[0] * array[1];
                    slabC[1]    = slab.CG - NA;
                    bolstC[0]   = bolster.Area(modRatio) * array[0] * array[1];
                    bolstC[1]   = bolster.CG - NA;
                    tFlangeC[0] = topFlange.Area();
                    tFlangeC[1] = topFlange.CG - NA;
                    webC[0]     = web.Area() * (web.TopLocation - location) / web.y;
                    webC[1]     = (web.TopLocation - NA) / 2;
                }
                else
                {
                    slabC[0]    = slab.Area(modRatio) * array[0] * array[1];
                    slabC[1]    = slab.CG - NA;
                    bolstC[0]   = bolster.Area(modRatio) * array[0] * array[1];
                    bolstC[1]   = bolster.CG - NA;
                    tFlangeC[0] = topFlange.Area();
                    tFlangeC[1] = topFlange.CG - NA;
                    webC[0]     = web.Area();
                    webC[1]     = web.CG - NA;
                    bFlangeC[0] = botFlange.Area() * (botFlange.TopLocation - location) / botFlange.y;
                    bFlangeC[1] = (botFlange.TopLocation - NA) / 2;
                }
                return(slabC[0] * slabC[1] + bolstC[0] * bolstC[1] + tFlangeC[0] * tFlangeC[1] + webC[0] * webC[1] + bFlangeC[0] * bFlangeC[1]
                       + reinfFirstMoment * array[0]);
            }
            else
            {
                if (location <= botFlange.TopLocation)
                {
                    bFlangeT[0] = botFlange.Area() * (location - botFlange.BotLocation) / botFlange.y;
                    bFlangeT[1] = (NA - botFlange.BotLocation) / 2;
                }
                else if (location <= web.TopLocation)
                {
                    bFlangeT[0] = botFlange.Area();
                    bFlangeT[1] = NA - botFlange.CG;
                    webT[0]     = web.Area() * (location - web.BotLocation) / web.y;
                    webT[1]     = (NA - web.BotLocation) / 2;
                }
                else if (location <= topFlange.TopLocation)
                {
                    bFlangeT[0] = botFlange.Area();
                    bFlangeT[1] = NA - botFlange.CG;
                    webT[0]     = web.Area();
                    webT[1]     = NA - web.CG;
                    tFlangeT[0] = topFlange.Area() * (location - topFlange.BotLocation) / topFlange.y;
                    tFlangeT[1] = (NA - topFlange.BotLocation) / 2;
                }
                else
                {
                    bFlangeT[0] = botFlange.Area();
                    bFlangeT[1] = NA - botFlange.CG;
                    webT[0]     = web.Area();
                    webT[1]     = NA - web.CG;
                    tFlangeT[0] = topFlange.Area();
                    tFlangeT[1] = NA - topFlange.CG;
                }
                return(tFlangeT[0] * tFlangeT[1] + webT[0] * webT[1] + bFlangeT[0] * bFlangeT[1]);
            }
        }
Exemplo n.º 10
0
        static void Main(string[] args)
        {
            BeamParts beamParts = new BeamParts();
            //CompositeBeam beam = new CompositeBeam();
            List <Force> forces = new List <Force>();

            Console.WriteLine("Enter Bottom Flange Width : ");
            double width = Convert.ToDouble(Console.ReadLine());

            Console.WriteLine("Enter Bottom Flange Thickness : ");
            double depth = Convert.ToDouble(Console.ReadLine());

            beamParts.BotFlange = new BotFlange(width, depth, 50);

            Console.WriteLine("Enter Web Thickness : ");
            width = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Enter Web Depth : ");
            depth         = Convert.ToDouble(Console.ReadLine());
            beamParts.Web = new Web(depth, width, 50);

            Console.WriteLine("Enter Top Flange Width : ");
            width = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Enter Top Flange Thickness : ");
            depth = Convert.ToDouble(Console.ReadLine());
            beamParts.TopFlange = new TopFlange(width, depth, 50);

            Console.WriteLine("Enter Bolster Width : ");
            width = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Enter Bolster Depth : ");
            depth             = Convert.ToDouble(Console.ReadLine());
            beamParts.Bolster = new Bolster(width, depth, 4);

            Console.WriteLine("Enter Slab Width : ");
            width = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Enter Slab Depth : ");
            depth          = Convert.ToDouble(Console.ReadLine());
            beamParts.Slab = new Slab(width, depth, 4);

            Console.WriteLine("Enter Top Reinforcing Area : ");
            double area = Convert.ToDouble(Console.ReadLine());

            Console.WriteLine("Enter Top Reinforcing Dist to Top of Slab : ");
            double      distToSlab = Convert.ToDouble(Console.ReadLine());
            Reinforcing topReinf   = new Reinforcing(area, 60, distToSlab, true);

            beamParts.Reinforcing.Add(topReinf);

            Console.WriteLine("Enter Bottom Reinforcing Area : ");
            area = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Enter Bottom Reinforcing Dist to Bottom of Slab : ");
            distToSlab = Convert.ToDouble(Console.ReadLine());
            Reinforcing botReinf = new Reinforcing(area, 60, distToSlab, false);

            beamParts.Reinforcing.Add(botReinf);

            Console.WriteLine("Please specify if beam is composite");
            Console.WriteLine("1 for Composite.");
            Console.WriteLine("2 for Non-composite.");
            Console.Write(":");

            string selection = Console.ReadLine();
            bool   composite = true;

            switch (selection)
            {
            case "1":
                composite = true;
                break;

            case "2":
                composite = false;
                break;

            default:
                Console.WriteLine("Invalid selection, beam assumed composite.");
                break;
            }

            Console.WriteLine("Please specify positive or negative moment");
            Console.WriteLine("1 for Positive Moment.");
            Console.WriteLine("2 for Negative Moment.");
            Console.Write(":");

            selection = Console.ReadLine();
            bool positiveMoment = true;

            switch (selection)
            {
            case "1":
                positiveMoment = true;
                break;

            case "2":
                positiveMoment = false;
                break;

            default:
                Console.WriteLine("Invalid selection, positive moment assumed.");
                break;
            }

            Console.WriteLine("Enter Non-composite Dead Load Moment : ");
            double M_D1 = Convert.ToDouble(Console.ReadLine());

            forces.Add(new Force(M_D1, 0, 0, 8, false));

            Console.WriteLine("Enter Composite Dead Load Moment : ");
            double M_D2 = Convert.ToDouble(Console.ReadLine());

            forces.Add(new Force(M_D2, 0, 0, 24, true));

            Console.WriteLine("Enter Composite Live Load Moment : ");
            double M_LL = Convert.ToDouble(Console.ReadLine());

            forces.Add(new Force(M_LL, 0, 0, 8, true));

            CompositeBeam beam = new CompositeBeam(beamParts);

            Console.WriteLine("Beam Area is {0} in^2", Math.Round(beam.Area(8, composite, positiveMoment), 4));
            Console.WriteLine("Beam Neutral Axis is {0} in", Math.Round(beam.NA_Elastic(8, composite, positiveMoment), 4));
            Console.WriteLine("Beam Elastic Moment of Inertia is {0} in^4", Math.Round(beam.I_Elastic(8, composite, positiveMoment), 4));
            Console.WriteLine("Beam Top Flange Elastic Section Modulus is {0} in^3", Math.Round(beam.S_Elastic(8, composite, positiveMoment, beam.TopFlange.TopLocation), 4));
            Console.WriteLine("Beam Bottom Flange Elastic Section Modulus is {0} in^3", Math.Round(beam.S_Elastic(8, composite, positiveMoment, beam.BotFlange.BotLocation), 4));
            Console.WriteLine("Beam Plastic Neutral Axis is {0} in", Math.Round(beam.NA_Plastic(composite, positiveMoment), 4));
            Console.WriteLine("Beam Plastic Moment is {0} kip-ft", Math.Round(beam.Mp(composite, positiveMoment), 4));
            //Console.WriteLine("Beam Plastic Neutral Axis is {0} in", Math.Round(beam.NA_Plastic(), 4));
            //Console.WriteLine("Beam Plastic Moment is {0} kip-ft", Math.Round(beam.Mp(), 4));
            Console.WriteLine("Q/I is {0}", Math.Round(beam.Q(8, composite, positiveMoment, beam.TopFlange.TopLocation) / beam.I_Elastic(8, composite, positiveMoment), 4));
            Console.WriteLine("Top Reinforcing Area = {0} at {1}", Math.Round(beam.Reinforcing[0].Area, 4), Math.Round(beam.Reinforcing[0].Location, 4));
            Console.WriteLine("Bottom Reinforcing Area = {0} at {1}", Math.Round(beam.Reinforcing[1].Area, 4), Math.Round(beam.Reinforcing[1].Location, 4));
            Console.WriteLine("Top flange stress = {0}, Bottom flange stress = {1}", Math.Round(ElasticProps.BeamStresses(forces, beam)[3], 4), Math.Round(ElasticProps.BeamStresses(forces, beam)[0], 4));
            Console.Read();
        }
Exemplo n.º 11
0
 public static double PlasticMoment(CompositeBeam compositeBeam, bool composite, bool positiveMoment)
 {
     return(PlasticTerms(compositeBeam, composite, positiveMoment)[1]);
 }
Exemplo n.º 12
0
 public static double PlasticNeutralAxis(CompositeBeam compositeBeam, bool composite, bool positiveMoment)
 {
     return(PlasticTerms(compositeBeam, composite, positiveMoment)[0]);
 }
Exemplo n.º 13
0
        private static double[] PlasticTerms(CompositeBeam compositeBeam, bool composite,
                                             bool positiveMoment)
        {
            //List<Reinforcing> sortedReinf = reinforcing.OrderByDescending(x => x.Location).ToList();
            double[] array = CompositeAndPositiveMoment(composite, positiveMoment);
            Plate    botFlange = compositeBeam.BotFlange, web = compositeBeam.Web, topFlange = compositeBeam.TopFlange, bolster = compositeBeam.Bolster, slab = compositeBeam.Slab;

            double[][] reinfForce = new double[2][];                               //reinfForce[0][] = compression,  reinfForce[1][] = tension
            double     PNA = web.TopLocation, increment = 12, force = -1, M_p = 0; //, totalReinfForce = reinforcing.Sum(x => x.Force);
            double     P_bfC = botFlange.Force(), P_bfT = 0, P_wC = web.Force(), P_wT = 0, P_tfC = topFlange.Force(), P_tfT = 0, P_bolstC = bolster.Force(), P_bolstT = 0, P_sC = slab.Force(), P_sT = 0;
            double     plasticForce = -1;

            double[] reinf_C   = new double[compositeBeam.Reinforcing.Count()], reinf_T = new double[compositeBeam.Reinforcing.Count()], terms = new double[2];
            int      loopCount = 0;

            while (plasticForce != 0)
            {
                M_p = 0;
                int reinfLayer = 0;
                foreach (Reinforcing reinf in compositeBeam.Reinforcing)
                {
                    if (reinf.Location == PNA)
                    {
                        reinf_C[reinfLayer] = 0;
                        reinf_T[reinfLayer] = 0;
                    }
                    else if (reinf.Location - 0.25 >= PNA)  //arbitrarily assign reinforcing 0.5 inch depth through which PNA can exist
                    {
                        reinf_C[reinfLayer] = -1 * reinf.Force * (1 - (reinf.Strength - slab.Strength * array[1]) / reinf.Strength) * array[0];
                        reinf_T[reinfLayer] = 0;
                        M_p += Math.Abs(reinf_C[reinfLayer] * (PNA - reinf.Location) / 12);
                    }
                    else if (reinf.Location + 0.25 <= PNA)
                    {
                        reinf_C[reinfLayer] = 0;
                        reinf_T[reinfLayer] = reinf.Force * array[0];
                        M_p += Math.Abs(reinf_T[reinfLayer] * (PNA - reinf.Location) / 12);
                    }
                    else
                    {
                        reinf_C[reinfLayer] = -1 * reinf.Force * (reinf.Location + 0.25 - PNA) / 0.5 * (1 - (reinf.Strength - slab.Strength * array[1]) / reinf.Strength) * array[0];
                        M_p += Math.Abs(reinf_C[reinfLayer] * (reinf.Location + 0.25 - PNA) / 24);
                        reinf_T[reinfLayer] = reinf.Force * (PNA - reinf.Location + 0.25) / 0.5;
                        M_p += Math.Abs(reinf_T[reinfLayer] * (PNA - reinf.Location + 0.25) / 24);
                    }

                    reinfLayer++;
                }
                reinfForce[0] = reinf_C;
                reinfForce[1] = reinf_T;
                if (botFlange.TopLocation <= PNA)
                {
                    P_bfC = 0;
                    P_bfT = botFlange.Force();
                    M_p  += Math.Abs(P_bfT * (PNA - botFlange.CG) / 12);
                }
                else
                {
                    P_bfC = -1 * botFlange.Force() * (botFlange.TopLocation - PNA) / botFlange.y;
                    M_p  += Math.Abs(P_bfC * (botFlange.TopLocation - PNA) / 24);
                    P_bfT = botFlange.Force() * (PNA - botFlange.BotLocation) / botFlange.y;
                    M_p  += Math.Abs(P_bfT * (PNA - botFlange.BotLocation) / 24);
                }
                if (web.TopLocation <= PNA)
                {
                    P_wC = 0;
                    P_wT = web.Force();
                    M_p += Math.Abs(P_wT * (PNA - web.CG) / 12);
                }
                else if (web.BotLocation >= PNA)
                {
                    P_wC = -1 * web.Force();
                    M_p += Math.Abs(P_wC * (web.CG - PNA) / 12);
                    P_wT = 0;
                }
                else
                {
                    P_wC = -1 * web.Force() * (web.TopLocation - PNA) / web.y;
                    M_p += Math.Abs(P_wC * (web.TopLocation - PNA) / 24);
                    P_wT = web.Force() * (PNA - web.BotLocation) / web.y;
                    M_p += Math.Abs(P_wT * (PNA - web.BotLocation) / 24);
                }
                if (topFlange.TopLocation <= PNA)
                {
                    P_tfC = 0;
                    P_tfT = topFlange.Force();
                    M_p  += Math.Abs(P_tfT * (PNA - topFlange.CG) / 12);
                }
                else if (topFlange.BotLocation >= PNA)
                {
                    P_tfC = -1 * topFlange.Force();
                    M_p  += Math.Abs(P_tfC * (topFlange.CG - PNA) / 12);
                    P_tfT = 0;
                }
                else
                {
                    P_tfC = -1 * topFlange.Force() * (topFlange.TopLocation - PNA) / topFlange.y;
                    M_p  += Math.Abs(P_tfC * (topFlange.TopLocation - PNA) / 24);
                    P_tfT = topFlange.Force() * (PNA - topFlange.BotLocation) / topFlange.y;
                    M_p  += Math.Abs(P_tfT * (PNA - topFlange.BotLocation) / 24);
                }
                if (bolster.TopLocation <= PNA)
                {
                    P_bolstC = 0;
                    P_bolstT = 0;
                }
                else if (bolster.BotLocation >= PNA)
                {
                    P_bolstC = -1 * bolster.Force(0.85) * array[0] * array[1];
                    M_p     += Math.Abs(P_bolstC * (bolster.CG - PNA) / 12);
                    P_bolstT = 0;
                }
                else
                {
                    P_bolstC = -1 * bolster.Force(0.85) * (bolster.TopLocation - PNA) / bolster.y * array[0] * array[1];
                    M_p     += Math.Abs(P_bolstC * (bolster.TopLocation - PNA) / 24);
                    P_bolstT = 0;
                }
                if (slab.TopLocation <= PNA)
                {
                    P_sC = 0;
                    P_sT = 0;
                }
                else if (slab.BotLocation >= PNA)
                {
                    P_sC = -1 * slab.Force(0.85) * array[0] * array[1];
                    M_p += Math.Abs(P_sC * (slab.CG - PNA) / 12);
                    P_sT = 0;
                }
                else
                {
                    P_sC = -1 * slab.Force(0.85) * (slab.TopLocation - PNA) / slab.y * array[0] * array[1];
                    M_p += Math.Abs(P_sC * (slab.TopLocation - PNA) / 24);
                    P_sT = 0;
                }
                force = Math.Round(PlasticForce(P_bfC, P_bfT, P_wC, P_wT, P_tfC, P_tfT, P_bolstC, P_bolstT, P_sC, P_sT, reinfForce), 6);
                if (force == 0)
                {
                    break;
                }
                if (force / plasticForce < 0)
                {
                    increment *= -0.5;
                    PNA       += increment;
                }
                else
                {
                    PNA += increment;
                }
                plasticForce = force;
                loopCount++;
            }

            terms[0] = PNA;
            terms[1] = M_p;
            return(terms);
        }