Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exercises: C = 0 on the whole boundary no flux at all boundaries In these cases, make surface color plots of the concentration in the cell at different.

Similar presentations


Presentation on theme: "Exercises: C = 0 on the whole boundary no flux at all boundaries In these cases, make surface color plots of the concentration in the cell at different."— Presentation transcript:

1 Exercises: C = 0 on the whole boundary no flux at all boundaries In these cases, make surface color plots of the concentration in the cell at different moments of time, learn how to make line plots, determine how fast the concentration spreads, and in general think about the meaning of the results.

2 Exercise 1: Create a Biomodel like this An elliptical cell with concentration confied somewhere inside it.

3 Create this Geometry (2D analytic). Think how to create geometry. Or if you can not Use shared Geometry from my account File  Open  Geometry  Shared Geometries  Satarupa  ellipse_diff  click See what I did to create this geometry. Save this geometry. It will be saved in your Geometry document.

4 Application (deterministic) Structure Mapping Initial Conditions (concentration confied inside the ellipse and C=0 at the whole boundary) Save the Model Simulation Now you know all the steps:

5 Structure Mapping: Value boundary condition for the ellipse

6 Initail Condition: concentration is confined some where inside the ellipse

7 Results: For t=3.4 sec For t=0 sec For t=10.0 sec For t=22.3 sec

8 For t=10.0 sec Spatial plot: For t=2.5 sec For t=28.1 sec

9 Time plot:

10 Play with your Model: 1.Change the Difussion Constant. See how fast equllibrim occurs. 2.Make the source concentration a point, see what happens. 3.Now you change the geometry, Create a new one (big or small), see the results

11 Exercise 2: Diffusion in this geometric structure with concentration in one of the circles Consider this structure as a cell in ECM Your Biomodel will look like this

12 Create this Geometry (2D analytic). Think how to create geometry. Or if you can not Use shared Geometry from my account File  Open  Geometry  Shared Geometries  Satarupa  2circle_rectangle  click See what I did to create this geometry. Save this geometry. It will be saved in your Geometry document.

13 1.Application (deterministic) 1.Structure Mapping 2.Initial Conditions 3.Save the Model 4.Simulation Now you know all the steps:

14 Structure Mapping:

15 concentration is confined some where inside one of the circles and No Flux BC Initial condition

16 Results: For t=0 sec For t=4.9 sec For t=60 secFor t=194.6 sec For Diffusion Constant =1

17 Diffusion constant = 10 For t= 52.9sec For t= 77.4sec

18 Line plot: Diffusion Constant =10 For t= 80.6sec For t= 41.9sec For t= 12.4sec For t= 1.6sec

19 Play with your Model: 1.Change the Difussion Constant. See how fast equllibrim occurs. 2.Make the source concentration a point, see what happens. 3.Now you change the geometry, Create a new one (big or small), see the results

20 Diffusion - Reaction Now we will study There will be a diffusion of concentration from left wall of the box to the right wall and inside this box concentration is decaying with a rate r (say). That is, Now we will see results of diffusion-reaction in Vcell

21 File  open  BioModel  model name (find out the model with diff in box which you did during last lab ) Select the compartment and right click to get this document then click Reactions.. Now we will use any of our old models of diff in Box from last lab Hint: We will modify this model -- Now save this model with a new name to study diffusion-Reaction.

22 In the reaction window use Reaction tool and line tool to set reaction. It will look like this Note: there is no other reactant. C is decaying itself. So we set the reaction like this.

23 ClickIn the reaction window to get Reaction kinetic editor. 1.Set the reaction General 2. Put the value of the constant r =0.5 Close the reaction kinetic editor window. Save the model with a name.

24 Set Boundary condition Go to initial condition

25 Save the Model  See the Math Model  Run Simulation. Reaction and Diffusion

26 R=0.5, D= 10, t=0.9R=0.5, D= 10, t=8.9

27 R=1, D= 10, t=2 R=1, D= 10, t=10

28 Diffusion-Reaction in an elliptical cell with concentration confied somewhere inside it. We can use our previous model and change it a bit to see the result of Diffusion-Reaction. Open your saved Ellipse_diffusion model. Now go to File  Save as..  with a new name (diff_reac_ellipse, say) So, this way we can save time and monotonous jobs !!!

29 Now we set the Reaction same as before: Save the Model.

30 Initial Condition: concentration is confined some where inside the ellipse like before Save the Model and See the Math Description Set no flux Boundary condition in structure mapping section.

31 See how Diffusion and Reaction are described in Math Model Reaction-Diffusion Inside the ellipse Note c is a Function

32 Results: r=0.3, D= 10, t=0.1 r=0.3, D= 10, t=1 r=1, D= 1, t=1.1

33 Exercise 1 (double source): No flux on the whole boundary Save previous ellipse model with a new name !!!! Only difference is declaring Initial Condition, where you have to set two sources of concentration.

