-
Notifications
You must be signed in to change notification settings - Fork 0
/
Object PD.msl
48 lines (35 loc) · 1.51 KB
/
Object PD.msl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// ---------------------------------------------------------------------------
// HEMMIS - Ghent University, BIOMATH - Université Laval, modelEAU
// Implementation: Peter Vanrolleghem, Frederik De Laender, Ludiwine Clouzot.
// Description: MSL-USER/ELAFish
// ---------------------------------------------------------------------------
#ifndef OBJECTPD
#define OBJECTPD
CLASS PD (* class = "detritus" *) EXTENDS DD WITH
{:
interface <-
{
OBJ INGESTION_PD (* terminal = "in_1" *) "": RateProcess := {: causality <- "CIN" :};
OBJ GameteLoss (* terminal = "in_1" *) "": RateProcess := {: causality <- "CIN" :};
OBJ PD_out (* terminal = "out_1" *) "": Concentration := {: causality <- "COUT" :};
};
parameters <-
{
OBJ KSed "sedimentation rate": Velocity:={:value<-0.15:};
};
independent <- { };
state <-
{
OBJ SEDIMENTATION "": RateProcess;
OBJ DECOMP_PD "remineralisation rate of PD": RateProcess;
OBJ PD "particulate detritus": Concentration;
};
equations <-
{
DERIV(state.PD,[independent.t])= interface.GameteLoss + interface.MORTALITY_algae * (1 - parameters.fMORTALITY_algae_DD) + interface.MORTALITY_animals * (1 - parameters.fMORTALITY_animals_DD) - state.DECOMP_PD - state.SEDIMENTATION - interface.INGESTION_PD;
state.DECOMP_PD = parameters.DecayMax_water_PD * state.DOCorrection_water * state.DecTCorr * state.pHCorr * state.PD;
state.SEDIMENTATION = parameters.KSed / parameters.ZMean * state.PD;
interface.PD_out = state.PD;
};
:};
#endif