Пример #1
0
        public void ReturnColumnStabilityFactorTimber()
        {
            CalcLog           log = new CalcLog();
            DimensionalLumber m   = new DimensionalLumber();
            double            b   = 5.5;
            double            d   = 5.5;


            double C_F    = 1.0;
            double C_M_Fc = 0.91;
            double C_M_E  = 1.0;
            double C_t    = 1.0;
            double C_i    = 1.0;
            double C_T    = 1.0;
            double C_D    = 1.15;
            double E_min  = 470.0;
            double F_c    = 0.85;
            double l_e    = 15 * 12 * 0.5; //with K-factor
            double lambda = 0.8;
            double C_P    = m.GetColumnStabilityFactor(d, F_c, E_min, l_e, C_M_Fc, C_M_E, C_t, C_t, C_F, C_i, C_i, C_T, lambda);

            double refValue        = 0.827;
            double actualTolerance = EvaluateActualTolerance(C_P, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
Пример #2
0
        public void ReturnColumnStabilityFactorDimensionalLumber()
        {
            CalcLog           log = new CalcLog();
            DimensionalLumber m   = new DimensionalLumber();
            double            b   = 1.5;
            double            d   = 5.5;


            double C_F    = 1.0;
            double C_M    = 1.0;
            double C_t    = 1.0;
            double C_i    = 1.0;
            double C_T    = 1.0;
            double C_D    = 1.15;
            double E_min  = 580.0;
            double F_c    = 1.6;
            double l_e    = 144.0;
            double lambda = 0.8;
            double C_P    = m.GetColumnStabilityFactor(d, F_c, E_min, l_e, C_M, C_M, C_t, C_t, C_F, C_i, C_i, C_T, lambda);

            double refValue        = 0.342;
            double actualTolerance = EvaluateActualTolerance(C_P, refValue);

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

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

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

            return(compSection);
        }
Пример #5
0
        protected double GetFcrGeneral()
        {
            SectionRectangular r   = new SectionRectangular(t_w, h_o);
            SteelMaterial      mat = new SteelMaterial(Material.YieldStress);
            CalcLog            log = new CalcLog();


            throw new NotImplementedException();
        }
        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 ConcreteSectionCompression GetCompressionMemberFromFlexuralSection(ConcreteSectionFlexure flexuralSection,
                                                                                  ConfinementReinforcementType ConfinementReinforcement, bool IsPrestressed = false)
        {
            CalcLog log = new CalcLog();
            CompressionMemberType CompressionMemberType = GetCompressionMemberType(ConfinementReinforcement, IsPrestressed);

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

            return(compSection);
        }
Пример #9
0
        public void ConnectedPlateReturnsFlexuralStrength()
        {
            ICalcLog                 log      = new  CalcLog();
            SectionRectangular       Section  = new SectionRectangular(0.5, 8);
            ISteelMaterial           Material = new SteelMaterial(50);
            AffectedElementInFlexure element  = new AffectedElementInFlexure(Section, Material, log);
            double phiM_n = element.GetFlexuralStrength();

            Assert.AreEqual(360.0, phiM_n);
        }
        public double GetExtendedSinglePlateFlexuralBucklingStrength(double F_y, double t_pl, double d_pl, double L_pl)
        {
            SectionRectangular r   = new SectionRectangular(t_pl, d_pl);
            SteelMaterial      mat = new SteelMaterial(F_y);
            CalcLog            log = new CalcLog();

            AffectedElementInFlexure flexuralElement = new AffectedElementInFlexure(r, mat, log);

            return(flexuralElement.GetPlateFlexuralBucklingStrength(L_pl));
        }
Пример #11
0
        public ConcreteSectionCompression GetConcreteCompressionMember(double Width, double Height, double fc, List <RebarPoint> LongitudinalBars, ConfinementReinforcementType ConfinementReinforcementType)
        {
            CalcLog          log     = new CalcLog();
            IConcreteSection Section = GetRectangularSection(Width, Height, fc);

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

            return(column);
        }
        /// <summary>
        /// Concrete generic shape
        /// </summary>
        /// <param name="PolygonPoints">Points representing closed polyline describing the outline of concrete shape</param>
        /// <param name="Concrete">Concrete material</param>
        /// <param name="RebarPoints">Points representing vertical rebar. Rebar points have associated rebar material and location</param>
        /// <param name="b_w">Section width (required for shear strength calculations)</param>
        /// <param name="ConfinementReinforcementType"></param>
        /// <param name="d">Distance from tension rebar centroid to the furthermost compressed point (required for shear strength calculations)</param>
        /// <returns></returns>
        public ConcreteSectionFlexure GetGeneralSection(List <Point2D> PolygonPoints,
                                                        IConcreteMaterial Concrete, List <RebarPoint> RebarPoints, double b_w, double d,
                                                        ConfinementReinforcementType ConfinementReinforcementType = ConfinementReinforcementType.NoReinforcement)
        {
            CalcLog log                      = new CalcLog();
            var     GenericShape             = new PolygonShape(PolygonPoints);
            CrossSectionGeneralShape Section = new CrossSectionGeneralShape(Concrete, null, GenericShape, b_w, d);
            ConcreteSectionFlexure   beam    = new ConcreteSectionFlexure(Section, RebarPoints, log, ConfinementReinforcementType);

            return(beam);
        }
Пример #13
0
        public static Dictionary <string, object> ShapeBasicGeometricProperties(string SteelShapeId)
        {
            //Default values
            double d     = 0;
            double b     = 0;
            double b_f   = 0;
            double t_f   = 0;
            double t_w   = 0;
            double k     = 0;
            double D     = 0;
            double B     = 0;
            double H     = 0;
            double t     = 0;
            double t_nom = 0;
            double t_des = 0;
            double A     = 0;

            //Calculation logic
            CalcLog cl = new CalcLog();

            SteelShapeId = SteelShapeId.ToUpper();
            AiscCatalogShape shape = new AiscCatalogShape(SteelShapeId, cl);

            d     = shape.d;
            b_f   = shape.bf;
            t_f   = shape.tf;
            t_w   = shape.tw;
            k     = shape.kdes;
            D     = shape.OD;
            b     = shape.b;
            B     = shape.B;
            H     = shape.Ht;
            t     = shape.t;
            t_nom = shape.tnom;
            t_des = shape.tdes;
            A     = shape.A;

            return(new Dictionary <string, object>
            {
                { "d", d }
                , { "b_f", b_f }
                , { "t_f", t_f }
                , { "t_w", t_w }
                , { "k", k }
                , { "D", D }
                , { "B", B }
                , { "H", H }
                , { "t", t }
                , { "t_nom", t_nom }
                , { "t_des", t_des }
                , { "b", b }
                , { "A", A }
            });
        }
        public void ConnectedPlateReturnsFlexuralStrength()
        {
            ICalcLog                 log        = new  CalcLog();
            SectionRectangular       Section    = new SectionRectangular(0.5, 8);
            SectionOfPlateWithHoles  NetSection = new SectionOfPlateWithHoles("", 0.5, 8, 2, 0.01, 2, 2, new Common.Mathematics.Point2D(0, 0));
            AffectedElementInFlexure element    = new AffectedElementInFlexure(Section, NetSection, 50, 65.0);

            double phiM_n = element.GetFlexuralStrength(0);

            Assert.True(360.0 == phiM_n);
        }
        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);
        }
        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 void CoefficientF_vReturnsValue1()
        {
            double           S_1 = 0.15;
            SeismicSiteClass cl  = SeismicSiteClass.D;
            CalcLog          log = new CalcLog();
            Site             s   = new Site(cl, null);
            double           F_v = s.SiteCoefficientFv(S_1);

            double refValue        = 2.2;
            double actualTolerance = EvaluateActualTolerance(F_v, refValue);

            Assert.True(actualTolerance <= tolerance);
        }
