Exercises: - PowerPoint PPT Presentation

1 / 71
About This Presentation
Title:

Exercises:

Description:

So, this way we can save time and monotonous jobs !!! Now we set the Reaction same as before: ... If healthy people dont move. Nothing happens outside the ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 72
Provided by: hom4310
Category:
Tags: dont | exercises | in | like | that | way | you

less

Transcript and Presenter's Notes

Title: Exercises:


1
Exercises
no flux at all boundaries
C 0 on the whole boundary
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
An elliptical cell with concentration confied
somewhere inside it.
Create a Biomodel like this
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?Share
d 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
Now you know all the steps
  • Application (deterministic)
  • Structure Mapping
  • Initial Conditions (concentration confied inside
    the ellipse and
  • C0 at the whole boundary)
  • Save the Model
  • Simulation

5
Structure Mapping
Value boundary condition for the ellipse
6
Initail Condition concentration is confined some
where inside the ellipse
7
Results
For t3.4 sec
For t0 sec
For t22.3 sec
For t10.0 sec
8
Spatial plot
For t28.1 sec
For t10.0 sec
For t2.5 sec
9
Time plot
10
  • Play with your Model
  • Change the Difussion Constant. See how fast
    equllibrim occurs.
  • Make the source concentration a point, see what
    happens.
  • 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?Share
d 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
Now you know all the steps
  • Application (deterministic)
  • Structure Mapping
  • Initial Conditions
  • Save the Model
  • Simulation

14
Structure Mapping
15
Initial condition
concentration is confined some where inside one
of the circles and No Flux BC
16
Results
For Diffusion Constant 1
For t4.9 sec
For t0 sec
For t60 sec
For t194.6 sec
17
Diffusion constant 10 For t 52.9sec
For t 77.4sec
18
Diffusion Constant 10
Line plot
For t 12.4sec
For t 1.6sec
For t 41.9sec
For t 80.6sec
19
  • Play with your Model
  • Change the Difussion Constant. See how fast
    equllibrim occurs.
  • Make the source concentration a point, see what
    happens.
  • 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
Now we will use any of our old models of diff in
Box from last lab
File?open?BioModel? model name (find out the
model with diff in box which you did during
last lab )
Hint
Now save this model with a new name to study
diffusion-Reaction.
We will modify this model --
Select the compartment and right click to get
this document then click Reactions..
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
Click
In 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
R0.5, D 10, t0.9
R0.5, D 10, t8.9
27
R1, D 10, t2
R1, D 10, t10
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. Ope
n 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
Set no flux Boundary condition in structure
mapping section.
Initial Condition concentration is confined some
where inside the ellipse like before
Save the Model and See the Math Description
31
See how Diffusion and Reaction are described in
Math Model
Note c is a Function
Reaction-Diffusion Inside the ellipse
32
Results
r0.3, D 10, t1
r0.3, D 10, t0.1
r1, D 1, t1.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 r1, D1
36
Now we will write our Math Model for solving PDEs
Lotka-Volterra Model with diffusion in 2D space
with no Flux BC
growth
predation
Death
growth
DR and DW are diffusion constants for Rabbit and
Wolf
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 Ini
tial R_N_init
Change Flux from value
No flux BC
Predation rate
Diffusion rate
Similarly write down the equations for Wolf
41
Wolf equation---
PdeEquation W_N BoundaryXm 0.0 BoundaryXp
0.0 BoundaryYm 0.0 BoundaryYp 0.0 Rate
J_wolfgrowth Diffusion W_N_diffusionRate In
itial W_N_init
Click Equation view to see the equations.
Click Apply Changes? Simulation? Run? Save the
Model
42
Lotka-Volterra spatial MathModel --
43
Run the simulation for t10 sec, time step0.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.
wolf at t4.25
Rabbit at t4.25
44
Time Plot
Rabbit a10, c5 DR0.2
Wolf a10, c5 DW0.2
You can play with with it, changinging different
parameters
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
Rabbits and Wolves must be described as Functions
not as Constants
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)) lt 25.0)) Function
W_N_init (5.0 ((((-5.0 x) 2.0) ((-10.0
y) 2.0)) lt 25.0))
Only change last two lines in Fuction
declaration
46
New MathModel looks like --
47
Rabbits and wolves at different times
Rabbit
At t0
At t.275 growth
At t1.989 decay
wolf
At t0.16 decay
At t.591 growth
At t0
48
Apply Changesrun simulation T10
sec Timesteps0.001 a 10.0 c5.0 Edit diffusion
rates 0.5 for rabbits and wolves.
Rabbits, t3.37
Wolves, t3.37
49
Rabbit at t5.806
wolft at t5.806
In these two Models edit different parameters and
try to think what is Happening and why?
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 .
50
Fitzhugh-Nagumo system with voltage (ions)
spreading along the axon
51
Create 2D analytic geometry. Set size x1, Y
0.5, origin at (0.0). Save it with a name .
52
Go file? new? math Model?Spatial? click the
geometry you just created
These are condition for our new system
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.
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
We have 1 ODE for C
Click Apply changes.
54
The code looks like -
55
Click equation viewer --
Close this window and click simulation
56
Run simulation for t100, I0, 0.05, 0.2
can you increase parameter I and get periodic
firing?
57
For I0.0
V at t0.0
C at t0.0
Time plot C
Time 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.2
Time plot for C with I 0.05
59
Time plot for I0.2, t 1000 sec
C
V
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.
  • 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
What happens to Healthy Population
Healthy people move arround and if they come near
infected people, who are In the middle, they get
sick !!
Time plot
Line plot
S_init9.0,D 1.0
65
Infected popultion stays at the middle , see how
the concentration Changes as you increase the
time.
Line plot, t 10
Line plot, t .3
Time plot
66
Recovered Population
Line plot
Time 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 y2) lt 1 ) (((x-5)2 (y-10)2)
lt 1 )) 0.2
It specifies two two places of infected
population with the concentration 0.2
Thats all !!!
68
Susceptible (D1)
Line plot
Time plot
69
Infected
Line plot
Time plot
70
Recovered
71
When Diffusion rate 0
Infection becomes epidemic in the infected region
If healthy people dont move.
Nothing happens outside the infected region
Recovered
Write a Comment
User Comments (0)
About PowerShow.com