Question: What is the timestep value ? And how do I go about altering from downstream to upstream? The following code solves the advection equation 1

What is the timestep value ? And how do I go about altering from downstream to upstream?
The following code solves the advection equation 1 2 3 4 5

The following code solves the advection equation 1 2 3 4 5 6 7 8 9- 10 - 11 12 - 13 - 14 - 15 - 16 - 17 18 19 20 21 22 - 23 24 - 25 - 26 27 28 - 29 30 - 31 - 32 33 - 34 - 35 - %set up the domain N = 200; x = linspace(-10,10,N); dx = x (2)-x(1); %advection velocity c C = 0.7; %temporal parameters t = 0; dt = 0.2; timestep= 0; initial condition f = @(x) exp(-5*x.^2); y = f(x)'; figure(1), plot (x, y) title(['Current time = ', num2str(t)]) drawnow +c = 0) with c= 0.7 on -10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!