Пример #18
0
        public void CoefficientF_vReturnsValue2()
        {
            double           S_1 = 0.45;
            SeismicSiteClass cl  = SeismicSiteClass.D;
            CalcLog          log = new CalcLog();
            Site             s   = new Site(cl, null);
            double           F_v = s.SiteCoefficientFv(S_1);

            double refValue        = 1.55;
            double actualTolerance = EvaluateActualTolerance(F_v, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
Пример #19
0
        public void CoefficientF_aReturnsValue2()
        {
            double           S_S = 1.2;
            SeismicSiteClass cl  = SeismicSiteClass.D;
            CalcLog          log = new CalcLog();
            Site             s   = new Site(cl, null);
            double           F_a = s.SiteCoefficientFa(S_S);

            double refValue        = 1.02;
            double actualTolerance = EvaluateActualTolerance(F_a, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        public void CoefficientF_aReturnsValue1()
        {
            double           S_S = 0.273;
            SeismicSiteClass cl  = SeismicSiteClass.D;
            CalcLog          log = new CalcLog();
            Site             s   = new Site(cl, null);
            double           F_a = s.SiteCoefficientFa(S_S);

            double refValue        = 1.58;
            double actualTolerance = EvaluateActualTolerance(F_a, refValue);

            Assert.True(actualTolerance <= tolerance);
        }
Пример #21
0
        public double GetFlexuralStrength()
        {
            double phiM_n = 0.0;

            CalcLog  log     = new CalcLog();
            ISection section = Section.Shape;

            if (section is SectionRectangular || section is SectionOfPlateWithHoles || section is SectionI)
            {
                if (section is SectionOfPlateWithHoles)
                {
                    SectionOfPlateWithHoles plateWithHoles = section as SectionOfPlateWithHoles;
                    double S_g   = plateWithHoles.B * Math.Pow(plateWithHoles.H, 2);
                    double Z_net = plateWithHoles.Z_x;
                    double Y     = 0.9 * this.Section.Material.YieldStress * S_g; //Flexural Yielding
                    double R     = 0.75 * this.Section.Material.UltimateStress * Z_net;
                    phiM_n = Math.Min(Y, R);
                }
                else if (section is ISectionI)
                {
                    ISectionI IShape = section as ISectionI;
                    double    R      = GetTensionFlangeRuptureStrength(IShape);
                    if (IsCompactDoublySymmetricForFlexure == false)
                    {
                        throw new Exception("Noncompact and singly symmetric I-shapes are not supported for connection checks.");
                    }
                    else
                    {
                        BeamIDoublySymmetricCompact IBeam = new BeamIDoublySymmetricCompact(Section, this.IsRolled, Log);
                        double Y = 0.9 * IBeam.GetMajorNominalPlasticMoment();
                        phiM_n = Math.Min(Y, R);
                    }
                }
                else //Rectangle
                {
                    SectionRectangular plate = section as SectionRectangular;
                    if (plate != null)
                    {
                        double Z = plate.Z_x;
                        double Y = 0.9 * this.Section.Material.YieldStress * Z;
                        phiM_n = Y;
                    }
                }
            }
            else
            {
                throw new Exception("Wrong section type. Only SectionRectangular, SectionOfPlateWithHoles and SectionI are supported.");
            }

            return(phiM_n);
        }
Пример #22
0
        public void DougFirReturnsBendingReferenceValue()
        {
            CalcLog log = new CalcLog();
            VisuallyGradedDimensionLumber dl = new VisuallyGradedDimensionLumber("DOUGLAS FIR-LARCH (NORTH)",
                                                                                 "Stud", "2 in. & wider", log);

            double F_b = dl.F_b;


            double refValue        = 650.0;
            double actualTolerance = EvaluateActualTolerance(F_b, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        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 }
            });
        }
Пример #24
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 }
            });
        }
