Пример #1
0
        private StandardHookInTension CreateHookObject(double ConcStrength, double RebarDiameter, bool IsEpoxyCoated,
                                                       ConcreteTypeByWeight typeByWeight, double ExcessFlexureReinforcementRatio)
        {
            MockRepository mocks = new MockRepository();

            IRebarMaterial rebarMat = mocks.Stub <IRebarMaterial>();

            Expect.Call(rebarMat.YieldStress).Return(60000);
            Rebar rebar = new Rebar(RebarDiameter, IsEpoxyCoated, rebarMat);

            ICalcLogEntry entryStub = mocks.Stub <ICalcLogEntry>();
            ICalcLog      logStub   = mocks.Stub <ICalcLog>();

            //IConcreteMaterial ConcStub = mocks.Stub<IConcreteMaterial>();
            IConcreteMaterial ConcStub = new ConcreteMaterial(ConcStrength, typeByWeight, logStub) as IConcreteMaterial;

            ConcStub.SpecifiedCompressiveStrength = ConcStrength;
            ConcStub.TypeByWeight = typeByWeight;


            using (mocks.Record())
            {
                logStub.CreateNewEntry();
                LastCall.Return(entryStub);
            }

            StandardHookInTension tensHook = new StandardHookInTension(ConcStub, rebar, logStub, ExcessFlexureReinforcementRatio);

            return(tensHook);
        }
Пример #2
0
        public IConcreteMaterial GetConcreteMaterial(double fc)
        {
            CalcLog          log      = new CalcLog();
            ConcreteMaterial concrete = new ConcreteMaterial(fc, ConcreteTypeByWeight.Normalweight, log);

            return(concrete);
        }
        internal RectangularSectionSinglyReinforced(double b, double h, double A_s, double c_cntr,
                                                    ConcreteMaterial ConcreteMaterial, RebarMaterial LongitudinalRebarMaterial, bool hasTies = false)
        {
            KodestructAci.ConfinementReinforcementType ConfinementReinforcementType;
            if (hasTies == true)
            {
                ConfinementReinforcementType = KodestructAci.ConfinementReinforcementType.Ties;
            }
            else
            {
                ConfinementReinforcementType = KodestructAci.ConfinementReinforcementType.NoReinforcement;
            }

            CrossSectionRectangularShape shape = new CrossSectionRectangularShape(ConcreteMaterial.Concrete, null, b, h);

            base.ConcreteMaterial = ConcreteMaterial; //duplicate save of concrete material into base Dynamo class

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

            KodestructAci.Rebar      thisBar = new KodestructAci.Rebar(A_s, LongitudinalRebarMaterial.Material);
            KodestructAci.RebarPoint point   = new KodestructAci.RebarPoint(thisBar, new KodestructAci.RebarCoordinate()
            {
                X = 0, Y = -h / 2.0 + c_cntr
            });
            LongitudinalBars.Add(point);

            KodestructAci.IConcreteFlexuralMember fs = new KodestructAci14.ConcreteSectionFlexure(shape, LongitudinalBars, new CalcLog(), ConfinementReinforcementType);
            this.FlexuralSection = fs;
        }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="h_total">Total height (including boundary zones)</param>
 /// <param name="t_w">Wall web thickness</param>
 /// <param name="RebarSizeId">Rebar Id</param>
 /// <param name="N_curtains">Number of rebar curtains</param>
 /// <param name="s">Bar spacing</param>
 /// <param name="c_edge">Concrete cover to center of rebar at wall ege</param>
 /// <param name="BoundaryZoneTop">Boundary zone object</param>
 /// <param name="BoundaryZoneBottom">Boundary zone object</param>
 /// <param name="ConcreteMaterial">Concrete material</param>
 /// <param name="LongitudinalRebarMaterial">Rebar material</param>
 /// <returns></returns>
 public static ShearWallSection ByWallGeometryAndBoundaryZones(double h_total, double t_w,
                                                               string RebarSizeId, double N_curtains, double s, double c_edge,
                                                               BoundaryZone BoundaryZoneTop, BoundaryZone BoundaryZoneBottom,
                                                               ConcreteMaterial ConcreteMaterial, RebarMaterial LongitudinalRebarMaterial)
 {
     return(new ShearWallSection(h_total, t_w,
                                 RebarSizeId, N_curtains, s, c_edge,
                                 BoundaryZoneTop, BoundaryZoneBottom,
                                 ConcreteMaterial, LongitudinalRebarMaterial));
 }
        public ConcreteSectionCompression GetRectangularCompressionMember(double Width, double Height, double fc, List <RebarPoint> LongitudinalBars,
                                                                          ConfinementReinforcementType ConfinementReinforcement, bool IsPrestressed = false)
        {
            CalcLog                      log     = new CalcLog();
            ConcreteMaterial             mat     = new ConcreteMaterial(fc, ConcreteTypeByWeight.Normalweight, log);
            CrossSectionRectangularShape Section = new CrossSectionRectangularShape(mat, null, Width, Height);
            CompressionMemberType        CompressionMemberType = GetCompressionMemberType(ConfinementReinforcement, IsPrestressed);
            ConcreteSectionCompression   column = new ConcreteSectionCompression(Section, LongitudinalBars, CompressionMemberType, log);

            return(column);
        }
