using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter12 { /// /// Example04: The Leaning Ladder /// A uniform ladder of length l rests against /// a smooth, verticalwall (Fig.12.11a). If the mass of /// the ladder is m and the coefficient of static friction /// between the ladder and the ground is ¥ì_s = 0.40, find /// the minimum angle \theta_{min} at which the ladder does not slip. /// 51^{\circle} /// public class Example04 { public Example04() { } private string result; public string Result { get{return result;} } public void Compute() { L.Mass m = new L.Mass(); m.kg = 20.0; L.Length l = new L.Length(); l.m = 12.0; double mu = 0.4; double g = L.Constant.AccelerationOfGravity; L.Force[] f = new L.Force[4]; L.Position[] r = new L.Position[4]; f[0] = new L.Force(); // n f[0].Y = m.kg*g; f[1] = new L.Force(); // f f[1].X = mu*m.kg*g; f[2] = new L.Force(); // P f[2].X = -mu*m.kg*g; f[3] = new L.Force(); // mg f[3].Y = -m.kg*g; r[0] = new L.Position(); r[1] = new L.Position(); r[2] = new L.Position(); r[2].XVariableQ = true; r[2].YVariableQ = true; r[3] = new L.Position(); r[3].XVariableQ = true; r[3].YVariableQ = true; L.RigidBody ladder = new L.RigidBody(); L.RigidBody.ConstraintFunctionToBeZero[] cf = new L.RigidBody.ConstraintFunctionToBeZero[3]; cf[0] = new L.RigidBody.ConstraintFunctionToBeZero(P); cf[1] = new L.RigidBody.ConstraintFunctionToBeZero(Mg); cf[2] = new L.RigidBody.ConstraintFunctionToBeZero(Ang); ladder.Constraint(cf); ladder.SolveStaticEquilibrium(r,f); result+=r[2].ToString()+"\r\n"; result+=Convert.ToString(Math.Atan(r[2].Y/Math.Abs(r[2].X))/Math.PI*180.0)+"\r\n"; } private double P(L.Position[] r, L.Force[] f) { return Math.Sqrt(r[2].X*r[2].X+r[2].Y*r[2].Y)-12.0; } private double Mg(L.Position[] r, L.Force[] f) { return Math.Sqrt(r[3].X*r[3].X+r[3].Y*r[3].Y)-6.0; } private double Ang(L.Position[] r, L.Force[] f) { return r[2].X*r[3].Y - r[3].X*r[2].Y; } } } /* -7.49634057028016 +/- 0 i +9.37042571348621 +/- 0 j +0 +/- 0 k (m) 51.3401917478069 */