Question: Problem 2 : Run the entrance flow program of Appendix F for Re = 0 . 1 , 3 . 0 , and 3 5
Problem :
Run the entrance flow program of Appendix F for Re and Refer to presented
results in the lecture, generate:
a Plots for the stream function.
b Plots for velocity profiles at x
c Plots for velocity versus xh for the centerline and stagnation line.
d Plots the vorticity lines from the wall to the centerline.
Here is the Program in MATLAB:
MATLAB PROGRAM Rb
program to compute entrance flow
vorti jj given by Stokes Flow
set input data
n;
in;
iin;
jjn;
al;
re;
epsie;
evorte;
allocate memory for vortnycord
vortn zerosiijj;
ycord zerosjj;
compute dx beta and f
dxalii;
betaaljjii;
betabeta;
betaplusbeta;
dtbetadxbetaplusredx;
ecospidoubleiibetacospidoublejjbetaplus;
etae;
fsqrtetaeta;
set initial conditions and boundary values
initial conditions
u onesiijj;
v zerosiijj;
vort zerosiijj;
psi repmat:jjiijj;
boundary conditions on plate
ui:iijj;
vi:iijj;
psii:iijj;
vorti:iijj;
boundary conditions at outlet
y :jj:;
vii:;
uii:y;
psiii:yy;
vortii:y;
solve for vorticity at interior points
iswtrue;
while isw
iswfalse;
for i:ii
for j:jj
delsqvortijvortijbetavortij
vortijbetaplusvortij;
if uij
conuuijvortijuijvortij;
else
conuuijvortijuijvortij;
end
if vij
convvijvortijvijvortij;
else
convvijvortijvijvortij;
end
dvortdtdxconubetaconvredxdelsq;
vortnijvortijdvort;
if dvort evort
iswtrue;
end
end
end
update vorticity matrix
vort:end:endvortn:end:end;
solve for stream function
iswtrue;
while isw
iswfalse;
for i:ii
for j:jj
dstrpsiijpsiijbetapsiij
betapsiijbetapluspsiijvortijdx;
psiijpsiijfbetaplusdstr;
if dstr epsi
iswtrue;
end
end
end
end
calculate u and v velocities at interior points
u:ii:jjpsi:ii:jjpsi:ii:jjbetadx;
v:ii:jjpsi:ii:jjpsi:ii:jjdx;
calculate centerline and stagnation streamline
values of u
u:iipsi:iibetadx;
u:ijjpsi:ijjbetadx;
calculate vorticities on the walls
for ii:ii
vortempvortijj;
vortijjpsiijjbetadx;
dvortvortijjvortemp;
ifdvort evort
iswtrue;
end
end
vortijjvortijjpsiijjdxbeta;
end
omegavort
stmpsi
xminialii;
xmaxaliiiii;
x xmin:alii:xmax
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
