Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public ConcreteSectionFlexure GetRectangularSectionFourSidesDistributed(double b, double h,
    double A_sTopBottom, double A_sLeftRight, double c_centTopBottom, double c_centLeftRight, IConcreteMaterial mat, IRebarMaterial rebarMaterial)
        {

            double YTop = h / 2.0 - c_centTopBottom;
            double YBottom = -h / 2.0 + c_centTopBottom;
            double XLeft = -b / 2.0 + c_centLeftRight;
            double XRight = b / 2.0 - c_centLeftRight;

            Point2D P1 = new Point2D(XLeft, YTop);
            Point2D P2 = new Point2D(XRight, YTop);
            Point2D P3 = new Point2D(XRight, YBottom);
            Point2D P4 = new Point2D(XLeft, YBottom);

            RebarLine topLine = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false);
            RebarLine bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false);

            RebarLine leftLine = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true);
            RebarLine rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true);

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

            LongitudinalBars.AddRange(topLine.RebarPoints);
            LongitudinalBars.AddRange(bottomLine.RebarPoints);
            LongitudinalBars.AddRange(leftLine.RebarPoints);
            LongitudinalBars.AddRange(rightLine.RebarPoints);


            CrossSectionRectangularShape section = new CrossSectionRectangularShape(mat, null, b, h);
            CalcLog log = new CalcLog();

            ConcreteSectionFlexure sectionFlexure = new ConcreteSectionFlexure(section, LongitudinalBars, log);
            return sectionFlexure;
        }
Exemplo n.º 3
0
 public Rebar(double Diameter, bool IsEpoxyCoated, IRebarMaterial rebarMaterial)
 {
     Section            = new RebarSection(Diameter, 0);
     this.db            = Diameter;
     this.isEpoxyCoated = IsEpoxyCoated;
     this.rebarMaterial = rebarMaterial;
 }
Exemplo n.º 4
0
 public OneWayShearReinforcedSectionNonPrestressed(double d, IRebarMaterial TransverseRebarMaterial, double A_v, double s)
 {
     this.d             = d;
     this.A_v           = A_v;
     this.s             = s;
     this.RebarMaterial = TransverseRebarMaterial;
 }
        public static Dictionary <string, object> StraightBarTensionLapSpliceLengthDetailed(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b1, double d_b2,
                                                                                            RebarMaterial RebarMaterial, string RebarSpliceClass = "B", string RebarCoatingType = "Uncoated", string RebarCastingPosition = "Top", double s_clear = 3, double c_c = 1.5,
                                                                                            double A_tr = 0.44, double s_tr = 12, double n = 5, string Code = "ACI318-14")
        {
            //Default values
            double l_st = 0;


            //Calculation logic:
            IRebarMaterial mat = RebarMaterial.Material;

            bool IsEpoxyCoated = false;

            switch (RebarCoatingType)
            {
            case "Uncoated": IsEpoxyCoated = false; break;

            case "EpoxyCoated": IsEpoxyCoated = true; break;

            default: throw new Exception("Unrecognized rebar coating. Please check string input"); break;
            }

            Rebar rebar1 = new Rebar(d_b1, IsEpoxyCoated, mat);
            Rebar rebar2 = new Rebar(d_b2, IsEpoxyCoated, mat);

            bool IsTopRebar = false;

            switch (RebarCastingPosition)
            {
            case "Other": IsTopRebar = false; break;

            case "Top": IsTopRebar = true; break;

            default: throw new Exception("Unrecognized rebar casting position. Please check string input"); break;
            }


            TensionLapSpliceClass _RebarSpliceClass;
            bool IsValidRebarSpliceClass = Enum.TryParse(RebarSpliceClass, true, out _RebarSpliceClass);

            if (IsValidRebarSpliceClass == false)
            {
                throw new Exception("Failed to convert string. RebarSpliceClass not recognzed (A and B are acceptable inputs). Please check input");
            }


            CalcLog log = new CalcLog();

            TensionLapSplice ls = new TensionLapSplice(ConcreteMaterial.Concrete, rebar1, rebar2, s_clear, c_c, IsTopRebar, A_tr, s_tr, n, _RebarSpliceClass, log);

            l_st = ls.Length;

            return(new Dictionary <string, object>
            {
                { "l_st", l_st }
            });
        }
        public static Dictionary <string, object> StraightBarTensionLapSpliceLengthBasic(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b1, double d_b2,
                                                                                         RebarMaterial RebarMaterial, string RebarSpliceClass = "B", string RebarCoatingType  = "Uncoated", string RebarCastingPosition = "Top", double ExcessRebarRatio = 1.0,
                                                                                         bool MeetsRebarSpacingAndEdgeDistance = true, bool HasMinimumTransverseReinforcement = false, string Code = "ACI318-14")
        {
            //Default values
            double l_st = 0;


            //Calculation logic:
            IRebarMaterial mat = RebarMaterial.Material;

            bool IsEpoxyCoated = false;

            switch (RebarCoatingType)
            {
            case "Uncoated": IsEpoxyCoated = false; break;

            case "EpoxyCoated": IsEpoxyCoated = true; break;

            default: throw new Exception("Unrecognized rebar coating. Please check string input");
            }

            Rebar rebar1 = new Rebar(d_b1, IsEpoxyCoated, mat);
            Rebar rebar2 = new Rebar(d_b2, IsEpoxyCoated, mat);


            bool IsTopRebar = false;

            switch (RebarCastingPosition)
            {
            case "Other": IsTopRebar = false; break;

            case "Top": IsTopRebar = true; break;

            default: throw new Exception("Unrecognized rebar casting position. Please check string input");
            }

            TensionLapSpliceClass _RebarSpliceClass;
            bool IsValidRebarSpliceClass = Enum.TryParse(RebarSpliceClass, true, out _RebarSpliceClass);

            if (IsValidRebarSpliceClass == false)
            {
                throw new Exception("Failed to convert string. RebarSpliceClass not recognzed (A and B are acceptable inputs). Please check input");
            }


            CalcLog log = new CalcLog();

            TensionLapSplice d = new TensionLapSplice(ConcreteMaterial.Concrete, rebar1, rebar2, MeetsRebarSpacingAndEdgeDistance, HasMinimumTransverseReinforcement, IsTopRebar, _RebarSpliceClass, log);

            l_st = d.Length;

            return(new Dictionary <string, object>
            {
                { "l_st", l_st }
            });
        }
 public ReinforcedSectionTwoWayShear(IConcreteMaterial Material, IRebarMaterial Rebar,
                                     PunchingPerimeterData Perimeter, double A_v, double s, PunchingReinforcementType PunchingReinforcementType)
 {
     this.Material  = Material;
     this.Perimeter = Perimeter;
     this.Rebar     = Rebar;
     this.A_v       = A_v;
     this.s         = s;
     this.PunchingReinforcementType = PunchingReinforcementType;
 }