Пример #6
0
        public IConcreteMaterial GetConcreteMaterial(double fc, bool IsLightWeight)
        {
            ConcreteMaterial concrete;

            if (IsLightWeight == true)
            {
                concrete = new ConcreteMaterial(fc, ConcreteTypeByWeight.Lightweight, log);
            }
            else
            {
                concrete = new ConcreteMaterial(fc, ConcreteTypeByWeight.Normalweight, log);
            }

            return(concrete);
        }
        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);
                }
            }
        }
Пример #8
0
        internal ShearWallSection(double h_total, double t_w,
                                  string RebarSizeId, double N_curtains, double s, double c_edge,
                                  BoundaryZone BoundaryZoneTop, BoundaryZone BoundaryZoneBottom,
                                  ConcreteMaterial ConcreteMaterial, RebarMaterial LongitudinalRebarMaterial)
        {
            ConfinementReinforcementType ConfinementReinforcementType = KodestructAci.ConfinementReinforcementType.Ties;

            base.ConcreteMaterial = ConcreteMaterial;
            CrossSectionIShape shape = GetIShape(ConcreteMaterial.Concrete, h_total, t_w, BoundaryZoneTop, BoundaryZoneBottom);

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

            KodestructAci.IConcreteFlexuralMember fs = new KodestructAci14.ConcreteSectionFlexure(shape, LongitudinalBars, new CalcLog(), ConfinementReinforcementType);
            this.FlexuralSection = fs;
        }
