STELLA Model Program

DO_Seg_1(t) = DO_Seg_1(t - dt) + (Flow_of_O2_into_Seg_1 + Photosynthesis_1 + O2_from_Turbulence -Flow_of_O2_into_Seg_2 - Degassing_to_Atmos_1 - Respiration_by_organizisms_1) * dt

NIT DO_Seg  1 = 5.6

DOCUMENT:  5.6
 

INFLOWS:
Flow_of_O2_into_Seg_1 = 3.5/24
Photosynthesis_1 = (-1 * SIN( (2*pi / 24) * (Time_of_Day+6)) +3.0)
O2_from_Turbulence = GRAPH(Turbulence)
(0.00, 0.00), (1.00, 0.6), (2.00, 2.00), (3.00, 3.00), (4.00, 7.77), (5.00, 23.0), (6.00, 37.0)

OUTFLOWS:
Flow_of_O2_into_Seg_2 = DO_Seg_1 * (1/24)

DOCUMENT:  DO1* (1/24)
 
Degassing_to_Atmos_1 = IF(DO_Seg_1>Max_Sol_1)THEN(DO_Seg_1-Max_Sol_1)ELSE(0.0)

Respiration_by_organizisms_1 = 3.5

DO_Seg_2(t) = DO_Seg_2(t - dt) + (Flow_of_O2_into_Seg_2 + Photosynthesis_2 + O2_from_Turbulence_2 - Flow_of_O2_into_Seg_3 - Degassing_to_Atmos_2 - Respiration_by_organisms__2) * dt

INIT DO_Seg_2 = 7.8

DOCUMENT:  7.8
 
INFLOWS:
Flow_of_O2_into_Seg_2 = DO_Seg_1 * (1/24)

DOCUMENT:  DO1* (1/24)

Photosynthesis_2 = (-1 * SIN( (2*pi / 24) * (Time_of_Day+6)) +3.0)
O2_from_Turbulence_2 = GRAPH(Turbulence_2)
(0.00, 0.00), (1.00, 0.6), (2.00, 2.00), (3.00, 3.00), (4.00, 7.77), (5.00, 23.0), (6.00, 37.0)

OUTFLOWS:
Flow_of_O2_into_Seg_3 = DO_Seg_2 * (1/24)
DOCUMENT:  DO1 * (1/24)
 
Degassing_to_Atmos_2 = IF(DO_Seg_2>Max_Sol_2)THEN(DO_Seg_2-Max_Sol_2)ELSE(0.0)
Respiration_by_organisms__2 = 3.5
DO_Seg_3(t) = DO_Seg_3(t - dt) + (Flow_of_O2_into_Seg_3 + Photosynthesis_3 + O2_from_Turbulence_3 - Flow_of_O2_out_of_Seg_3 - Degassing_to_Atmos_3 - Respiration_by_organisms__3) * dt

INIT DO_Seg_3 = 5.7

DOCUMENT:  5.7
 
INFLOWS:
Flow_of_O2_into_Seg_3 = DO_Seg_2 * (1/24)

DOCUMENT:  DO1 * (1/24)
 
Photosynthesis_3 = (-1 * SIN( (2*pi / 24) *(Time_of_Day+6)) + 3.0)
O2_from_Turbulence_3 = GRAPH(Turbulence_3)
(0.00, 0.00), (1.00, 0.6), (2.00, 2.00), (3.00, 3.00), (4.00, 7.77), (5.00, 23.0), (6.00, 37.0)

OUTFLOWS:
Flow_of_O2_out_of_Seg_3 = DO_Seg_3 * (1/24)
Degassing_to_Atmos_3 = IF(DO_Seg_3>Max_Sol_3)THEN(DO_Seg_3-Max_Sol_3)ELSE(0.0)
Respiration_by_organisms__3 = 3.5
Temp_1 = 18
Temp_2 = 22
Temp_3 = 20
Time_of_Day = TIME
Turbulence = 1
Turbulence_2 = 1.25
Turbulence_3 = 1
Max_Sol_1 = GRAPH(Temp_1)
(0.00, 14.6), (5.00, 12.8), (10.0, 11.3), (15.0, 10.1), (20.0, 9.20), (25.0, 8.40), (30.0, 7.60)
DOCUMENT:  This is plot of max solubility of O2 as a function of water temperature, taken from QCC Laboratory Activities, Science Education Department, University of Georgia.

Max_Sol_2 = GRAPH(Temp_2)
(0.00, 14.6), (5.00, 12.8), (10.0, 11.3), (15.0, 10.1), (20.0, 9.20), (25.0, 8.40), (30.0, 7.60)
Max_Sol_3 = GRAPH(Temp_3)
(0.00, 14.6), (5.00, 12.8), (10.0, 11.3), (15.0, 10.1), (20.0, 9.20), (25.0, 8.40), (30.0, 7.60)
 
 

Back to Home Page