Exemplo n.º 8
0
 public RebarLine(double A_total, Point2D StartPoint, Point2D EndPoint,
     IRebarMaterial rebarMaterial, bool setBackCornerBars, bool IsEpoxyCoated =false, int NumberOfSubdivisions = 20)
 {
     this.A_total = A_total;
     this.NodeI = StartPoint;
     this.NodeJ = EndPoint;
     this.isEpoxyCoated = IsEpoxyCoated;
     this.rebarMaterial = rebarMaterial;
     this.NumberOfSubdivisions = NumberOfSubdivisions;
     this.setBackCornerBars = setBackCornerBars;
 }
Exemplo n.º 9
0
 public RebarLine(double A_total, Point2D StartPoint, Point2D EndPoint,
                  IRebarMaterial rebarMaterial, bool setBackCornerBars, bool IsEpoxyCoated = false, int NumberOfSubdivisions = 20)
 {
     this.A_total              = A_total;
     this.NodeI                = StartPoint;
     this.NodeJ                = EndPoint;
     this.isEpoxyCoated        = IsEpoxyCoated;
     this.rebarMaterial        = rebarMaterial;
     this.NumberOfSubdivisions = NumberOfSubdivisions;
     this.setBackCornerBars    = setBackCornerBars;
 }
        public static Dictionary <string, object> StraightBarTensionDevelopmentLengthBasic(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b,
                                                                                           Concrete.ACI318.General.Reinforcement.RebarMaterial RebarMaterial,
                                                                                           string RebarCoatingType = "Uncoated", string RebarCastingPosition = "Top", double ExcessRebarRatio = 1.0, bool MeetsRebarSpacingAndEdgeDistance = true,
                                                                                           bool HasMinimumTransverseReinforcement = false, string Code       = "ACI318-14")
        {
            //Default values
            double l_d = 0;


            //Calculation logic:

            IRebarMaterial mat = RebarMaterial.Material;

            bool IsEpoxyCoated = false;

            switch (RebarCoatingType)
            {
            case "Uncoated":  IsEpoxyCoated = false; break;

            case "EpoxyCoated":  IsEpoxyCoated = true; break;

            default: throw new Exception("Unrecognized rebar coating. Please check string input");
            }

            Rebar rebar = new Rebar(d_b, IsEpoxyCoated, mat);


            bool IsTopRebar = false;

            switch (RebarCastingPosition)
            {
            case "Other":  IsTopRebar = false; break;

            case "Top":  IsTopRebar = true; break;

            default: throw new Exception("Unrecognized rebar casting position. Please check string input");
            }

            CalcLog log = new CalcLog();

            DevelopmentTension d = new DevelopmentTension(ConcreteMaterial.Concrete, rebar, MeetsRebarSpacingAndEdgeDistance, IsTopRebar, ExcessRebarRatio, true, log);

            l_d = d.GetTensionDevelopmentLength(HasMinimumTransverseReinforcement);

            return(new Dictionary <string, object>
            {
                { "l_d", l_d }
            });
        }
Exemplo n.º 11
0
        public static Dictionary <string, object> StraightBarTensionDevelopmentLengthDetailed(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b,
                                                                                              RebarMaterial RebarMaterial, string RebarCoatingType = "Uncoated", string RebarCastingPosition = "Top", double ExcessRebarRatio = 1.0, double s_clear = 3, double c_c = 1.5,
                                                                                              double A_tr = 0.44, double s_tr = 12, double n = 5, string Code = "ACI318-14")
        {
            //Default values
            double l_d = 0;


            //Calculation logic:
            IRebarMaterial mat = RebarMaterial.Material;

            bool IsEpoxyCoated = false;

            switch (RebarCoatingType)
            {
            case "Uncoated": IsEpoxyCoated = false; break;

            case "EpoxyCoated": IsEpoxyCoated = true; break;

            default: throw new Exception("Unrecognized rebar coating. Please check string input"); break;
            }

            Rebar rebar = new Rebar(d_b, IsEpoxyCoated, mat);


            bool IsTopRebar = false;

            switch (RebarCastingPosition)
            {
            case "Other": IsTopRebar = false; break;

            case "Top": IsTopRebar = true; break;

            default: throw new Exception("Unrecognized rebar casting position. Please check string input"); break;
            }

            CalcLog log = new CalcLog();

            DevelopmentTension d = new DevelopmentTension(ConcreteMaterial.Concrete, rebar, s_clear, c_c, IsTopRebar, ExcessRebarRatio, true, log);

            l_d = d.GetTensionDevelopmentLength(A_tr, s_tr, n);


            return(new Dictionary <string, object>
            {
                { "l_d", l_d }
            });
        }
        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);
                }
            }
        }
        public static Dictionary <string, object> CompressionLapSpliceLength(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b,
                                                                             RebarMaterial RebarMaterial, bool HasConfiningReinforcement = false, string Code = "ACI318-14")
        {
            //Default values
            double l_sc = 0;


            //Calculation logic:
            IRebarMaterial mat   = RebarMaterial.Material;
            Rebar          rebar = new Rebar(d_b, false, mat);

            return(new Dictionary <string, object>
            {
                { "l_sc", l_sc }
            });
        }
        private List <RebarPoint> GetLongitudinalBarsFromCoordinates(IRebarMaterial LongitudinalRebarMaterial)
        {
            List <RebarPoint> points     = new List <RebarPoint>();
            List <double>     RebarAreas = new List <double>()
            {
                5.04,
                5.04,
                5.04,
                5.04,
                5.04,
                5.04,
                5.04,
                5.04,
                5.04,
                2,
                2,
                2,
                2,
                0.576,
            };
            List <double> RebarYs = new List <double>()
            {
                -117,
                -104.25,
                -91.5,
                -78.75,
                -66,
                -53.25,
                -40.5,
                -27.75,
                -15,
                -9,
                31,
                71,
                111,
                117,
            };

            for (int i = 0; i < RebarAreas.Count(); i++)
            {
                RebarPoint pnt = new RebarPoint(new Rebar(RebarAreas[i], LongitudinalRebarMaterial), new RebarCoordinate(0, RebarYs[i]));
                points.Add(pnt);
            }
            return(points);
        }
        public void RectangularBeamReturnsRequiredShearRebarAreaValue()
        {
            double h                 = 24.0;
            double d                 = 21.5;
            double b                 = 14.0;
            double N_u               = 0.0;
            double phiV_s            = 43100.0 * 0.75;
            double fc                = 3000.0;
            double s                 = 1.0;
            double c_center          = 1.75;
            bool   IsLightWeight     = false;
            RebarMaterialFactory rmf = new RebarMaterialFactory();
            IRebarMaterial       rm  = rmf.GetMaterial();
            OneWayShearReinforcedSectionNonPrestressed section = new OneWayShearReinforcedSectionNonPrestressed(d, rm, s);
            double A_v = section.GetRequiredShearReinforcementArea(phiV_s);

            double refValue        = 0.0334;
            double actualTolerance = EvaluateActualTolerance(A_v, refValue);

            Assert.True(actualTolerance <= tolerance);
        }
        public static Dictionary <string, object> CompressionDevelopmentLengthBasic(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b,
                                                                                    RebarMaterial RebarMaterial, bool HasConfiningReinforcement = false, string Code = "ACI318-14")
        {
            //Default values
            double l_dc = 0;


            //Calculation logic:
            IRebarMaterial mat   = RebarMaterial.Material;
            Rebar          rebar = new Rebar(d_b, false, mat);

            CalcLog log = new CalcLog();
            DevelopmentCompression cd = new DevelopmentCompression(ConcreteMaterial.Concrete, rebar, log, HasConfiningReinforcement);

            l_dc = cd.Length;

            return(new Dictionary <string, object>
            {
                { "l_dc", l_dc }
            });
        }
