reaction-diffusion systems reactive random walks
TRANSCRIPT
Reaction-Diffusion Systems
Reactive Random Walks
General Principle Consider a reactive system made up of species
A, B and C, where A and B can react to form C at some rate kf and C can degrade back into A and B at some rate kb
If the system is well-mixed (i.e. no spatial variability in concentration, reaction are governed by the law of mass action
kf
kb
Let’s Start Simple – Recall Chemistry 101
A
B
C
Question
Consider a case where you have equal amounts of A and B initially, that is CA(t=0)=CB(t=0)=C0 and no CC.
What will the system evolve to at very late (steady state) times?
What is kb=0, i.e. there is no backward reaction. How will the system evolve at all times?
at late times
Diffusion-Reaction System
Now, rather than assuming that the system is well mixed, we allow A, B and C to move through space by diffusion, but they still react by the law of mass action
How can you solve these equations?
Certainly Finite Differences
Explicit forward in space and time difference equation:
Works, but certain issues such as stability and numerical dispersion can be exacerbated
How about random walks
Recall
So, let’s break A into N particles and B into N particles and let them bounce around randomly as we have done before
We know this solve the diffusion equation, but how to include reactions? What is needed?
Let start with the easier case – CC
CC is degrading a first order rate kb. Do you remember how to incorporate this into the random walk method.
Calculate the probability of reaction during any given time step
Generate a random number Q, drawn from a uniform distribution U[0,1].
Reaction occurs
Reaction does not occur
Conceptual Picture
How about for the bimolecular reaction A+B->C. Consider an A and a B Particle, distributed in space
(xA,yA)
(xB,yB)
All we know is the location of these two particles at time t, their diffusion coefficient and the reaction rate kf.
How do we calculate the probability of reaction for this pair in the same way as we did in previous slide.
Brainstorm it! And think about what has to happen for a reaction to occur
Several Approaches Exist
Fixed (Hard) Radius Method
If particles are less than a distance rcrit they have probability 1 of reacting.
Question : How do we determine rcrit and make it physically consistent with what we know about A, B and C move?
Variable (Soft) Radius Method
Particles have a probability of reacting depending on how far apart they are as long as they are within some critical radius. Again, how do we determine this?
Which do you prefer?
Neither – and either did my mate Dave
Benson & Meerschaert Algorithm
Move Particles with a random walk
Based on the distance between two particles calculate probability that they will collocate
Then based on the reaction multiply probability that reaction will occur
𝑠
A
B
This is the cool idea
Probability of Reaction
=
Probability of Collocation
X
Probability of Reaction Given Collocation
Depends only on transport
Depends only on reactions
But what are they?
Consider a 1d system
An A particle is located a position x1 and a B particle is located at a position x2 at time t as depicted. What is the probability they will collocate at time t+Dt.
x1x2
Consider how they move. Where will they be located at time t =Dt
s=x2-x1
Consider a 1d system
At time t+Dt, each particle’s random position is described a Gaussian (i.e. solution of diffusion equation)
x1 x2s=x2-x1
Consider a 1d system
At time t+Dt, each particle’s random position is described a Gaussian (i.e. solution of diffusion equation)
x1 x2
s=x2-x1
Overlap area gives probability of collocation
Probability of Collocation
Probability of Collocation
Calculate integral directly or in Fourier Space
(convolution rule)
What about Probability of Reaction
given collocation This is easier
Where kf is reaction ratemp is the mass of a particleDt is time step
How the algorithm works
Step 1 – Move Particles by Brownian Motion
Update Particle Positions by x(t+dt)=x(t)+sqrt(2Ddt)x
Random Jump Reflecting Diffusion
Step 1 – Move Particles by Brownian Motion
Update Particle Positions by x(t+dt)=x(t)+sqrt(2Ddt)x
Random Jump Reflecting Diffusion
Step 1 – Move Particles by Brownian Motion
Update Particle Positions by x(t+dt)=x(t)+sqrt(2Ddt)x
Random Jump Reflecting Diffusion
Step 2 – Search for Neighbors of Opposite Particle
Particle 1
Gives distancess1s2s3
Step 3 – Calculate Probability of RXN
Particle 1-1 Probability of Reaction
=
Probability of Collocation
X
Probability of Reaction Given Collocation
function of distanceand diffusion
function of reactionkinetics
Step 4 – Die or Survive
Particle 1 - 1 Generate a random number 0<P<1
If P< Probability of Reaction
Kill both particles
If greater move to next blue particle
For this example let’s assume greater
Step 4 – Die or Survive
Particle 1 - 2 Generate a random number 0<P<1
If P< Probability of Reaction (for this pair)
Kill both particles
If greater move to next blue particle
For this example let’s again assume greater
Step 4 – Die or Survive
Particle 1 - 2 Generate a random number 0<P<1
If P< Probability of Reaction (for this pair)
Kill both particles
If less move to next blue particle
Let’s assume less now
Step 4 – Die or Survive
Particle 1 - 2
And so on Cycling through all blues
Generate a random number 0<P<1
If P< Probability of Reaction (for this pair)
Kill both particles
If less move to next blue particle
Let’s assume less now
Repeat for Each red Particle
Particle 2
And so on Cycling through all reds
Then back to Step One (Move Particles)
The grand question
How do you code this?
-
Next Lecture