I'm doing a Phd in physics. I must simulate the gas diffusion into a
porous glass. But I don't know the world of simulation so to start I
want to simulate a simple particle that move into a rectangle and at
the centre of one wall of the rectangle there is a narrow, long
rectangle that simulates one porous. Something like this:
I want to do this with C++, or C. Is there someone that can give me
some example of code to doing that? I've trying to write the program
and if you want I can send it, but I think it doesn't work very well…
Thank you for the attention
"N:dlzc D:aol T:com \(dlzc\)" <N: dlzc1 D:cox T:[Only registered users see links. ]> wrote in message news:<PGr%c.106366$4o.60805@fed1read01>...
I once wrote a simulation program in C, that simulated diffusion of
smoke through a wall with a number of holes in it. This simulation was
based on a cellular automaton of a size of approximately 1000*1000
cells. On modern computer hardware I expect this kind and size of
simulations can almost be done 'real time'. Smoke particles were
represented by a certain state for a cell. Motion was represented by
letting the 'smoke-state' move along the cells by interaction with
neighbours, according to simple random rules.
I used a book of Margolis on the subject, which contains very good
descriptions of different types of automata, and how they can be used
to simulate diffusion, flow of liquids and many other physical
phenomena. It is a mid-80's book. It is approximately 10 years ago I
did this. I'm not totally sure, but I think the book is the following:
Toffoli and Margolis "Cellular Automata Machines"
This book should be present in a well-assorted university library. The
internet also has many sites on cellular automata, just google
"cellular automata" or "margolis automaton".
The difficult - and interesting - part is to design the
state-transition rules, such that the massive parallel combination of
all discrete simple state transition rules statistically speaking
approaches the time-continuous rules of physics of a system,
consisting of a large number of particles.