There have been a number of strange results that need to be understood. One way to deal with these issues may be to decrease the timesteps when the recalculate depostion rate overshoots the CFL number. The plane is to reexamine a number of factors. These include the following.
Changing the code so that time steps are reevaluated when the recalculated deposition rate exceeds the CFL number.
Reducing the CFL number, we'll try 0.1, 0.05, 0.02 and 0.01
Trying finer grids to see if there is grid convergence for the simulations that actually look sensible.
Running with more sweeps to see if that helps any, try 4, 8, 16.
Look over the stdout of the simulations to check if there is anything important
In [2]:
%load_ext autoreload
%autoreload 2
from tools import getSMTRecords
import numpy as np
from multiViewer import MultiViewer
import pandas as pd
def plotkpvkm(records, kPluses=np.logspace(3, 4, 20), kMinuses=np.logspace(7.6, 8.6, 20), times=np.arange(10) * 4000. / 9.):
getrecord = lambda kPlus, kMinus: getSMTRecords(records=records, parameters={'kPlus' : kPlus, 'kMinus' : kMinus}, rtol=1e-5, atol=1e-3)[0]
records = [[getrecord(kPlus, kMinus) for kMinus in kMinuses] for kPlus in kPluses]
viewer = MultiViewer(records,
rowtitle=lambda r: r'$k^+$={0:1.2e}'.format(r.parameters['kPlus']),
columntitle=lambda r: r'$k^-$={0:1.2e}'.format(r.parameters['kMinus']),
figsize=(1.5, 6))
viewer.plot(times=times)
return smt_ipy_table([j for i in records for j in i], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['kPlus', 'kMinus'])
In [1]:
%load_ext autoreload
%autoreload 2
from tools import getSMTRecords, smt_ipy_table
records = getSMTRecords()
annular25Records = getSMTRecords(records=records, tags=['annular25'])
In [4]:
from tools import getDepositionRates
kPlus = 20.6913808111
kMinus = 10000000.0
plotkpvkm(annular25Records, kPluses=(kPlus,), kMinuses=(kMinus,))
record = getSMTRecords(records=annular25Records, parameters={'kPlus' : kPlus, 'kMinus' : kMinus})[0]
t, d = getDepositionRates(record)
pylab.semilogy(t, d)
smt_ipy_table([record], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['CFL', 'sweeps', 'Nx'])
Out[4]:
In [2]:
from tools import batch_launch
!date
rboundary = 50e-6 / np.sqrt(np.pi)
kPlus = 20.6913808111
kMinus = 10000000.0
reason = "Running simulation with odd voids under different system parameter to check convergence."
for CFL in (0.1, 0.05, 0.02, 0.01):
for sweeps in (4, 8, 16):
for Nx in (100, 200, 400, 800):
batch_launch(reason=reason, tags=['annular34'], kPlus=kPlus, kMinus=kMinus, rboundary=rboundary, Nx=Nx, spacing_ratio=1.2, CFL=CFL, sweeps=sweeps)
!qstat > qstat_annular34.txt
In [1]:
%load_ext autoreload
%autoreload 2
from tools import getSMTRecords, smt_ipy_table
records = getSMTRecords()
annular34Records = getSMTRecords(records=records, tags=['annular34'])
smt_ipy_table(annular34Records, fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['CFL', 'sweeps', 'Nx'])
Out[1]:
In [6]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
CFLs = (0.1, 0.05, 0.02, 0.01, 0.001)
records = [[getRecord(records=annular34Records, CFL=CFL, Nx=Nx, sweeps=4) for Nx in Nxs] for CFL in CFLs]
viewer = MultiViewer(records,
rowtitle=lambda r: r'CFL={0:1.2e}'.format(r.parameters['CFL']),
columntitle=lambda r: r'$N$={0}'.format(r.parameters['Nx']),
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 4000. / 9.)
smt_ipy_table([j for i in records for j in i if j], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['Nx', 'CFL', 'sweeps', 'kPlus', 'kMinus'])
Out[6]:
In [7]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
CFLs = (0.1, 0.05, 0.02, 0.01)
records = [[getRecord(records=annular34Records, CFL=CFL, Nx=Nx, sweeps=8) for Nx in Nxs] for CFL in CFLs]
viewer = MultiViewer(records,
rowtitle=lambda r: r'CFL={0:1.2e}'.format(r.parameters['CFL']),
columntitle=lambda r: r'$N$={0}'.format(r.parameters['Nx']),
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 4000. / 9.)
smt_ipy_table([j for i in records for j in i if j], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['Nx', 'CFL', 'sweeps', 'kPlus', 'kMinus'])
Out[7]:
In [5]:
kPlus = np.logspace(1, 3, 20)[18]
kMinus = np.logspace(7, 8, 10)[6]
record = getSMTRecords(records=annular25Records, parameters={'kPlus' : kPlus, 'kMinus' : kMinus})[0]
plotkpvkm(annular25Records, kPluses=(kPlus,), kMinuses=(kMinus,))
t, d = getDepositionRates(record)
pylab.semilogy(t, d)
smt_ipy_table([record], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['CFL', 'sweeps', 'Nx'])
Out[5]:
In [3]:
from tools import batch_launch
kPlus = np.logspace(1, 3, 20)[18]
kMinus = np.logspace(7, 8, 10)[6]
!date
rboundary = 50e-6 / np.sqrt(np.pi)
reason = "Running simulation that seems to be good under different system parameter to check convergence."
for CFL in (0.1, 0.05, 0.02, 0.01):
for sweeps in (4, 8, 16):
for Nx in (100, 200, 400, 800):
batch_launch(reason=reason, tags=['annular35'], kPlus=kPlus, kMinus=kMinus, rboundary=rboundary, Nx=Nx, spacing_ratio=1.2, CFL=CFL, sweeps=sweeps)
!qstat > qstat_annular35.txt
In [1]:
%load_ext autoreload
%autoreload 2
from tools import getSMTRecords, smt_ipy_table
records = getSMTRecords()
annular35Records = getSMTRecords(records=records, tags=['annular35'])
smt_ipy_table(annular35Records, fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['CFL', 'sweeps', 'Nx'])
Out[1]:
In [4]:
%load_ext autoreload
%autoreload 2
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
CFLs = (0.1, 0.05, 0.02, 0.01, 0.001)
records = [[getRecord(records=annular35Records, CFL=CFL, Nx=Nx, sweeps=4) for Nx in Nxs] for CFL in CFLs]
viewer = MultiViewer(records,
rowtitle=lambda r: r'CFL={0:1.2e}'.format(r.parameters['CFL']),
columntitle=lambda r: r'$N$={0}'.format(r.parameters['Nx']),
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 4000. / 9.)
smt_ipy_table([j for i in records for j in i if j], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['Nx', 'CFL', 'sweeps', 'kPlus', 'kMinus'])
Out[4]:
In [6]:
%load_ext autoreload
%autoreload 2
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
CFLs = (0.1, 0.05, 0.02, 0.01)
records = [[getRecord(records=annular35Records, CFL=CFL, Nx=Nx, sweeps=8) for Nx in Nxs] for CFL in CFLs]
viewer = MultiViewer(records,
rowtitle=lambda r: r'CFL={0:1.2e}'.format(r.parameters['CFL']),
columntitle=lambda r: r'$N$={0}'.format(r.parameters['Nx']),
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 4000. / 9.)
smt_ipy_table([j for i in records for j in i if j], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['Nx', 'CFL', 'sweeps', 'kPlus', 'kMinus'])
Out[6]:
In [7]:
%load_ext autoreload
%autoreload 2
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
CFLs = (0.1, 0.05, 0.02, 0.01)
records = [[getRecord(records=annular35Records, CFL=CFL, Nx=Nx, sweeps=16) for Nx in Nxs] for CFL in CFLs]
viewer = MultiViewer(records,
rowtitle=lambda r: r'CFL={0:1.2e}'.format(r.parameters['CFL']),
columntitle=lambda r: r'$N$={0}'.format(r.parameters['Nx']),
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 4000. / 9.)
smt_ipy_table([j for i in records for j in i if j], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['Nx', 'CFL', 'sweeps', 'kPlus', 'kMinus'])
Out[7]:
In [1]:
%load_ext autoreload
%autoreload 2
from tools import getSMTRecords, smt_ipy_table
records = getSMTRecords()
annular26Records = getSMTRecords(records=records, tags=['annular26'])
In [12]:
from tools import getDepositionRates
kPlus = np.logspace(3, 4, 20)[17]
kMinus = np.logspace(7.6, 8.6, 20)[10]
record = getSMTRecords(records=annular26Records, parameters={'kPlus' : kPlus, 'kMinus' : kMinus})[0]
plotkpvkm(annular26Records, kPluses=(kPlus,), kMinuses=(kMinus,))
t, d = getDepositionRates(record)
pylab.semilogy(t, d)
smt_ipy_table([record], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['CFL', 'sweeps', 'Nx'])
Out[12]:
In [4]:
from tools import batch_launch
kPlus = np.logspace(3, 4, 20)[17]
kMinus = np.logspace(7.6, 8.6, 20)[10]
!date
rboundary = 50e-6 / np.sqrt(np.pi)
reason = "Running strange simulation under different system parameter to check convergence."
for CFL in (0.1, 0.05, 0.02, 0.01):
for sweeps in (4, 8, 16):
for Nx in (100, 200, 400, 800):
batch_launch(reason=reason, tags=['annular36'], kPlus=kPlus, kMinus=kMinus, rboundary=rboundary, Nx=Nx, spacing_ratio=1.2, CFL=CFL, sweeps=sweeps)
!qstat > qstat_annular36.txt
In [1]:
%load_ext autoreload
%autoreload 2
from tools import getSMTRecords, smt_ipy_table
records = getSMTRecords()
annular36Records = getSMTRecords(records=records, tags=['annular36'])
smt_ipy_table(annular36Records, fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['CFL', 'sweeps', 'Nx'])
Out[1]:
In [4]:
%load_ext autoreload
%autoreload 2
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
CFLs = (0.1, 0.05, 0.02, 0.01, 0.001)
records = [[getRecord(records=annular36Records, CFL=CFL, Nx=Nx, sweeps=4) for Nx in Nxs] for CFL in CFLs]
viewer = MultiViewer(records,
rowtitle=lambda r: r'CFL={0:1.2e}'.format(r.parameters['CFL']),
columntitle=lambda r: r'$N$={0}'.format(r.parameters['Nx']),
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 4000. / 9.)
smt_ipy_table([j for i in records for j in i if j], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['Nx', 'CFL', 'sweeps', 'kPlus', 'kMinus'])
Out[4]:
In [5]:
%load_ext autoreload
%autoreload 2
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
CFLs = (0.1, 0.05, 0.02, 0.01)
records = [[getRecord(records=annular36Records, CFL=CFL, Nx=Nx, sweeps=8) for Nx in Nxs] for CFL in CFLs]
viewer = MultiViewer(records,
rowtitle=lambda r: r'CFL={0:1.2e}'.format(r.parameters['CFL']),
columntitle=lambda r: r'$N$={0}'.format(r.parameters['Nx']),
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 4000. / 9.)
smt_ipy_table([j for i in records for j in i if j], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['Nx', 'CFL', 'sweeps', 'kPlus', 'kMinus'])
Out[5]:
In [6]:
%load_ext autoreload
%autoreload 2
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
CFLs = (0.1, 0.05, 0.02, 0.01)
records = [[getRecord(records=annular36Records, CFL=CFL, Nx=Nx, sweeps=16) for Nx in Nxs] for CFL in CFLs]
viewer = MultiViewer(records,
rowtitle=lambda r: r'CFL={0:1.2e}'.format(r.parameters['CFL']),
columntitle=lambda r: r'$N$={0}'.format(r.parameters['Nx']),
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 4000. / 9.)
smt_ipy_table([j for i in records for j in i if j], fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['Nx', 'CFL', 'sweeps', 'kPlus', 'kMinus'])
Out[6]: