public static Dictionary <string, object> TorsionalFunctionValues(string TorsionalFunctionCaseId, double E, double G, double J, double L, double z, double T, double C_w, double t, double alpha) { //Default values double theta = 0; double theta_1der = 0; double theta_2der = 0; double theta_3der = 0; //Calculation logic: TorsionalFunctionCase TCase; bool IsValidStringTorsionCase = Enum.TryParse(TorsionalFunctionCaseId, true, out TCase); if (IsValidStringTorsionCase == false) { throw new Exception("Torsional case is not recognized. Check input string."); } TorsionalFunctionFactory tf = new TorsionalFunctionFactory(); ITorsionalFunction function = tf.GetTorsionalFunction(TCase, E, G, J, L, z, T, C_w, t, alpha); theta = function.Get_theta(); theta_1der = function.Get_theta_1(); theta_2der = function.Get_theta_2(); theta_3der = function.Get_theta_3(); #region For debugging calculate the normalized values as in AISC design Guide double thetaNorm; double theta_1derNorm; double theta_2derNorm; double theta_3derNorm; //FOR TESTING CALCULATE THE SECTION PROPS double a = Math.Sqrt((E * C_w) / (G * J)); double la = L / a; #region Case 12 thetaNorm = theta * (G * J / t) * 1 / (Math.Pow(a, 2)); theta_1derNorm = theta_1der * (G * J / t) * 2.0 / (a); theta_2derNorm = theta_2der * G * J / t; theta_3derNorm = theta_3der * G * J / t * a; #endregion #endregion return(new Dictionary <string, object> { { "theta", theta } , { "theta_1der", theta_1der } , { "theta_2der", theta_2der } , { "theta_3der", theta_3der } }); }
public void DGExample5_1ReturnsWarpingStressAtMidspan() { SetAiscDG9Example5_1Parameters(); z = 0.5 * L; TorsionalFunctionFactory tf = new TorsionalFunctionFactory(); ITorsionalFunction function = tf.GetTorsionalFunction(TorsionalFunctionCase.Case3, E, G, J, L, z, T_u, C_w, t, alpha); double theta_2der = function.Get_theta_2(); SectionStressAnalysis st = new SectionStressAnalysis(); double sigma = st.GetNormalStressDueToWarpingOpenSection(E, W_no, theta_2der); double refValue = 28.0; double actualTolerance = EvaluateActualTolerance(sigma, refValue); Assert.LessOrEqual(actualTolerance, tolerance); }
public void TorsionalFunctionCase7ReturnsSecondDerivativeAtSupport() { SetAiscDG9Example5_5Parameters(); z = 0.0 * L; TorsionalFunctionFactory tf = new TorsionalFunctionFactory(); //double a_rev = Math.Sqrt(E * C_w / (G * J)); ITorsionalFunction function = tf.GetTorsionalFunction(TorsionalFunctionCase.Case7, E, G, J, L, z, T_u, C_w, t, alpha); double theta_2der = function.Get_theta_2(); double refValue = 0.46; double ratio = L / a; double GraphValuePredicted = theta_2der * G * J / t * (2.0 * a) / L; double actualTolerance = EvaluateActualTolerance(GraphValuePredicted, refValue); Assert.LessOrEqual(actualTolerance, tolerance); }
public void TorsionalFunctionCase3ReturnsSecondDerivativeAtSupport() { //AISC Design Guide 9 Example 5.1 //Case 3, with alpha = 0.5: SetAiscDG9Example5_1Parameters(); z = 0; TorsionalFunctionFactory tf = new TorsionalFunctionFactory(); ITorsionalFunction function = tf.GetTorsionalFunction(TorsionalFunctionCase.Case3, E, G, J, L, z, T_u, C_w, t, alpha); double theta_2der = function.Get_theta_2(); double refValue = 0; double actualTolerance = EvaluateActualTolerance(theta_2der, refValue); Assert.LessOrEqual(actualTolerance, tolerance); }
public void TorsionalFunctionCase12ReturnsSecondDerivativeAtSupport() { SetAiscDG9Example5_1Parameters(); z = 0.0 * L; TorsionalFunctionFactory tf = new TorsionalFunctionFactory(); T_u = 0.0; t = 5.0; ITorsionalFunction function = tf.GetTorsionalFunction(TorsionalFunctionCase.Case12, E, G, J, L, z, T_u, C_w, t, alpha); double theta_2der = function.Get_theta_2(); double refValue = 0.84; double ratio = L / a; double GraphValuePredicted = theta_2der * G * J / t; double actualTolerance = EvaluateActualTolerance(GraphValuePredicted, refValue); Assert.LessOrEqual(actualTolerance, tolerance); }