-
Notifications
You must be signed in to change notification settings - Fork 0
/
Object MASS.msl
46 lines (30 loc) · 1.55 KB
/
Object MASS.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
// ---------------------------------------------------------------------------
// HEMMIS - Ghent University, BIOMATH - Université Laval, modelEAU
// Implementation: Peter Vanrolleghem, Frederik De Laender, Ludiwine Clouzot.
// Description: MSL-USER/ELAFish
// ---------------------------------------------------------------------------
#ifndef OBJECTMASS
#define OBJECTMASS
CLASS MASS (* class = "detritus" *)
EXTENDS PHOSPHORUS WITH
{:
interface <-
{
OBJ Bio_algae (* terminal = "in_3" *) "total algae biomass": Concentration := {: causality <- "CIN" :};
OBJ Bio_animals (* terminal = "in_1" *) "total animal biomass": Concentration := {: causality <- "CIN" :};
};
parameters <- { };
independent <- { };
state <-
{
OBJ Ntest"TESTING VAR FOR N MASS CONSERVATION (little loss for denitrif)" : Concentration;
OBJ Ptest"TESTING VAR FOR P MASS CONSERVATION" : Concentration;
};
equations <-
{
//MASS BALANCE//
state.Ntest = (interface.Bio_algae + interface.Bio_animals + state.DD - state.AccMix_DDin - state.AccMix_DDout + state.PD + state.SD - state.Strat_in + state.Strat_out) * parameters.N2OM + state.Ammonia - state.AccMix_NH4in - state.AccMix_NH4out + state.Nitrate - state.AccMix_NO3in - state.AccMix_NO3out + state.NDenit;
state.Ptest = (interface.Bio_algae + interface.Bio_animals + state.DD - state.AccMix_DDin - state.AccMix_DDout + state.PD + state.SD - state.Strat_in + state.Strat_out) * parameters.P2OM + state.Phosphate - state.AccMix_Pin - state.AccMix_Pout;
};
:};
#endif