Better closing of app

This commit is contained in:
deckensteuerung
2018-08-22 19:43:16 +02:00
parent 51e8263dbd
commit 3f34d88bbc
2 changed files with 24 additions and 10 deletions

View File

@ -17,10 +17,10 @@ kx, ky = np.meshgrid(np.fft.fftfreq(Nx,Lx/(Nx*2.0*np.pi)), np.fft.fftfreq(Ny,Ly/
ksq = kx*kx + ky*ky
c = 0.0+(np.random.random((Ny,Nx))-0.5)*0.1
#eps=0.3
#delta=0.0
eps = 0.1
delta = 1.0
eps=0.3
delta=0.0
#eps = 0.1
#delta = 1.0
t = 0.0
dt = 0.01
@ -49,6 +49,8 @@ while True:
i+= 1
ck=Eu*(ck+dt*(delta*np.fft.fft2(np.fft.ifft2(ck)**2)-np.fft.fft2(np.fft.ifft2(ck)**3)))
c=np.fft.ifft2(ck)
eps = 0.1+0.2*np.cos(i/10000)
delta = np.sin(i/10000)
if(i % plotEveryNth == 0):
myc = c.real
myc = (myc-np.min(myc))/(np.max(myc)-np.min(myc))