Пример #25
0
        public AffectedElementInFlexure(ISection GrossSection, ISection NetSection,
                                        double F_y, double F_u, bool IsCompactDoublySymmetricForFlexure = true, bool IsRolled = false)
            : base(F_y, F_u)
        {
            SteelMaterial material = new SteelMaterial(F_y, F_u, SteelConstants.ModulusOfElasticity, SteelConstants.ShearModulus);

            this.Section           = new SteelGeneralSection(GrossSection, material);
            this.SectionNet        = new SteelGeneralSection(NetSection, material);
            this.GrossSectionShape = GrossSection;
            this.NetSectionShape   = NetSection;

            this.IsCompactDoublySymmetricForFlexure = IsCompactDoublySymmetricForFlexure;
            this.IsRolled = IsRolled;

            Log = new CalcLog();
        }
        public void ReturnsSizeFactorDimensionalLumber()
        {
            CalcLog           log = new CalcLog();
            DimensionalLumber m   = new DimensionalLumber();
            double            b   = 1.5;
            double            d   = 5.5;

            double C_F = m.GetSizeFactor(d, b, Wood.NDS.Entities.SawnLumberType.DimensionLumber, Wood.NDS.Entities.CommercialGrade.No2,
                                         Wood.NDS.Entities.ReferenceDesignValueType.Bending);


            double refValue        = 1.3;
            double actualTolerance = EvaluateActualTolerance(C_F, refValue);

            Assert.True(actualTolerance <= tolerance);
        }
