private StandardHookInTension CreateHookObject(double ConcStrength, double RebarDiameter, bool IsEpoxyCoated, ConcreteTypeByWeight typeByWeight, double ExcessFlexureReinforcementRatio) { MockRepository mocks = new MockRepository(); IRebarMaterial rebarMat = mocks.Stub <IRebarMaterial>(); Expect.Call(rebarMat.YieldStress).Return(60000); Rebar rebar = new Rebar(RebarDiameter, IsEpoxyCoated, rebarMat); ICalcLogEntry entryStub = mocks.Stub <ICalcLogEntry>(); ICalcLog logStub = mocks.Stub <ICalcLog>(); //IConcreteMaterial ConcStub = mocks.Stub<IConcreteMaterial>(); IConcreteMaterial ConcStub = new ConcreteMaterial(ConcStrength, typeByWeight, logStub) as IConcreteMaterial; ConcStub.SpecifiedCompressiveStrength = ConcStrength; ConcStub.TypeByWeight = typeByWeight; using (mocks.Record()) { logStub.CreateNewEntry(); LastCall.Return(entryStub); } StandardHookInTension tensHook = new StandardHookInTension(ConcStub, rebar, logStub, ExcessFlexureReinforcementRatio); return(tensHook); }
public void GetDevelopmentLength_PCAExample_10000psiN3bar_ReturnsValue() { double ConcStrength = 10000; double RebarDiam = 0.375; StandardHookInTension stdHook = CreateHookObject(ConcStrength, RebarDiam); double ldh = Math.Round(stdHook.GetDevelopmentLength(), 0); Assert.AreEqual(6.0, ldh); }
public void GetDevelopmentLength_PCAExample_3000psiN18bar_ReturnsValue() { double ConcStrength = 3000; double RebarDiam = 2.257; StandardHookInTension stdHook = CreateHookObject(ConcStrength, RebarDiam); double ldh = Math.Round(stdHook.GetDevelopmentLength(), 0); Assert.AreEqual(49.0, ldh); //PCA is 49.5 }
public void GetDevelopmentLength_PCAExample_4000psiN6bar_ReturnsValue() { double ConcStrength = 4000; double RebarDiam = 0.75; StandardHookInTension stdHook = CreateHookObject(ConcStrength, RebarDiam); double ldh = Math.Round(stdHook.GetDevelopmentLength(), 1); Assert.Equal(14.2, ldh); }
private StandardHookInTension CreateHookObject(double ConcStrength, double RebarDiameter, bool IsEpoxyCoated, ConcreteTypeByWeight typeByWeight, double ExcessFlexureReinforcementRatio) { IRebarMaterial rebarMat = new RebarMaterialGeneral(60000); Rebar rebar = new Rebar(RebarDiameter, IsEpoxyCoated, rebarMat); IConcreteMaterial ConcStub = new ConcreteMaterial(ConcStrength, typeByWeight, null) as IConcreteMaterial; ConcStub.SpecifiedCompressiveStrength = ConcStrength; ConcStub.TypeByWeight = typeByWeight; StandardHookInTension tensHook = new StandardHookInTension(ConcStub, rebar, null, ExcessFlexureReinforcementRatio); return(tensHook); }
public static Dictionary <string, object> StandardHookTensionDevelopmentLengthBasic(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b, RebarMaterial RebarMaterial, double ExcessRebarRatio = 1.0, string RebarCoatingType = "Uncoated", string Code = "ACI318-14") { //Default values double l_dh = 0; //Calculation logic: IRebarMaterial mat = RebarMaterial.Material; bool IsEpoxyCoated = true; if (RebarCoatingType.ToLower() == "uncoated") { IsEpoxyCoated = false; } else if (RebarCoatingType.ToLower() == "epoxycoated") { IsEpoxyCoated = true; } else { throw new Exception("Unrecognized rebar coating string."); } Rebar rebar = new Rebar(d_b, IsEpoxyCoated, mat); CalcLog log = new CalcLog(); StandardHookInTension hook = new StandardHookInTension(ConcreteMaterial.Concrete, rebar, log, ExcessRebarRatio); l_dh = hook.GetDevelopmentLength(); return(new Dictionary <string, object> { { "l_dh", l_dh } }); }
public static Dictionary <string, object> StandardHookTensionDevelopmentLengthDetailed(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b, RebarMaterial RebarMaterial, string HookType = "Degree90", string RebarCoatingType = "Uncoated", double ExcessRebarRatio = 1.0, double c_side = 1.5, double c_extension = 1.5, string EnclosingRebarDirection = "Parallel", double s_enclosing = 12, string Code = "ACI318-14") { //Default values double l_dh = 0; //Calculation logic: IRebarMaterial mat = RebarMaterial.Material; bool IsEpoxyCoated = true; if (RebarCoatingType.ToLower() == "uncoated") { IsEpoxyCoated = false; } else if (RebarCoatingType.ToLower() == "epoxycoated") { IsEpoxyCoated = true; } else { throw new Exception("Unrecognized rebar coating string."); } Rebar rebar = new Rebar(d_b, IsEpoxyCoated, mat); CalcLog log = new CalcLog(); StandardHookInTension hook = new StandardHookInTension(ConcreteMaterial.Concrete, rebar, log, ExcessRebarRatio); HookType _HookType; bool IsValidHookTypeString = Enum.TryParse(HookType, true, out _HookType); if (IsValidHookTypeString == false) { throw new Exception("Failed to convert string. Check HookType string. Please check input"); } bool enclosingRebarIsPerpendicular = false; if (EnclosingRebarDirection.ToLower() == "perpendicular") { enclosingRebarIsPerpendicular = true; } else if (EnclosingRebarDirection.ToLower() == "parallel") { enclosingRebarIsPerpendicular = false; } else { throw new Exception("Failed to convert string. Check EnclosingRebarDirection string. Please check input"); } l_dh = hook.GetDevelopmentLength(_HookType, c_side, c_extension, enclosingRebarIsPerpendicular, s_enclosing); return(new Dictionary <string, object> { { "l_dh", l_dh } }); }