A chemical reaction combines hydrogen and oxygen to produce water
To make it simple we will assume that the reaction is this: \[2H+O\leftrightarrow H_2O\]
Our system has 3 items:
We represent hydrogen by H
, oxygen by O
, and water by W
.
Each vector has the number of atoms or molecules for different times
We will measure the number of atoms and molecules in moles
The initial quantities are:
There are two reactions at the same time:
from hydrogen and oxygen into water
(that is, left to right),
from water into hydrogen and oxygen
(that is, right to left).
Create a water_formation
function.
Inputs are:
N
: Number of steps in the simulationH_ini
: initial amount of hydrogenO_ini
: initial amount of oxygenW_ini
: initial amount of waterreaction1_rate
: reaction 1 ratereaction2_rate
: reaction 2 rateN
: Try 100 or 1000H_ini
: 1O_ini
: 1W_ini
: 0reaction1_rate
: 0.1reaction2_rate
: 0.1One atom of oxygen has 16 times the mass of one atom of hydrogen
Therefore one molecule of water has mass 18
Show that the total mass never changes
We have three kinds of rabbits: baby, adult and pregnant rabbits.
Each month baby rabbits grow, so the number of adult rabbits increases and the number of baby rabbits decreases. The same happens with adult and pregnant rabbits.
On the other side, each of pregnant rabbit produces a new baby rabbit, so the number of baby rabbits increases by the number of pregnant rabbits.
Please answer in plain English. Then draw the system
The initial conditions are:
baby_ini=1
,adult_ini=0
andpregnant_ini=0
.The rate constants for growth, mating and birth are 1.
Please simulate the system for N=24
steps.
We start with a lot of Healthy people and one Infected person.
The process of infection transforms healthy people into infected people.
They can die before treatment though the dying process, or can be accepted in a Hospital through the process of diagnostic.
People in the hospital can become Recovered through the healing process, or become Dead through the death process.
Please answer in plain English. Then draw it.
The public health decisions do not change the model, or the initial values. We can only change the process rates.
Please explain how process rates change with each action.
Simulate it and test your predictions
dead people can revive in the form of zombies
Some of the dead get revived by Afro-caribean voodoo magic. Zombies go around looking for humans to eat.
When a zombie and a human meet, two things can happen.
see “Night of the Living Dead”, George A. Romero, 1968 or “Shaun of the Dead”, Simon Pegg, 2002
So N=28*24
The attack rate is 5e-3
,
kill rate is 1e-3
and
the voodoo rate is 1e-2
.
What will happen with us?