34 Initial Condition for two sources

35 For r=1, D=1

36 Now we will write our Math Model for solving PDEs Lotka-Volterra Model with diffusion in 2D space with no Flux BC D R and D W are diffusion constants for Rabbit and Wolf growth predation Deathgrowth

37 Start file  new  MathModel  Spatial Then you have to choose a geometry. For L-V model just consider a box. Imagine this Box as the Jungle. No Flux BC means animals must stay inside it.

38 This Window will pop up Here we will write pde.

39 Open your old Lotka –Volterra model (ODE) and copy paste all constants. Add diffusion rates as constant, like Constant W_N_diffusionRate 0.2; Constant R_N_diffusionRate 0.2; Then copy-Paste VolumeVariables and Functions

40 CompartmentSubDomain subVolume1 { } In this section we will write PDEs for Rabbit and wolf. CompartmentSubDomain subVolume1 { BoundaryXm Flux BoundaryXp Flux BoundaryYm Flux BoundaryYp Flux PdeEquation R_N { BoundaryXm 0.0; BoundaryXp 0.0; BoundaryYm 0.0; BoundaryYp 0.0; Rate J_predation; Diffusion R_N_diffusionRate; Initial R_N_init; } Change Flux from value No flux BC Similarly write down the equations for Wolf Predation rate Diffusion rate

41 PdeEquation W_N { BoundaryXm 0.0; BoundaryXp 0.0; BoundaryYm 0.0; BoundaryYp 0.0; Rate J_wolfgrowth; Diffusion W_N_diffusionRate; Initial W_N_init; } Wolf equation--- Click Apply Changes  Simulation  Run  Save the Model Click Equation view to see the equations.

42 Lotka-Volterra spatial MathModel --

43 Run the simulation for t=10 sec, time step=0.01, See the results.. Here we have thought that rabbits and wolves are mixed up in jungle.... Increase the time and see how number of Rabbits and wolves chages. Rabbit at t=4.25 wolf at t=4.25

44 You can play with with it, changinging different parameters Time Plot Rabbit : a=10, c=5 D R =0.2 Wolf : a=10, c=5 D W =0.2 Now, consider Rabbits and wolves live in two different places in Jungle save this model with a new name. File  save as..(a new name to modify it)

45 Modify the code: Cut the Constant declaration for initial Rabbit and Wolf. Constant d 1.0; Constant c 1.0; Constant b 1.0; Constant a 1.0; Constant W_N_diffusionRate 0.2; Constant R_N_diffusionRate 0.2; VolumeVariable R_N VolumeVariable W_N Function J_predation ((a * R_N) - (R_N * b * W_N)); Function J_wolfgrowth ((R_N * d * W_N) - (c * W_N)); Function R_N_init (10.0 * ((((-5.0 + x) ^ 2.0) + (y ^ 2.0)) < 25.0)); Function W_N_init (5.0 * ((((-5.0 + x) ^ 2.0) + ((-10.0 + y) ^ 2.0)) < 25.0)); Rabbits and Wolves must be described as Functions not as Constants Only change: last two lines in Fuction declaration

46 New MathModel looks like --

47 Rabbits and wolves at different times At t=0 At t=.275 growth At t=1.989 decay At t=0.16 decay At t=.591 growth At t=0 Rabbit wolf

48 Apply Changes—run simulation T=10 sec Timesteps=0.001 a= 10.0 c=5.0 Edit diffusion rates 0.5 for rabbits and wolves. Rabbits, t=3.37Wolves, t=3.37

49 1.Change diffusion rate 2. Change growth and death rate of Rabbit and wolf 3. Modify the positions of rabbit and wolf 4. Run for different time. In these two Models edit different parameters and try to think what is Happening and why? Rabbit at t=5.806wolft at t=5.806

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

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

52 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. These are condition for our new system: Go file  new  math Model  Spatial  click the geometry you just created

53 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

54 The code looks like -

55 Click equation viewer -- Close this window and click simulation

56 Run simulation for t=100, I=0, 0.05, 0.2 can you increase parameter I and get periodic firing?

57 For I=0.0V at t=0.0C at t=0.0 Time plot CTime plot V

58 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

59 Time plot for I=0.2, t= 1000 sec V C

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

61 Again 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.

62 Part-1

63 Part-2

64 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

65 Infected popultion stays at the middle, see how the concentration Changes as you increase the time. Line plot, t=.3 Time plot Line plot, t= 10

66 Recovered Population: Time plot Line plot

67 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 !!!

68 Susceptible (D=1): Line plot Time plot

69 Infected Time plot Line plot

70 Recovered:

71 When Diffusion rate =0 If healthy people dont move. Nothing happens outside the infected region Infection becomes epidemic in the infected region Recovered


Download ppt "Exercises: C = 0 on the whole boundary no flux at all boundaries In these cases, make surface color plots of the concentration in the cell at different."

Similar presentations


Ads by Google