Curious-ity

Here I share what I understand, what confuses me and what makes me curiouser and curiouser. New theories and data often leave me asking more questions. I keep returning to the basics, checking my assumptions and testing what I think I know.

“Curiouser and curiouser!”

Alice in Lewis Carroll’s Alice’s Adventures in Wonderland, Chapter II

“The important thing is not to stop questioning.”

Albert Einstein · American Institute of Physics archive

Why we love simulations

Whenever I find a little time, I return to this webpage and experiment with visual ways of understanding things. Movies, mysteries and novels set events in motion in our imagination. Simulations let us watch patterns evolve and ask, “What if?” It is fascinating how our minds follow a story in motion.

What if I change the composition, the elastic constants or the starting pattern? I can watch what happens and test my understanding.

I grew up with cartoons and comic books; manga, Tintin, Asterix, Marvel and DC still fascinate me. In Japan, visual conference slides let me follow talks in Japanese.

I have asked colleagues in Design about graphic guides with different levels of detail: a visual story first, then the physical ideas, mathematics and code.

Follow a phase-field calculation.

THROUGH MY LENS

Small moments. Different perspectives.

MY EVOLUTION

Then and now.

Microstructures evolve. So do the people studying them.

Saswata Bhattacharyya in his earlier portrait
ThenThe earlier portrait.
Saswata Bhattacharyya in his recent portrait, wearing glasses and a light blue shirt
NowA more recent frame, with an edited landscape background.

Two photographs, and plenty of learning, questions and confusions in between.

AN ANIMATION THAT STAYED WITH ME

A face, two equations,
and a reason to be curious.

During my Master’s, I saw an animation on the homepage of Prof. W. Craig Carter of MIT. What caught my imagination was not a deep theoretical argument, but an image evolving through an equation. I was really inspired. Sometimes these small encounters become powerful motivating events.

In that spirit, here is my face evolving under two different equations. Inspired by Prof. W. Craig Carter, MIT. His historical homepage shows image evolution under Cahn–Hilliard and Allen–Cahn dynamics.

My portrait is the energy minimum.

My portrait is first broken up by shuffling its pixels, producing a distorted, noise-like image. Now define an energy whose minimum is the intact portrait. Both equations move downhill in that energy, and the face emerges as the end product of forward evolution.

Left: Allen–Cahn (nonconserved), \(L=0.03\). Right: Cahn–Hilliard (conserved), \(M=10^{-5}\). Values are dimensionless.

The apparent noise is my color portrait broken up into shuffled pixels. I shuffle whole RGB pixels, so their original colors remain together. As the fields evolve toward the energy minimum, the face returns. The preview shows the final computed frame; press Play to start from the shuffled image.

Build the color example step by step

How do we make the color portrait the minimum?

I represent the red, green and blue channels by three independent fields. Let \(r_j(x,y)\) be a channel of my fixed portrait and \(u_j(x,y,t)\) the corresponding evolving field. The index \(j\) identifies red, green or blue; \(x,y\) are position coordinates and \(t\) is time. I map each channel's 0–255 values to −1–1. All quantities in this example are dimensionless.

\[F[\mathbf u]=\frac12\int_\Omega\sum_{j=R,G,B}(u_j-r_j)^2\,dA,\qquad\mu_j=\frac{\delta F}{\delta u_j}=u_j-r_j.\]

Here \(F\) is the total image energy, \(\Omega\) is the image domain, \(dA\) is an area element, and \(\mu_j\) is the energy derivative for channel \(j\). Every squared difference is nonnegative. The unique unconstrained minimum occurs when every channel matches the portrait: \(\mathbf u=\mathbf r\), where \(F=0\). The symbol on the right is the number zero. This deliberately designed image energy is different from the usual double-well free energy of a material.

\[\partial_tu_j=-L(u_j-r_j)\quad\text{(Allen–Cahn)},\qquad\partial_tu_j=M\nabla^2(u_j-r_j)\quad\text{(Cahn–Hilliard)}.\]

\(L=0.03\) sets the Allen–Cahn relaxation rate; \(M=10^{-5}\) is the Cahn–Hilliard mobility. The Laplacian \(\nabla^2\) adds the second spatial derivatives in \(x\) and \(y\). With this local quadratic energy, the Cahn–Hilliard conservation law gives a second-order equation. The familiar fourth-order term would require a gradient-energy contribution, which this restoration example does not include.

With periodic boundaries, both energies decrease:

\[\frac{dF}{dt}\bigg|_{\mathrm{AC}}=-L\int_\Omega\sum_j\mu_j^2\,dA\le0,\qquad\frac{dF}{dt}\bigg|_{\mathrm{CH}}=-M\int_\Omega\sum_j|\nabla\mu_j|^2\,dA\le0.\]

