The growth of floating, unicellular algae below a sewage treatment plant discharge can be modeled with the following simultaneous ODEs:
d
a
d
t
=
−
[
K
g
(
n
,
p
)
−
k
d
−
k
s
]
a
d
n
d
t
=
r
n
c
k
h
c
−
r
n
a
k
g
(
n
,
p
)
a
d
p
d
t
r
p
c
k
h
c
−
r
p
a
k
g
(
n
,
p
)
a
d
c
d
t
=
r
c
a
k
a
a
−
k
h
c
where
t
=
traveltime
(
d
)
,
a
=
algal
chlorophyll concentration
(
μ
g
A/L
)
,
n
=
inorganic
nitrogen concentration
(
μ
g
N/L
)
,
p
=
inorganic
phosphorus concentration
(
μ
g
P
/
L
)
,
c
=
detritus
concentration
(
μ
g
C
/
L
)
,
k
d
=
algal
death rate
(
l
d
)
,
k
s
=algal
settling rate
(
l
d
)
,
k
h
=
det
rital
hydrolysis rate
(
l
d
)
,
r
n
c
=
nitrogen
to-carbon ratio
(
μ
g
N/
μ
gC
)
,
r
p
c
=
phosphorus-to-carbon
ratio
(
μ
g
P/
μ
gC
)
,
r
n
a
=
nitrogen-to
chlorophyll ratio
(
μ
g
N/
μ
gA
)
,
r
p
a
=
Phophorus-to
chlorophyll ratio
(
μ
g
p/
μ
gA
)
,
a
n
d
k
g
(
n
,
p
)
=
algal
growth rate
(
l
d
)
, which can be computed with
k
g
(
n
,
p
)
=
k
g
min
{
p
k
s
p
+
p
,
n
k
s
n
+
n
}
where
k
g
=
the
the algal growth rate at excess nutrient levels
(
l
d
)
,
k
s
p
=
the
phosphorus half-saturation constant
(
μ
g
P/L
)
,
and
k
s
n
=
the
nitrogen half-saturation constant
(
μ
g
N/L
)
. Use the ode45 and ode15s functions to solve these equations from
t
=
0
to 50 d given the initial conditions
a
=
1
,
n
=
4000
,
p
=
800
,
and
c
=
0
Note that the parameters are
k
d
=
0.1
,
k
s
=
0.15
,
k
h
=
0.025
,
r
n
c
=
0.18
,
r
p
c
=
0.025
,
r
n
a
=
7.2
,
r
p
a
=
1
,
r
c
a
=
40
,
k
g
=
0.5
,
k
s
p
=
2
,
and
k
s
n
=
15
. Develop plots of both solutions and interpret the results.