public static Dictionary<string, object> FilletWeldGroupCoefficient(string WeldGroupPattern,double l_Weld_horizontal,double l_Weld_vertical,double e_group,
            double theta, double w_weld, double F_EXX, bool IsLoadOutOfPlane = false, string Code = "AISC360-10")
        {
            //Default values
            double C_WeldGroup = 0;
            double phiR_n = 0;

            //Calculation logic:
            WeldGroupPattern pattern;
            bool IsValidString = Enum.TryParse(WeldGroupPattern, true, out pattern);
            if (IsValidString == true)
            {
                FilletWeldGroup wg = new FilletWeldGroup(pattern, l_Weld_horizontal, l_Weld_vertical, w_weld, F_EXX, IsLoadOutOfPlane);
                C_WeldGroup = wg.GetInstantaneousCenterCoefficient(e_group, theta); ;
                phiR_n = 0.75*wg.GetUltimateForce(e_group, theta); //0.75 is the phi factor
            }
            else
            {
                throw new Exception("Weld group strength calculation failed. Invalid weld group pattern designation.");
            }


            return new Dictionary<string, object>
            {
                { "C_WeldGroup", C_WeldGroup },
                { "phiR_n", phiR_n }
 
            };
        }
        public static Dictionary<string, object> FilletWeldGroupConcentricLoadStrength(string WeldGroupPattern,double l_transv,double l_longit,
            double w_weld, double F_EXX, double theta, string Code = "AISC360-10")
        {
            //Default values
            double phiR_n = 0;


            //Calculation logic:
            WeldGroupPattern pattern;
            bool IsValidString = Enum.TryParse(WeldGroupPattern, true, out pattern);
            if (IsValidString == true)
            {
                FilletWeldGroup wg = new FilletWeldGroup(pattern, l_transv, l_longit, w_weld, F_EXX);
                phiR_n = wg.GetConcentricLoadStrenth(theta);
            }
            else
            {
                throw new Exception("Weld group strength calculation failed. Invalid weld group pattern designation.");
            }


            return new Dictionary<string, object>
            {
                { "phiR_n", phiR_n }
 
            };
        }
        public void WeldConcentricCShapeLinesReturnsValue45Degrees()
        {
            FilletWeldGroup wg = new FilletWeldGroup(WeldGroupPattern.C, 1.0, 2.0, 1.0 / 16.0, 70.0);
            double phiR_n = wg.GetConcentricLoadStrenth(45);
            double refValue = 4 * 1.392;
            double actualTolerance = EvaluateActualTolerance(phiR_n, refValue);
            Assert.LessOrEqual(actualTolerance, tolerance);

        }
        public void WeldConcentricParallelLinesReturnsValue()
        {
            FilletWeldGroup wg = new FilletWeldGroup(WeldGroupPattern.ParallelVertical, 5.0, 28.0, 3.0 / 16.0, 70.0);
            double phiR_n = wg.GetConcentricLoadStrenth(0);
            double refValue = 0.75 * 5.57 * 2 * 28.0;
            double actualTolerance = EvaluateActualTolerance(phiR_n, refValue);
            Assert.LessOrEqual(actualTolerance, tolerance);

        }
        public void WeldConcentricCShapeLinesReturnsValue()
        {
            FilletWeldGroup wg = new FilletWeldGroup(WeldGroupPattern.C, 1.0, 2.0, 1.0 / 16.0, 70.0);
            double phiR_n = wg.GetConcentricLoadStrenth(0);
            double ws1 = 4 * 1.392;
            double ws2 =0.85*2 * 1.392+2*1.5*1.392;
            double refValue = Math.Max(ws1, ws2);
            double actualTolerance = EvaluateActualTolerance(phiR_n, refValue);
            Assert.LessOrEqual(actualTolerance, tolerance);

        }