Пример #9
0
        private StandardHookInTension CreateHookObject(double ConcStrength, double RebarDiameter, bool IsEpoxyCoated,
                                                       ConcreteTypeByWeight typeByWeight, double ExcessFlexureReinforcementRatio)
        {
            IRebarMaterial rebarMat = new RebarMaterialGeneral(60000);
            Rebar          rebar    = new Rebar(RebarDiameter, IsEpoxyCoated, rebarMat);


            IConcreteMaterial ConcStub = new ConcreteMaterial(ConcStrength, typeByWeight, null) as IConcreteMaterial;

            ConcStub.SpecifiedCompressiveStrength = ConcStrength;
            ConcStub.TypeByWeight = typeByWeight;



            StandardHookInTension tensHook = new StandardHookInTension(ConcStub, rebar, null, ExcessFlexureReinforcementRatio);

            return(tensHook);
        }
        public void GetTensionDevelopmentLength_Basic()
        {
            double RebarDiam                         = 0.5;
            bool   IsTopRebar                        = false;
            bool   IsEpoxyCoated                     = false;
            ConcreteTypeByWeight type                = ConcreteTypeByWeight.Normalweight;
            double            fc                     = 4000;
            double            ExcessRebarRatio       = 1.0;
            IConcreteMaterial concrete               = new ConcreteMaterial(fc, ConcreteTypeByWeight.Normalweight, null);
            Rebar             rebar                  = new Rebar(RebarDiam, IsEpoxyCoated, new MaterialAstmA615(A615Grade.Grade60));
            bool MeetsRebarSpacingAndEdgeDistance    = true;
            DevelopmentTension d                     = new DevelopmentTension(concrete, rebar, MeetsRebarSpacingAndEdgeDistance, IsTopRebar, ExcessRebarRatio, true, null);
            bool   HasMinimumTransverseReinforcement = true;
            double l_d = d.GetTensionDevelopmentLength(HasMinimumTransverseReinforcement);

            double refValue        = 18.97;
            double actualTolerance = EvaluateActualTolerance(l_d, refValue);

            Assert.True(actualTolerance <= tolerance);
        }
        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);
                }
            }
        }
        private DevelopmentTension CreateDevelopmentObject(double ConcStrength, double RebarDiameter, bool IsEpoxyCoated,
                                                           ConcreteTypeByWeight typeByWeight, TypeOfLightweightConcrete lightWeightType, double AverageSplitStrength,
                                                           double ClearSpacing, double ClearCover, bool IsTopRebar, double ExcessRebarRatio, bool checkMinLength)
        {
            IRebarMaterial rebarMat = new RebarMaterialGeneral(60000);


            //IConcreteMaterial ConcStub = mocks.Stub<IConcreteMaterial>();
            IConcreteMaterial ConcStub = new ConcreteMaterial(ConcStrength, typeByWeight, lightWeightType,
                                                              null) as IConcreteMaterial;

            ConcStub.SpecifiedCompressiveStrength = ConcStrength;
            ConcStub.TypeByWeight = typeByWeight;
            ConcStub.AverageSplittingTensileStrength = AverageSplitStrength;



            DevelopmentTension tensDev = new DevelopmentTension(ConcStub,
                                                                new Rebar(RebarDiameter, IsEpoxyCoated, rebarMat),
                                                                ClearSpacing, ClearCover, IsTopRebar, ExcessRebarRatio, checkMinLength, null);

            return(tensDev);
        }
        private DevelopmentTension CreateDevelopmentObject(double ConcStrength, double RebarDiameter, bool IsEpoxyCoated,
                                                           ConcreteTypeByWeight typeByWeight, TypeOfLightweightConcrete lightWeightType, double AverageSplitStrength,
                                                           double ClearSpacing, double ClearCover, bool IsTopRebar, double ExcessRebarRatio, bool checkMinLength)
        {
            MockRepository mocks = new MockRepository();

            IRebarMaterial rebarMat = mocks.Stub <IRebarMaterial>();

            Expect.Call(rebarMat.YieldStress).Return(60000);
            //IRebarMaterial rebarMat = new MaterialAstmA706() as IRebarMaterial;

            ICalcLogEntry entryStub = mocks.Stub <ICalcLogEntry>();
            //entryStub.DependencyValues = new Dictionary<string, double>();
            ICalcLog logStub = mocks.Stub <ICalcLog>();

            //IConcreteMaterial ConcStub = mocks.Stub<IConcreteMaterial>();
            IConcreteMaterial ConcStub = new ConcreteMaterial(ConcStrength, typeByWeight, lightWeightType,
                                                              logStub) as IConcreteMaterial;

            ConcStub.SpecifiedCompressiveStrength = ConcStrength;
            ConcStub.TypeByWeight = typeByWeight;
            ConcStub.AverageSplittingTensileStrength = AverageSplitStrength;


            using (mocks.Record())
            {
                logStub.CreateNewEntry();
                LastCall.Return(entryStub);
            }

            DevelopmentTension tensDev = new DevelopmentTension(ConcStub,
                                                                new Rebar(RebarDiameter, IsEpoxyCoated, rebarMat),
                                                                ClearSpacing, ClearCover, IsTopRebar, ExcessRebarRatio, checkMinLength, logStub);

            return(tensDev);
        }
