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); }
internal double GetRequiredShearStress() { double frv = 0.0; double F2 = Math.Abs(this.FindMaximumForce(ForceType.F2, true).F2); double F3 = Math.Abs(this.FindMaximumForce(ForceType.F3, true).F3); double V = Math.Max(F2, F3); double A = this.Area; if (A != 0.0) { frv = V / A; ICalcLogEntry ent = Log.CreateNewEntry(); ent.ValueName = v.frv; ent.AddDependencyValue(v.Ab, A); ent.AddDependencyValue(v.Vb, V); ent.DescriptionReference = d.frv; ent.FormulaID = f.frv; ent.VariableValue = frv.ToString(); AddToLog(ent); } else { throw new Exception("Bolt load information not available"); } return(frv); }
public void AddToLog(ICalcLogEntry LogEntry) { if (LogModeActive == true) { log.AddEntry(LogEntry); } }
private double GetLambda() { double lambda; ICalcLogEntry ent = Log.CreateNewEntry(); if (this.TypeByWeight == ConcreteTypeByWeight.Normalweight) { lambda = 1.0; } else { double fct = AverageSplittingTensileStrength; if (fct > 0.0) { double sqrt_fc = this.Sqrt_f_c_prime; lambda = fct / (6.7 * sqrt_fc); } else { lambda = lightWeightType == TypeOfLightweightConcrete.SandLightweightConcrete ? 0.85 : 0.75; } } if (LogModeActive == true) { AddToLog(ent); } ent.VariableValue = lambda.ToString(); return(lambda); }
private double GetWarmRoofCs(double slope, data.SnowRoofSurfaceType surface, ICalcLogEntry CsEntry) { double Cs = 1.0; if (surface == data.SnowRoofSurfaceType.Slippery) { if (slope <= 5.0) { Cs = 1.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmSlippery.docx"; } else { if (slope > 70) { Cs = 0.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmSlippery.docx"; } else { Cs = 1.0 - (slope - 5.0) / 65.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmSlipperyInterp.docx"; } } } else { if (slope <= 30.0) { Cs = 1.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmNonSlippery.docx"; } else { if (slope > 70) { Cs = 0.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmNonSlippery.docx"; } else { Cs = 1.0 - (slope - 30.0) / 40.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmSlipperyInterp.docx"; } } } return Cs; }
private double GetWarmRoofCs(double slope, data.SnowRoofSurfaceType surface, ICalcLogEntry CsEntry) { double Cs = 1.0; if (surface == data.SnowRoofSurfaceType.Slippery) { if (slope <= 5.0) { Cs = 1.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmSlippery.docx"; } else { if (slope > 70) { Cs = 0.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmSlippery.docx"; } else { Cs = 1.0 - (slope - 5.0) / 65.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmSlipperyInterp.docx"; } } } else { if (slope <= 30.0) { Cs = 1.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmNonSlippery.docx"; } else { if (slope > 70) { Cs = 0.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmNonSlippery.docx"; } else { Cs = 1.0 - (slope - 30.0) / 40.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorWarmSlipperyInterp.docx"; } } } return(Cs); }
internal double CheckMaximumAvailableTensileStrength(double F_pp_nt) { double Fnt = NominalTensileStress; if (F_pp_nt > Fnt) { ICalcLogEntry ent = Log.CreateNewEntry(); ent.ValueName = v.F_pp_nt; ent.AddDependencyValue(v.Fnt, Fnt); ent.DescriptionReference = d.F_pp_nt; ent.FormulaID = f.F_pp_ntMax; ent.VariableValue = F_pp_nt.ToString(); AddToLog(ent); return(Fnt); } return(F_pp_nt); }
internal double GetSlipCoefficient() { ICalcLogEntry ent = Log.CreateNewEntry(); ent.ValueName = v.mu; ent.Reference = "AISC Section J3-8"; ent.FormulaID = f.mu; double mu = 0.3; switch (FayingSurface) { case BoltFayingSurfaceClass.ClassA: ent.DescriptionReference = d.mu.ClassA; return(0.3); case BoltFayingSurfaceClass.ClassB: ent.DescriptionReference = d.mu.ClassB; return(0.5); } ent.VariableValue = mu.ToString(); AddToLog(ent); return(mu); }
public double GetSlipResistanceReductionFactor(double T_u) { double ksc = 0.0; //Get tension per bolt double Du = pretensionMultiplier; double phiR_n = this.GetAvailableTensileStrength(); if (T_u > phiR_n) { throw new Exception("Bolt factored force exceeeds capacity. Reduced slip strength cannot be calculated."); } ICalcLogEntry ent = Log.CreateNewEntry(); ent.ValueName = v.ksc; ent.DescriptionReference = d.ksc; if (T_b == 0.0) { throw new Exception("Bolt pretension cannot be zero"); } if (Du == 0.0) { throw new Exception("Multiplier that reflects the ratio of the mean installed bolt pretension to the specified minimum bolt pretension cannot be zero"); } ksc = 1.0 - T_u / (Du * T_b); ent.AddDependencyValue(v.Tu, T_u); ent.Reference = "AISC Formula J3-5a"; ent.FormulaID = f.J3_5.LRFD; ent.VariableValue = ksc.ToString(); AddToLog(ent); return(ksc); }
private DevelopmentTension CreateDevelopmentObject(double ConcStrength, double RebarDiameter, bool IsEpoxyCoated, ConcreteTypeByWeight typeByWeight, TypeOfLightweightConcrete lightWeightType, double AverageSplitStrength, double ClearSpacing, double ClearCover, bool IsTopRebar, double ExcessRebarRatio, bool checkMinLength) { MockRepository mocks = new MockRepository(); IRebarMaterial rebarMat = mocks.Stub <IRebarMaterial>(); Expect.Call(rebarMat.YieldStress).Return(60000); //IRebarMaterial rebarMat = new MaterialAstmA706() as IRebarMaterial; ICalcLogEntry entryStub = mocks.Stub <ICalcLogEntry>(); //entryStub.DependencyValues = new Dictionary<string, double>(); ICalcLog logStub = mocks.Stub <ICalcLog>(); //IConcreteMaterial ConcStub = mocks.Stub<IConcreteMaterial>(); IConcreteMaterial ConcStub = new ConcreteMaterial(ConcStrength, typeByWeight, lightWeightType, logStub) as IConcreteMaterial; ConcStub.SpecifiedCompressiveStrength = ConcStrength; ConcStub.TypeByWeight = typeByWeight; ConcStub.AverageSplittingTensileStrength = AverageSplitStrength; using (mocks.Record()) { logStub.CreateNewEntry(); LastCall.Return(entryStub); } DevelopmentTension tensDev = new DevelopmentTension(ConcStub, new Rebar(RebarDiameter, IsEpoxyCoated, rebarMat), ClearSpacing, ClearCover, IsTopRebar, ExcessRebarRatio, checkMinLength, logStub); return(tensDev); }
public void AddEntry(ICalcLogEntry Entry) { entries.Add(Entry); }
public double GetAvailableTensileStrength(double V) { double F_pp_nt = 0.0; double Fnt = NominalTensileStress; double Fnv = NominalShearStress; //double frv = GetRequiredShearStress(); double Ab = Area; double frv = V / Ab; double R = 0.0; // check if interaction needs to be investigated: double f_available; f_available = 0.75 * Fnv; if (f_available * 0.3 > frv) { //interation need not be investigated return(0.75 * Fnt * Ab); } // interaction ICalcLogEntry ent = Log.CreateNewEntry(); ent.ValueName = v.F_pp_nt; ent.AddDependencyValue(v.Fnt, Fnt); ent.DescriptionReference = d.F_pp_nt; AddToLog(ent); ent.Reference = "AISC Formula J3-3a"; ent.FormulaID = f.J3_3.a; F_pp_nt = 1.3 * Fnt - Fnt / (0.75 * Fnv) * frv; F_pp_nt = CheckMaximumAvailableTensileStrength(F_pp_nt); ent.VariableValue = F_pp_nt.ToString(); ICalcLogEntry ent2 = Log.CreateNewEntry(); ent2.AddDependencyValue(v.F_pp_nt, F_pp_nt); ent2.AddDependencyValue(v.Ab, Ab); ent2.Reference = "AISC Formula J3-2"; ent2.DescriptionReference = d.phiRn.AvailableTensileStrengthForCombinedLoad; ent2.FormulaID = f.J3_2.LRFD; R = 0.75 * F_pp_nt * Ab; ent2.ValueName = v.R; ent2.VariableValue = R.ToString(); AddToLog(ent2); return(R); }
private double GetIntermediateColdRoofCs(double slope, data.SnowRoofSurfaceType surface, ICalcLogEntry CsEntry) { double Cs = 1.0; if (surface == data.SnowRoofSurfaceType.Slippery) { if (slope <= 10.0) { Cs = 1.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdSlippery.docx"; } else { if (slope > 70) { Cs = 0.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdSlippery.docx"; } else { Cs = 1.0 - (slope - 10.0) / 60.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdSlipperyInterp.docx"; } } } else { if (slope <= 37.5) { Cs = 1.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdNonSlippery.docx"; } else { if (slope > 70) { Cs = 0.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdNonSlippery.docx"; } else { Cs = 1.0 - (slope - 37.5) / 32.5; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdNonSlipperyInterp.docx"; } } } return(Cs); }
private double GetIntermediateColdRoofCs(double slope, data.SnowRoofSurfaceType surface, ICalcLogEntry CsEntry) { double Cs = 1.0; if (surface == data.SnowRoofSurfaceType.Slippery) { if (slope <= 10.0) { Cs = 1.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdSlippery.docx"; } else { if (slope > 70) { Cs = 0.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdSlippery.docx"; } else { Cs = 1.0 - (slope - 10.0) / 60.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdSlipperyInterp.docx"; } } } else { if (slope <= 37.5) { Cs = 1.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdNonSlippery.docx"; } else { if (slope > 70) { Cs = 0.0; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdNonSlippery.docx"; } else { Cs = 1.0 - (slope - 37.5) / 32.5; CsEntry.DescriptionReference = "/Templates/Loads/ASCE7_10/Snow/SnowSlopeFactorIntermediateColdNonSlipperyInterp.docx"; } } } return Cs; }