Cahn–Hilliard preserves the mean of each channel for any initial field. Allen–Cahn does not impose that conservation law. Its channel means approach the target means. Here shuffling preserves all three target means, so the Allen–Cahn means stay fixed as a special case. That does not make Allen–Cahn conserved.

If a starting channel mean differed from its target mean, Cahn–Hilliard would approach the target channel plus a constant offset. The offset equals the initial mean minus the target mean. Allen–Cahn would remove that offset.

I solve the linear equations with exact propagators on a 256 × 256 periodic grid of width 32. The random seed is 19. Frames use nonuniform simulation times, so playback does not compare physical rates. The final frame is calculated at time 30,000,000, rather than replaced by the portrait. The displayed energy is \(F/(3|\Omega|)\), the total energy divided by the domain area \(|\Omega|\) and three channels. Both solutions approach the target asymptotically; a computed zero can occur at finite floating-point precision. Small computed values are shown in scientific notation. Numerical fields are not clipped; clipping is used only to display RGB values.

Download the Python notebook · Read the code in steps · Color energy and mean diagnostics · Download the color animation · Original grayscale animation

I develop this example in small notebook cells: read the color channels, shuffle whole pixels, check their means, choose the energy, test one evolution step, and then save the full sequence. Each part includes an explanation and a check. Follow the code and its results · Run the notebook in Colab. The final cells write 241 PNG frames and diagnostics.csv.

Can the Allen–Cahn image drift?

Mean drift and motion of the image are different questions. For this energy, the exact Allen–Cahn solution is

\[u_j(x,y,t)=r_j(x,y)+\big[u_j(x,y,0)-r_j(x,y)\big]e^{-Lt}.\]

Each pixel relaxes toward its fixed target value. This can look like a gradual reveal of the face, but it does not translate the face across the image. A translated portrait is not an energy minimum because the target is tied to fixed positions.

The channel mean obeys the same relaxation rule: \(\overline u_j(t)-\overline r_j=[\overline u_j(0)-\overline r_j]e^{-Lt}\), where the overbar denotes a spatial mean. Thus Allen–Cahn can change the mean when the initial mean differs from the target mean. The shuffled starting image has no such difference.

Other Allen–Cahn models can move interfaces when their free energy supplies a driving force. Motion is possible in those models; the fixed-target energy used here does not demonstrate it.

A portrait disintegrates into abstract art.

Here both panels use conserved Cahn–Hilliard dynamics and start from exactly the same portrait with a small, zero-mean perturbation. The left energy favors my portrait. The right energy favors phase separation: my face breaks apart into evolving domains of color, a fun take on abstract art.

The energy determines the destination. The same conserved dynamics can restore a portrait or form color domains, depending on the free-energy functional.

The number shown under each panel is its dimensionless mean energy density: that panel’s total energy \(F\), divided by the image area and by the three RGB channels. It is not an interfacial energy in J m\(^{-2}\). Since the panels use different energy functionals, compare how each number decreases in time, not its magnitude against the other panel.

Who would have thought?

Allen–Cahn and Cahn–Hilliard equations also turn up in computer graphics and image processing! Edge detection locates boundaries where image brightness or color changes. Image segmentation separates pixels into meaningful regions, such as a particle and the surrounding matrix in a micrograph. Phase-field methods can describe these regions and evolve their boundaries.

Looking back at the Cahn–Hilliard reconstruction above, did you notice my glasses, hairline and facial outline emerging before the broad colors and shading settle? For a while, my face looks almost like an outline drawing. These edges mark boundaries between image regions, where brightness or color changes. I find the connection with interfaces in microstructures intriguing.

Why do those edges become visible so early? In this particular example, the difference between the evolving image and my target portrait relaxes by diffusion. Fine-scale differences disappear faster than broad, slowly varying differences, revealing sharp details while the larger-scale shading is still returning. My portrait is already encoded in the energy, so this is an early emergence of its edges rather than an independent edge detector.

For example, Qiao and Zhang combine an edge detector with Allen–Cahn evolution for image segmentation . The detected edges guide the initial field. In another application, Lipková and coauthors use Cahn–Hilliard phase separation to reduce noise and distinguish lesions from healthy tissue in CT images . The image information and the chosen model determine which regions are identified.

In computer graphics, Yang and coauthors use both equations in visual simulations involving liquids, solids and phase changes .

