Beispiel #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;
        }
Beispiel #2
0
         internal RebarPoint(double A_b, double X_shp, double Y_shp, RebarMaterial RebarMaterial)
        {

            wosadAci.Rebar b = new wosadAci.Rebar(A_b, RebarMaterial.Material);
            this.RebarPointLData = new wosadAci.RebarPoint(b, new wosadAci.RebarCoordinate() { X = X_shp, Y = Y_shp });

        }
Beispiel #3
0
        //Basic calculation
        public TensionLapSplice
            (
            IConcreteMaterial Concrete,
            Rebar Bar1,
            Rebar Bar2,
            bool MeetsRebarSpacingAndEdgeDistance,
            bool HasMinimumTransverseReinforcement,
            bool IsTopRebar,
            TensionLapSpliceClass SpliceClass,
            ICalcLog log
            )
            : base(log)
        {
            this.Concrete = Concrete;
            this.Bar1 = Bar1;
            this.Bar2 = Bar2;
            this.MeetsRebarSpacingAndEdgeDistance=MeetsRebarSpacingAndEdgeDistance;
            this.HasMinimumTransverseReinforcement=HasMinimumTransverseReinforcement;

            this.SpliceClass = SpliceClass;
            this.IsTopRebar = IsTopRebar;
            this.A_tr = A_tr;
            this.s_tr = s_tr;
            this.n = n;


            CalculateValuesBasic();
        }
Beispiel #4
0
        //Detailed calculation
        public TensionLapSplice
            (
            IConcreteMaterial Concrete,
            Rebar Bar1,
            Rebar Bar2,
            double ClearSpacing,
            double ClearCover,
            bool IsTopRebar,
            double A_tr, 
            double s_tr, 
            double n,
            TensionLapSpliceClass SpliceClass,
            ICalcLog log
            )
            : base(log)
        {
            this.Concrete    =Concrete    ;
            this.Bar1        =Bar1        ;      
            this.Bar2        =Bar2        ;      
            this.ClearSpacing=ClearSpacing;     
            this.ClearCover  =ClearCover  ;
            this.IsTopRebar = IsTopRebar;
            this.A_tr =A_tr  ;
            this.s_tr =s_tr  ;
            this.n = n;
            this.SpliceClass = SpliceClass;

            CalculateValuesDetailed();
        }
        public static Dictionary<string, object> StraightBarTensionLapSpliceLengthDetailed(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b1, double d_b2,
            RebarMaterial RebarMaterial, string RebarSpliceClass, string RebarCoatingType, string RebarCastingPosition, double s_clear, double c_c,
            double A_tr, double s_tr, double n, 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 }
 
            };
        }
Beispiel #6
0
        protected virtual void CalculateElements()
        {
            List<RebarPoint> RebarPoints = new List<RebarPoint>();


            double  dx = NodeJ.X - NodeI.X;
            double  dy = NodeJ.Y - NodeI.Y;


            Vector seg = new Vector(dx, dy);
            int N = NumberOfSubdivisions;
            int NumberOfRebarPoints = NumberOfSubdivisions + 1;

            double segDx;
            double segDy;

            double PointArea = A_total / NumberOfRebarPoints;
            Rebar rebar = new Rebar(PointArea, rebarMaterial);


            if (setBackCornerBars == false)
            {
               
                segDx = dx / N;
                segDy = dy / N;

                RebarCoordinate coord1 = new RebarCoordinate(NodeI.X, NodeI.Y);
                RebarPoints.Add(new RebarPoint(rebar, coord1));

                for (int i = 0; i < NumberOfSubdivisions; i++)
                {
                    RebarCoordinate Pt = new RebarCoordinate(NodeI.X + (i + 1) * segDx, NodeI.Y + (i + 1) * segDy);
                    RebarPoints.Add(new RebarPoint(rebar, Pt));
                }
            }
            else
            {
                segDx = dx / (N +1.0);
                segDy = dy / (N +1.0);

                for (int i = 0; i < NumberOfSubdivisions; i++)
                {
                    RebarCoordinate Pt = new RebarCoordinate(NodeI.X + (i + 1) * segDx, NodeI.Y + (i + 1) * segDy);
                    RebarPoints.Add(new RebarPoint(rebar, Pt));
                }

            }
            this.rebarPoints = RebarPoints;
        }
 public DevelopmentTension(
 IConcreteMaterial Concrete,
 Rebar Rebar,
 bool MeetsSpacingCritera,
 bool IsTopRebar,
 double ExcessReinforcementRatio,
 bool CheckMinimumLength,
 ICalcLog log)
 : base(Concrete, Rebar, ExcessReinforcementRatio, log)
 {
 this.isTopRebar = IsTopRebar;
 this.MeetsSpacingCritera = MeetsSpacingCritera;
 this.CheckMinimumLength = CheckMinimumLength;
 db = Rebar.Diameter;
 }
        internal RectangularSectionSinglyReinforced(double b, double h, double A_s, double c_cntr,
        ConcreteMaterial ConcreteMaterial, RebarMaterial LongitudinalRebarMaterial, bool hasTies=false)
        {

            CrossSectionRectangularShape shape = new CrossSectionRectangularShape(ConcreteMaterial.Concrete, null, b, h);
            base.ConcreteMaterial = ConcreteMaterial; //duplicate save of concrete material into base Dynamo class

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

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

            wosadAci.IConcreteFlexuralMember fs = new wosadAci14.ConcreteSectionFlexure(shape, LongitudinalBars, new CalcLog());
            this.FlexuralSection = fs;
        }
        public ConcreteSectionFlexure GetConcreteBeam(double Width, double Height, double fc, params RebarInput[] rebarInput)
        {

            IConcreteSection Section = GetRectangularSection(Width, Height, fc);

            List<RebarPoint> LongitudinalBars = new List<RebarPoint>();
            foreach (var bar in rebarInput)
            {
                Rebar thisBar = new Rebar(bar.Area, new MaterialAstmA615(A615Grade.Grade60));
                RebarPoint point = new RebarPoint(thisBar, new RebarCoordinate() { X = 0, Y = -Height / 2.0 + bar.Cover });
                LongitudinalBars.Add(point);
            }

            ConcreteSectionFlexure beam = new ConcreteSectionFlexure(Section,LongitudinalBars, log);
            return beam;
        }
