From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 629/CH4/EX4.2/example4_2.sce | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 629/CH4/EX4.2/example4_2.sce (limited to '629/CH4/EX4.2/example4_2.sce') diff --git a/629/CH4/EX4.2/example4_2.sce b/629/CH4/EX4.2/example4_2.sce new file mode 100644 index 000000000..d53b32650 --- /dev/null +++ b/629/CH4/EX4.2/example4_2.sce @@ -0,0 +1,12 @@ +clear +clc +//Example 4.2 APPLICATION OF EULER’S EQUATION TO ACCELERATION OF A FLUID +g=9.81; //[m/s^2] +az=100; //acceleration in z direction [m/s^2] +rho=10^3; //[kg/m^3] +//Integrating, d(p+g*rho*z)/dz=-rho*az +//(p2+rho*g*z2)-(p1+rho*g*z1)=-rho*az*(z2-z1) +delz=0.1; //delz=z2-z1,[m] +p2=0; +p1=(p2+rho*(g+az)*delz)/10^3 //[kPa] +printf("\nThe gage pressure on the piston, p = %.1f kPa, gage.\n",p1) \ No newline at end of file -- cgit