public void BoltReturnsNominalTensileStress()
 {
     BoltFactory bf = new BoltFactory("A325");
     IBoltMaterial material = bf.GetBoltMaterial();
     double F_nt = material.GetNominalTensileStress(BoltThreadCase.Included);
     Assert.AreEqual(90.0, F_nt);
 }
 public void BoltReturnsNominalTensileStressStringInput()
 {
     BoltFactory bf = new BoltFactory("A325");
     IBoltMaterial material = bf.GetBoltMaterial();
     double F_nt = material.GetNominalTensileStress("N");
     Assert.AreEqual(90.0, F_nt);
 }
 public void BoltReturnsNominalShearStressStringInput()
 {
     BoltFactory bf = new BoltFactory("A325");
     IBoltMaterial material = bf.GetBoltMaterial();
     double F_nv = material.GetNominalShearStress("N");
     Assert.AreEqual(54.0, F_nv);
 }
         public void GetNominalTensileStrengthModifiedToIncludeTheEffectsOfShearStressDG29()
         {
             BoltFactory bf = new BoltFactory("A325");

             IBoltBearing bolt = bf.GetBearingBolt(7.0 / 8.0, "N");
             double V = 8.05;
             double phi_R_n = bolt.GetAvailableTensileStrength(V);

             Assert.AreEqual(39.3, Math.Round(phi_R_n, 1));
         }
        public void GetNominalTensileStrengthModifiedToIncludeTheEffectsOfShearStress()
        {
            BoltFactory bf = new BoltFactory("A325");

            BoltBearingGroupA bolt = new BoltBearingGroupA(3.0 / 4.0, BoltThreadCase.Included, null);
            double V = 8.0;
            double phi_R_n = bolt.GetAvailableTensileStrength(V);

            Assert.AreEqual(25.4, Math.Round(phi_R_n,1));
        }
        public static Dictionary<string, object> ModifiedBoltShearStrength(double V_u,double d_b,string BoltMaterialId,
            string BoltThreadCase, string Code = "AISC360-10")
        {
            //Default values
            double phiR_nt_modified = 0.0;

            //Calculation logic:
            BoltFactory bf = new BoltFactory(BoltMaterialId);
            IBoltBearing bolt = bf.GetBearingBolt(d_b, BoltThreadCase);
            phiR_nt_modified = bolt.GetAvailableTensileStrength(V_u);

            return new Dictionary<string, object>
            {
                {"phiR_nt_modified", phiR_nt_modified}  
            };
        }
        public static Dictionary<string, object> BearingBoltNominalShearStress(string BoltMaterialId, string BoltThreadCase, string Code = "AISC360-10")
        {
            //Default values
            double F_nv = 0;


            //Calculation logic:
            BoltFactory bf = new BoltFactory(BoltMaterialId);
            IBoltMaterial material = bf.GetBoltMaterial();
            F_nv = material.GetNominalShearStress(BoltThreadCase);

            return new Dictionary<string, object>
            {
                { "F_nv", F_nv }
 
            };
        }
        public static Dictionary<string, object> BearingBoltShearStrength(double d_b, string BoltMaterialId, string BoltThreadCase,
            double NumberShearPlanes, bool IsEndLoadedConnectionWithLengthEfect = false, string Code = "AISC360-10")
        {
            //Default values
            double phiR_nv = 0;


            //Calculation logic:
            BoltFactory bf = new BoltFactory(BoltMaterialId);
            IBoltBearing bolt = bf.GetBearingBolt(d_b, BoltThreadCase);
            phiR_nv = bolt.GetAvailableShearStrength(NumberShearPlanes, IsEndLoadedConnectionWithLengthEfect);

            return new Dictionary<string, object>
            {
                { "phiR_nv", phiR_nv }
 
            };
        }
        public static Dictionary<string, object> SlipCriticalBoltCombinedTensionAndShear(double d_b, double T_u, string BoltMaterialId, string BoltHoleType, string BoltFillerCase = "One",
            string BoltFayingSurfaceClass = "ClassA", double NumberShearPlanes = 1, string Code = "AISC360-10")
        {
            //Default values
            double phiR_nModified = 0;

            BoltFayingSurfaceClass SurfaceClass = ParseSurfaceClass(BoltFayingSurfaceClass);
            BoltFillerCase FillerCase = ParseFillerCase(BoltFillerCase);
            b.BoltHoleType HoleType = ParseBoltHoleType(BoltHoleType); 

            //Calculation logic:
            BoltFactory bf = new BoltFactory(BoltMaterialId);
            IBoltSlipCritical bolt = bf.GetSlipCriticalBolt(d_b, BoltThreadCase.Included, SurfaceClass, HoleType, FillerCase, NumberShearPlanes);

            phiR_nModified = bolt.GetReducedSlipResistance(T_u);

            return new Dictionary<string, object>
            {
                { "phiR_nModified", phiR_nModified }
 
            };
        }