summaryrefslogtreecommitdiff
path: root/494/CH2/EX2.1
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /494/CH2/EX2.1
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '494/CH2/EX2.1')
-rwxr-xr-x494/CH2/EX2.1/2_1.sce28
1 files changed, 28 insertions, 0 deletions
diff --git a/494/CH2/EX2.1/2_1.sce b/494/CH2/EX2.1/2_1.sce
new file mode 100755
index 000000000..d1c52ef64
--- /dev/null
+++ b/494/CH2/EX2.1/2_1.sce
@@ -0,0 +1,28 @@
+//All the quantities are in SI units
+v_inf = 240; //freestream velocity
+l = 1; //wavelength of the wall
+h = 0.01; //amplitude of the wall
+M_inf = 0.7; //freestream mach number
+b = sqrt(1-(M_inf^2));
+x = l/4;
+y = l;
+
+function temp = u(x,y)
+temp = v_inf*(1 + (h/b*2*%pi/l*cos(2*%pi*x/l)*exp(-2*%pi*b*y/l)));
+endfunction
+
+function temp = v(x,y)
+temp = -v_inf*h*2*%pi/l*sin(2*%pi*x/l)*exp(-2*%pi*b*y/l);
+endfunction
+
+d = 1e-10;
+
+du = derivative(u,x,d);
+
+dv = derivative(v,y,d);
+
+grad_V = du + dv;
+
+test = (b-(1/b))*v_inf*h*((2*%pi/l)^2)*exp(-2*%pi*b);
+
+printf("\nRESULT\n-------\nThe time rate of change of the volume of the fluid element per unit volume is: %1.4f s-1\n", grad_V) \ No newline at end of file