Exemplo n.º 17
0
        private void UpdateValuesFromResult(IStrainCompatibilityAnalysisResult nominalResult,
                                            FlexuralCompressionFiberPosition FlexuralCompressionFiberPosition, double beta1)
        {
            LinearStrainDistribution strainDistribution = nominalResult.StrainDistribution;

            double d = strainDistribution.Height;

            if (FlexuralCompressionFiberPosition == FlexuralCompressionFiberPosition.Top)
            {
                this.a = strainDistribution.NeutralAxisTopDistance * beta1;
                //epsilon_t = strainDistribution.BottomFiberStrain;
            }
            else
            {
                this.a = (d - strainDistribution.NeutralAxisTopDistance) * beta1;
                //epsilon_t = strainDistribution.TopFiberStrain;
            }
            epsilon_t = nominalResult.ControllingTensionBar.Strain;
            IRebarMaterial controllingBarMaterial = nominalResult.ControllingTensionBar.Point.Rebar.Material;

            epsilon_ty = controllingBarMaterial.YieldStrain;
        }
Exemplo n.º 18
0
        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)
        {
            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);
            return beam;
        }
Exemplo n.º 19
0
        public static Dictionary <string, object> StandardHookTensionDevelopmentLengthBasic(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b,
                                                                                            RebarMaterial RebarMaterial, double ExcessRebarRatio = 1.0, string RebarCoatingType = "Uncoated", string Code = "ACI318-14")
        {
            //Default values
            double l_dh = 0;


            //Calculation logic:

            IRebarMaterial mat           = RebarMaterial.Material;
            bool           IsEpoxyCoated = true;

            if (RebarCoatingType.ToLower() == "uncoated")
            {
                IsEpoxyCoated = false;
            }
            else if (RebarCoatingType.ToLower() == "epoxycoated")
            {
                IsEpoxyCoated = true;
            }
            else
            {
                throw new Exception("Unrecognized rebar coating string.");
            }
            Rebar rebar = new Rebar(d_b, IsEpoxyCoated, mat);

            CalcLog log = new CalcLog();

            StandardHookInTension hook = new StandardHookInTension(ConcreteMaterial.Concrete, rebar, log, ExcessRebarRatio);

            l_dh = hook.GetDevelopmentLength();

            return(new Dictionary <string, object>
            {
                { "l_dh", l_dh }
            });
        }
        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);
        }
        public ConcreteSectionCompression GetGeneralCompressionMember(List <Point2D> PolygonPoints, List <RebarPoint> LongitudinalBars,
                                                                      IConcreteMaterial ConcreteMaterial, IRebarMaterial RebarMaterial,
                                                                      ConfinementReinforcementType ConfinementReinforcement, double b_w = 0.0, double d = 0.0, bool IsPrestressed = false)
        {
            CalcLog log          = new CalcLog();
            var     GenericShape = new PolygonShape(PolygonPoints);

            if (b_w == 0.0)
            {
                b_w = GenericShape.XMax - GenericShape.XMin;
            }

            if (d == 0.0)
            {
                d = GenericShape.YMax - GenericShape.YMin;
            }
            CrossSectionGeneralShape Section         = new CrossSectionGeneralShape(ConcreteMaterial, null, GenericShape, b_w, d);
            ConcreteSectionFlexure   flexuralSection = new ConcreteSectionFlexure(Section, LongitudinalBars, log, ConfinementReinforcement);

            return(GetCompressionMemberFromFlexuralSection(flexuralSection, ConfinementReinforcement, IsPrestressed));
        }
