- Parent Category: Mathematics Assignments' Solutions
We Helped With This Differential Equations Homework: Have A Similar One?
Short Assignment Requirements
Write a matlab code to solve the Lnear advection euqation. Question #1 only.
Finally, we'll be writing a CFD code!
We are solving the linear advection equation:
using a scheme which is first order in space and time:
u (xoto + At)
u (xo, to) - u (xo - Ax, to)
u (xo, to + At) - u (xo, to)
u (xo, to) -
For all cases, c = 1/2.
Our computational domain for this problem is:
Ax = 1
(u (xo, to) - u (xo - Ax, to)) (2)
The initial condition is:
u (x,0) = 1
This equation requires a boundary condition at x = 0, which is:
1. (60/100): For time steps of
u (0, t) = 0.25 +
This value should be used at the x = 0 grid point. All other points should
be computed using Eqn (2).
At the outflow, no boundary condition is needed; just use the code to
compute the flow. Again, you'll be specifying the value of u at the first grid
point (x=0) and computing the other 600.
Hint from the Professor: Please note that this is a marching method, and
computational memory is not infinite. A properly written code does not have
to store u for all space and time (601 space points x 14400 time levels), but
only at two (at most) time levels (601 space points x 2 time levels) - but
one time level is easily possible.
Another hint from the Professor: You'll want to debug your code using
the smallest time step...
0.25 cos (
+0.25 cos (Tot
0.0625,0.125, 0.25, 0.3, 0.4, 0.5, 0.6, 0.75, 0.8, 1.0, 1.2, 1.25, 1.5, 1.8, 2.0, 3.0, 4.0
compute the flow solution at t = 900. Plot the solutions as a function
tn=to + Dt
Dt * No, it = 900 harmonic
2. (20/100): Describe the differences (if any) in the solutions. Illustrate
your description with graphs of the solutions. Compare the results as
necessary to illustrate what's happening in the solutions as the time
step is changed.