⚠️ Status: Under Development
Predicts the final dry film thickness of a spin-coated layer and how it changes with spin speed. Three models of increasing realism, live plot, statistical deviation and saveable parameter presets. It tries to turn the theoretical thin-film PDE into a tool that is usable in the lab.
Available as a desktop ui and as a single-file web version. Both use the same models and give the same numbers.
-
Thickness-rpm plot:
$h(\omega)$ over a chosen range, current operating point marked. - Two ways to enter the solids fraction: directly as volume fraction, or from weight fraction plus the two pure-component densities.
-
Statistical deviation:
- Gauss (analytic): linearised error propagation
-
Monte Carlo: samples every uncertain parameter (normal, uniform or triangular) and propagates it through the full, non-linear model; reports P05 / P50 / P95. See the caveat in
src/model/deviation.pyabout mean/std under large relative uncertainties, the percentiles stay reliable regardless. - The Flack model solves an ODE per sample, so its Monte Carlo runs on demand (button Run Monte Carlo, about 4 s for 3000 samples).
- Parameter presets: save/load a complete parameter set (model, values, uncertainties, note), e.g. one per resin.
-
Themes: multiple color schemes:
dark_purple,dark_blue,black_white, choosablestyle.py.
| Model | Computes | Evaporation | Viscosity | Typical use |
|---|---|---|---|---|
| Emslie-Bonner-Peck (1958) | wet film thickness |
none | constant | understanding the flow-driven thinning |
| Meyerhofer (1978) | final dry film thickness |
constant rate |
constant | quick estimate, first guess |
| Flack et al. (1984), depth-averaged | final dry film thickness |
slows down as the film concentrates | rises with solids content | resins whose viscosity changes a lot while drying |
Rule of thumb: start with Meyerhofer. Switch to Flack if the result is clearly off and you can calibrate
Enter via the link next to About or click here for the web version. Note: There are some issues with preset loaders in the web version!
Since Python is already a perfect habitat for scientific calculations, only matplotlib is needed:
pip install -r requirements.txt # or just matplotliband run main.py:
python main.py- Python 3.9+ (tested with 3.12). tkinter ships with Python on Windows/macOS; on Linux install it first (e.g.
sudo apt install python3-tk). - Pick a colour theme without editing code:
SPIN_COATING_THEME=dark_blue python main.py(dark_purple,dark_blue,black_white). - Presets are read from / written to
data/*.json.
spin-coating/
├── index.html # web version (single self-contained file; mirrors src/model line by line)
├── main.py # desktop entry point
├── requirements.txt
├── data/ # parameter presets (JSON, one file each)
├── src/
│ ├── settings.py # app defaults: Monte Carlo, plot range, preset folder
│ ├── store.py # read/write presets
│ └── model/ # pure physics, no UI
│ ├── parameters.py # units, parameter specs + defaults, data shapes
│ ├── emslie.py # model 1
│ ├── meyerhofer.py # model 2
│ ├── flack.py # model 3 (numerical ODE)
│ ├── deviation.py # Gauss propagation + Monte Carlo for every model
│ └── __init__.py # dispatch by model id, spin curves
├── ui/ # tkinter desktop app
│ ├── app.py # main window, live recompute
│ ├── widgets.py plot.py # fields, dropdowns, result display, thickness-rpm plot
│ ├── forms.py presets.py info.py dialogs.py # input forms, preset window, parameter help, popups
│ └── style.py tex.py texts.py # themes, formula rendering, UI texts
├── tests/ # see below
└── *.pdf # reference papers
Outward flow of a Newtonian liquid film on a spinning disk [1]:
Without evaporation the film keeps thinning (about
Adds a solvent evaporation rate
Early on, flow dominates; late, evaporation does. Where both solvent losses are equal, the film freezes:
With
Flack, Soong, Bell and Hess [2] model a resist whose viscosity and solvent diffusivity change strongly with polymer concentration, resolved through the film depth and with non-Newtonian behaviour.
What this tool implements is the depth-averaged ("well-mixed") version of that mechanism, not the full paper model. It keeps "viscosity rises and evaporation slows as the film concentrates", but has no depth profile, no solid skin, no shear thinning and no Fujita-Doolittle diffusivity, so the paper's five parameters (
$D_0$ ,$A$ ,$B$ ,$\eta_0$ ,$\kappa_0$ ) are not used.
State: solute and solvent volume per area
solved with an adaptive RK4 until the solvent is gone;
| Law | Formula | Parameters |
|---|---|---|
| Evaporation |
|
|
| Viscosity, exponential (default, generic) |
|
|
| Viscosity, Flack Table I (measured PMMA, zero shear) |
|
only the shape is used, |
With
python tests/test_model.py # models, deviation, unit conversion (no framework needed)
python tests/test_store.py # presets
python tests/test_themes.py # theme palettes (needs tkinter)
python tests/test_ui_smoke.py # app runs through all models/methods (tkinter stub, no display needed)
pytest tests/test_web_matches_python.py # index.html == Python models (needs node + pytest)- Ossila, "Spin Coating: A Complete Guide". https://www.ossila.com/pages/spin-coating (original: A. G. Emslie, F. T. Bonner, L. G. Peck, J. Appl. Phys. 29, 858 (1958); D. Meyerhofer, J. Appl. Phys. 49, 3993 (1978))
- W. W. Flack, D. S. Soong, A. T. Bell and D. W. Hess, "A mathematical model for spin coating of polymer resists", J. Appl. Phys. 56, 1199-1206 (1984). https://www.researchgate.net/publication/224533748_A_mathematical_model_for_spin_coating_of_polymer_resists
Distributed under the MIT License.