exercise: sir model (infected individuals do not move, they stay at home) what is the effect of...

37
2 2 getting sick m oving around getting sick recovering 2 2 recovering m oving around S S SI D t x I SI I t R R I D t x Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion coefficient D? What if you have two ‘nests’ of infection?

Upload: liliana-watkins

Post on 31-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

2

2

getting sickmoving around

getting sick recovering

2

2

recoveringmoving around

S SSI D

t x

ISI I

t

R RI D

t x

Exercise: SIR MODEL

(Infected individuals do not move, they stay at home)

What is the effect of diffusion? How is the behavior affected by the diffusion coefficient D?

What if you have two ‘nests’ of infection?

Page 2: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

create a math Model Spatial for BOX geometry.

1. Copy – Paste the Constants, VolumeVariable and Functions. Add diffusionRate as constant.

2.Cut Initial concentration for infected population. We want to set infected population in a particular place. So we will declare it as Function.

3. We have no Flux BC.

4. Infected people do not move, so no diffusion for Infectected population, i.e. ODE .

File->openmathmodelsatarupaSIR_NEW_MODELSave this .

Page 3: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Part-1

Page 4: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Part-2

Page 5: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Healthy people move arround and if they come near infected people, who are in the middle, they get sick !!

What happens to Healthy Population:

Time plot

Line plot

S_init=9.0,D= 1.0

Page 6: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Infected population stays at the middle , see how the concentration changes as you increase the time.

Line plot, t= .3

Time plot

Line plot, t= 10

Page 7: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Recovered Population:

Time plot Line plot

Page 8: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Now consider two nests of infection- that is infection in two places:

Save this SIR model with a new name to modify it .

Only change Function I_init

((((x-5)^2 + y^2) < 1 ) || (((x-5)^2 + (y-10)^2) < 1 )) *0.2 ;

It specifies two two places of infected population with the concentration 0.2

That‘s all !!!

Page 9: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Susceptible (D=1):

Line plot Time plot

Page 10: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Infected

Time plot

Line plot

Page 11: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Recovered:

Page 12: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

When diffusion rate =0

If healthy people dont move.

Nothing happens outside the infected region

Infection becomes epidemic inthe infected region

Recovered

Page 13: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Fitzhugh-Nagumo system with voltage (ions) spreading along the axon

2

20.2 1

0.002*

V VI V V V C D

t xC

V Ct

2, 0 0.5 (1- )

0.0003; 0

V x t x

D I

Page 14: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Create 2D analytic geometry. Set size x=1, Y= 0.5, origin at (0.0). Save it with a name .

Page 15: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

1.Copy the constants from the old F-N model (ODE model) and paste, cut Constant V_init, because V is now a sptial variable, i.e. a Function

2. Constant V_diffusionRate 0.0003;

3. Copy & paste VolumeVariable and Function.Add new function for V_init.

2, 0 0.5 (1- )

0.0003; 0

V x t x

D I

New conditions for our new system:

Go file new math ModelSpatial click the geometry you just created

file open math ModelsatarupaFHN_model (ode model)Save this.

Page 16: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

We will set PDE and ODE here—

CompartmentSubDomain subVolume1 { Priority 0 BoundaryXm Flux BoundaryXp Flux PdeEquation V { BoundaryXm 0.0; BoundaryXp 0.0; Rate J1; Diffusion V_diffusionRate; Initial V_init;}

OdeEquation C {RateJ2;Initial C_init;}

} }

Click Apply changes.

We have 1 ODE for C

Page 17: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

The code looks like -

Page 18: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Click equation viewer --

Close this window and click simulation

Page 19: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Run simulation for t=100, I=0, 0.05, 0.2

can you increase parameter I and get periodic firing?

Page 20: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

For I=0.0V at t=0.0 C at t=0.0

Time plot CTime plot V

Page 21: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Time plot for V with I= 0.05 Time plot for V with I= 0.2

Time plot for C with I= 0.2Time plot for C with I= 0.05

Page 22: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Time plot for I=0.2, t= 1000 sec

V C

Page 23: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Reaction-Diffusion system of the activator-inhibitor type that appears to account for many important types of pattern formation and morphogenesis observed in development .

Page 24: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

The development of a higher organism out of a single fertilised egg is one of the most fascinating aspects of biology.

A central question is how the cells, which carry identical genetic code, become different from each other.

Spontaneous pattern formation in initially almost homogeneous systems is also common in inorganic systems.

Large sand dunes are formed despite the fact that the wind permanently redistributes the sand.

Sharply contoured and branching river systems (which are in fact quite similar to the branching patterns of a nerve) are formed due to erosion despite the fact that the rain falls more or less homogeneously over the ground

Pattern Formation

Page 25: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion
Page 26: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

2 22 2

2 2

22

2

a D a aa

t x i

i iD i a

t x

When activator spreads much more slowly than the inhibitor, periodically spaced peaks of activator evolve:

Exercise 3: on a 2D domain, would you have stripes or spots?

Model equations:

In my model I have taken e=e, delta=d

Page 27: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

For this model we will take retangular geometry.

File OpenGeometrySatarupa rectangle save it.

File NewMathModelSpatial click the geometry you just saved.

Constants, VolumeVariables and Functions

Page 28: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

PDEs :

Page 29: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Click Equation viewer to see the equations:

Run simulation for t=10, and use line tool to see kymograph results.

Page 30: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

For e=.9,d=5, D=1.0, t=10

a

For e=.9,d=15, D=1.0, t=10

i

Page 31: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Stripes and other patterns can be produced by reaction diffusion mechanism in 2D domain under variety of initial conditions and chemical interactions.

Change initial conditions and different constant parameters for various pattern.

For e=.9,d=15, D=1.0, t=10

Rectangualr geometry:

a i

Page 32: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

2

21

1, 11, , 0

0, 1

P PP P D

t xx

D P x tx

Exercise (Fisher equation):

Animals or bacteria grow until the local environment cannot handle the population and then spread by diffusion. The result is the invasion and colonization. Mathematically, you see the traveling wave solution.

How does it look in 2D?

How does the wave speed depend on the value of parameter D?

Page 33: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

For this model we will take retangular geometry.

File OpenGeometrySatarupa rectangle save it.

File NewMathModelSpatial click the geometry you just saved.

Page 34: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Now we have to declare two Functions.

1st Function is simple:

Function J P*(1-P) ;

Second Function initial concentration of P

Function P_init (1.0 / (1.0 + exp((2.0 * k * (-1.0 + x))))) ;

Page 35: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

The code looks like---

Page 36: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

Run simulation for t=20, and use line tool to see kymograph results.

t=0t=2

t=5.7 t=14.2

Page 37: Exercise: SIR MODEL (Infected individuals do not move, they stay at home) What is the effect of diffusion? How is the behavior affected by the diffusion

See the kymograph: