@@ -12,7 +12,8 @@ How close is your approximation to the exact solution $x=3$ when your initial gu
_Write your answer here._
Really close.
Really close. 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**
...
...
@@ -20,6 +21,8 @@ Include a figure of your solution for dt=0.25 s (task 2.3).
_Your figure here._
_See the plot, task 2.3, of the analysis solution notebook._
See notebook.
**Question 3**
...
...
@@ -42,13 +45,98 @@ Add an image of the stencils and the algebraic expression of the differential eq
_Insert image here._
The algebraic expression and stencil using Forward Difference in time and Central Difference in space:
Add an image (or Latex equation) of your matrices $AT=b$ for both solution methods. Describe the differences in a few short sentences.
_Your answer here._
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.
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 plainly implemented. No iteration is required in the implicit scheme because the dependence on time and space is linear, a.k.a., the power of the unknowns is 1.
**Question 6**
...
...
@@ -56,7 +144,7 @@ Add an image of the results corresponding to Task 3.8 at t=1500 sec and at t=100
_Insert image here._
See notebook.
See figure in the analysis solution notebook. 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**
...
...
@@ -68,34 +156,21 @@ _Write your answer here_
The dx could have been interpreted as dx=0.3/15=0.02m or dx=0.3/14=0.0214..m. If the former was used, the stability limit was at 50-51 seconds and for dx/2 it was about 13 seconds. If the later was used, the stability limit was 58-59 seconds and for dx/2 it was about 15 seconds. 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 $\nu \Delta t / \Delta x^2$ was printed, then a value of about 0.5 should have been found for both cases, if $\nu$ was not included, then a value about 127000 should have been found.
The following contains Robert's text.
probably between 20 and 200 time steps (with original values of t0 and t_end)
stability threshold for diffusion should be nu*\Delta t/\Delta x^2 = 0.5 (but we forgot the nu in the equation above, so students will report different ratios)
a good answer would have been:
- find a bad dt
- change dx
- find another bad dt
- find that the ratio dt/dx^2 is about the same for both cases
- (we point out in solution that if you *nu it is around 0.5)
Isabel: grade based on the good answer and we will adjust.
**Question 8**
For the implicit scheme, try to find a $\Delta t$ 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 $\Delta t$, 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_
Explicit methods are not better than Implicit ones and viceversa. The former is easier to schematize and to program but it normally requires smaller time steps to retain its stability and a reasonable solution. The latter is more complex for non-linear problems but gives the flexibility of using larger time steps. However, under some cases, the iteration method may not converge neither posing also a limit to the usable time step.
Explicit methods are not better than Implicit ones and viceversa, they both have advantages and disadvantages. The former is easier to schematize and to program but it normally requires smaller time steps to retain its stability and a reasonable solution. The latter is more complex for non-linear problems but gives the flexibility of using larger time steps. However, under some cases, the iteration method may not converge neither posing also a limit to the usable time step.