using System; namespace Science.Physics.GeneralPhysics { /// /// Power is given by differentiation of work dW/dt. /// Unit of power is Watt, W = J/sec /// public class Power : Scalar { private void SetDim() { this.DimensionMass = 1; this.DimensionLength = 2; this.DimensionTime = -3; } public Power() { SetDim(); } public Power(Work work, Time time) { SetDim(); this.W = work.J/time.s; } public Power(Force f, Velocity v) { SetDim(); Scalar s = f * v; this.W = s.Magnitude; } public double W { get{return this.Magnitude;} set{this.Magnitude = value;} } public override string ToString() { return base.ToString() + "(W)"; } } }