MY TEACHING CODES

Develop the code
one step at a time.

I first write a small part of a calculation and test it. Once I understand the result, I add the next part. These lessons follow that approach rather than beginning with a complete program and asking students to understand everything at once.

How I develop each lesson

I first explain what I want to calculate and define the quantities. I write a small code cell or C program, then compare its result with a known answer. If the check fails, I examine that part before adding the next operation. Each lesson retains the complete program for comparison. The notebook cells follow this sequence, and each C checkpoint is a complete program.

Download the teaching collection ↓ · Read the completed checks →

Python notebooks for the complete examples

The Python notebook collection includes the color portrait, all five portrait programs, full diffusion and random-walk examples, binary spinodal simulation, topology, full-resolution 3D algorithms and native VPython viewers. The pages show explained code cells and their measured outputs. The short lessons below provide a smaller starting point.

Worked code lessons

Existing notebook lessons

The following resources already develop their calculations through notebook cells. Their complete source and numerical work remain available.

Larger models and original programs

The 256³ spinodal example, topology playground and NRCM C examples retain their simulations, explanations and complete sources. The short lessons above do not replace those models or their measured results.

Return to the resource library →