Пример #27
0
        public static Dictionary <string, object> ReferenceValues(string WoodSpeciesId, string CommercialGradeId, string SizeClassId = "2 in. & wider",
                                                                  string WoodMemberType = "SawnDimensionLumber",
                                                                  string Code           = "NDS2015")
        {
            //Default values
            double F_b     = 0;
            double F_c     = 0;
            double F_t     = 0;
            double F_v     = 0;
            double E       = 0;
            double E_min   = 0;
            double F_cPerp = 0;
            double G       = 0.0;

            //Calculation logic:
            if (WoodMemberType.Contains("Sawn") && WoodMemberType.Contains("Lumber"))
            {
                CalcLog log = new CalcLog();
                VisuallyGradedDimensionLumber dl = new VisuallyGradedDimensionLumber(WoodSpeciesId,
                                                                                     CommercialGradeId, SizeClassId, log);

                F_b     = dl.F_b / 1000.0;      //All Dynamo nodes use ksi units by default
                F_c     = dl.F_cParal / 1000.0; //All Dynamo nodes use ksi units by default
                F_t     = dl.F_t / 1000.0;      //All Dynamo nodes use ksi units by default
                F_v     = dl.F_v / 1000.0;      //All Dynamo nodes use ksi units by default
                E       = dl.E / 1000.0;        //All Dynamo nodes use ksi units by default
                E_min   = dl.E_min / 1000.0;    //All Dynamo nodes use ksi units by default
                F_cPerp = dl.F_cPerp / 1000.0;  //All Dynamo nodes use ksi units by default
                G       = dl.G;
            }
            else
            {
                throw new Exception("Wood member type not supported.");
            }

            return(new Dictionary <string, object>
            {
                { "F_b", F_b }
                , { "F_c", F_c }
                , { "F_t", F_t }
                , { "F_v", F_v }
                , { "E", E }
                , { "E_min", E_min }
                , { "F_cPerp", F_cPerp }
                , { "G", G }
            });
        }
        public static Dictionary <string, object> WindExposureConstants(string WindExposureCategory, string Code = "ASCE7-10")
        {
            //Default values
            double alpha    = 0;
            double z_g      = 0;
            double alpha_   = 0;
            double b_       = 0;
            double c        = 0;
            double l        = 0;
            double epsilon_ = 0;
            double z_min    = 0;

            WindExposureCategory Exposure;
            //Calculation logic:
            bool IsValidStringExposure = Enum.TryParse(WindExposureCategory, true, out Exposure);

            if (IsValidStringExposure == false)
            {
                throw new Exception("Exposure category is not recognized. Check input string.");
            }

            CalcLog       log       = new CalcLog();
            WindStructure structure = new WindStructure(new CalcLog());

            //structure.GetTerrainExposureConstant(TerrainExposureConstant.alpha, Exposure);
            alpha    = structure.GetTerrainExposureConstant(TerrainExposureConstant.alpha, Exposure);
            z_g      = structure.GetTerrainExposureConstant(TerrainExposureConstant.zg, Exposure);
            alpha_   = structure.GetTerrainExposureConstant(TerrainExposureConstant.alpha_ob, Exposure);
            b_       = structure.GetTerrainExposureConstant(TerrainExposureConstant.b_ob, Exposure);
            c        = structure.GetTerrainExposureConstant(TerrainExposureConstant.c, Exposure);
            l        = structure.GetTerrainExposureConstant(TerrainExposureConstant.l, Exposure);
            epsilon_ = structure.GetTerrainExposureConstant(TerrainExposureConstant.epsilon_ob, Exposure);
            z_min    = structure.GetTerrainExposureConstant(TerrainExposureConstant.zmin, Exposure);

            return(new Dictionary <string, object>
            {
                { "alpha", alpha }
                , { "z_g", z_g }
                , { "alpha_", alpha_ }
                , { "b_", b_ }
                , { "c", c }
                , { "l", l }
                , { "epsilon_", epsilon_ }
                , { "z_min", z_min }
            });
        }
        public void ExtendedPlateBucklingFlexuralStrength()
        {
            double             phiR_n;
            double             h_o = 9.0;
            double             t_w = 0.5;
            SectionRectangular r   = new SectionRectangular(t_w, h_o);
            SteelMaterial      mat = new SteelMaterial(36);
            CalcLog            log = new CalcLog();

            AffectedElementInFlexure flexuralElement = new AffectedElementInFlexure(r, mat, log);
            double lambda   = flexuralElement.GetLambda(10);
            double refValue = 0.408;

            double actualTolerance = EvaluateActualTolerance(lambda, refValue);

            Assert.LessOrEqual(actualTolerance, tolerance);
        }
        public static Dictionary <string, object> SeismicStoryForces(double T, double C_s, List <double> StoryElevationsFromBase, List <double> StoryWeights, string Code = "ASCE7-10")
        {
            //Default values
            List <double> StoryForces = new List <double>();


            //Calculation logic:
            CalcLog log = new CalcLog();
            SeismicLateralForceResistingStructure structure = new SeismicLateralForceResistingStructure(log);

            StoryForces = structure.CalculateSeismicLoads(T, C_s, StoryElevationsFromBase, StoryWeights);

            return(new Dictionary <string, object>
            {
                { "StoryForces", StoryForces }
            });
        }