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);

        }
Example #2
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 }
                        };
                    }