Пример #14
0
        /// <summary>
        /// Rectangular section with reinforcement doubly reinforced
        /// </summary>
        /// <param name="b">Width of compression face of member</param>
        /// <param name="h">Overall thickness, height, or depth of member</param>
        /// <param name="A_sTop">Total area of top reinforcement</param>
        /// <param name="A_sBot">Total area of bottom reinforcement</param>
        /// <param name="c_cntr">Concrete cover to tension rebar centroid</param>
        /// <param name="ConcreteMaterial">Concrete material</param>
        /// <param name="LongitudinalRebarMaterial">Rebar material for longitudinal bars</param>
        /// <param name="hasTies">Identifies if member has ties around longitudinal reinforcement</param>
        /// <returns name="RectangularSectionDoublyReinforced">  Section [OBJECT] </returns>

        public static RectangularSectionDoublyReinforced ByWidthHeigthAndReinforcementArea(double b, double h, double A_sTop, double A_sBot,
                                                                                           double c_cntr, ConcreteMaterial ConcreteMaterial, RebarMaterial LongitudinalRebarMaterial, bool hasTies = true)
        {
            return(new RectangularSectionDoublyReinforced(b, h, A_sTop, A_sBot, c_cntr, ConcreteMaterial, LongitudinalRebarMaterial));
        }
        public static Dictionary <string, object> TwoWayShearStrengthProvidedByConcrete(PunchingShearPerimeter PunchingShearPerimeter,
                                                                                        ConcreteMaterial ConcreteMaterial, double d, double c_x, double c_y, bool IsSectionAtColumnFace = true)
        {
            //Default values
            double phi_v_c = 0;


            //Calculation logic:

            PunchingPerimeterConfiguration Configuration;
            bool IsValidInputString = Enum.TryParse(PunchingShearPerimeter.Configuration, true, out Configuration);

            if (IsValidInputString == false)
            {
                throw new Exception("Failed to convert string. Examples of acceptable values are Interior, EdgeLeft, CornerLeftTop. Please check input");
            }

            ConcreteSectionTwoWayShear sec = new ConcreteSectionTwoWayShear(ConcreteMaterial.Concrete,
                                                                            PunchingShearPerimeter.PerimeterData, d, c_x, c_y, Configuration);

            phi_v_c = sec.GetTwoWayStrengthForUnreinforcedConcrete() / 1000.0; //convert to ksi

            return(new Dictionary <string, object>
            {
                { "phi_v_c", phi_v_c }
            });
        }
Пример #16
0
        /// <summary>
        /// Rectangular section with reinforcement on 4-sides
        /// </summary>
        /// <param name="b">Width of compression face of member</param>
        /// <param name="h">Overall thickness, height, or depth of member</param>
        /// <param name="A_sTopBottom">Total area of top/bottom reinforcement (per face)</param>
        /// <param name="A_sLeftRight">Total area of reinforcement on left-hand/right-hand side face (per face)</param>
        /// <param name="c_cntrTopBottom">Concrete cover to tension rebar centroid (top or bottom face)</param>
        /// <param name="c_cntrLeftRight">Concrete cover to tension rebar centroid (side faces)</param>
        /// <param name="ConcreteMaterial">Concrete material</param>
        /// <param name="LongitudinalRebarMaterial">Rebar material for longitudinal bars</param>
        /// <param name="hasTies">Identifies if member has ties around longitudinal reinforcement</param>
        /// <returns name="RectangularSectionFourSideReinforced">  Section [OBJECT] </returns>

        public static RectangularSectionFourSideReinforced ByWidthHeigthAndReinforcementArea(double b, double h, double A_sTopBottom, double A_sLeftRight,
                                                                                             double c_cntrTopBottom, double c_cntrLeftRight,
                                                                                             ConcreteMaterial ConcreteMaterial, RebarMaterial LongitudinalRebarMaterial, bool HasTies = true)
        {
            return(new RectangularSectionFourSideReinforced(b, h, A_sTopBottom, A_sLeftRight, c_cntrTopBottom, c_cntrLeftRight,
                                                            ConcreteMaterial, LongitudinalRebarMaterial, HasTies));
        }
