Untitled
unknown
plain_text
3 years ago
3.1 kB
9
Indexable
clc;
choices = 'Fluid-II Report Selection:\n\n[1] Half Body [Uniform + Source]\n[2] Uniform + Free Vortex\n[3] Source + Free Vortex\n[4] Sink + Free Vortex\n[5] Near Together Doubt [Sink + Source]\n[6] Flow Over Cylinder\n[7] Flow Over Rotating Cylinder\n\n [#Input]>> ';
inputChoice = input(choices);
if (inputChoice == 1)
a=25;
[axis_x , axis_y] = meshgrid( -40 : 0.1 : 40 , -40 : 0.1 : 40 );
SLIP = axis_y + a / ( 2 * 3.14 ) * atan( axis_y ./ axis_x );
contour( axis_x , axis_y , SLIP , 'k' , 'ShowText' , "ON" , 'TextStep' , 2 , "LevelStep" , 5/2, 'color' , [1 0 0] );
title( 'HALF-BODY UNIFORM SOURCE' );
elseif (inputChoice == 2)
a = 25;
[axis_x , axis_y] = meshgrid( -40 : 0.1 : 40 , -40 : 0.1 : 40 );
rangeAxis = ( axis_x.^2 + axis_y.^2 );
SILP = axis_y - ( a / ( 2 * 3.14 ) ) * log( sqrt( rangeAxis ) );
contour( axis_x , axis_y , SILP , 'k' , 'ShowText' , "ON" , 'TextStep' , 2 , "LevelStep" , 3 , 'color' , [0 0.5 1] );
title( 'UNIFORM FREE-VORTEX' );
elseif (inputChoice == 3)
a = 25;
[axis_x , axis_y] = meshgrid( -40 : 0.09 : 40 , -40 : 0.09 : 40 );
rangeAxis = ( axis_x.^2 + axis_y.^2 );
SILP = a / ( 2 * 3.14 ) * atan( axis_y ./ axis_x ) - ( a / ( 2 * 3.14 ) ) * log( sqrt( rangeAxis ) );
contour( axis_x , axis_y , SILP , 'k' , 'ShowText' , "ON" , 'TextStep' , 2 , "LevelStep" , 5 / 2 ,'color' , [1 0 0] );
title( 'SOURCE FREE-VORTEX' );
elseif (inputChoice == 4)
a = -25;
MCAP = 100;
[axis_x , axis_y] = meshgrid( -40 : 0.1 : 40 , -40 : 0.1 : 40 );
rangeAxis = ( axis_x.^2 + axis_y.^2 );
SILP = a / ( 2 * 3.14 ) * atan( axis_y ./ axis_x ) - ( MCAP / ( 2*3.14 ) ) * log( sqrt( rangeAxis ) );
contour( axis_x , axis_y , SILP , 'k' , 'ShowText' , "ON" , 'TextStep' , 2 , "LevelStep" , 5 / 2 , 'color' , [1 0 0] );
title( 'SINK FREE-VORTEX' );
elseif (inputChoice == 5)
[axis_x , axis_y] = meshgrid( -40 : 40 , -40 : 40 );
rangeAxis = ( axis_x.^2 + axis_y.^2 );
SILP = -250 * axis_y ./ rangeAxis;
contour( axis_x , axis_y , SILP , 'k' , 'ShowText' , "ON" , 'TextStep' , 2 , 'LevelStep' , 5/2 , 'color' , [0 0 0] );
title( 'NEVER TOGETHER DOUBLE SINK SOURCE' );
elseif (inputChoice == 6)
K=1000;
[axis_x , axis_y] = meshgrid( -40 : 40 , -40 : 40 );
rangeAxis = ( axis_x.^2 + axis_y.^2 );
SLIP = 4*axis_y - K*axis_y ./ ( rangeAxis );
contour( axis_x , axis_y , SLIP , 'k' , 'ShowText' , "ON" , 'TextStep' , 30 , 'LevelStep' , 10 , 'color' , [0 0 1] );
title( 'FLOW OVER CYLINDER' );
elseif (inputChoice == 7)
K=100;
MCAP=500;
[axis_x , axis_y] = meshgrid( -30 : 30 , -30 : 30 );
rangeAxis = ( axis_x.^2 + axis_y.^2 );
SLIP = 4 * axis_y - K*axis_y ./ ( rangeAxis ) - ( MCAP/( 2*3.14 ) ) * log( sqrt( rangeAxis ) );
contour( axis_x , axis_y , SLIP , 'k' , 'ShowText' , "ON" , 'TextStep' , 30 , 'LevelStep' , 10 , 'color' , [0 0.5 1] );
title( 'FLOW OVER ROTATING CYLINDER' );
else
disp("[!] Couldnt find this option please try again..!");
endEditor is loading...