Calculate u1, u2, and u3. Check that the numbers are the same as obtained in a)-c). October 14, 2020 Read More »
Make a function test_ode_FE_1()that calls ode_FE to compute three time steps in the problem u = u, u(0) = 1, and compare the three values u1, u2, and u3 with the values obtained in Exercise 8.2. October 14, 2020 Read More »
For the case in b), find through experimentation the largest value of Δt where the exact solution and the numerical solution by Heun’s method cannot be distinguished visually. October 14, 2020 Read More »
Write up the complete model, implement it, and rerun the case from Sect. 8.3.8 with various choices of parameters to illustrate various effects. October 14, 2020 Read More »
Consider the file osc_FE.py implementing the Forward Euler method for the oscillating system model (8.43)–(8.44). October 14, 2020 Read More »
Add a call to osc_energy in the programs osc_FE.py and osc_EC.py and plot the sum of the kinetic and potential energy. October 14, 2020 Read More »
Find an expression for the Nn in terms of Nn−1 and formulate an algorithm for computing Nn, n = 1, 2,…,Nt . October 14, 2020 Read More »
Make plots for comparing the Crank-Nicolson scheme with the Forward and Backward Euler schemes in the same test problem as in Exercise 8.12. October 14, 2020 Read More »
Write the code with a test block, so that it gets easy to either import functions from the module, or to run it as a program. October 14, 2020 Read More »
Implement the scheme in a function adams_bashforth_2 that takes appropriate parameters, so that it is easy to import and use whenever needed. October 14, 2020 Read More »