mathematical modeling uab/edgrid john c. mayer uab/mathematics graduate assistants: clinton curry...

33
Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics raduate Assistants: Clinton Curry Brent Shivers

Upload: nickolas-bailey

Post on 23-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

Mathematical Modeling

UAB/EdGridJohn C. Mayer

UAB/MathematicsGraduate Assistants:

Clinton CurryBrent Shivers

Page 2: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 2

Mathematical Modeling

• Creates a mathematical representation of some phenomenon to better understand it.

• Matches observation with symbolic representation. • Informs theory and explanation.

The success of a mathematical model depends on how easily it can be used, and how accurately it predicts and how well it explains the phenomenon being studied.

Page 3: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 3

Mathematical Modeling• A  mathematical model is central to most

computational scientific research.

• Other terms often used in connection with mathematical modeling are– Computer modeling– Computer simulation– Computational mathematics– Scientific Computation

Page 4: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 4

Mathematical Modeling and the Scientific Method

• How do we incorporate mathematical modeling/computational science in the scientific method?

Page 5: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 5

Mathematical ModelingProblem-Solving Steps

• Identify problem area• Conduct background

research • State project goal• Define relationships• Develop mathematical

model

• Develop computational algorithm

• Perform test calculations

• Interpret results• Communicate results

Page 6: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

Syllabus: MA 261/419/519

Spring, 2006

Page 7: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 7

Syllabus: MA 261/419/519Introduction to Mathematical Modeling

• Prerequisite: Calculus 1• Goals

• Learn to build models• Understand mathematics behind models• Improve understanding of mathematical concepts• Communicate mathematics

• Models may be mathematical equations, spreadsheets, or computer simulations.

Page 8: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 8

Contact Information

• Instructor: Dr. John Mayer - CH 490A– [email protected] - 934-2154

– ??

• Assistant: Mr. Robert Cusimano - CH 478B– [email protected] - 934-2154

– ??MW 4:00 – 5:30 PM (computer lab CB 112)

• Assistant: Ms. Jeanine Sedjro – ??– ??

– ??MW 6:45 – 8:00 PM (computer lab CB 112)

Page 9: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 9

Class Meetings

• Lectures.– Monday and

Wednesday

– 5:30 – 6:45 PM

– CB15 112.

• Computer lab.– Monday and

Wednesday– 4:00 – 5:30 PM– 6:45 – 8:00 PM– CB15 112.

Page 10: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 10

Software Tools

• Spreadsheet:

• Microsoft EXCEL

• Compartmental Analysis and System Dynamics programming:

• Isee Systems STELLA

Page 11: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 11

Computer Lab

• The only computer labs that have STELLA installed are CB15 112 and EDUC 149A.

• Always bring a formatted 3.5” diskette to the lab.

• Label disk: “Math Modeling, Spring, 2006, Your Name, Math Phone Number: 934-2154”

Page 12: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 12

Assignments

• One or two assignments every week.

• First few assignments have two due dates.– Returned next class.– Re-Graded for improved grade.

• Written work at most two authors.– You may work together with a partner on the

computer.

Page 13: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 13

Midterm Tests

• Two tests, one about every 5 weeks.

• Given in the computer lab.

• Basic building blocks relevant to the kinds of models we are constructing.

• Mathematics and logic behind the computer models.

Page 14: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 14

System Dynamics Stories and Projects

• System Dynamics Stories.

– Scenarios describing realistic situations to be modeled.

– Entirely independent work – no partners.

– Construct model and write 5-10 page technical paper (template provided).

• Project due date to be announced.

– Begin work about middle of term.

– Preliminary evaluation three weeks prior to due date.

Page 15: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 15

Grading

  MA 261 MA 419 MA 519

Assignments 40% 30% 30%

Tests (2) 30% 30% 25%

Model 1 10% 10% 10%

Model 2 na  na 10%

Paper 20% 20% 15%

Lesson Plan na 10% 10%

Page 16: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

A Course Sampler

Page 17: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 17

Topics for Tools

• Spreadsheet Models– Data analysis: curve

fitting.– Recurrence Relations

and difference equations.

– Cellular Automata: nearest-neighbor averaging.

• Compartmental Models– Introduction to

System Dynamics.– Applications of

System Dynamics.– System Dynamics

Stories (guided projects).

Page 18: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 18

Spreadsheet Models: Excel

• Curve fitting – introduction to (linear) regression

• Difference Equations: modeling growth

• Nearest-neighbor averaging

Page 19: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 19

Mortevilleby Doug Childers

• Anthrax detected in Morteville

• Is terrorism the source?

• Infer geographic distribution from measures at several sample sites

• Build nearest neighbor averaging automaton in Excel

• Form hypothesis

• Get more data and compare

• Revise hypothesis

Page 20: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 20

Morteville View 1

0.2 0 2.1 4.1 6.3 8.4 9 9.7 11 12 13 14 14

0.3 0.9 2.2 4 6.3 10 9 9.4 10 12 13 15 14

0 0.9 1.9 3.3 5 6.7 7.4 8.6 10 11 12 13 13

0.3 0.7 1.2 2.4 3.5 4.5 5.3 7.6 10 11 12 13 12

0.3 0.3 0 1.4 2.3 2.6 1.5 6.6 12 10 11 13 11

0.3 0.3 0.3 0.8 1.6 2.2 2.9 5.1 7.2 7.8 8.2 8.6 8.5

0.2 0.2 0.2 0 1.1 1.8 2.6 3.6 4 5.3 5.5 4.9 5.5

0.1 0.1 0.2 0.4 0.9 1.4 2.1 2.9 3.5 4.1 3.6 0 3

0.1 0 0.2 0.4 0.6 0.9 1.6 2.2 3 4.1 4.8 3.4 3.6

0.1 0.1 0.2 0.3 0.3 0 1 1.6 2.2 4.3 8 5.2 4.5

0.2 0.2 0.2 0.3 0.3 0.4 0.7 0.8 0 3 5 4.8 4.6

0.2 0.2 0.3 0.3 0.4 0.5 0.7 0.9 1.2 2.8 4.1 4.5 4.5

Page 21: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 21

Anthrax Distribution 1

Page 22: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 22

Compartmental Modeling

• How to Build a Stella Model

• Simple Population Models

• Generic Processes

• Advanced Population Models

• Drug Assimilation

• Epidemiology

• System Stories

Page 23: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 23

Population Model•Stella Model

Population(t) = Population(t - dt) + (Births - Deaths) * dtINIT Population = 100000 {people}

INFLOWS:Births = Population*Fraction_That_Are_Female*Reproducing_Females*Births_per_Rep_Female {people/year}OUTFLOWS:Deaths = Population*Death_Fraction {people/year}Births_per_Rep_Female = 66/1000 {people/1000 rep females/year}Fraction_That_Are_Female = 0.5 {females/people}Reproducing_Females = .45 {rep females/female}Death_Fraction = GRAPH(Population)(120000, 0.01), (125000, 0.011), (130000, 0.013), (135000, 0.015), (140000, 0.017), (145000, 0.019), (150000, 0.02)

•Equations•Graphical Output

Page 24: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 24

Generic Processes

• Linear model with external resource

Typewriters in warehouse

Typewriters madeper week

Typewriters made per employee Employees

Temperature

Cooling

cooling rate

Weight

weight gained weight lost

weight gain per month

weight loss rate

• Exponential growth or decay model

• Convergence model

Page 25: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 25

Calculus Example

Stock X

Flow 1

Constant a

STELLA Equations:Stock_X(t) = Stock_X(t - dt) + (Flow_1) * dt

INIT Stock_X = 100Flow_1 = Constant_a*Stock_XConstant_a = .1

Flow is proportional to X.

STELLA Diagram

Page 26: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 26

Connecting the Discrete to the Continuous

• Stock_X(t) = Stock_X(t - dt) + (Flow_1) * dt

• (Stock_X(t) - Stock_X(t - dt))/dt = Flow_1• Flow_1 = Constant_a*Stock_X(t – dt)

• (X(t) - X(t - dt))/dt = a X(t - dt)

• Let dt go to 0

• dX/dt = a X(t) (a Differential Equation)

Page 27: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 27

Solution to DE

• dX/dt = a X(t)

• dX/X(t) = a dt

• Integrate

• log (X(t)) = at + C

• X(t) = exp(C) exp(at)

• X(t) = X(0) exp(at)

Page 28: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

System Dynamics Stories and

Projects

Page 29: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 29

System Dynamics Stories and Projects

• Scenarios describing realistic situations to be modeled.

• Fully independent work.• Construct model.• Write 5-10 page technical paper

(template provided).

Page 30: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 30

Modeling a Dam 2

• Boysen Dam has several purposes: It "provides regulation of the streamflow for power generation, irrigation, flood control, sediment retention, fish propagation, and recreation development." The United States Bureau of Reclamation, the government agency that runs the dam, would like to have some way of predicting how much power will be generated by this dam under certain conditions.

– Clinton Curry

Boysen Dam

Page 31: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 31

TailwaterElimination

Water Volume

Dam Capacity

Percent full

~

height ofheadwater

~

Ten Year Average

?

River flow

~Turbine multiplier

Minimum Height

Target Water Height

Spillway Release Capacity

Turbine Flow

Tailwater

Spillway Flow

Turbine Flow

Turbine Capacity

Minimum Head

~height oftailwater

~

Initial Water Volume Percent

~

height ofheadwater

~

height oftailwater

Power Generated

Initial Water Height~

Spill modifier

~

Spill modifier

?

River flow

Water Volume

Dam Capacity

~

Target Water Volume Percent

Maximum Height

~

Target Water Volume Percent

Initial values

Power Gene…

Calculating Spill …

Page 32: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 32

Boysen Dam

Page 33: Mathematical Modeling UAB/EdGrid John C. Mayer UAB/Mathematics Graduate Assistants: Clinton Curry Brent Shivers

UAB 33

Modeling a Smallpox Epidemic• One infected

terrorist comes to town

• How does the system handle the epidemic under different assumptions?

– Alicia Wilson

unvaccinated

susceptible

Unvaccinated

have smallpox

unvaccinated

getting smallpox

Total never

infected people

exposure

probability

current

population

unvaccinated

deaths

unvaccinated

mortality

new exposures

Total deaths

new exposures

per unvaccinated

sick person

unvaccinated probability

of catching smallpox

unvaccinated

survivors

unvaccinated

survival

unvaccinated

death rate

Recently

vaccinated

recently

vaccinated

have smallpox

immune suppressed

mortality

Total people

with smallpox

exposure

probability

recently vaccinated

getting smallpox

Recently

vaccinated

deaths

recently vaccinated

mortality

recently vaccinated

survivors

recently

vaccinated

survival

vaccinations

Recent vaccination

probability of

catching smallpox

Vaccination

rate

recently

vaccinated

death rate

exposure

probability

multiple exposure

correction

older vaccinated

mortality

immune

suppressed

immune suppressed

have smallpox

immune suppressed

deaths

immune suppressed

getting smallpox

Total deaths

older

vaccinated

older vaccinated

have smallpox

older vaccinated

getting smallpox

older vaccinated

deaths

older vaccinated

survivors

older vaccinated

survival older

vaccinated

death rate

older vaccinated

susceptibility

Revaccinations

revaccination

rate

unvaccinated

deaths

Recently

vaccinated

deaths

older vaccinated

deaths

Unvaccinated

have smallpox

recently

vaccinated

have smallpox

older vaccinated

have smallpox

Total people

with smallpox

unvaccinated

susceptible

Recently

vaccinated

older

vaccinated

Total never

infected people

Total original

population

new esposures

per vaccinated

sick person

Unvaccinated

have smallpox

recently

vaccinated

have smallpox

older vaccinated

have smallpox

new exposures

per older vaccinated

sick person

immune suppressed

survivors

immune suppressed

survival

immune suppressed

mortality rate

immune suppressed

probability of

catching smallpox

immune

suppressed

immune suppressed

have smallpox

immune suppressed

deaths

immune suppressed

have smallpox

new exposures

per immune suppressed

sick person