Physics 212, 2018: Lectures 4

From Ilya Nemenman: Theoretical Biophysics @ Emory
Revision as of 11:28, 4 July 2018 by Ilya (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Emory Logo

Back to the main Teaching page.

Back to Physics 212, 2018: Computational Modeling.

In this lecture, we continue learning the basics of computational modeling and Python language using the simple linear (,malthusian) growth model.

Finishing up from the previous lecture

Your work
explore how the solution spends on dt. Output results only when t is an integer.

New Python constructions

  • Objects -- mutable (arrays and lists) vs. immutable (numbers)
    • Object attributes and object methods, using dir()
    • Overloading methods
  • Variables vs. objects
  • Lists vs. Numpy arrays
    • Why np.zeros((2,4)) and not np.zeros(2,4)?
  • Creation, concatenation (stacking).
  • Slicing -- doesn't create new arrays
  • Flatten copies data, ravel and reshape does not
  • Strings
  • Loops
  • Vector math is always faster than element-by-element math

Basic plotting

Submit your work.

Our simplest model

A real environment won't have resources that are capable of supporting an infinite bacterial population. Thus as the population grows, the growth rate should decrease. The simplest assumption is that it decreases linearly . This gives for the growth: . Or, in other words, , where is the carrying capacity -- the number of bacteria where there growth rate is equal to 0, and the population stabilizes.