The simulations below test using only a first order distance function calculation and reinitialization frequency based on number of cells traversed. The first order distance function calculation is probably more stable and I have notices issues with the second order distance function calculation is past work. The second order scheme can sometimes be non-deterministic, see this small test case in FiPy. This could be causing some voiding issues. The next cell shows the diffs in the code that were made for all the simulations in this notebook.
The simulations are for three values of $k+$ and $k-$ and differing values of CFL (represented by CFL
) and level set update frequency (based on cells traversed) (represented by $f$ in the figures). $f$ changes by row and $N$ changes by column.
After running the simulations is seems that the annular44
simulations are not getting any voids in at all unlike in the previous notebook where voids were seen for the CFL=0.001 case for the "Simulation that worked quite well". This is good and means that I think we can trust the results. We need to confirm this with the larger grid sizes, but these results should be available tomorrow.
Just noticed a heinous bug. It won't affect these simulations because the CFL were all divisible into any integer, but it could have been nasty. This
if (step % (levelset_update_ncell / CFL) == 0):
should have been
if (step % int(levelset_update_ncell / CFL) == 0):
This will be fixed in the next commit.
In [1]:
!git diff ae3dbb3388c4..345958513b87
In [4]:
from tools import batch_launch
!date
rboundary = 50e-6 / np.sqrt(np.pi)
kPlus = 20.6913808111
kMinus = 10000000.0
reason = "Running simulation with only order 1 level set updates"
for CFL in (0.1, 0.01, 0.001):
for levelset_update_ncell in (5, 15, 45):
for Nx in (100, 200, 400, 800):
batch_launch(reason=reason, tags=['annular43'], kPlus=kPlus, kMinus=kMinus, rboundary=rboundary, Nx=Nx, spacing_ratio=1.2, CFL=CFL, levelset_update_ncell=levelset_update_ncell)
!qstat > qstat_annular43.txt
In [5]:
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 with only order 1 level set updates"
for CFL in (0.1, 0.01, 0.001):
for levelset_update_ncell in (5, 15, 45):
for Nx in (100, 200, 400, 800):
batch_launch(reason=reason, tags=['annular44'], kPlus=kPlus, kMinus=kMinus, rboundary=rboundary, Nx=Nx, spacing_ratio=1.2, CFL=CFL, levelset_update_ncell=levelset_update_ncell)
!qstat > qstat_annular44.txt
In [6]:
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 simulation with only order 1 level set updates"
for CFL in (0.1, 0.01, 0.001):
for levelset_update_ncell in (5, 15, 45):
for Nx in (100, 200, 400, 800):
batch_launch(reason=reason, tags=['annular45'], kPlus=kPlus, kMinus=kMinus, rboundary=rboundary, Nx=Nx, spacing_ratio=1.2, CFL=CFL, levelset_update_ncell=levelset_update_ncell)
!qstat > qstat_annular45.txt
In [1]:
%load_ext autoreload
%autoreload 2
from tools import getSMTRecords, smt_ipy_table
records = getSMTRecords()
annular43Records = getSMTRecords(records=records, tags=['annular43'])
In [2]:
smt_ipy_table(annular43Records, fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['CFL', 'levelset_update_ncell', 'Nx'])
Out[2]:
In [3]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
ls_ncells = (2, 5, 15, 45)
records = [[getRecord(records=annular43Records, CFL=0.1, Nx=Nx, levelset_update_ncell=ls_ncell) for Nx in Nxs] for ls_ncell in ls_ncells]
def columntitle(r):
if r:
Nx = r.parameters['Nx']
else:
Nx = 400
return r'$N$={0}'.format(Nx)
viewer = MultiViewer(records,
rowtitle=lambda r: r'f={0}'.format(r.parameters['levelset_update_ncell']),
columntitle=columntitle,
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 3000. / 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', 'levelset_update_ncell', 'kPlus', 'kMinus'])
Out[3]:
In [7]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
ls_ncells = (2, 5, 15, 45)
records = [[getRecord(records=annular43Records, CFL=0.01, Nx=Nx, levelset_update_ncell=ls_ncell) for Nx in Nxs] for ls_ncell in ls_ncells]
def columntitle(r):
if r:
Nx = r.parameters['Nx']
else:
Nx = 400
return r'$N$={0}'.format(Nx)
viewer = MultiViewer(records,
rowtitle=lambda r: r'f={0}'.format(r.parameters['levelset_update_ncell']),
columntitle=columntitle,
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 3000. / 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', 'levelset_update_ncell', 'kPlus', 'kMinus'])
Out[7]:
In [8]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
ls_ncells = (2, 5, 15, 45)
records = [[getRecord(records=annular43Records, CFL=0.001, Nx=Nx, levelset_update_ncell=ls_ncell) for Nx in Nxs] for ls_ncell in ls_ncells]
def columntitle(r):
if r:
Nx = r.parameters['Nx']
else:
Nx = 200
return r'$N$={0}'.format(Nx)
viewer = MultiViewer(records,
rowtitle=lambda r: r'f={0}'.format(r.parameters['levelset_update_ncell']),
columntitle=columntitle,
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 3000. / 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', 'levelset_update_ncell', 'kPlus', 'kMinus'])
Out[8]:
In [1]:
%load_ext autoreload
%autoreload 2
from tools import getSMTRecords, smt_ipy_table
records = getSMTRecords()
annular44Records = getSMTRecords(records=records, tags=['annular44'])
In [2]:
smt_ipy_table(annular44Records, fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['CFL', 'levelset_update_ncell', 'Nx'])
Out[2]:
In [5]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400, 800)
ls_ncells = (2, 5, 15, 45)
def columntitle(r):
if r:
Nx = r.parameters['Nx']
else:
Nx = 800
return r'$N$={0}'.format(Nx)
records = [[getRecord(records=annular44Records, CFL=0.1, Nx=Nx, levelset_update_ncell=ls_ncell) for Nx in Nxs] for ls_ncell in ls_ncells]
viewer = MultiViewer(records,
rowtitle=lambda r: r'f={0}'.format(r.parameters['levelset_update_ncell']),
columntitle=columntitle,
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 3000. / 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', 'levelset_update_ncell', 'kPlus', 'kMinus'])
Out[5]:
In [6]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
ls_ncells = (2, 5, 15, 45)
def columntitle(r):
if r:
Nx = r.parameters['Nx']
else:
Nx = 400
return r'$N$={0}'.format(Nx)
records = [[getRecord(records=annular44Records, CFL=0.01, Nx=Nx, levelset_update_ncell=ls_ncell) for Nx in Nxs] for ls_ncell in ls_ncells]
viewer = MultiViewer(records,
rowtitle=lambda r: r'f={0}'.format(r.parameters['levelset_update_ncell']),
columntitle=columntitle,
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 3000. / 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', 'levelset_update_ncell', 'kPlus', 'kMinus'])
Out[6]:
In [8]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400)
ls_ncells = (2, 5, 15, 45)
def columntitle(r):
if r:
Nx = r.parameters['Nx']
else:
Nx = 400
return r'$N$={0}'.format(Nx)
records = [[getRecord(records=annular44Records, CFL=0.001, Nx=Nx, levelset_update_ncell=ls_ncell) for Nx in Nxs] for ls_ncell in ls_ncells]
viewer = MultiViewer(records,
rowtitle=lambda r: r'f={0}'.format(r.parameters['levelset_update_ncell']),
columntitle=columntitle,
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 3000. / 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', 'levelset_update_ncell', 'kPlus', 'kMinus'])
Out[8]:
In [1]:
%load_ext autoreload
%autoreload 2
from tools import getSMTRecords, smt_ipy_table
records = getSMTRecords()
annular45Records = getSMTRecords(records=records, tags=['annular45'])
In [2]:
smt_ipy_table(annular45Records, fields=['label', 'timestamp', 'parameters', 'duration', 'version', 'tags'], parameters=['CFL', 'levelset_update_ncell', 'Nx'])
Out[2]:
In [3]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400, 800)
ls_ncells = (2, 5, 15, 45)
def columntitle(r):
if r:
Nx = r.parameters['Nx']
else:
Nx = 800
return r'f={0}'.format(Nx)
records = [[getRecord(records=annular45Records, CFL=0.1, Nx=Nx, levelset_update_ncell=ls_ncell) for Nx in Nxs] for ls_ncell in ls_ncells]
viewer = MultiViewer(records,
rowtitle=lambda r: r'f={0}'.format(r.parameters['levelset_update_ncell']),
columntitle=columntitle,
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 3000. / 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', 'levelset_update_ncell', 'kPlus', 'kMinus'])
Out[3]:
In [4]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200, 400, 800)
ls_ncells = (2, 5, 15, 45)
def columntitle(r):
if r:
Nx = r.parameters['Nx']
else:
Nx = 800
return r'f={0}'.format(Nx)
records = [[getRecord(records=annular45Records, CFL=0.01, Nx=Nx, levelset_update_ncell=ls_ncell) for Nx in Nxs] for ls_ncell in ls_ncells]
viewer = MultiViewer(records,
rowtitle=lambda r: r'f={0}'.format(r.parameters['levelset_update_ncell']),
columntitle=columntitle,
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 3000. / 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', 'levelset_update_ncell', 'kPlus', 'kMinus'])
Out[4]:
In [5]:
from multiViewer import MultiViewer
from tools import getRecord
Nxs = (100, 200)
ls_ncells = (2, 5, 15, 45)
records = [[getRecord(records=annular45Records, CFL=0.001, Nx=Nx, levelset_update_ncell=ls_ncell) for Nx in Nxs] for ls_ncell in ls_ncells]
def columntitle(r):
if r:
Nx = r.parameters['Nx']
else:
Nx = 200
return r'$N$={0}'.format(Nx)
viewer = MultiViewer(records,
rowtitle=lambda r: r'f={0}'.format(r.parameters['levelset_update_ncell']),
columntitle=columntitle,
figsize=(1.5, 6))
viewer.plot(times=np.arange(10) * 3000. / 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', 'levelset_update_ncell', 'kPlus', 'kMinus'])
Out[5]:
In [5]:
from tools import batch_launch
!date
rboundary = 50e-6 / np.sqrt(np.pi)
kPlus = 20.6913808111
kMinus = 10000000.0
reason = "Running simulation with only order 1 level set updates"
for CFL in (0.1, 0.01, 0.001):
for levelset_update_ncell in (2,):
for Nx in (100, 200, 400, 800):
batch_launch(reason=reason, tags=['annular43'], kPlus=kPlus, kMinus=kMinus, rboundary=rboundary, Nx=Nx, spacing_ratio=1.2, CFL=CFL, levelset_update_ncell=levelset_update_ncell)
In [6]:
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 with only order 1 level set updates"
for CFL in (0.1, 0.01, 0.001):
for levelset_update_ncell in (2,):
for Nx in (100, 200, 400, 800):
batch_launch(reason=reason, tags=['annular44'], kPlus=kPlus, kMinus=kMinus, rboundary=rboundary, Nx=Nx, spacing_ratio=1.2, CFL=CFL, levelset_update_ncell=levelset_update_ncell)
In [7]:
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 simulation with only order 1 level set updates"
for CFL in (0.1, 0.01, 0.001):
for levelset_update_ncell in (2,):
for Nx in (100, 200, 400, 800):
batch_launch(reason=reason, tags=['annular45'], kPlus=kPlus, kMinus=kMinus, rboundary=rboundary, Nx=Nx, spacing_ratio=1.2, CFL=CFL, levelset_update_ncell=levelset_update_ncell)
In [ ]: