The extreme fill 1D model has been extended to 2D. Although, the 1D model uses transient terms for all the equations, the electrode/electrolyte interface is held in a stationary position. This idealized system helps explain the most puzzling aspect of extreme fill, the initial formation of the "on" and "off" states of deposition (see previous blog post. While the 1D model captures the most important qualitative aspect of extreme fill, it is not particularly accurate for making fill/fail predictions. The 2D extreme fill model aims to improve the accuracy by using the level set method to model the moving interface in similar way to the old 2D superfill models, but now uses the new level set implementation recently introduced into FiPy. The extreme fill 2D model is hosted at Github.
This is a just a note on integrating the IPython notebook into the Jekyll blog. The blog post by David Ketcheson includes a script to automate the IPython to Jekyll transition. The script has been modified for my own needs (see the script on Github). There are a number of issues that aren't yet ironed out such as embedding Sumatra markdown tables rather than HTML and including hover text with Sumatra labels for figures.
As a demonstration of the model, a movie has been made from the following Sumatra record. This also demonstrates embedding a Sumatra table in IPython.
In [2]:
from smtext import getSMTRecords, smt_ipy_table
records = getSMTRecords(tags=['serialnumber18'],parameters={'Nx' : 600})
smt_ipy_table(records, fields=['label', 'timestamp', 'parameters', 'repository', 'version'], parameters=['Nx'])
Out[2]:
In [3]:
from multiViewer import MultiViewer
from smtext import getSMTRecords, smt_ipy_table
records = getSMTRecords(tags=['CFL', 'production'])
records = [getSMTRecords(records=records, parameters={'CFL' : CFL})[0] for CFL in (0.01, 0.02, 0.04, 0.08, 0.16, 0.32, 0.64)]
title = [r'CFL={0:1.2f}'.format(r.parameters['CFL']) for r in records[1:]]
viewer = MultiViewer(records[1:], baseRecords=records[0], title=title, figsize=(12, 9))
viewer.plot(times=(0., 1000., 2000., 3000., 4000.))
smt_ipy_table(records, fields=['label', 'timestamp', 'parameters', 'repository', 'version', 'duration'], parameters=['CFL'])
Out[3]:
The figures show a comparison between Nx=1200 (the red curves) and Nx=150, 300, 600. Nx is the total number of cells from the bottom to the top of the domain including the length of the feature and the boundary layer. The results do not demonstrate any clear grid convergence at present and further results with finer grids are required. These runs are all in serial at present. Some changes are required to the level set implementation in FiPy to run in parallel to allow comparison with finer grids.
In [4]:
from multiViewer import MultiViewer
from smtext import getSMTRecords, smt_ipy_table
records = getSMTRecords(tags=['batch2'])
records = [getSMTRecords(records=records, parameters={'Nx' : Nx})[0] for Nx in (1200, 600, 300, 150)]
title = [r'Nx={0:d}'.format(r.parameters['Nx']) for r in records[1:]]
viewer = MultiViewer(records[1:], baseRecords=records[0], title=title, figsize=(6, 9))
viewer.plot(times=(0., 1000., 2000., 3000., 4000.))
smt_ipy_table(records, fields=['label', 'timestamp', 'parameters', 'repository', 'version', 'duration'], parameters=['Nx'])
Out[4]:
In [5]:
from multiViewer import MultiViewer
from smtext import getSMTRecords, smt_ipy_table
records = getSMTRecords(tags=['serialnumber4'])
records = [getSMTRecords(records=records, parameters={'sweeps' : sweeps})[0] for sweeps in (32, 16, 8, 4, 2, 1)]
title = [r'sweeps={0:d}'.format(r.parameters['sweeps']) for r in records[1:]]
viewer = MultiViewer(records[1:], baseRecords=records[0], title=title, figsize=(10, 9))
viewer.plot(times=(0., 1000., 2000., 3000., 4000.))
smt_ipy_table(records, fields=['label', 'timestamp', 'parameters', 'repository', 'version', 'duration'], parameters=['sweeps'])
Out[5]:
In [6]:
from multiViewer import MultiViewer
from smtext import getSMTRecords, smt_ipy_table
records = getSMTRecords(tags=['serialnumber7'])
records = [getSMTRecords(records=records, parameters={'solver_tol' : solver_tol})[0] for solver_tol in (1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1)]
title = [r'tol={0:1.1e}'.format(r.parameters['solver_tol']) for r in records[1:]]
viewer = MultiViewer(records[1:], baseRecords=records[0], title=title, figsize=(12, 9))
viewer.plot(times=(0., 1000., 2000., 3000., 4000.))
smt_ipy_table(records, fields=['label', 'timestamp', 'parameters', 'repository', 'version', 'duration'], parameters=['solver_tol'])
Out[6]:
Using the images above, the control parameters will be adjusted from
sweeps = 30
solver_tol = 1e-6
CFL = 0.1
tol = 1e-1
to
sweeps = 4
solver_tol = 1e-10
CFL = 0.1
tol = 1e-10
Using these new parameters, simulations have been run with Nx=150, 300, 600 and compared with the old parameters. Simulations with the new parameters are more efficient without sacrificing accuracy.
In [7]:
from multiViewer import MultiViewer
from smtext import getSMTRecords, smt_ipy_table
Nxs = (600, 300)
records = getSMTRecords(tags=['serialnumber8'])
records = [getSMTRecords(records=records, parameters={'Nx' : Nx})[0] for Nx in Nxs]
baseRecords = getSMTRecords(tags=['batch2'])
baseRecords = [getSMTRecords(records=baseRecords, parameters={'Nx' : Nx})[0] for Nx in Nxs]
title = [r'Nx={0:d}'.format(r.parameters['Nx']) for r in records]
viewer = MultiViewer(records, baseRecords=baseRecords, title=title, figsize=(4, 9))
viewer.plot(times=(0., 1000., 2000., 3000., 4000.))
smt_ipy_table(records + baseRecords, fields=['label', 'timestamp', 'parameters', 'repository', 'version', 'duration'], parameters=['Nx'])
Out[7]:
In [8]:
from IPython.core.display import HTML
HTML('<iframe src=http://129.6.153.60:8000/extremefill/tag=serialnumber7/ width=800 height=600></iframe>')
Out[8]:
In [ ]: