
Programming the Diffusion Equation
Hard
Can a computer program calculate how fast atoms spread through a solid? Diffusion (the slow movement of particles from crowded areas to empty ones) is described by a second-order differential equation. Solving that equation by hand is slow and difficult.
You write programs in the Scheme language that solve first-order and then second-order differential equations. Both programs return their expected results. Changing the constants in the equation changes the rate of diffusion.
Because the diffusion equation is a type of second-order equation, a working solver for that type can be extended to model real diffusion between solids.
Hypothesis
The hypothesis is that the rate of diffusion between solids can be determined using computer programming.
Method & Materials
You will learn how to program using "How to Design Programs" and Dr. Scheme, design a program to compute first-order and second-order differential equations, and work on the diffusion equation.
You will need a computer, a programming language such as Scheme, and knowledge of calculus.
MEL Math — hands-on math experiment kits delivered monthly — makes abstract concepts tangible. (Affiliate link)
See what’s includedResults
The results of the two programs designed showed that the constants in the second-order differential equation caused the results to change. This suggests that a different diffusion constant would change the rate of diffusion, and this should be researched further.
Why do this project?
This science project is unique because it uses computer programming to solve a complex equation and determine the rate of diffusion between solids.
Also Consider
Experiment variations to consider include researching the Improved Euler method, which is a more accurate way of solving differential equations, and researching the effects of different diffusion constants on the rate of diffusion.
Full project details
Additional information and source material for this project are available below.Share this Science Project:
Related Science Fair Project Ideas
Swap the CPU and RAM in a desktop computer and time the difference to find out which upgrade matters more.
Hard
Simulate 6,300 billiard ball paths and discover that a single property of the launch angle predicts whether the ball reaches a corner.
Hard
Program a tic-tac-toe player in MATLAB that wins 80 percent of games against random opponents and never loses to a human.
Hard
Share this Science Project:
