#Sales Offer!| Get upto 25% Off:

a)The Crank-Nicolson method for ODEs is very popular when combined with diffusion equations. For a linear ODE u = au it reads un+1 − un Δt = 1 2 (aun + aun+1) . Apply the Crank-Nicolson method in time to the ODE system for a onedimensional diffusion equation. Identify the linear system to be solved.

b) The Backward Euler, Forward Euler, and Crank-Nicolson methods can be given a unified implementation. For a linear ODE u = au this formulation is known as the θ rule: un+1 − un Δt = (1 − θ )aun + θaun+1 . For θ = 0 we recover the Forward Euler method, θ = 1 gives the Backward Euler scheme, and θ = 1/2 corresponds to the Crank-Nicolson method. The approximation error in the θ rule is proportional to Δt, except for θ = 1/2 where it is proportional to Δt2. For θ ≥ 1/2 the method is stable for all Δt. Apply the θ rule to the ODE system for a one-dimensional diffusion equation. Identify the linear system to be solved.

c) Implement the θ rule with aid of the Odespy package. The relevant object name is ThetaRule:

d) Consider the physical application from Sect. 9.2.4. Run this case with the θ rule and θ = 1/2 for the following values of Δt: 0.001, 0.01, 0.05. Report what you see.

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!