-
Notifications
You must be signed in to change notification settings - Fork 0
/
Object EXTINCTION.msl
54 lines (40 loc) · 1.83 KB
/
Object EXTINCTION.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
49
50
51
52
53
54
// ---------------------------------------------------------------------------
// HEMMIS - Ghent University, BIOMATH - Université Laval, modelEAU
// Implementation: Peter Vanrolleghem, Frederik De Laender, Ludiwine Clouzot.
// Description: MSL-USER/ELAFish
// ---------------------------------------------------------------------------
#ifndef OBJECTEXTINCTION
#define OBJECTEXTINCTION
CLASS EXTINCTION (* class = "detritus" *)
EXTENDS PHOSPHORUS WITH
{:
interface <-
{
OBJ Bio_algae (* terminal = "in_3" *) "total algae biomass": Concentration := {: causality <- "CIN" :};
OBJ Extinct_out (* terminal = "out_1" *) "light extinction": LightExtinct := {: causality <- "COUT" :};
};
parameters <-
{
OBJ EcoeffWater "extinction due to pure water" : LightExtinct:={:value<-0.016:};
OBJ EcoeffDOM "attenuation coeff for 'diss detritus'" : ExtinctCoeff:={:value<-0.03:};
OBJ EcoeffPOM "attenuation coeff for partic detritus" : ExtinctCoeff:={:value<-0.12:};
OBJ EcoeffPhyto "attenuation coeff for algae" : ExtinctCoeff:={:value<-0.014:};
OBJ EcoeffMacro "attenuation coeff for macrophyte" : ExtinctCoeff:={:value<-0.05:};
};
independent <- { };
state <-
{
OBJ PhytoExt"extinction due to phytoplankton" :LightExtinct;
};
equations <-
{
interface.Extinct_out = IF ( parameters.EcoeffWater + state.PhytoExt + parameters.EcoeffDOM * state.DD + parameters.EcoeffPOM * state.PD > 25)
THEN 25
ELSE
IF (parameters.EcoeffWater + state.PhytoExt + parameters.EcoeffDOM * state.DD + parameters.EcoeffPOM * state.PD < 0.000000001)
THEN 0.000000001
ELSE parameters.EcoeffWater + state.PhytoExt + parameters.EcoeffDOM * state.DD + parameters.EcoeffPOM * state.PD;
state.PhytoExt = parameters.EcoeffPhyto * interface.Bio_algae;
};
:};
#endif