Challenge

Week 5.2 - Literature review: ODE Stability

                                  Literature review: ODE Stability

stable solution:-

If the solution of the given problem is smooth and the solution converges to an original solution then that solution is called a stable solution.

unstable solution:-

If the solution of the given problem is not smooth & containing a lot of blows and the solution divergence to an original solution then that solution is called an unstable solution.

import math 
import matplotlib.pyplot as plt


def f(t,y):
	return -1000*y-math.exp(-t)

t_start = 0
t_end = 0.1
print("t start = ",t_start,"t end = ",t_end)
print("Number of time steps     dt")
A = [25,50,75,100,125,150]
fig = 1
for n in A:
	dt = (t_end-t_start)/(n-1)
	print("    ",n, "             ", dt)
	t = 0
	y_old = 0
	y_new = []
	y_analytical = []

	for i in range(0,n):
		y_new.append(y_old+dt*f(t,y_old))
		y_old = y_new[i]
		t = t + dt
	# title = 
	plt.figure(fig)
	plt.plot(y_new)
	plt.title("dt = "+str(dt))
	fig = fig + 1

plt.show()

  • When does an ODE become unstable? As we decrease the number of time steps leads to an increase in Delta t value, resulting in the solution become blow off.

from the plots, we can understand that at higher values of deltat the solution becomes unstable. 

strictly speaking, the solution is blowing up (or) becomes unstable when a number of time steps <=101 where dt >= 0.001.

  • Reasons why our solution becomes unstable:-

The solution becomes unstable when there is an error in it.

while doing discretization for a given equation we approximate the solution to a particular order by ignoring the values above that order this error is called truncation error. 

in some cases this truncation error grows continuously with exponential order this leads to introduce blow-offs in the solution especially in an explicit condition

  • How does stability affect engineering simulations?

 A stable solution is a good sign to proceed further into the project. 

 Solution mainly associated with the truncation or residual error in the solution. it grows continuously in exponential order to cause blow-offs in the solution.

Sharp blow-offs are the indication of an unstable solution.

It will take a lot of time to run a perfect engineering simulation sometimes it will run for hours, days, months, years depending on the complexity of the problem that we are solving. for some cases, we don't get a stable solution, and for some cases, the simulation runs forever.  stability always depends on time step size and mesh size.

if we get a stable engineering solution it does not mean that it is perfect for implementation we have to run for multiple cases to compare all possible stable solutions.

stability is inversely proportional to the error, the more the error lesser the stability.

A stable engineering simulation can be replicated for prototyping to do practical(experimental) tests and results are compared. if results are matching to the maximum extent then  the real-time model will be fabricated

  • Can stability conditions be derived for all types of problems?

Derivation of stability conditions is not required for all types of problems. While solving time marching solutions we use Explicit, Implicit solvers.

For Explicit cases, if we use inappropriate step sizes of time and grid the solution blows up and the solution is no more stable. So, Explicit solvers need stability conditions to get stable solutions.  

For Implicit cases, we don't require any stability condition because the implicit solver is unconditionally stable irrespective of step sizes. 

 
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.