diff options
Diffstat (limited to '689/CH2/EX2.7/7.sce')
-rw-r--r-- | 689/CH2/EX2.7/7.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/689/CH2/EX2.7/7.sce b/689/CH2/EX2.7/7.sce new file mode 100644 index 000000000..6f2bbe803 --- /dev/null +++ b/689/CH2/EX2.7/7.sce @@ -0,0 +1,21 @@ +//Example 2.7 Uniform Flow Plus a Source
+
+// Initialisation of variables
+U = 100;
+m = 600;
+P0 = 2116.2;
+rho = 0.002378;
+function[z] = shi(x,y)
+ z = -U*y + (m/(2*%pi)*atan(y/x));
+endfunction
+
+// Calculations
+h = 0.000001;
+u = (shi(h,1.5+h)-shi(h,1.5))/h ; // Partial derivative is ts taken in just the neighbourhood of 0 as if we take absolute zero then there will be a divide by zero error.
+v = -(shi(2*h,1.5)-shi(h,1.5))/h ;
+Velo = sqrt(u^2+v^2);
+P = P0 - (rho/2)*(Velo^2-U^2);
+
+//Results
+disp(P,"Pressure at P(0, 1.5) (lb/sq-ft)");
+
|