using System; using L=Science.Physics.GeneralPhysics; namespace ScienceTest.PhysicsTest.GeneralPhysicsTest { /// /// BernoulliEquation /// public class FluidTest { public FluidTest() { } private string result; public string Result { get{return result;} } public void Compute() { L.Density rho = new L.Density(); rho.kgPERmCUBE = 1000.0; L.Fluid water = new L.Fluid(rho); L.Pressure P0 = new L.Pressure(); P0.Pa = 1.013E5; L.Pressure P1 = new L.Pressure(); P1.Pa = 1.2E5; L.Velocity v0 = new L.Velocity(); v0.XVariableQ = true; L.Velocity v1 = new L.Velocity(); L.Length y0 = new L.Length(); y0.m = 1.0; L.Length y1 = new L.Length(); y1.m = 10.0; water.SolveBernoulliEquation(v0,y0,P0,v1,y1,P1); result += "v="+v0.ToString()+"\r\n"; result += Convert.ToString( Math.Sqrt(2.0*(P1.Pa-P0.Pa)/rho.kgPERmCUBE + 2.0*L.Constant.AccelerationOfGravity*(y1.m-y0.m))); } } } /* v=14.6219013811474 +/- 0 i +0 +/- 0 j +0 +/- 0 k (m/s) 14.6219013811474 */