public static Dictionary <string, object> CrackedMomentOfInertia(ConcreteFlexureAndAxiaSection ConcreteSection, string FlexuralCompressionFiberLocation = "Top", string Code = "ACI318-14") { //Default values double I_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; I_cr = beam.GetCrackedMomentOfInertia(p); return(new Dictionary <string, object> { { "I_cr", I_cr } }); }
public void CrackedMomentOfInertiaReturnsValue() { ConcreteSectionFlexure beam = GetConcreteBeam(12, 22, 3000, true, new RebarInput(1.8, 2.5), new RebarInput(0.6, 19.5)); double Icr = beam.GetCrackedMomentOfInertia(FlexuralCompressionFiberPosition.Top); double refValue = 3770.0; double actualTolerance = EvaluateActualTolerance(Icr, refValue); Assert.True(actualTolerance <= tolerance); }