matlab question will you help me

User Generated

nnnnooo1

Engineering

Description

matlab question will you help me

please check attachment.

i need correct solution

Unformatted Attachment Preview

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

attached is my complete answer

The MATLAB code for all parts (a) – (d) is provided below:
Re = 1e2;
diff_t = 1e-2;
tf = 4e-0;
lx = 1;
ly = 1;
num_x = 90;
num_y = 90;
nsteps = 10;
num_t = ceil(tf/diff_t);
d_t = tf/num_t;
x = linspace(0,lx,num_x +1);
h_x = lx/num_x;
y = linspace(0,ly,num_y+1);
h_y = ly/num_y;
[X,Y] = meshgrid(y,x);
U = zeros(num_x-1, num_y); V = zeros(num_x, num_y-1);
Nu = x*0+1; Nv = avg(x)*0;
Su = x*0; Sv = avg(x)*0;
Wu = avg(y)*0; vW = y*0;
Eu = avg(y)*0; vE = y*0;
Ubc = diff_t/Re*([2*uS(2:end-1)’ zeros(num_x-1,ny-2) 2*uN(2:end1)’]/h_x^2+...
[Wu;zeros(num_x-3,num_y);uE]/h_y^2);
Vbc = dif...


Anonymous
Just the thing I needed, saved me a lot of time.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags