nut.model.functions: Functions to define ecosystem models for simulation.

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Model functions are used as part of argument model to call simulation functions.

Usage

1
2
3
4
nut.cycle(t,p,x)
nut.cycle.z(t,p,x)
nut.cycle.g(t,p,x,tz)
nut.river(t,p,x)

Arguments

t

time

p

parameters, an array

x

state variable

tz

times of sudden disturbance

Details

Function nut.cycle has a function f with the ODE resulting from the multiplication of the matrix k of coefficients by the X vector and the addition of a proportional u input/output (e.g., donor) component and the independent input/output forcing terms U. State varibale is concentration.

Functions nut.cycle.z and nut.cycle.g define discontinuous disturbance regime. Function nut.cycle.z defines times of discontinuities, and nut.cycle.g applies a linear disturbance at tz times defined by nut.cycle.z.

Function nut.river: Nitrogen is controlled by load, which is calculated as discharge over volume, inflow from upstream conditions (when multiplied by flow/volume), and depuration or washout (which is the concentration multiplied by flow/volume).

Value

Model functions: Rate of change or derivative of model.

Note

Model functions are employed mainly to define the ODE to be simulated by sim, simd, simt and other simulation functions.

Nominal parameter values are defined in input files. Variation of param values are defined in lists.

Input files are in 'datafiles.zip' in directory 'datafiles' and organized by chapters of Acevedo (2012). Input files are required to run the examples below.

Author(s)

Miguel F. Acevedo Acevedo@unt.edu

References

Acevedo M.F. 2012. Simulation of Ecological and Environmental Models. CRC Press.

See Also

Simulation functions sim, simd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

# Nitrogen cycle
cycle <- list(f=nut.cycle, z=nut.cycle.z, g=nut.cycle.g)
param <- list(plab="uh",pval=c(-0.5,-0.8))
t.X <- simd(cycle,"chp13/Ncycle-inp.csv",param)

# river no algae no flow and low flow,
river <- list(f=nut.river); param <- list(plab="Q",pval=c(0,0.060,0.600))
t.X <- sim(river,file="chp14/river-no-algae-inp.csv", param, pdfout=TRUE)


## End(Not run)

seem documentation built on April 14, 2017, 9:12 p.m.