Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reaction-Diffusion Systems Reactive Random Walks.

Similar presentations


Presentation on theme: "Reaction-Diffusion Systems Reactive Random Walks."— Presentation transcript:

1 Reaction-Diffusion Systems Reactive Random Walks

2 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 k f and C can degrade back into A and B at some rate k b  If the system is well-mixed (i.e. no spatial variability in concentration, reaction are governed by the law of mass action kfkf kbkb

3 Let’s Start Simple – Recall Chemistry 101 A B C

4 Question  Consider a case where you have equal amounts of A and B initially, that is C A (t=0)=C B (t=0)=C0 and no C C.  What will the system evolve to at very late (steady state) times?  What is k b =0, i.e. there is no backward reaction. How will the system evolve at all times? at late times

5 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?

6 Certainly Finite Differences  Explicit forward in space and time difference equation:  Works, but certain issues such as stability and numerical dispersion can be exacerbated

7 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?

8 Let start with the easier case – C C  C C is degrading a first order rate k b. 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

9 Conceptual Picture  How about for the bimolecular reaction A+B->C. Consider an A and a B Particle, distributed in space (x A,y A ) (x B,y B ) All we know is the location of these two particles at time t, their diffusion coefficient and the reaction rate k f. 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

10 Several Approaches Exist  Fixed (Hard) Radius Method  If particles are less than a distance r crit they have probability 1 of reacting.  Question : How do we determine r crit 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?

11 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

12 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?

13 Consider a 1d system  An A particle is located a position x 1 and a B particle is located at a position x 2 at time t as depicted. What is the probability they will collocate at time t+  t. x1x1 x2x2 Consider how they move. Where will they be located at time t =  t s=x 2- x 1

14 Consider a 1d system  At time t+  t, each particle’s random position is described a Gaussian (i.e. solution of diffusion equation) x1x1 x2x2 s=x 2- x 1

15 Consider a 1d system  At time t+  t, each particle’s random position is described a Gaussian (i.e. solution of diffusion equation) x1x1 x2x2 s=x 2- x 1 Overlap area gives probability of collocation

16 Probability of Collocation  Probability of Collocation Calculate integral directly or in Fourier Space (convolution rule)

17 What about Probability of Reaction given collocation  This is easier Where k f is reaction rate m p is the mass of a particle  t is time step

18 How the algorithm works

19 Step 1 – Move Particles by Brownian Motion Update Particle Positions by x (t+dt)= x (t)+sqrt(2Ddt)  Random Jump Reflecting Diffusion

20 Step 1 – Move Particles by Brownian Motion Update Particle Positions by x (t+dt)= x (t)+sqrt(2Ddt)  Random Jump Reflecting Diffusion

21 Step 1 – Move Particles by Brownian Motion Update Particle Positions by x (t+dt)= x (t)+sqrt(2Ddt)  Random Jump Reflecting Diffusion

22 Step 2 – Search for Neighbors of Opposite Particle Particle 1 Gives distances s1 s2 s3

23 Step 3 – Calculate Probability of RXN Particle 1-1 Probability of Reaction = Probability of Collocation X Probability of Reaction Given Collocation function of distance and diffusion function of reaction kinetics

24 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

25 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

26 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

27 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

28 Repeat for Each red Particle Particle 2 And so on Cycling through all reds Then back to Step One (Move Particles)

29 The grand question How do you code this? - Next Lecture


Download ppt "Reaction-Diffusion Systems Reactive Random Walks."

Similar presentations


Ads by Google