EGR 103/Spring 2021/Lab 13

From PrattWiki
Jump to navigation Jump to search

Introduction

Be sure to look at the information at:

first! For the first and fourth problems, you are given a code skeleton to start with. For the second problem, you will be using the first problem as a starter. For the third and fifth problems, you should start with the template.

Assignment

Chapra 22.4

There is relatively little code for you to add (three lines need adjustment); the goal is to make sure you understand the process of setting up and solving a differential equation and plotting the results.

Chapra 22.5

Be sure to start with the code from Chapra 22.4! Note that the required parameters are given in the problem statement - you are not trying to optimize anything here.

Chapra 22.18

The concentrations all start at 0; after an hour, the concentrations have climbed to values between about 7 and 13. One tank has a concave-down graph while the others start a little concave up and then go concave down.

Cannon Ranging

You should get two distinct angles (i.e. 45 and 405 would be the same angle). Remember that you are firing from a hilltop.

Chapra 22.14

You will only be using the initial population data for this problem, not the rest of the table in the book. The values for $$a$$, $$b$$, $$c$$, and $$d$$ are given in the problem. The Moose and Wolf populations should look periodic with the Moose peaks coming a few years before the Wolf peaks and the Moose troughs coming a few years after the Wolf peaks.

Deliverables

  • Connect
    1. $$k_g$$ for the simple population model.
    2. Estimate of the population in 2050 using the simple population model - the Connect answer will be different from yours because they use RK4 instead of ODE45; however, yours will be within 2% of their answer and thus will be marked correct.
    3. Estimate of the population in 2050 using the more complicated population model.
  • Sakai - make a "Lab 13" folder in the Dropbox and use the filenames given in the assignment
    1. Code and graph
    2. Code and graph
    3. Code and graph
    4. Code where the initial angle is set to one value and has a comment indicating the other
    5. Code and graph