I learned more about these applications from my students when they chose image-processing problems for their projects in my Mesoscale Microstructure Modeling class. Their questions and explorations took me into details I had not looked at before. Do take a look at the student projects in the class materials (access follows the course folder’s permissions).

Let’s keep the curiosity engine going! If you come across other offbeat applications of these equations, let me know.

The two energies and what is conserved

We treat the red, green and blue channels as three independent signed fields. This is an image analogy, not a coupled material or perceptual color model.

\[F_{\rm portrait}=\frac12\int\sum_j(u_j-r_j)^2\,dA,\qquad F_{\rm domains}=\int\sum_j\left[\frac{(u_j^2-1)^2}{4}+\frac{\kappa}{2}|\nabla u_j|^2\right]dA.\]
\[\partial_tu_j=M\nabla^2\frac{\delta F}{\delta u_j}.\]

On the right, the portrait supplies the initial field, which evolves under a double-well and gradient energy. On the left, the portrait is explicitly encoded as the energy minimum. Both runs preserve each channel’s mean on the periodic domain. The same zero-mean noise is added to each starting portrait, so the left-hand target is compatible with conservation.

Grid: 256 × 312, spacing 1, M = 1, κ = 0.4. The right-hand nonlinear evolution uses a stabilized semi-implicit Fourier step with Δt = 0.1 and stabilization 2; the left uses the exact linear Fourier propagator. The displayed quantity is \(F/(3|\Omega|)\), a dimensionless mean energy density. The two values belong to different functionals, so their absolute magnitudes should not be compared. Numerical values are not clipped; only displayed RGB values are clipped to the screen’s range. Conservation is checked on the numerical fields.

Learn and run it step by step in Colab · Download the teaching notebook · Energy and conservation diagnostics

For discussion: Which image, animation or simple demonstration first made you want to understand the science behind it?

UPDATED 7 OCTOBER 2026

Bicontinuity and connected phases

Compare connected regions, periodic wrapping and phase fractions in simulated microstructures. Explore the 2D turtle, the saved 256³ simulation and the topology playground.

Explore connectivity
THE PEOPLE BEHIND THE CURIOSITY

How SHAP sparked my interest in AI/ML.

My wife, Joyita, is an experimentalist who loves to experiment and explore. Having worked on thermoelectrics, she began exploring a thermoelectrics database out of curiosity, using machine learning and SHAP to understand the patterns it contained. She was also looking for patterns in microstructures.

While I was focused on phase-field modeling, she would show me what she was finding. I found the results very informative and began paying closer attention to what AI and machine learning could help us understand. Her curiosity and experiments sparked my own interest. She is the inspiration behind my journey into AI/ML, and I owe this learning to her.

She shares her own explorations, tutorials and examples on Materials Data Explorer .

UNDERSTANDING, CONFUSIONS & QUESTIONS

Ideas worth thinking aloud about.

Some ideas feel clear; others leave me with more questions. This is a space for both, and for the conversations that help us understand them.

MATERIALS SCIENCE & ENGINEERING

Sites we like to visit.

I collect materials stories, simulations and learning resources here, with a few visual explainers from the wider world of physics and engineering.

Materialism podcast

A podcast exploring the science and stories of materials around us.

By Taylor Sparks and Andrew Falkowski.

Using nature to grow batteries

Biology inspires the assembly of nanoscale materials for batteries and energy applications.

By Angela Belcher · TEDxCaltech.

Nanopolitan

An archive of reflections on higher education, research, science and academic life.

By Prof. T. A. Abinandanan, IISc.

Entertaining Research

Personal reflections on books, science, research and the wider world.

By Prof. M. P. Gururajan, IIT Bombay.

Materials, Science of

Technical notes and reading on computational materials science, statistical mechanics and machine learning.

By Prof. M. P. Gururajan, IIT Bombay.

The metallurgy of steel

Conversational explanations of steels, phase transformations and questions arising in metallurgy.

By Prof. Sir Harry Bhadeshia, University of Cambridge (emeritus) and Queen Mary University of London.

Alloy Phase Equilibria

I keep returning to this book for its detailed treatment of ternary phase diagrams and phase equilibria.

By Alan Prince. Online edition hosted by MSI.

A book I kept borrowing during my Master’s

In my NPTEL course, I mainly used binary phase diagrams and systems, while generalizing the thermodynamic ideas to \(n\)-component systems. For a detailed treatment of ternary phase diagrams and ternary phase equilibria, I find Alan Prince’s book a gem.

I came across it in the library during my Master’s thesis on ternary spinodal decomposition. I borrowed and reborrowed it throughout my Master’s.