//        public ConcreteSectionFlexure GetRectangularSectionWithBoundaryZones(double b, double h,
//double A_sBoundary, double L_Boundary, RebarDesignation curtainBar, double s_curtain, int N_curtains, IConcreteMaterial mat, IRebarMaterial rebarMaterial,
//    ConfinementReinforcementType ConfinementReinforcementType, int NumberOfSubdivisions = 20)
//        {

//            double YTop = h / 2.0 - c_centTopBottom;
//            double YBottom = -h / 2.0 + c_centTopBottom;
//            double XLeft = -b / 2.0 + c_centLeftRight;
//            double XRight = b / 2.0 - c_centLeftRight;

//            Point2D P1 = new Point2D(XLeft, YTop);
//            Point2D P2 = new Point2D(XRight, YTop);
//            Point2D P3 = new Point2D(XRight, YBottom);
//            Point2D P4 = new Point2D(XLeft, YBottom);



//            RebarLine topLine = null;
//            RebarLine bottomLine = null;

//            RebarLine leftLine = null;
//            RebarLine rightLine = null;

//            if (NumberOfSubdivisions == 0)
//            {
//                topLine = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false);
//                bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false);
//                if (A_sLeftRight > 0)
//                {
//                    leftLine = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true);
//                    rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true);
//                }

//            }
//            else
//            {
//                topLine = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false, false, NumberOfSubdivisions);
//                bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false, false, NumberOfSubdivisions);
//                if (A_sLeftRight > 0)
//                {
//                    leftLine = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true, false, NumberOfSubdivisions);
//                    rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true, false, NumberOfSubdivisions);
//                }
//            }


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


//            if (topLine != null) LongitudinalBars.AddRange(topLine.RebarPoints);
//            if (bottomLine != null) LongitudinalBars.AddRange(bottomLine.RebarPoints);
//            if (leftLine != null) LongitudinalBars.AddRange(leftLine.RebarPoints);
//            if (rightLine != null) LongitudinalBars.AddRange(rightLine.RebarPoints);


//            CrossSectionRectangularShape section = new CrossSectionRectangularShape(mat, null, b, h);
//            CalcLog log = new CalcLog();

//            ConcreteSectionFlexure sectionFlexure = new ConcreteSectionFlexure(section, LongitudinalBars, log, ConfinementReinforcementType);
//            return sectionFlexure;
//        }

        public ConcreteSectionFlexure GetRectangularSectionFourSidesDistributed(double b, double h,
                                                                                double A_sTopBottom, double A_sLeftRight, double c_centTopBottom, double c_centLeftRight, IConcreteMaterial mat, IRebarMaterial rebarMaterial,
                                                                                ConfinementReinforcementType ConfinementReinforcementType, int NumberOfSubdivisions = 0)
        {
            double YTop    = h / 2.0 - c_centTopBottom;
            double YBottom = -h / 2.0 + c_centTopBottom;
            double XLeft   = -b / 2.0 + c_centLeftRight;
            double XRight  = b / 2.0 - c_centLeftRight;

            Point2D P1 = new Point2D(XLeft, YTop);
            Point2D P2 = new Point2D(XRight, YTop);
            Point2D P3 = new Point2D(XRight, YBottom);
            Point2D P4 = new Point2D(XLeft, YBottom);



            RebarLine topLine    = null;
            RebarLine bottomLine = null;

            RebarLine leftLine  = null;
            RebarLine rightLine = null;

            if (NumberOfSubdivisions == 0)
            {
                topLine    = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false);
                bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false);
                if (A_sLeftRight > 0)
                {
                    leftLine  = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true);
                    rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true);
                }
            }
            else
            {
                topLine    = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false, false, NumberOfSubdivisions);
                bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false, false, NumberOfSubdivisions);
                if (A_sLeftRight > 0)
                {
                    leftLine  = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true, false, NumberOfSubdivisions);
                    rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true, false, NumberOfSubdivisions);
                }
            }


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


            if (topLine != null)
            {
                LongitudinalBars.AddRange(topLine.RebarPoints);
            }
            if (bottomLine != null)
            {
                LongitudinalBars.AddRange(bottomLine.RebarPoints);
            }
            if (leftLine != null)
            {
                LongitudinalBars.AddRange(leftLine.RebarPoints);
            }
            if (rightLine != null)
            {
                LongitudinalBars.AddRange(rightLine.RebarPoints);
            }


            CrossSectionRectangularShape section = new CrossSectionRectangularShape(mat, null, b, h);
            CalcLog log = new CalcLog();

            ConcreteSectionFlexure sectionFlexure = new ConcreteSectionFlexure(section, LongitudinalBars, log, ConfinementReinforcementType);

            return(sectionFlexure);
        }
        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));
 }
        private List <KodestructAci.RebarPoint> GetWallBars(double h, double t_w, string RebarSizeId, double N_curtains, double s,
                                                            double topZoneLength, double bottomZoneLength, double c_edge, IRebarMaterial LongitudinalRebarMaterial)
        {
            RebarDesignation des;
            bool             IsValidString = Enum.TryParse(RebarSizeId, true, out des);

            if (IsValidString == false)
            {
                throw new Exception("Rebar size is not recognized. Check input.");
            }
            RebarSection sec = new RebarSection(des);
            double       A_b = sec.Area;

            int       NBarLines = (int)Math.Floor(h / s);
            double    A_s       = NBarLines * N_curtains * A_b;
            RebarLine Line      = new RebarLine(A_s,
                                                new Point2D(0.0, (bottomZoneLength + c_edge) - h / 2),
                                                new Point2D(0.0, h / 2 - c_edge - topZoneLength),
                                                LongitudinalRebarMaterial, false, false, NBarLines);

            return(Line.RebarPoints);
        }
