STELLA ® 6.0 code for PT04Nom.stm, a representative example of

advertisement
STELLA 6.0 code for PT04Nom.stm, an explicit example of Ecophys.Fish
parameterized for red drum. The binary code for this model (and for all others cited in
the Ecophys.Fish manuscript and article) can be downloaded at
http://neilllab2.tamu.edu/PUBLIC/EcophysFish . STELLA 6 models will run in that and
all subsequent versions of STELLA. For information about purchasing the current
version of STELLA, visit http://www.iseesystems.com . (While the Ecophys.Fish article
was in production, High Performance Systems, Inc., became “isee systems;” the latter
has discontinued its predecessor’s practice of distributing free demonstration copies of
save-disabled STELLA.)
{ INITIALIZATION EQUATIONS }
MMSO = 0.320
pHgain = .56
pHObs = GRAPH(time)
(0.00, 8.80), (8.00, 8.90), (16.0, 8.80), (24.0, 8.80),..., (9544, 8.90)
pH = pHObs
pHfactor = 1-EXP((-pHgain/max(0.01,(max(pH,7)-pH))))
DOobs = GRAPH(time)
(0.00, 6.60), (8.00, 9.40), (16.0, 8.50), (24.0, 6.60),..., (9544, 4.60)
DOa = DOobs
TaObs = GRAPH(time)
(0.00, 21.3), (8.00, 22.9), (16.0, 22.3), (24.0, 20.5),..., (9544, 25.5)
Ta = TaObs
Tinfl = 32
Tratio = Ta/Tinfl
Hill = 2
INIT Taccl = MIN(Ta,34)
Tstress = Ta-Taccl
DOlim = 0.35 + (Tratio^Hill/(1+Tratio^Hill))*(1-0.005*Tstress^2)*8.15
Wfish0 = 13.9
INIT GEfish = 1000
INIT FishEnergy = Wfish0*GEFish
Wfish = FishEnergy/GEFish
Wexp = -.22
Weffect = Wfish^Wexp
A = min(DOa, DOlim/pHfactor)*Weffect
minDOaccl = .45*DOlim
INIT DOaccl0 = max(min(DOa,DOlim) ,minDOaccl)
DOaccl = max(min(DOaccl0,DOlim) , minDOaccl)
Mact = MMSO* pHfactor*A*DOlim*DOaccl^-0.9
Smin = 0.1*Wfish^-0.2
Sgain = IF (Taccl>18) THEN .003 ELSE .003+(0.0001*((18-Taccl)^2)*-Tstress)
SalObs = GRAPH(time)
(0.00, 32.3), (8.00, 32.3), (16.0, 32.4), (24.0, 32.4),..., (9544, 43.0)
Sal = SalObs
SalOpt = 10
SalLL = 0.1
SalUL = 50
SalL = If(Sal<SalOpt) Then SalLL Else SalUL
Svar = ((Sal-SalOpt)/(SalL-SalOpt))^2
S = Smin+Sgain*Svar
q1 = 0.05
q2 = 0.09
Mstd = S*EXP(q1*Taccl)*EXP(q2*Tstress)
Winberg = (1+0.5*(Mact-Mstd)/Mstd)*0+2
oxycal = 3.4
As = 24*Mstd*oxycal
Aa = 24*Mact*oxycal
FeedRate = 1
FeedRateMax = 0.18*Wfish^(0.0105*LOGN(Wfish)-0.25)
GEFeed = 1000
Apc = MIN(FeedRate, FeedRateMax)*GEfeed
MSgrowth = Mact-Winberg*Mstd
sda = .15
Acmax = max(0,24*(MSgrowth/sda)*oxycal)
hAcxWfish = (MIN(Apc, Acmax)*Wfish)/24
hArxWfish = (min(Winberg*As, Aa)/24)*Wfish
hAdxWfish = sda*hAcxWfish
VO2xWfish = (hArxWfish+hAdxWfish)/oxycal
SysVol = 100
DOuse = VO2xWfish/SysVol
FeedDigestibility% = 90
hAwxWfish = ((100-FeedDigestibility%)/100)*hAcxWfish + 0.05*MAX(hAcxWfish,
hArxWfish)
INIT PrMORT = 0
DOStress = DOa-DOaccl
MORTinc = IF((DOStress)<-2.45) THEN -(DOStress)*.023 ELSE 0
MORTdec = 0*PrMORT
Topt = 28
kaccl = IF ((Ta>34) AND (Taccl>34)) THEN 0 ELSE (24*EXP(-2.15+(Taccl- Ta)/Topt –
(((Topt-Ta)/8.5)^2)))
TacclCng = Ta-(Ta-Taccl)*EXP(-kaccl/24)-Taccl
INIT DO = 6.5
INIT FeedEnergy = 400000000
DOsupply = DOuse
INIT WastedEnergy = 0
Wfeed = FeedEnergy/GEFeed
VO2 = VO2xWfish/Wfish
AgScope = MSgrowth/oxycal
Eflux = IF (hAdxWfish < 0.2* hArxWfish) AND (GEfish > 800) THEN
(-(0.003/24)*GEfish) ELSE (IF (hAdxWfish > 0.2*hArxWfish) AND (GEfish <1400)
THEN (+(0.003/24)*GEfish) ELSE 0)
Wwastes = WastedEnergy/GEFeed
INIT O2used = 0
O2use = VO2xWfish
simWfish = Wfish
raccl = if DOaccl0 >=minDOaccl AND DOaccl0 <= DOlim THEN 1*Mstd ELSE 0
DOacclCng = IF (DOaccl0<minDOaccl) THEN (minDOaccl-DOaccl0) ELSE IF (DOaccl0
> DOlim) THEN (DOlim-DOaccl0) ELSE (DOa-(DOa-DOaccl0)*EXP(-raccl/24)DOaccl0)
obsWfish3 = GRAPH(time)
(0.00, 13.9), (793, 35.5), (1587, 78.4), (2380, 105), (3173, 151), (3967, 232),
(4760, 383), (5553, 774), (6347, 947), (7140, 1057), (7933, 1146), (8727, 1394),
(9520, 1526)
ArxWfish = hArxWfish*24
AdxWfish = hAdxWfish*24
AwxWfish = hAwxWfish*24
MMS = VO2/DOa
obsWfish5 = GRAPH(time)
(0.00, 14.7), (793, 35.6), (1587, 79.4), (2380, 104), (3173, 154), (3967, 274),
(4760, 478), (5553, 745), (6347, 881), (7140, 947), (7933, 987), (8727, 1176),
(9520, 1292)
obsWfish6 = GRAPH(time)
(0.00, 13.2), (793, 37.3), (1587, 70.7), (2380, 115), (3173, 212), (3967, 333),
(4760, 629), (5553, 918), (6347, 1038), (7140, 1115), (7933, 1183), (8727, 1262),
(9520, 1281)
INIT WatEnd = 0
transferW = if TIME = 9519 then Wfish else 0
Wchg%perday = ((WatEnd-Wfish0)/(Wfish0*396.67))*100
{ RUNTIME EQUATIONS }
Taccl(t) = Taccl(t - dt) + (TacclCng) * dt
GEfish(t) = GEfish(t - dt) + (Eflux) * dt
FishEnergy(t) = FishEnergy(t - dt) + (hAcxWfish - hArxWfish - hAwxWfish - hAdxWfish)
* dt
DOaccl0(t) = DOaccl0(t - dt) + (DOacclCng) * dt
PrMORT(t) = PrMORT(t - dt) + (MORTinc - MORTdec) * dt
DO(t) = DO(t - dt) + (DOsupply - DOuse) * dt
FeedEnergy(t) = FeedEnergy(t - dt) + (- hAcxWfish) * dt
WastedEnergy(t) = WastedEnergy(t - dt) + (hAwxWfish) * dt
O2used(t) = O2used(t - dt) + (O2use) * dt
WatEnd(t) = WatEnd(t - dt) + (transferW) * dt
pHObs = GRAPH(time)
(0.00, 8.80), (8.00, 8.90), (16.0, 8.80), (24.0, 8.80),..., (9544, 8.90)
pH = pHObs
pHfactor = 1-EXP((-pHgain/max(0.01,(max(pH,7)-pH))))
DOobs = GRAPH(time)
(0.00, 6.60), (8.00, 9.40), (16.0, 8.50), (24.0, 6.60),..., (9544, 4.60)
DOa = DOobs
TaObs = GRAPH(time)
(0.00, 21.3), (8.00, 22.9), (16.0, 22.3), (24.0, 20.5),..., (9544, 25.5)
Ta = TaObs
Tratio = Ta/Tinfl
Tstress = Ta-Taccl
DOlim = 0.35 + (Tratio^Hill/(1+Tratio^Hill))*(1-0.005*Tstress^2)*8.15
Wfish = FishEnergy/GEFish
Weffect = Wfish^Wexp
A = min(DOa, DOlim/pHfactor)*Weffect
minDOaccl = .45*DOlim
DOaccl = max(min(DOaccl0,DOlim) , minDOaccl)
Mact = MMSO* pHfactor*A*DOlim*DOaccl^-0.9
Smin = 0.1*Wfish^-0.2
Sgain = IF (Taccl>18) THEN .003 ELSE .003+(0.0001*((18-Taccl)^2)*-Tstress)
SalObs = GRAPH(time)
(0.00, 32.3), (8.00, 32.3), (16.0, 32.4), (24.0, 32.4),..., (9544, 43.0)
Sal = SalObs
SalL = If(Sal<SalOpt) Then SalLL Else SalUL
Svar = ((Sal-SalOpt)/(SalL-SalOpt))^2
S = Smin+Sgain*Svar
Mstd = S*EXP(q1*Taccl)*EXP(q2*Tstress)
Winberg = (1+0.5*(Mact-Mstd)/Mstd)*0+2
As = 24*Mstd*oxycal
Aa = 24*Mact*oxycal
FeedRateMax = 0.18*Wfish^(0.0105*LOGN(Wfish)-0.25)
Apc = MIN(FeedRate, FeedRateMax)*GEfeed
MSgrowth = Mact-Winberg*Mstd
Acmax = max(0,24*(MSgrowth/sda)*oxycal)
hAcxWfish = (MIN(Apc, Acmax)*Wfish)/24
hArxWfish = (min(Winberg*As, Aa)/24)*Wfish
hAdxWfish = sda*hAcxWfish
VO2xWfish = (hArxWfish+hAdxWfish)/oxycal
DOuse = VO2xWfish/SysVol
hAwxWfish = ((100-FeedDigestibility%)/100)*hAcxWfish + 0.05*MAX(hAcxWfish,
hArxWfish)
DOStress = DOa-DOaccl
MORTinc = IF((DOStress)<-2.45) THEN -(DOStress)*.023 ELSE 0
MORTdec = 0*PrMORT
kaccl = IF ((Ta>34) AND (Taccl>34)) THEN 0 ELSE (24*EXP(-2.15+(Taccl-Ta)/Topt –
(((Topt-Ta)/8.5)^2)))
TacclCng = Ta-(Ta-Taccl)*EXP(-kaccl/24)-Taccl
DOsupply = DOuse
Wfeed = FeedEnergy/GEFeed
VO2 = VO2xWfish/Wfish
AgScope = MSgrowth/oxycal
Eflux = IF (hAdxWfish < 0.2* hArxWfish) AND (GEfish > 800) THEN ((0.003/24)*GEfish) ELSE (IF (hAdxWfish > 0.2*hArxWfish) AND (GEfish <1400)
THEN (+(0.003/24)*GEfish) ELSE 0)
Wwastes = WastedEnergy/GEFeed
O2use = VO2xWfish
simWfish = Wfish
raccl = if DOaccl0 >=minDOaccl AND DOaccl0 <= DOlim THEN 1*Mstd ELSE 0
DOacclCng = IF (DOaccl0<minDOaccl) THEN (minDOaccl-DOaccl0) ELSE IF (DOaccl0
> DOlim) THEN (DOlim-DOaccl0) ELSE (DOa-(DOa-DOaccl0)*EXP(-raccl/24)DOaccl0)
obsWfish3 = GRAPH(time)
(0.00, 13.9), (793, 35.5), (1587, 78.4), (2380, 105), (3173, 151), (3967, 232),
(4760, 383), (5553, 774), (6347, 947), (7140, 1057), (7933, 1146), (8727, 1394),
(9520, 1526)
ArxWfish = hArxWfish*24
AdxWfish = hAdxWfish*24
AwxWfish = hAwxWfish*24
MMS = VO2/DOa
obsWfish5 = GRAPH(time)
(0.00, 14.7), (793, 35.6), (1587, 79.4), (2380, 104), (3173, 154), (3967, 274),
(4760, 478), (5553, 745), (6347, 881), (7140, 947), (7933, 987), (8727, 1176),
(9520, 1292)
obsWfish6 = GRAPH(time)
(0.00, 13.2), (793, 37.3), (1587, 70.7), (2380, 115), (3173, 212), (3967, 333),
(4760, 629), (5553, 918), (6347, 1038), (7140, 1115), (7933, 1183), (8727, 1262),
(9520, 1281)
transferW = if TIME = 9519 then Wfish else 0
Wchg%perday = ((WatEnd-Wfish0)/(Wfish0*396.67))*100
Download