public static Dictionary <string, object> CrackingMoment(ConcreteFlexureAndAxiaSection ConcreteSection, string FlexuralCompressionFiberLocation = "Top", string Code = "ACI318-14") { //Default values double M_cr = 0; //Calculation logic: FlexuralCompressionFiberPosition p; bool IsValidStringFiber = Enum.TryParse(FlexuralCompressionFiberLocation, true, out p); if (IsValidStringFiber == false) { throw new Exception("Flexural compression fiber location is not recognized. Check input."); } ConcreteSectionFlexure beam = ConcreteSection.FlexuralSection as ConcreteSectionFlexure; M_cr = beam.GetCrackingMoment(p) / 1000.0; // Conversion from ACI318 psi units to ksi units return(new Dictionary <string, object> { { "M_cr", M_cr } }); }
public void CrackingMomentReturnsValue() { ConcreteSectionFlexure beam = GetConcreteBeam(12, 22, 3000, true, new RebarInput(1.8, 2.5), new RebarInput(0.6, 19.5)); double Mcr = beam.GetCrackingMoment(FlexuralCompressionFiberPosition.Top) / 1000.00; //to get to kip*in double refValue = 33.2 * 12; double actualTolerance = EvaluateActualTolerance(Mcr, refValue); Assert.True(actualTolerance <= tolerance); }