CEGM1000 MUDE: Week 1.6, Friday, Oct 11, 2024.
Question 1
How close is your approximation to the exact solution when your initial guess is 0.01? Explain why it takes more iterations to converge when you use this value instead of a value much farther away than the solution.
Write your answer here.
The solution found is 3.000000000008298 it took 11 iterations to converge.
When the initial guess is close to 0, the slope will also be close to 0, and the first "improved" guess is 450.005, very far from the solution! Then, the slope at that point is more reasonable and approaches rapidly the solution.
Question 2
Include a figure of your solution for s (task 2.3).
Your figure here.
Question 3
By trial and error, find the dt limit of stability for the explicit scheme.
Note that an unstable condition is one that increases/decreases unbounded; an inaccurate solution that has not converged close to the "true" value is not necessarily an unstable condition.
Sate the stability limit here.
The stability limit seemed to be between 0.35s and 0.4s when looking at the beginning of the plot.
However, the error remains bounded. So, under the strict definition of stability given above, there does not seem to be a limit if we extend the plot to include larger values of time in the x axis. The fact that the function is nonlinear, dependent on harmonic functions, makes it quite complicated to confidently state a limit.
Note also that the implicit scheme also has issues when the time step becomes too big. This is due to the Newton-Raphson scheme not converging; it is not a stability issue. In this case, the solution does not converge starting with dt=0.35s. The solution is unconditionally stable, but it is stopped at the very beginning.
Here are some images where and for the explicit scheme:
Question 4
Add an image of the stencils and the algebraic expression of the differential equations for both solution methods: central difference in space with forward and backward difference in time.
Insert image here.
Stencils:
The algebraic expression and stencil using Forward Difference in time and Central Difference in space:
The algebraic expression and stencil of Backward Difference in time and Central Difference in space:
and rewritten for convenience, unknowns from one side and knowns from the other:
Question 5
Add an image (or Latex equation) of your matrices for both solution methods. Describe the differences in a few short sentences.
Your answer here.
CDS-FDT:
CDS-BDT:
The A matrix is an identity matrix for the CDS-FDT case. The b vector is elaborated where the boundaries are implemented intrinsically. In the latter case, CDS-BDT, the matrix A is tridiagonal and the boundaries in the b vector are explicitly implemented. No iteration is required in the implicit scheme because the dependence on time is linear, a.k.a., the power of the unknowns is 1.
Question 6
Add an image of the results corresponding to Task 3.8 at t=1500 sec and at t=10000 sec.
Insert image here.
At t=1500 sec a parabola connecting the Dirichlet BC are observed with a minimum value around x=0.15m. At t=10000 sec an almost straight line connecting the Dirichlet BC are observed, the steady state solution is almost reached around this moment.
Question 7
From your results of task 3.4 you can observe a dependency on the parameter . Vary until you find the stability limit of the Explicit scheme (also print the parameter ). What is its value? Now, define by half (0.01 instead of 0.02) and vary until you find its stability limit and print the parameter . Are the values similar? What is the implication for the computational time?
Your answer should include a couple sentences as an explanation, as well as the values of at the limit of stability and the computation time for each approach (see last task of WS 1.6 solution for an example of tracking computation time in Python).
Write your answer here
The computational time increases a lot since not only the grid contains more points when refining dx but also dt has to be reduced by a factor 3 (for this case). If the parameter was printed, then a value of about 0.5 should have been found for both cases, if was not included, then a value about 127000 should have been found.
Question 8
For the implicit scheme, try to find a value for which the solution is not reasonable. State your result and explain.
Write your answer here
There does not seem to be a limitation of , it can be quite large, even 1000 and it does reach the stable state. Its limitation would be related to the desired accuracy of the solution, as it still has an error related to the time step. However, as this was not a constraint, results are reasonable for absurdly large time steps.
Question 9
Considering the non-linear ODE and the PDE results, would you say that Implicit methods are always better than Explicit methods? State "yes" or "no" and provide a brief explanation (2-3 sentences).
Insert image here
No.
Explicit methods are not better than Implicit ones and viceversa.
Last Question: How did things go? (Optional)
Use this space to let us know if you ran into any challenges while working on this GA, and if you have any feedback to report.
End of file.
© Copyright 2024 MUDE, TU Delft. This work is licensed under a CC BY 4.0 License.