Beispiel #10
0
        protected virtual void CalculateElements()
        {
            List <RebarPoint> RebarPoints = new List <RebarPoint>();


            double dx = NodeJ.X - NodeI.X;
            double dy = NodeJ.Y - NodeI.Y;


            Vector seg = new Vector(dx, dy);
            int    N   = NumberOfSubdivisions;
            int    NumberOfRebarPoints = NumberOfSubdivisions + 1;

            double segDx;
            double segDy;

            double PointArea = A_total / NumberOfRebarPoints;
            Rebar  rebar     = new Rebar(PointArea, rebarMaterial);


            if (setBackCornerBars == false)
            {
                segDx = dx / N;
                segDy = dy / N;

                RebarCoordinate coord1 = new RebarCoordinate(NodeI.X, NodeI.Y);
                RebarPoints.Add(new RebarPoint(rebar, coord1));

                for (int i = 0; i < NumberOfSubdivisions; i++)
                {
                    RebarCoordinate Pt = new RebarCoordinate(NodeI.X + (i + 1) * segDx, NodeI.Y + (i + 1) * segDy);
                    RebarPoints.Add(new RebarPoint(rebar, Pt));
                }
            }
            else
            {
                segDx = dx / (N + 1.0);
                segDy = dy / (N + 1.0);

                for (int i = 0; i < NumberOfSubdivisions; i++)
                {
                    RebarCoordinate Pt = new RebarCoordinate(NodeI.X + (i + 1) * segDx, NodeI.Y + (i + 1) * segDy);
                    RebarPoints.Add(new RebarPoint(rebar, Pt));
                }
            }
            this.rebarPoints = RebarPoints;
        }
 public DevelopmentTension(
     IConcreteMaterial Concrete, 
     Rebar Rebar, 
     double clearSpacing, 
     double ClearCover,
     bool IsTopRebar, 
     double ExcessReinforcementRatio, 
     bool CheckMinimumLength,  
     ICalcLog log)
     : base (Concrete, Rebar, ExcessReinforcementRatio,log)
 {
     this.isTopRebar = IsTopRebar;
     this.ClearCover = ClearCover;
     this.clearSpacing = clearSpacing;
     this.CheckMinimumLength = CheckMinimumLength;
     db = Rebar.Diameter;
 }
        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 }
 
            };
        }
        public static Dictionary<string, object> StraightBarTensionDevelopmentLengthBasic(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b, 
            Concrete.ACI318.General.Reinforcement.RebarMaterial RebarMaterial,
            string RebarCoatingType, string RebarCastingPosition, double ExcessRebarRatio, bool MeetsRebarSpacingAndEdgeDistance,
            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"); 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, MeetsRebarSpacingAndEdgeDistance, IsTopRebar, ExcessRebarRatio, true, log);
            l_d = d.GetTensionDevelopmentLength(HasMinimumTransverseReinforcement);

            return new Dictionary<string, object>
            {
                { "l_d", l_d }
 
            };
        }
        public static Dictionary<string, object> StraightBarTensionDevelopmentLengthDetailed(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b, 
            RebarMaterial RebarMaterial, string RebarCoatingType, string RebarCastingPosition, double ExcessRebarRatio, double s_clear, double c_c,
            double A_tr, double s_tr, double n, 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 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 }
 
            };
        }
        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;
        }
        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 }
 
            };
        }
 public DevelopmentCompression(IConcreteMaterial Concrete, Rebar Rebar, 
 ICalcLog log, bool IsConfinedCompressionRebar, double ExcessReinforcementRatio = 1.0)
     : base(Concrete, Rebar, ExcessReinforcementRatio, log)
 {
     this.IsConfinedCompressionRebar = IsConfinedCompressionRebar;
 }
 public StandardHookInTension(IConcreteMaterial Concrete, Rebar Rebar, 
      ICalcLog log,double ExcessFlexureReinforcementRatio)
     : base (Concrete, Rebar, ExcessFlexureReinforcementRatio,log)
 {
     db = Rebar.Diameter;
 }
        public static Dictionary<string, object> StandardHookTensionDevelopmentLengthBasic(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b,
            RebarMaterial RebarMaterial, string HookType, string RebarCoatingType, double ExcessRebarRatio, double c_side, double c_extension, string EnclosingRebarDirection, 
            double s_enclosing, 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 }
 
            };
        }
Beispiel #21
0
 private Development(IConcreteMaterial Concrete, Rebar Rebar, ICalcLog log)
     : base(log)
 {
     this.conc = Concrete;
     this.rebar = Rebar;
 }
Beispiel #22
0
 public Development(IConcreteMaterial Concrete, Rebar Rebar, double ExcessReinforcementRatio, ICalcLog log)
     : this(Concrete, Rebar, log)
 {
     this.excessFlexureReinforcementRatio = ExcessReinforcementRatio;
 }