[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pathology of discrete diffusion
From: |
David Sumpter |
Subject: |
Re: Pathology of discrete diffusion |
Date: |
Wed, 23 Apr 1997 19:57:03 +0100 |
> 1. I am using a technique similar to Diffuse 2d for the diffusion of
> heat and am slightly confused by one aspect. Consider a portion of
> lattice with temperatures and first order diffusion:
>
> 0
> 080
> 0
>
> If the diffusion constant is 1.0 and evaporation rate is 1.0 then the
> centre value will update to 0 while the outside values will update to
> 2. i.e.
>
> 2
> 202
> 2
>
> This appears somewhat unnatural for heat equations. If the value 8 came
> from some source, you would not expect the source to be colder than
> the surroundings on the next time step........
The way to avoid such problems is to choose a correct value for the diffusion
constant, we'll call D.
This discretisation is the Laplacian Difference Equations for Diffusion. There
are whole numerical analysis departments working on what the value of D should
be for different problems. THe solution lies in the nature of the problem. It
is
smaller values of D which give more accurate results but obviously mean a
larger
diffusion time where
diffusion time is proportional to (size of single lattice cell)^2 / D .
The important thing is to view D as a constant determining the accruacy of your
simulation and not to use it as an element of time. This is the trap I fell
into
at first. Instead of changing the diffusion constant to change the time for
diffusion to take place, change the time steps at which agents update their
position on the associated world lattice. Using this technique you can set the
diffusion constant as low as you like, computing time allowing.
In the end I just used D=0.5 so that I get,
1
141
1
Quite nice, I suppose.
Good luck,
David Sumpter
==================================
Swarm-Modelling is for discussion of Simulation and Modelling techniques
esp. using Swarm. For list administration needs (esp. [un]subscribing),
please send a message to <address@hidden> with "help" in the
body of the message.
==================================