Skip to content
Snippets Groups Projects
Commit 3b90e2ab authored by mehtank's avatar mehtank
Browse files

eigenvalue of big A matrix vs max magnitude

parent adf2aa8f
Branches
No related merge requests found
from matplotlib import pyplot as plt
from numpy import arange, zeros, linspace, sign
from numpy import arange, zeros, linspace, sign, logspace, log10
from idmlin import IDMLin
t = 1.5
amin, amax, acount = 0.1, 0.6, 50
bmin, bmax, bcount = 2, 4, 100
amin, amax, acount = log10(0.3), log10(3), 20
bmin, bmax, bcount = log10(1), log10(4), 20
arng = linspace(amin, amax, acount)
brng = linspace(bmin, bmax, bcount)
arng = logspace(amin, amax, acount)
brng = logspace(bmin, bmax, bcount)
s0 = 2
v0 = 30
re = 0.5
re = 0.1
ns = (10, 25, 50)
ns = (200,)
f, axarr = plt.subplots(2, len(ns)+1, sharex=True, sharey=True)
#f, axarr = plt.subplots(2, 2, sharex=True, sharey=True)
......@@ -29,10 +29,13 @@ for i, n in enumerate(ns):
def isstable(a, b):
idm = IDMLin(t=t, a=a, b=b, s0=s0)
idm.go(v0, re)
if idm.isloopstable(n):
return 1, sign(idm.os())
else:
return 0, sign(idm.os())
sys = idm.sys()
ils = idm.isloopstable(n)
imr = idm.maxresponse()
print a, b, ils, imr
return 1 if ils else 0, imr
#return 1 if ils else 0, 1 if imr<0 else 0
for ai, a in enumerate(arng):
for bi, b in enumerate(brng):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment