Example #1
0
        public static Dictionary<string, object> ShearLagFactor(string ShearLagCaseId,double x_bar,double t_p, double l,double B,double H,
            double A_g,
            double A_connected,
            bool IsOpenOpenTensionSection = true, string Code = "AISC360-10")
        {
            //Default values
            double U = 0;


            //Calculation logic:
            ShearLagCase ShearLagCase;
            bool ValidCase = Enum.TryParse(ShearLagCaseId, out ShearLagCase);
            if (ValidCase == false)
            {
                throw new Exception("Shear lag case not recognized. Check input string.");
            }

            ShearLagFactor factor = new ShearLagFactor();
            U = factor.GetShearLagFactor(ShearLagCase, x_bar, t_p, l, B, H,A_g,A_connected,IsOpenOpenTensionSection);


            return new Dictionary<string, object>
            {
                { "U", U }
 
            };
        }
 public void TensionShearLagFactorCase7ForIBeamReturnsValue()
 {
     ShearLagFactor slf = new ShearLagFactor();
     double U = slf.GetShearLagFactor(ShearLagCase.Case7a, double.PositiveInfinity, 5.27, 9, 5.27, 8.28,0,0,true);
     double refValue = 0.85;
     double actualTolerance = EvaluateActualTolerance(U, refValue);
     Assert.LessOrEqual(actualTolerance, tolerance);
 }
 public void TensionShearLagFactorCase2ForIBeamReturnsValue()
 {
     ShearLagFactor slf = new ShearLagFactor();
     double U = slf.GetShearLagFactor(ShearLagCase.Case2,0.831,5.27,9,0,0,0,0,true);
     double refValue = 0.908;
     double actualTolerance = EvaluateActualTolerance(U, refValue);
     Assert.LessOrEqual(actualTolerance, tolerance);
 }
 public void TensionShearLagFactorCase2ReturnsValue()
 {
     ShearLagFactor slf = new ShearLagFactor();
     double U = slf.GetShearLagFactor(ShearLagCase.Case2,1.65,0.0,18.0,0,0,0,0,true);
     Assert.AreEqual(0.908,Math.Round(U,3));
 }