1 / 17

A Simple Model of Carnivore & Their Prey

A Simple Model of Carnivore & Their Prey. How to deal with linked ODE systems And why we must abandon Euler's method Next time; how to replace Euler's. First, what is an ODE? Where the derivatives of one or more variables vary with respect to just one axis

zahir-horne
Download Presentation

A Simple Model of Carnivore & Their Prey

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Simple Model of Carnivore & Their Prey How to deal with linked ODE systems And why we must abandon Euler's method Next time; how to replace Euler's

  2. First, what is an ODE? • Where the derivatives of one or more variables vary with respect to just one axis • So let us examine a simple model of how Carnivores and Prey evolve in time (but not space & time). • Why is this earth science?

  3. Lotka-Volterra Predator Prey model • Assume prey have infinite food, and each can reproduce a fixed amount per time • So prey (P) growth is a fraction  of prey abundance • This really means that prey abundance is controlled by carnivores (why?) • Solution, without predators, is • Show on board!

  4. Assume that a fraction  of the carnivores C die per unit time • accidents and mishaps! • so w/o food, they all die in an exponential decay

  5. And now the interaction term • number of Prey eaten depends on number of prey times number of carnivores • Chance encounter model • with efficiency  • thus: • Where PC is rate of predation

  6. And some of the Prey eaten turn into new carnivores with an efficiency  • burp…

  7. So the equations are: Prey are born Prey are eaten, and turned into Carnivores Carnivores die of old age

  8. How do we solve this with Euler's method? • So we write code for the derivative of the vector Pop=[P,C]

  9. So what does the code for the derivative function look like? function dPopdt=dPop_dt(t,Pop); %calculate the Lotka-Volterra carnivore prey equations % % d(Prey)/dt = Prey*(alpha-beta*Carnivore) % d(Carnivore)/dt = -Carnivore*(gamma-delta*Prey) % % where % % The state variable is Pop(1) is prey, Pop(2) is carnivore gamma=0.05; delta=0.001; alpha=0.04; beta=0.00075; dPopdt=[1;1]; %Explain this line! dPopdt(1)=Pop(1)*(alpha-beta*Pop(2)); dPopdt(2)=-Pop(2)*(gamma-delta*Pop(1));

  10. And how do we use this with Euler's method? t=0; %initial time Pop=[10;10]; %intial condition dt=0.05/2; %time step tvec=[t]; %store time history Popvec=[Pop]; %store T history %integrate with Euler's method to time t>2pi while (t<=500) Pop=Pop+dt*dPop_dt(t,Pop); %what is the shape of Pop? t=t+dt; tvec=[tvec t]; Popvec=[Popvec Pop]; end plot(tvec,Popvec(2,:),'r*-',tvec,Popvec(1,:),'g-','linewidth',2) xlabel('time, days') ylabel('critter numbers') title('Red line is the Carnivore density; green is the Prey')

  11. So what does the solution look like • What is wrong? • What is right?

  12. What is right: The dynamics • Few Carnivores • Lots of Prey growth • Lots of Preditor growth • Most of the prey eaten • Carnivores Starve

  13. Examples of this in the real world • diatom blooms in ocean • lemmings in the arctic • wolf & moose in some isolated systems (islands, mostly)

  14. What is wrong? • With Euler, we do not know what timestep should be

  15. How do you find a good time step? • What is origin of error in Euler's?

  16. So how do you find the "right" timestep? • should get same answer for t and t/2 • But this is expensive and time consuming! • And Euler's is also inefficient. • Next time, a more accurate method that chooses its own timestep!

More Related