Exemplo n.º 26
0
 public Rebar(double Area, IRebarMaterial rebarMaterial)
 {
     Section = new RebarSection(0,Area);
     this.A = Area;
     this.rebarMaterial = rebarMaterial;
 }
        private List <KodestructAci.RebarPoint> GetBoundaryZoneBars(BoundaryZone BoundaryZone, IRebarMaterial LongitudinalRebarMaterial, Point2D BzCentroid, bool IsTop)
        {
            Point2D topPoint;
            Point2D botPoint;

            if (IsTop == true)
            {
                topPoint = new Point2D(0, BzCentroid.Y + (BoundaryZone.h / 2.0 - BoundaryZone.c_cntrEdge));
                botPoint = new Point2D(0, BzCentroid.Y - (BoundaryZone.h / 2.0 - BoundaryZone.c_cntrInterior));
            }
            else
            {
                topPoint = new Point2D(0, BzCentroid.Y + (BoundaryZone.h / 2.0 - BoundaryZone.c_cntrInterior));
                botPoint = new Point2D(0, BzCentroid.Y - (BoundaryZone.h / 2.0 - BoundaryZone.c_cntrEdge));
            }



            RebarLine Line = new RebarLine(BoundaryZone.A_s,
                                           botPoint, topPoint, LongitudinalRebarMaterial, false, false, (int)BoundaryZone.N_Bar_Rows - 1);

            return(Line.RebarPoints);
        }
Exemplo n.º 28
0
        public ConcreteSectionFlexure GetRectangularSectionFourSidesDistributed(double b, double h,
                                                                                double A_sTopBottom, double A_sLeftRight, double c_centTopBottom, double c_centLeftRight, IConcreteMaterial mat, IRebarMaterial rebarMaterial)
        {
            double YTop    = h / 2.0 - c_centTopBottom;
            double YBottom = -h / 2.0 + c_centTopBottom;
            double XLeft   = -b / 2.0 + c_centLeftRight;
            double XRight  = b / 2.0 - c_centLeftRight;

            Point2D P1 = new Point2D(XLeft, YTop);
            Point2D P2 = new Point2D(XRight, YTop);
            Point2D P3 = new Point2D(XRight, YBottom);
            Point2D P4 = new Point2D(XLeft, YBottom);

            RebarLine topLine    = new RebarLine(A_sTopBottom, P1, P2, rebarMaterial, false);
            RebarLine bottomLine = new RebarLine(A_sTopBottom, P3, P4, rebarMaterial, false);

            RebarLine leftLine  = new RebarLine(A_sLeftRight, P2, P3, rebarMaterial, true);
            RebarLine rightLine = new RebarLine(A_sLeftRight, P4, P1, rebarMaterial, true);

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

            LongitudinalBars.AddRange(topLine.RebarPoints);
            LongitudinalBars.AddRange(bottomLine.RebarPoints);
            LongitudinalBars.AddRange(leftLine.RebarPoints);
            LongitudinalBars.AddRange(rightLine.RebarPoints);


            CrossSectionRectangularShape section = new CrossSectionRectangularShape(mat, null, b, h);
            CalcLog log = new CalcLog();

            ConcreteSectionFlexure sectionFlexure = new ConcreteSectionFlexure(section, LongitudinalBars, log);

            return(sectionFlexure);
        }
        private List <KodestructAci.RebarPoint> GetLongitudinalBars(ISectionRectangular shape, double h_total, double t_w,
                                                                    string RebarSizeId, double N_curtains, double s, double c_edge,
                                                                    BoundaryZone BoundaryZoneTop, BoundaryZone BoundaryZoneBottom, IRebarMaterial LongitudinalRebarMaterial)
        {
            List <KodestructAci.RebarPoint> BzTopBars    = GetBoundaryZoneBars(BoundaryZoneTop, LongitudinalRebarMaterial, new Point2D(0.0, shape.H / 2.0 - BoundaryZoneTop.h / 2.0), true);
            List <KodestructAci.RebarPoint> BzBottomBars = GetBoundaryZoneBars(BoundaryZoneBottom, LongitudinalRebarMaterial, new Point2D(0.0, BoundaryZoneTop.h / 2.0 - shape.H / 2.0), false);

            List <KodestructAci.RebarPoint> retBars = null;

            if (N_curtains != 0)
            {
                List <KodestructAci.RebarPoint> WallBars = GetWallBars(h_total, t_w, RebarSizeId, N_curtains, s,
                                                                       BoundaryZoneTop.h, BoundaryZoneBottom.h, c_edge, LongitudinalRebarMaterial);
                retBars = BzTopBars.Concat(BzBottomBars).Concat(WallBars).ToList();
            }
            else
            {
                retBars = BzTopBars.Concat(BzBottomBars).ToList();
            }

            return(retBars);
        }
