Zitao Ni

Ph.D. in Materials Science and Engineering

Study Notes · Part 2: Diffusion Equation

Chapter 2: Diffusion Equation (Fick’s Second Law)

Understanding and implementing the diffusion equation in spherical coordinates for SPM battery simulation.

Learning Materials

Resource Description
Main Learning Notes Complete Q&A-style study notes covering all 3 sessions
Session Background Course background & learning plan for starting a new conversation
Learning Plan Snapshot Chapter 2 → Chapter 3 progress snapshot & preview

Three-Session Structure

Session Topic Core Activity Output
2.1 Physical Intuition Derive Fick’s laws, build “onion model” intuition diffusion_concept.png
2.2 Numerical Methods Hand-derive finite differences, Laplacian discretization, L’Hôpital rule diffusion_discretization.png
2.3 Code Implementation Build diffusion solver from scratch, verify against reference diffusion_simulation.png

Key Concepts Covered

  • Fick’s First Law: $J = -D \cdot \partial c / \partial r$
  • Fick’s Second Law (spherical): $\partial c / \partial t = D \cdot [\partial^2 c / \partial r^2 + (2/r) \cdot \partial c / \partial r]$
  • Finite Difference Discretization: $\nabla^2 c_i = \alpha_i c_{i-1} + \beta_i c_i + \gamma_i c_{i+1}$
  • Implicit Euler: $(I - D\Delta t \cdot L) \cdot c^{new} = c^{old}$
  • Center Boundary: $\nabla^2 c|_0 = 6(c_1 - c_0)/dr^2$
  • Tridiagonal Matrix & Banded Storage

Next Chapter

Chapter 3: Butler-Volmer Kinetics

Back to Roadmap

Electrochemistry Study Home

0%