This is also where I first learned about the geometrical constraints on the two solubility boundaries meeting a vertex of a three-phase tie triangle in an isothermal section at fixed pressure. Their local metastable extensions must either both enter the triangle or both remain outside it. One entering while the other stays outside is not allowed. Prince credits the basic rule to Schreinemakers and explains Vogel’s refinement: the acute angle between the solubility boundaries must point toward the triangle. See page 144 and Figure 135 .

Choose a chapter from the contents, then click the lower-right corner of a scanned page to continue.

Understanding phase diagrams

A glossary and illustrated introduction to phase diagrams, including ternary systems, tie triangles and the scope of Gibbs’ phase rule.

General Discussion and Glossary of Phase Diagrams. PDF hosted by NIST.

Solder alloy phase diagrams

Calculated binary and ternary phase diagrams for solder alloys, with downloadable thermodynamic data for exploring melting and solidification.

National Institute of Standards and Technology (NIST).

Iron, Steel and Swords

Metallurgy, microstructures and the history of swords in an illustrated set of notes. The archived PDF has 688 pages and is about 26 MB.

By Helmut Föll, University of Kiel.

steeluniversity

Interactive steelmaking simulations connect processing choices with steel production. Some simulations require registration and payment.

SnowCrystals

Snowflake growth explored through photographs, experiments and crystal physics.

By Ken Libbrecht.

Molecular Expressions

Optical microscopy galleries reveal colorful patterns in crystals, everyday substances and electronic materials.

Nikon MicroscopyU

Illustrated explanations and interactive tutorials explore how optical microscopes form images.

Ptable

An interactive periodic table for exploring element properties, isotopes and electron configurations.

nanoHUB

Browser-based simulation tools, courses and learning resources for nanotechnology and materials.

CTCMS: computational materials science

Materials modeling resources, including FiPy, OOF, interatomic potentials and phase-field archives.

Center for Theoretical and Computational Materials Science, NIST.

Wulffman: crystal shapes from surface energies

A classic crystal-shape constructor connecting surface-energy anisotropy with equilibrium shapes, with illustrated examples and archived software.

By Andrew Roosen, Ryan McCormack and W. Craig Carter · NIST CTCMS. The original software is provided without support.

OOF: finite element analysis of microstructures

Start with a real or simulated microstructure image, assign material properties and run virtual experiments to explore stresses and effective properties.

OOF Working Group, NIST. Includes OOF2 and OOF3D.

PRISMS-PF

Open-source phase-field software with examples for precipitation, grain growth and solidification.

MIT OpenCourseWare

Open course materials on materials science, thermodynamics, mechanics, mathematics and computation.

NPTEL

Lecture courses from the IITs and IISc on materials, engineering and the sciences.

SWAYAM

India’s online course platform brings together NPTEL and other national course providers.

Materials Data Explorer

Step-by-step tutorials on materials data, SHAP, PCA and microstructure images, with code and interactive examples.

Pattern Recognition and Machine Learning

A free PDF on probabilistic machine learning, including regression, classification and graphical models. The file is about 18 MB.

By Christopher M. Bishop. PDF hosted by Microsoft Research.

matminer

Python tools and example notebooks turn compositions and crystal structures into features for machine learning.

Matbench

Materials datasets and benchmarks for comparing how well machine-learning models predict properties.

Microsoft MatterGen

A diffusion-based generative model with code for proposing inorganic crystal structures under property constraints.

Materials Scientists: a scientist is fascinated by the materials used to wrap a present.
Materials Scientists, xkcd #2856 . By Randall Munroe. Shared with attribution under xkcd’s reuse permission .

PHD Comics

Comics about graduate school, research, deadlines and the everyday absurdities of academic life.

Delivering a Material Safari Experience

Prof. Padarth takes a curious student on a comic safari through metals, ceramics, polymers and smart materials.

From the Department of Materials Science and Engineering, IIT Delhi.

Rheology of Cats

Are cats solid or liquid? Read a comic exploring stress, strain and how materials flow.

From Rheology Comics, led by Rob Campbell with art direction by Caroline Martin.

More comics on rheology

Materials science cartoons

Cartoons about materials science and engineering, available for licensed use.

From CartoonStock’s commercial collection.

Dr. STONE: free preview

Science-fiction manga imagines rebuilding civilization through scientific knowledge, invention and resourcefulness. Select “Free preview” to read sample pages.

By Riichiro Inagaki and Boichi. Published in English by VIZ.

Secrets of the Nano-World

Read a time-travel comic about the nanoscale world, atomic force microscopy and the inventions behind nanotechnology. Wikimedia Commons offers page previews and the full PDF.

From the Institute of Physics, Czech Academy of Sciences.