Exemplo n.º 30
0
 public RebarPrestressed(double Diameter, IRebarMaterial rebarMaterial,
                         PrestressingType PrestressingType, StrandType StrandType, double JackingStress, double TransferStress, double EffectiveStress)
     : base(Diameter, rebarMaterial)
 {
 }
Exemplo n.º 31
0
 public ConcreteSectionFlexure GetNonPrestressedDoublyReinforcedRectangularSection(double b, double h, 
      double A_s1,double A_s2,double c_cntr1,double c_cntr2, 
      ConcreteMaterial concreteMaterial, IRebarMaterial rebarMaterial)
  {
      return GetNonPrestressedDoublyReinforcedRectangularSection(b, h, A_s1, A_s2, c_cntr1, c_cntr2, 0, 0, 0, 0, concreteMaterial, rebarMaterial);
  }
        public static Dictionary <string, object> StandardHookTensionDevelopmentLengthDetailed(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b,
                                                                                               RebarMaterial RebarMaterial, string HookType = "Degree90", string RebarCoatingType = "Uncoated", double ExcessRebarRatio = 1.0, double c_side = 1.5, double c_extension = 1.5, string EnclosingRebarDirection = "Parallel",
                                                                                               double s_enclosing = 12, string Code = "ACI318-14")
        {
            //Default values
            double l_dh = 0;


            //Calculation logic:

            IRebarMaterial mat = RebarMaterial.Material;

            bool IsEpoxyCoated = true;

            if (RebarCoatingType.ToLower() == "uncoated")
            {
                IsEpoxyCoated = false;
            }
            else if (RebarCoatingType.ToLower() == "epoxycoated")
            {
                IsEpoxyCoated = true;
            }
            else
            {
                throw new Exception("Unrecognized rebar coating string.");
            }

            Rebar rebar = new Rebar(d_b, IsEpoxyCoated, mat);

            CalcLog log = new CalcLog();

            StandardHookInTension hook = new StandardHookInTension(ConcreteMaterial.Concrete, rebar, log, ExcessRebarRatio);

            HookType _HookType;
            bool     IsValidHookTypeString = Enum.TryParse(HookType, true, out _HookType);

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


            bool enclosingRebarIsPerpendicular = false;

            if (EnclosingRebarDirection.ToLower() == "perpendicular")
            {
                enclosingRebarIsPerpendicular = true;
            }
            else if (EnclosingRebarDirection.ToLower() == "parallel")
            {
                enclosingRebarIsPerpendicular = false;
            }
            else
            {
                throw new Exception("Failed to convert string. Check EnclosingRebarDirection string. Please check input");
            }


            l_dh = hook.GetDevelopmentLength(_HookType, c_side, c_extension, enclosingRebarIsPerpendicular, s_enclosing);

            return(new Dictionary <string, object>
            {
                { "l_dh", l_dh }
            });
        }
Exemplo n.º 33
0
 public Rebar(double Area, IRebarMaterial rebarMaterial)
 {
     Section            = new RebarSection(0, Area);
     this.A             = Area;
     this.rebarMaterial = rebarMaterial;
 }
