Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a184a5e
commit 0337e7c
Showing
15 changed files
with
49 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
jss Sourcecode and demo for Petzoldt and Rinke (2007): Journal of Statistical Software, vol. 22 issue 09 | ||
rwalk3d Demo of a random walk model in 3D | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
chemostat <- new("odeModel", | ||
main = function(time, init, parms, inputs=NULL) { | ||
vm <- parms["vm"] # max growth rate | ||
km <- parms["km"] # half saturation constant | ||
D <- parms["D"] # dilution rate | ||
S0 <- parms["S0"] # substrate in inflow | ||
Y <- parms["Y"] # yield coefficient for substrate | ||
X <- init[1] # cells (e.g. algae) | ||
S <- init[2] # substrate (e.g. phosphorus) | ||
|
||
mu <- vm * S/(km + S) # Monod equation | ||
dx1 <- mu * X - D * X # cells | ||
dx2 <- D *(S0 - S) - 1/Y * mu * X # substrate | ||
list(c(dx1, dx2)) | ||
}, | ||
parms = c( | ||
vm = 1.0, # 1/d | ||
km = 2.0, # mumol Substrate/l | ||
Y = 100, # cells /mumol Substrate | ||
D = 0.5, # 1/d | ||
S0 = 10 # mumol Substrate/l | ||
), | ||
times = c(from=0, to=40, by=.5), | ||
init = c(X=10, S=10), # cells/l; umol Substrate/l | ||
solver = "lsoda" | ||
main = function(time, init, parms, inputs = NULL) { | ||
with(as.list(c(init, parms)), { | ||
mu <- vm * S / (km + S) # Monod equation | ||
dx1 <- mu * X - D * X # cells, e.g. algae | ||
dx2 <- D *(S0 - S) - 1/Y * mu * X # substrate, e.g. phosphorus | ||
list(c(dx1, dx2)) | ||
}) | ||
}, | ||
parms = c( | ||
vm = 1.0, # max growth rate, 1/d | ||
km = 2.0, # half saturation constant, mumol / L | ||
Y = 100, # cells /mumol Substrate | ||
D = 0.5, # dilution rate, 1/d | ||
S0 = 10 # substrate in inflow, mumol / L | ||
), | ||
times = c(from = 0, to = 40, by = .5), | ||
init = c(X = 10, S = 10), # cells / L; Substrate umol / L | ||
solver = "lsoda" | ||
) | ||
|
Binary file not shown.
Oops, something went wrong.