Пример #17
0
        internal RectangularSectionFourSideReinforced(double b, double h, double A_sTopBottom, double A_sLeftRight,
                                                      double c_cntrTopBottom, double c_cntrLeftRight, ConcreteMaterial ConcreteMaterial, RebarMaterial LongitudinalRebarMaterial,
                                                      bool hasTies = false)
        {
            KodestructAci.ConfinementReinforcementType ConfinementReinforcementType;
            if (hasTies == true)
            {
                ConfinementReinforcementType = KodestructAci.ConfinementReinforcementType.Ties;
            }
            else
            {
                ConfinementReinforcementType = KodestructAci.ConfinementReinforcementType.NoReinforcement;
            }

            base.ConcreteMaterial = ConcreteMaterial; //duplicate save of concrete material into base Dynamo class

            FlexuralSectionFactory flexureFactory = new FlexuralSectionFactory();
            ConcreteSectionFlexure fs             = flexureFactory.GetRectangularSectionFourSidesDistributed(b, h, A_sTopBottom, A_sLeftRight,
                                                                                                             c_cntrTopBottom, c_cntrLeftRight,
                                                                                                             ConcreteMaterial.Concrete, LongitudinalRebarMaterial.Material, ConfinementReinforcementType);


            this.FlexuralSection = fs;
        }
        public static Dictionary <string, object> TwoWayShearStrengthProvidedByReinforcedSection(PunchingShearPerimeter PunchingShearPerimeter,
                                                                                                 ConcreteMaterial ConcreteMaterial, RebarMaterial RebarMaterial,
                                                                                                 double A_v, double s, string PunchingReinforcementType)
        {
            //Default values
            double phi_v_n = 0;


            //Calculation logic:


            Kodestruct.Concrete.ACI.ACI318_14.SectionalStrength.Shear.TwoWay.PunchingReinforcementType ReinforcementType;
            bool IsValidInputString = Enum.TryParse(PunchingReinforcementType, true, out ReinforcementType);

            if (IsValidInputString == false)
            {
                throw new Exception("Failed to convert string. Examples of acceptable values are Interior, EdgeLeft, CornerLeftTop. Please check input");
            }

            ReinforcedSectionTwoWayShear sec = new ReinforcedSectionTwoWayShear(ConcreteMaterial.Concrete, RebarMaterial.Material, PunchingShearPerimeter.PerimeterData, A_v, s, ReinforcementType);

            phi_v_n = sec.GetTwoWayStrength() / 1000.0; //convert to ksi

            return(new Dictionary <string, object>
            {
                { "phi_v_n", phi_v_n }
            });
        }
        public ConcreteSectionFlexure GetNonPrestressedDoublyReinforcedRectangularSection(double b, double h,
                                                                                          double A_s1, double A_s2, double c_cntr1, double c_cntr2,
                                                                                          double A_s_prime1, double A_s_prime2, double c_cntr_prime1, double c_cntr_prime2,
                                                                                          ConcreteMaterial concrete, IRebarMaterial rebar, ConfinementReinforcementType ConfinementReinforcementType)
        {
            CrossSectionRectangularShape Section          = new CrossSectionRectangularShape(concrete, null, b, h);
            List <RebarPoint>            LongitudinalBars = new List <RebarPoint>();

            Rebar      bottom1      = new Rebar(A_s1, rebar);
            RebarPoint pointBottom1 = new RebarPoint(bottom1, new RebarCoordinate()
            {
                X = 0, Y = -h / 2.0 + c_cntr1
            });

            LongitudinalBars.Add(pointBottom1);


            if (A_s2 != 0)
            {
                Rebar      bottom2      = new Rebar(A_s2, rebar);
                RebarPoint pointBottom2 = new RebarPoint(bottom2, new RebarCoordinate()
                {
                    X = 0, Y = -h / 2.0 + c_cntr2
                });
                LongitudinalBars.Add(pointBottom2);
            }

            if (A_s_prime1 != 0)
            {
                Rebar      top1      = new Rebar(A_s_prime1, rebar);
                RebarPoint pointTop1 = new RebarPoint(top1, new RebarCoordinate()
                {
                    X = 0, Y = h / 2.0 - c_cntr_prime1
                });
                LongitudinalBars.Add(pointTop1);
            }

            if (A_s_prime2 != 0)
            {
                Rebar      top2      = new Rebar(A_s_prime2, rebar);
                RebarPoint pointTop2 = new RebarPoint(top2, new RebarCoordinate()
                {
                    X = 0, Y = h / 2.0 - c_cntr_prime2
                });
                LongitudinalBars.Add(pointTop2);
            }

            CalcLog log = new CalcLog();
            ConcreteSectionFlexure beam = new ConcreteSectionFlexure(Section, LongitudinalBars, log, ConfinementReinforcementType);

            return(beam);
        }
 public ConcreteSectionFlexure GetNonPrestressedDoublyReinforcedRectangularSection(double b, double h,
                                                                                   double A_s1, double A_s2, double c_cntr1, double c_cntr2,
                                                                                   ConcreteMaterial concreteMaterial, IRebarMaterial rebarMaterial, ConfinementReinforcementType ConfinementReinforcementType)
 {
     return(GetNonPrestressedDoublyReinforcedRectangularSection(b, h, A_s1, A_s2, c_cntr1, c_cntr2, 0, 0, 0, 0, concreteMaterial, rebarMaterial, ConfinementReinforcementType));
 }
        /// <summary>
        /// Rectangular section singly reinforced
        /// </summary>
        /// <param name="b">Width of compression face of member</param>
        /// <param name="h">Overall thickness, height, or depth of member</param>
        /// <param name="A_s">Area of nonprestressed longitudinal tension reinforcement</param>
        /// <param name="c_cntr">Concrete cover to tension rebar centroid</param>
        /// <param name="ConcreteMaterial">Concrete material</param>
        /// <param name="LongitudinalRebarMaterial">Rebar material for longitudinal bars</param>
        /// <param name="HasTies">Indicates if member has ties/strirrups</param>
        /// <returns name="RectangularSectionSinglyReinforced">  Section [OBJECT] </returns>

        public static RectangularSectionSinglyReinforced ByWidthHeigthAndReinforcementArea(double b, double h, double A_s, double c_cntr,
                                                                                           ConcreteMaterial ConcreteMaterial, RebarMaterial LongitudinalRebarMaterial, bool HasTies = false)
        {
            return(new RectangularSectionSinglyReinforced(b, h, A_s, c_cntr, ConcreteMaterial, LongitudinalRebarMaterial, HasTies));
        }
        public static Dictionary <string, object> ShearFrictionStrength(string ShearFrictionSurfaceTypeId, ConcreteMaterial ConcreteMaterial,
                                                                        double A_c, RebarMaterial RebarMaterial, double A_v, double alpha = 90, double F_comp = 0)
        {
            //Default values


            //Calculation logic:
            double phiV_n = 0.0;

            ShearFrictionSurfaceType _ShearFrictionSurfaceType;
            bool IsValidShearFrictionSurfaceTypeString = Enum.TryParse(ShearFrictionSurfaceTypeId, true, out _ShearFrictionSurfaceType);

            if (IsValidShearFrictionSurfaceTypeString == false)
            {
                throw new Exception("Failed to convert string. ShearFrictionSurfaceType variable needs to be MonolithicConcrete, HardenedRoughenedConcrete, HardenedNonRoughenedConcrete or ConcreteAgainstSteel. Please check input");
            }
            ConcreteSectionShearFriction sec = new ConcreteSectionShearFriction(_ShearFrictionSurfaceType, ConcreteMaterial.Concrete, A_c, RebarMaterial.Material, A_v, alpha, F_comp);

            phiV_n = sec.GetShearFrictionStrength() / 1000.0; //convert back to ksi units
            return(new Dictionary <string, object>
            {
                { "phiV_n", phiV_n }
            });
        }