Exemplo n.º 34
0
        public RebarPrestressed(double Diameter, IRebarMaterial rebarMaterial,
            PrestressingType PrestressingType, StrandType StrandType, double JackingStress, double TransferStress, double EffectiveStress)
        : base(Diameter, rebarMaterial)
            {

            }
Exemplo n.º 35
0
 public Rebar(double Diameter, bool IsEpoxyCoated, IRebarMaterial rebarMaterial)
 {
     Section = new RebarSection(Diameter, 0);
     this.db = Diameter;
     this.isEpoxyCoated = IsEpoxyCoated;
     this.rebarMaterial = rebarMaterial;
 }
Exemplo n.º 36
0
        public RebarPrestressed(double Diameter, IRebarMaterial rebarMaterial,
            PrestressingType PrestressingType, StrandType StrandType, double EffectiveStress)
            : this(Diameter, rebarMaterial, PrestressingType, StrandType, 0, 0, EffectiveStress)
            {

            }
Exemplo n.º 37
0
 public RebarPrestressed(double Diameter, IRebarMaterial rebarMaterial,
                         PrestressingType PrestressingType, StrandType StrandType, double EffectiveStress)
     : this(Diameter, rebarMaterial, PrestressingType, StrandType, 0, 0, EffectiveStress)
 {
 }
        /// <summary>
        /// Creates compression member from top/bottom and side reinforcement
        /// </summary>
        /// <param name="Width">Width</param>
        /// <param name="Height">Heigth</param>
        /// <param name="ConcreteMaterial">Concrete material (as IConcreteMaterial)</param>
        /// <param name="RebarMaterial"> Rebar material (as IRebarMaterial) </param>
        /// <param name="A_s_TopBottom">Area of left or right reinforcement (each)</param>
        /// <param name="A_s_LeftRight">Area of top or bottom reinforcement (each)</param>
        /// <param name="c_centerTopBottom">Cover to rebar centroid for top and bottom reinforcement</param>
        /// <param name="c_centerLeftRight">Cover to rebar centroid for left and right side reinforcement</param>
        /// <param name="ConfinementReinforcement">Distiguishes between ties and spirals</param>
        /// <param name="IsPrestressed">Distinguishes between prestressed versus non-prestressed members</param>
        /// <returns></returns>
        public ConcreteSectionCompression GetRectangularCompressionMember(double Width, double Height,
                                                                          IConcreteMaterial ConcreteMaterial, IRebarMaterial RebarMaterial,
                                                                          double A_s_TopBottom, double A_s_LeftRight,
                                                                          double c_centerTopBottom, double c_centerLeftRight,
                                                                          ConfinementReinforcementType ConfinementReinforcement, bool IsPrestressed = false)
        {
            CalcLog   log     = new CalcLog();
            RebarLine topLine = new RebarLine(A_s_TopBottom,
                                              new Point2D(-Width / 2.0 + c_centerLeftRight, Height / 2.0 - c_centerTopBottom),
                                              new Point2D(Width / 2.0 - c_centerLeftRight, Height / 2.0 - c_centerTopBottom),
                                              RebarMaterial, false);

            RebarLine botLine = new RebarLine(A_s_TopBottom,
                                              new Point2D(-Width / 2.0 + c_centerLeftRight, -Height / 2.0 + c_centerTopBottom),
                                              new Point2D(Width / 2.0 - c_centerLeftRight, -Height / 2.0 + c_centerTopBottom),
                                              RebarMaterial, false);

            RebarLine leftLine = new RebarLine(A_s_LeftRight,
                                               new Point2D(-Width / 2.0 + c_centerLeftRight, -Height / 2.0 + c_centerTopBottom),
                                               new Point2D(-Width / 2.0 + c_centerLeftRight, Height / 2.0 - c_centerTopBottom),
                                               RebarMaterial, true);

            RebarLine rightLine = new RebarLine(A_s_LeftRight,
                                                new Point2D(Width / 2.0 - c_centerLeftRight, -Height / 2.0 + c_centerTopBottom),
                                                new Point2D(Width / 2.0 - c_centerLeftRight, Height / 2.0 - c_centerTopBottom),
                                                RebarMaterial, true);

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

            LongitudinalBars.AddRange(topLine.RebarPoints);
            LongitudinalBars.AddRange(botLine.RebarPoints);
            LongitudinalBars.AddRange(leftLine.RebarPoints);
            LongitudinalBars.AddRange(rightLine.RebarPoints);

            return(this.GetRectangularCompressionMember(Width, Height, ConcreteMaterial, LongitudinalBars, ConfinementReinforcement, log, IsPrestressed));
        }