public static Dictionary <string, object> StraightBarTensionLapSpliceLengthBasic(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b1, double d_b2, RebarMaterial RebarMaterial, string RebarSpliceClass = "B", string RebarCoatingType = "Uncoated", string RebarCastingPosition = "Top", double ExcessRebarRatio = 1.0, bool MeetsRebarSpacingAndEdgeDistance = true, bool HasMinimumTransverseReinforcement = false, string Code = "ACI318-14") { //Default values double l_st = 0; //Calculation logic: IRebarMaterial mat = RebarMaterial.Material; bool IsEpoxyCoated = false; switch (RebarCoatingType) { case "Uncoated": IsEpoxyCoated = false; break; case "EpoxyCoated": IsEpoxyCoated = true; break; default: throw new Exception("Unrecognized rebar coating. Please check string input"); } Rebar rebar1 = new Rebar(d_b1, IsEpoxyCoated, mat); Rebar rebar2 = new Rebar(d_b2, IsEpoxyCoated, mat); bool IsTopRebar = false; switch (RebarCastingPosition) { case "Other": IsTopRebar = false; break; case "Top": IsTopRebar = true; break; default: throw new Exception("Unrecognized rebar casting position. Please check string input"); } TensionLapSpliceClass _RebarSpliceClass; bool IsValidRebarSpliceClass = Enum.TryParse(RebarSpliceClass, true, out _RebarSpliceClass); if (IsValidRebarSpliceClass == false) { throw new Exception("Failed to convert string. RebarSpliceClass not recognzed (A and B are acceptable inputs). Please check input"); } CalcLog log = new CalcLog(); TensionLapSplice d = new TensionLapSplice(ConcreteMaterial.Concrete, rebar1, rebar2, MeetsRebarSpacingAndEdgeDistance, HasMinimumTransverseReinforcement, IsTopRebar, _RebarSpliceClass, log); l_st = d.Length; return(new Dictionary <string, object> { { "l_st", l_st } }); }
public static Dictionary <string, object> StraightBarTensionLapSpliceLengthDetailed(Concrete.ACI318.General.Concrete.ConcreteMaterial ConcreteMaterial, double d_b1, double d_b2, RebarMaterial RebarMaterial, string RebarSpliceClass = "B", string RebarCoatingType = "Uncoated", string RebarCastingPosition = "Top", double s_clear = 3, double c_c = 1.5, double A_tr = 0.44, double s_tr = 12, double n = 5, string Code = "ACI318-14") { //Default values double l_st = 0; //Calculation logic: IRebarMaterial mat = RebarMaterial.Material; bool IsEpoxyCoated = false; switch (RebarCoatingType) { case "Uncoated": IsEpoxyCoated = false; break; case "EpoxyCoated": IsEpoxyCoated = true; break; default: throw new Exception("Unrecognized rebar coating. Please check string input"); break; } Rebar rebar1 = new Rebar(d_b1, IsEpoxyCoated, mat); Rebar rebar2 = new Rebar(d_b2, IsEpoxyCoated, mat); bool IsTopRebar = false; switch (RebarCastingPosition) { case "Other": IsTopRebar = false; break; case "Top": IsTopRebar = true; break; default: throw new Exception("Unrecognized rebar casting position. Please check string input"); break; } TensionLapSpliceClass _RebarSpliceClass; bool IsValidRebarSpliceClass = Enum.TryParse(RebarSpliceClass, true, out _RebarSpliceClass); if (IsValidRebarSpliceClass == false) { throw new Exception("Failed to convert string. RebarSpliceClass not recognzed (A and B are acceptable inputs). Please check input"); } CalcLog log = new CalcLog(); TensionLapSplice ls = new TensionLapSplice(ConcreteMaterial.Concrete, rebar1, rebar2, s_clear, c_c, IsTopRebar, A_tr, s_tr, n, _RebarSpliceClass, log); l_st = ls.Length; return(new Dictionary <string, object> { { "l_st", l_st } }); }