コード例 #1
0
ファイル: SimpleBeamAnalysis.cs プロジェクト: lulzzz/Nucleus
 /// <summary>
 /// Calculate the maximum bending moment (about the major axis).
 /// Requires UDL and Length.
 /// </summary>
 /// <returns></returns>
 public double MaxMoment(ICalculationLog log = null)
 {
     // M = wl²/8
     log?.Symbol("Moment").Write(" = ").Symbol("UDL").Symbol("Span").Superscript("2").WriteLine("/8");
     return(UDL * Span.Squared() / 8);
 }
コード例 #2
0
ファイル: SimpleBeamAnalysis.cs プロジェクト: lulzzz/Nucleus
 /// <summary>
 /// Calculate the bending moment at a position along the beam.
 /// Requires UDL and Length.
 /// </summary>
 /// <param name="x">The position along the beam, as a distance from
 /// the start (in m).</param>
 /// <returns></returns>
 public double MomentAt(double x, ICalculationLog log = null)
 {
     // Mx = (wx/2)(l - x)
     log?.Write("(").Symbol("UDL").Symbol("x").Write("/2)(").Symbol("Span").Write("-").Symbol("x").WriteLine(")");
     return((UDL * x / 2) * (Span - x));
 }
コード例 #3
0
 /// <summary>
 /// Calculate value of K
 /// </summary>
 /// <param name="M">The design moments, in Nm</param>
 /// <param name="b">The bredth of section, in m</param>
 /// <param name="d">The depth of section, in m</param>
 /// <param name="fck">The cylinder strength of the concrete, in MPa</param>
 /// <returns></returns>
 public static double CalculateK(double M, double b, double d, double fck, ICalculationLog log = null)
 {
     // K = M/(bd²fck)
     log.Write("{K} = {M}/({b}{d}²{fck}");
     return(M / (b * d * d * fck));
 }