Esempio n. 1
0
        public ConcreteSectionCompression GetConcreteExampleColumn()
        {
            double b   = 16;
            double h   = 16;
            double f_c = 5000;

            List <RebarPoint> LongitudinalBars = new List <RebarPoint>();

            Rebar      thisBar1 = new Rebar(4, new MaterialAstmA615(A615Grade.Grade60));
            RebarPoint point1   = new RebarPoint(thisBar1, new RebarCoordinate()
            {
                X = 0, Y = -h / 2.0 + 2.5
            });

            LongitudinalBars.Add(point1);


            Rebar      thisBar2 = new Rebar(4, new MaterialAstmA615(A615Grade.Grade60));
            RebarPoint point2   = new RebarPoint(thisBar2, new RebarCoordinate()
            {
                X = 0, Y = h / 2.0 - 2.5
            });

            LongitudinalBars.Add(point2);

            //ConcreteSectionCompression column = GetConcreteCompressionMember(b, h, f_c, LongitudinalBars, CompressionMemberType.NonPrestressedWithTies);
            ConcreteSectionCompression column = GetConcreteCompressionMember(b, h, f_c, LongitudinalBars, ConfinementReinforcementType.Ties);

            return(column);
        }
Esempio n. 2
0
        public void ColumnDistributedInteractionReturnsSPCOL_Nominal0_Strains()

        {
            double b   = 16;
            double h   = 16;
            double f_c = 5000;

            List <RebarPoint>         LongitudinalBars   = new List <RebarPoint>();
            FlexuralSectionFactory    flexureFactory     = new FlexuralSectionFactory();
            CompressionSectionFactory compressionFactory = new CompressionSectionFactory();
            IConcreteMaterial         mat      = GetConcreteMaterial(f_c);
            IRebarMaterial            rebarMat = new MaterialAstmA615(A615Grade.Grade60);

            ConcreteSectionFlexure flexureMember = flexureFactory.GetRectangularSectionFourSidesDistributed(b, h, 4.0, 0, 2.5, 2.5,
                                                                                                            mat, rebarMat, ConfinementReinforcementType.Ties, 1);

            ConcreteSectionCompression col = compressionFactory.GetCompressionMemberFromFlexuralSection(flexureMember, CompressionMemberType.NonPrestressedWithTies);



            double refForce  = 1440;
            double refMoment = 43.0;


            double SteelStrain     = 0.00126;
            double P               = col.SectionAxialForceResultantFunction(SteelStrain) / 1000.0;
            double actualTolerance = EvaluateActualTolerance(P, refForce);


            Assert.True(actualTolerance <= tolerance);
        }
        public void ColumnDistributedInteractionReturnsSPCOL_Nominal1_Strains()
        {
            double b   = 16;
            double h   = 16;
            double f_c = 5000;

            List <RebarPoint>         LongitudinalBars   = new List <RebarPoint>();
            FlexuralSectionFactory    flexureFactory     = new FlexuralSectionFactory();
            CompressionSectionFactory compressionFactory = new CompressionSectionFactory();
            IConcreteMaterial         mat      = GetConcreteMaterial(f_c);
            IRebarMaterial            rebarMat = new MaterialAstmA615(A615Grade.Grade60);

            ConcreteSectionFlexure flexureMember = flexureFactory.GetRectangularSectionFourSidesDistributed(b, h, 4.0, 0, 2.5, 2.5,
                                                                                                            mat, rebarMat, ConfinementReinforcementType.Ties, 1);

            ConcreteSectionCompression col = compressionFactory.GetCompressionMemberFromFlexuralSection(flexureMember, CompressionMemberType.NonPrestressedWithTies);



            double refForce  = 1220;
            double refMoment = 160.8;


            double SteelStrain     = 0.000654;
            double P               = col.SectionAxialForceResultantFunction(SteelStrain) / 1000.0;
            double actualTolerance = EvaluateActualTolerance(P, refForce);

            //IStrainCompatibilityAnalysisResult momentResult = col.GetNominalMomentResult(refForce, FlexuralCompressionFiberPosition.Top);
            //double M_n = momentResult.Moment / 12000.0;


            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        public static Dictionary <string, object> MaximumCompressiveStrength(ConcreteFlexureAndAxiaSection ConcreteSection,
                                                                             string ConfinementReinforcementType = "Ties",
                                                                             bool IsPrestressed = false, string Code = "ACI318-14")
        {
            //Default values
            double phiP_o = 0;


            //Calculation logic:

            ConfinementReinforcementType ConfinementReinforcement;
            bool IsValidConfinementReinforcementType = Enum.TryParse(ConfinementReinforcementType, true, out ConfinementReinforcement);

            if (IsValidConfinementReinforcementType == false)
            {
                throw new Exception("Failed to convert string. ConfinementReinforcementType. Please check input");
            }
            double  P_o = 0.0;
            CalcLog log = new CalcLog();
            IConcreteSectionWithLongitudinalRebar Section = (IConcreteSectionWithLongitudinalRebar)ConcreteSection.FlexuralSection;
            ConcreteSectionCompression            column  = new ConcreteSectionCompression(Section, ConfinementReinforcement, log);

            P_o = column.GetMaximumForce() / 1000.0;     // convert to kip inch units;
            double phi = 0.65;

            phiP_o = phi * P_o;

            return(new Dictionary <string, object>
            {
                { "phiP_o", phiP_o }
            });
        }
        public void ColumnDistributedInteractionReturnsSPCOL_Nominal2()
        {
            double b   = 16;
            double h   = 16;
            double f_c = 5000;

            List <RebarPoint>         LongitudinalBars   = new List <RebarPoint>();
            FlexuralSectionFactory    flexureFactory     = new FlexuralSectionFactory();
            CompressionSectionFactory compressionFactory = new CompressionSectionFactory();
            IConcreteMaterial         mat      = GetConcreteMaterial(f_c);
            IRebarMaterial            rebarMat = new MaterialAstmA615(A615Grade.Grade60);

            ConcreteSectionFlexure flexureMember = flexureFactory.GetRectangularSectionFourSidesDistributed(b, h, 4.0, 0, 2.5, 2.5,
                                                                                                            mat, rebarMat, ConfinementReinforcementType.Ties, 1);

            ConcreteSectionCompression col = compressionFactory.GetCompressionMemberFromFlexuralSection(flexureMember,
                                                                                                        CompressionMemberType.NonPrestressedWithTies);



            double P        = 500 * 1000;
            double refValue = 369 * 12 * 1000; //from SP column software


            double M_n = col.GetNominalMomentResult(P, FlexuralCompressionFiberPosition.Top).Moment;

            double phiM_n_KipFt    = M_n / 1000.0 / 12.0;
            double actualTolerance = EvaluateActualTolerance(M_n, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        public ConcreteSectionCompression GetConcreteCompressionMember(double Width, double Height, double fc, List <RebarPoint> LongitudinalBars, CompressionMemberType CompressionMemberType)
        {
            CalcLog                    log     = new CalcLog();
            IConcreteSection           Section = GetRectangularSection(Width, Height, fc);
            ConcreteSectionCompression column  = new ConcreteSectionCompression(Section, LongitudinalBars, CompressionMemberType, log);

            return(column);
        }
        public ConcreteSectionCompression GetCompressionMemberFromFlexuralSection(ConcreteSectionFlexure flexuralSection,
                                                                                  CompressionMemberType CompressionMemberType)
        {
            CalcLog log = new CalcLog();

            ConcreteSectionCompression compSection = new ConcreteSectionCompression(flexuralSection, CompressionMemberType, log);

            return(compSection);
        }
Esempio n. 8
0
        public ConcreteSectionCompression GetConcreteCompressionMember(double Width, double Height, double fc, List <RebarPoint> LongitudinalBars, ConfinementReinforcementType ConfinementReinforcementType)
        {
            CalcLog          log     = new CalcLog();
            IConcreteSection Section = GetRectangularSection(Width, Height, fc);

            IConcreteFlexuralMember    fs     = new ConcreteSectionFlexure(Section, LongitudinalBars, new CalcLog(), ConfinementReinforcementType);
            ConcreteSectionCompression column = new ConcreteSectionCompression(fs as IConcreteSectionWithLongitudinalRebar, ConfinementReinforcementType, log);

            return(column);
        }
Esempio n. 9
0
        public void ColumnInteractionReturnsM_n_Z_Neg2()
        {
            ConcreteSectionCompression col = GetConcreteExampleColumn();
            double P_u             = 247000.0;
            double M_n             = col.GetNominalMomentResult(P_u, FlexuralCompressionFiberPosition.Top).Moment;
            double refValue        = 4080 * 1000; //from MacGregor
            double actualTolerance = EvaluateActualTolerance(M_n, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        public ConcreteSectionCompression GetCompressionMemberFromFlexuralSection(ConcreteSectionFlexure flexuralSection,
                                                                                  ConfinementReinforcementType ConfinementReinforcement, bool IsPrestressed = false)
        {
            CalcLog log = new CalcLog();
            CompressionMemberType CompressionMemberType = GetCompressionMemberType(ConfinementReinforcement, IsPrestressed);

            ConcreteSectionCompression compSection = new ConcreteSectionCompression(flexuralSection, CompressionMemberType, log);

            return(compSection);
        }
        public ConcreteSectionCompression GetRectangularCompressionMember(double Width, double Height, IConcreteMaterial ConcreteMaterial,
                                                                          List <RebarPoint> LongitudinalBars, ConfinementReinforcementType ConfinementReinforcement,
                                                                          ICalcLog log, bool IsPrestressed = false)
        {
            CrossSectionRectangularShape Section = new CrossSectionRectangularShape(ConcreteMaterial, null, Width, Height);
            CompressionMemberType        CompressionMemberType = GetCompressionMemberType(ConfinementReinforcement, IsPrestressed);
            ConcreteSectionCompression   column = new ConcreteSectionCompression(Section, LongitudinalBars, CompressionMemberType, log);

            return(column);
        }
Esempio n. 12
0
        public void ColumnDistributedInteractionReturnsM_n_Z_Neg4()
        {
            ConcreteSectionCompression col = GetConcreteExampleColumnWithDistributed();
            double P_u             = 43900.0;
            double M_n             = col.GetNominalMomentResult(P_u, FlexuralCompressionFiberPosition.Top).Moment;
            double refValue        = 257 * 12 * 1000; //from MacGregor
            double actualTolerance = EvaluateActualTolerance(M_n, refValue);

            Assert.True(actualTolerance <= tolerance);
        }
Esempio n. 13
0
        public void ColumnInteractionReturnsM_n_Z_Neg1()
        {
            ConcreteSectionCompression col = GetConcreteExampleColumn();
            double P_u             = 417000.0;
            var    nominalResult   = col.GetNominalMomentResult(P_u, FlexuralCompressionFiberPosition.Top);
            double M_n             = nominalResult.Moment;
            double refValue        = 4630 * 1000; //from MacGregor
            double actualTolerance = EvaluateActualTolerance(M_n, refValue);

            Assert.True(actualTolerance <= tolerance);
        }
        public void ColumnInteractionReturnsM_n_Z_Neg2Factored()
        {
            ConcreteSectionCompression col = GetConcreteExampleColumn();
            double phiP_n    = 205 * 1000;
            double phiM_nRef = 282.0 * 1000 * 12;

            double phiM_n          = col.GetDesignMomentWithCompressionStrength(phiP_n, FlexuralCompressionFiberPosition.Top).phiM_n;
            double actualTolerance = EvaluateActualTolerance(phiM_n, phiM_nRef);


            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        public void ColumnDistributedInteractionReturnsM_n_Z_Neg4Factored()
        {
            ConcreteSectionCompression col = GetConcreteExampleColumnWithDistributed();
            double phiP_n   = 39.5 * 1000;
            double refValue = 232 * 12 * 1000; //from MacGregor


            double phiM_n = col.GetDesignMomentWithCompressionStrength(phiP_n, FlexuralCompressionFiberPosition.Top).phiM_n;

            double actualTolerance = EvaluateActualTolerance(phiM_n, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
Esempio n. 16
0
        public void ColumnInteractionReturnsM_n_Z_Neg1()
        {
            ConcreteSectionCompression col = GetConcreteExampleColumn();
            double P_u             = 417000.0;
            var    nominalResult   = col.GetNominalMomentResult(P_u, FlexuralCompressionFiberPosition.Top);
            double M_n             = nominalResult.Moment;
            double refValue        = 4630 * 1000; //from MacGregor
            double actualTolerance = EvaluateActualTolerance(M_n, refValue);

            //ConcreteCompressionStrengthResult result = new ConcreteCompressionStrengthResult(nominalResult, FlexuralCompressionFiberPosition.Top, col.Section.Material.beta1);
            //StrengthReductionFactorFactory f = new StrengthReductionFactorFactory();
            //FlexuralFailureModeClassification failureMode = f.GetFlexuralFailureMode(result.epsilon_t, result.epsilon_ty);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        public void ShearWallCalculatesPMMDiagram()
        {
            double f_c_prime                         = 6;
            double f_c_prime_psi                     = f_c_prime * 1000;
            RebarMaterialFactory factory             = new RebarMaterialFactory();
            string         RebarSpecificationId      = "A615Grade60";
            IRebarMaterial LongitudinalRebarMaterial = factory.GetMaterial(RebarSpecificationId);
            double         h_total                   = 20 * 12;
            double         t_w                       = 12;
            double         N_curtains                = 2;
            double         s                         = 12;
            double         c_edge                    = 0;

            BoundaryZone BoundaryZoneTop    = new BoundaryZone(3, 3, "No8", 6, 3, 3);
            BoundaryZone BoundaryZoneBottom = new BoundaryZone(3, 3, "No8", 6, 3, 3);
            string       WallRebarSizeId    = "No4";


            FlexuralCompressionFiberPosition p    = FlexuralCompressionFiberPosition.Top;
            ConcreteMaterial             Concrete = new ConcreteMaterial(f_c_prime_psi, ConcreteTypeByWeight.Normalweight, null);
            ConfinementReinforcementType ConfinementReinforcementType = KodestructAci.ConfinementReinforcementType.Ties;

            CrossSectionRectangularShape shape = new CrossSectionRectangularShape(Concrete, null, t_w, h_total);

            List <KodestructAci.RebarPoint> LongitudinalBars = GetLongitudinalBars(shape.SliceableShape as ISectionRectangular, h_total, t_w, WallRebarSizeId, N_curtains, s, c_edge,
                                                                                   BoundaryZoneTop, BoundaryZoneBottom, LongitudinalRebarMaterial);

            KodestructAci.IConcreteFlexuralMember fs = new KodestructAci14.ConcreteSectionFlexure(shape, LongitudinalBars, null, ConfinementReinforcementType);

            IConcreteSectionWithLongitudinalRebar Section = fs as IConcreteSectionWithLongitudinalRebar;
            ConcreteSectionCompression            column  = new ConcreteSectionCompression(Section, ConfinementReinforcementType, null);
            //Convert axial force to pounds
            List <PMPair> Pairs         = column.GetPMPairs(p);
            var           PairsAdjusted = Pairs.Select(pair => new PMPair(pair.P / 1000.0, pair.M / 1000.0 / 12.0));

            string Filename = Path.Combine(Path.GetTempPath(), "PMInteractionShearWall.csv");

            using (CsvFileWriter writer = new CsvFileWriter(Filename))
            {
                foreach (var pair in PairsAdjusted)
                {
                    CsvRow row = new CsvRow();
                    row.Add(pair.M.ToString());
                    row.Add(pair.P.ToString());
                    writer.WriteRow(row);
                }
            }
        }
        /// <summary>
        ///     Moment strength with axial force (kip - in unit system for all inputs and outputs)
        /// </summary>
        /// <param name="P_u">   Factored axial force; to be taken as positive for  compression and negative for tension  </param>
        /// <param name="ConcreteSection">  Reinforced concrete section </param>
        /// <param name="ConfinementReinforcementType">  Type of compression member confinement reinforcement (tied, spiral etc) </param>
        /// <param name="FlexuralCompressionFiberLocation">Specifies if top or bottom fiber is in compression from the effects of bending moment</param>
        /// <param name="IsPrestressed">Indicates if member is prestressed</param>
        /// <param name="Code">Applicable version of code/standard</param>
        /// <returns name="phiM_n">  Design flexural strength at section   </returns>


        public static double MaximumMomentFromAxialForce(double P_u, ConcreteFlexureAndAxiaSection ConcreteSection,
                                                         string ConfinementReinforcementType = "Ties", string FlexuralCompressionFiberLocation = "Top",
                                                         bool IsPrestressed = false, string Code = "ACI318-14")
        {
            //Default values

            double phiM_n = 0.0;

            //Calculation logic:


            ConfinementReinforcementType ConfinementReinforcement;
            bool IsValidConfinementReinforcementType = Enum.TryParse(ConfinementReinforcementType, true, out ConfinementReinforcement);

            if (IsValidConfinementReinforcementType == false)
            {
                throw new Exception("Failed to convert string. ConfinementReinforcementType. Please check input");
            }

            FlexuralCompressionFiberPosition p;
            bool IsValidStringFiber = Enum.TryParse(FlexuralCompressionFiberLocation, true, out p);

            if (IsValidStringFiber == false)
            {
                throw new Exception("Flexural compression fiber location is not recognized. Check input.");
            }


            CalcLog log = new CalcLog();

            if (ConcreteSection.FlexuralSection is IConcreteSectionWithLongitudinalRebar)
            {
                IConcreteSectionWithLongitudinalRebar Section = (IConcreteSectionWithLongitudinalRebar)ConcreteSection.FlexuralSection;
                ConcreteSectionCompression            column  = new ConcreteSectionCompression(Section, ConfinementReinforcement, log);
                //Convert axial force to pounds
                double P_u_pounds = P_u * 1000.0;
                phiM_n = column.GetDesignMomentWithCompressionStrength(P_u_pounds, p).phiM_n / 1000.0; // convert to kip inch units
            }
            else
            {
                throw new Exception("Section of wrong type. Create a section type that has longitudinal bars as part of definition.");
            }

            return(phiM_n);
        }
        public ConcreteSectionCompression GetConcreteExampleColumnWithDistributed()
        {
            double b   = 16;
            double h   = 16;
            double f_c = 5000;

            List <RebarPoint>         LongitudinalBars   = new List <RebarPoint>();
            FlexuralSectionFactory    flexureFactory     = new FlexuralSectionFactory();
            CompressionSectionFactory compressionFactory = new CompressionSectionFactory();
            IConcreteMaterial         mat      = GetConcreteMaterial(f_c);
            IRebarMaterial            rebarMat = new MaterialAstmA615(A615Grade.Grade60);

            ConcreteSectionFlexure flexureMember = flexureFactory.GetRectangularSectionFourSidesDistributed(b, h, 4, 0, 2.5, 2.5, mat, rebarMat);

            ConcreteSectionCompression column = compressionFactory.GetCompressionMember(flexureMember, CompressionMemberType.NonPrestressedWithTies);

            return(column);
        }
Esempio n. 20
0
        public void ColumnReturnsNegativeNominalInteractionDiagram()
        {
            ConcreteSectionCompression col = GetConcreteExampleColumn();
            List <PMPair> Pairs            = col.GetPMPairs(FlexuralCompressionFiberPosition.Bottom, 50, false);
            var           PairsAdjusted    = Pairs.Select(pair => new PMPair(pair.P / 1000.0, pair.M / 1000.0 / 12.0));

            string Filename = Path.Combine(Path.GetTempPath(), "PMInteractionMacGregorNegative.csv");

            using (CsvFileWriter writer = new CsvFileWriter(Filename))
            {
                foreach (var pair in PairsAdjusted)
                {
                    CsvRow row = new CsvRow();
                    row.Add(pair.M.ToString());
                    row.Add(pair.P.ToString());
                    writer.WriteRow(row);
                }
            }
        }
        public void ShearWallCalculatesPMMDiagramMaxIteration()
        {
            double         f_c_prime                 = 6;
            double         f_c_prime_psi             = f_c_prime * 1000;
            IRebarMaterial LongitudinalRebarMaterial = new RebarMaterialGeneral(60000);
            double         l_w = 20 * 12;
            double         h   = 12;


            FlexuralCompressionFiberPosition p    = FlexuralCompressionFiberPosition.Top;
            ConcreteMaterial             Concrete = new ConcreteMaterial(f_c_prime_psi, ConcreteTypeByWeight.Normalweight, null);
            ConfinementReinforcementType ConfinementReinforcementType = KodestructAci.ConfinementReinforcementType.Ties;

            CrossSectionRectangularShape shape = new CrossSectionRectangularShape(Concrete, null, h, l_w);

            List <RebarPoint> LongitudinalBars = GetLongitudinalBarsFromCoordinates(LongitudinalRebarMaterial);

            KodestructAci.IConcreteFlexuralMember fs = new KodestructAci14.ConcreteSectionFlexure(shape, LongitudinalBars, null, ConfinementReinforcementType);

            IConcreteSectionWithLongitudinalRebar Section = fs as IConcreteSectionWithLongitudinalRebar;
            ConcreteSectionCompression            column  = new ConcreteSectionCompression(Section, ConfinementReinforcementType, null);
            //Convert axial force to pounds
            List <PMPair> Pairs         = column.GetPMPairs(p, 50, true);
            var           PairsAdjusted = Pairs.Select(pair => new PMPair(pair.P / 1000.0, pair.M / 1000.0 / 12.0));

            string Filename = Path.Combine(Path.GetTempPath(), "PMInteractionShearWallMaxIteration.csv");

            using (CsvFileWriter writer = new CsvFileWriter(Filename))
            {
                foreach (var pair in PairsAdjusted)
                {
                    CsvRow row = new CsvRow();
                    row.Add(pair.M.ToString());
                    row.Add(pair.P.ToString());
                    writer.WriteRow(row);
                }
            }
        }