Sign up ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

I'm using following code to generate a picture of the reaction-diffusion process:

Explicit Euler method too slow for reaction-diffusion problem

I would like to obtain an animation effect. When I draw the solution step by step, it does give good animation. The problem is that the solution quickly converges to uniform, solid color (i.e. uniform concentration of chemical species).

How to sustain the animation? The solution should reverse the Euler method to some degree? Adding random noise sustains the animation, but also adds visible noise

share|improve this question

1 Answer 1

If I remember correctly from the original question, the main purpose is to have an "interesting" visual output. While this somewhat lines up with your noise comment, likely the best way to maintain a transient solution is to have time dependent boundary conditions. As time goes on and your animation stabilizes, choose a random point on the edge of the image and impose a non-equilibrium concentration (how much effort you want to put into making it appear smooth the current solution is up to you). This will cause your solution to remain transient while avoiding the visible noise you mentioned.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.