! "# ! $ % ! &' ( ) * + , - . -( -( / 0 - . -( & 1. 2 2 3 !2 4 5"" 2 2 !2 " # ! $ 6 7 $ ! 7 ! 7 ! 8 ' ! ' 7 $7 2 ! $ ! ! ! ! 7 7 * ! 7$ $' ' 1. $ ! 2 ' 9 . ! $: 9 : ! ;& < *! ' ' !
! 2 6 $ $ ! ' 2 ! 9 7 $:2 6 2
!
" ! ################################################################################################################################# " $ % & ############################################################################################################### " ' ( ############################################################################################################################ $ -2; = . !222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 -2 = !22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222? ) ########################################################################################### * + , ########################################################################################################## -&2; @ A! " ? 22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222B &2 C " ? 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222( * , ################################################################################################# . - / ############################################################################################################################## "$ 0 1 ############################################################################################################################# "$ . ################################################################################################################################ "' D2; = !2222222222222222222222222222;-;
"
!
! ! ! 2 )$ ! 7 ! ! 2 6 ! + $ ! 2 E ! 9- 0; : $7 9;2& 0 :' ! ! 2 6 ! 2 ! $ 7 ! 2$
%
&
+ 7$ 7!! 2 ! 7 ! 2 7 ! ' 7! ' 2 / !! ; ! 6 !!2 0 20 40 60 80 100 120 6 8 10 12 pH P ro to n er in g v an N H3 ( % ) 0 oC 10 oC 20 oC 40 oC ! $ 6 B2 1 $ !! 7 2 7 ! $ !!' . ! 9 :2 ' ! $ !! 6- 7 7$' 2 4 $ + 7!! 7 7!! 6F;. 2 $ 6 $2 1 7!! 6 ! 2 , $ ! $ 2 4 ' 2 E 7 ! ' $ 7!! 2 6 ! ! 2/ !! ;5 %
!
6
!!2
# ! $. 2 3 #
'
(
6 + $ 0 2 1 7$ $ $ 2 @ 7$ 6' 2 $ $ $2 E ! ! + ' ! ! $ 2 7 ! 7$ 2 7 7 $ 7$ 5 6 2 % 7 7 ' $ $ 7$ $ 7 2 1 ! 2 1 $ !7 9 5 : 2 7 $ 2 ! 2 6 ! $ 9 : 8 8 9 :2 6 8 8 $ 2 '#" ( 4 $ ' ! GG . 2 7 . ! ! !! 2 4 !! 7 7$ 2 7 7$ $ 2 1 ! 5 2 ; $; 7 2 6 0 ! 7 8 H I2 6 7 !! -2 0 H $ I . ! 2 ! ' ! J ' !/ !! 5 E
!
5
7
7
!
7
'
!
;
.
7
$
2 =
*F
,*F
!
97
;:2
C C K * K ,*-! 2 7 7$ ' 7 7 $ ! 2 4 !! - 7$ ! 2 6 !! 2 # + 2 7 7$ ;2 5 ,*F ,! . 9 : *LF *M 9.: *F 9.: C/*LF C/" *L C 9 -" : 6*F 6 9 : /*LF /" *L 9 -" : **F * 9 : *F 9 : 6F 6*" I N C/F C 9 -" : *F **" H N /F 9 -" : F 6M* . 9 : IF 9.: HF 9.: C/NF C/*L" H C 9 -" : 4 F O 6-P ' 9 " -: /NF /*L" I 9 -" : 6 F 6 CN #F *M " # ! 9 -: L F @!! 6?Q 9 " -: N #F ,*M " # ! 9 -: L F 8 2 9 " : 6 +F 6 + 9.: #CF C/NM "CN # # ' 9.: F , $ 9 : # F /NM " N # # ' 9.: F 9.: 6 ! 9 : ! $ 2 1 7 ! 2 7$ R S !! ! 7$ R S !!2 # ! ! . ! 2 7$ 2 7 ! 2
/ !! -5 E
7
!
2
.
7$
H $ I
2
,
;5
2
C , $ , ; - H HQ; ; -I IQ;# ! $. 2 3 # ? '#$ ( 4 !! ? 9 : 9 :2 ) 7$ ! 9 :2 ;2 ! ' ! ! 7$ 6 2 6 ! $ 2 6 ! ! 2 7 ! 2 9O 6-P)' ! +: 9O 6-PC' ! +B: 6 + 9;:2 boundary G boundary W H ' -' -P 6 O P 6 O 8 6 + 8 = ≡ 9;: 6 2; 6 ! !!2 6 $ °N 96F;-(? 9.::2 6 !! &2 7 . $ *2 )! $ ! 9O 6-PC:2
/ !! ?5 C
;
'
!
2
/ ! &5
$
!
C O 6-PC' ! + O 6-P ' ! +F O 6-P O 6-PC C *& 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,
5 N
+
7
7
$
7
V/ N
2
# ! $. 2 3 # ( +#$ 6 < & : / & $;;) $ !! 2 1 7 -! -2 6 ,* ,! . 9 : 2 ; * 9.: 6* 6 9 : ** * 9 : 2& * 9 : 2 & C/ C 9 -" : - " ?F;2& -" F ?2; B M; .? -" / 9 -" : (2-I 9.: H 9.: ; 4 O 6-P ' 9 " -: ;2D F D2 M; .? " -6 6 ? , , !! 9°N: ;& L @!! 6? Q 9 " -: 2 &M; .B " -6 + 6 + 9.: ;BD;2B 9.: , $ 9 : 2 ; 9.: ; 6 D-U2 = ! L 2 4 !! B 7$ ! L 2 7 !! $ 8 8 L 7 -2; M; .& " 2
/ !! B5 )
!
/ N
!
.
8
8 2 N
-2
,
-5 N
+
7
7
$
V/ N
2
D
*
,
4 ! $ ! + 2 6 ! + + ! 2 1 2 6 ,* ,! . 9 : 2 D * 9.: ; & 6* 6 9 : ; ** * 9 : ; * 9 : 2 & C/ C 9 -" : ?(" ?F -" F &2&&& M; .? -" / 9 -" : (2-I 9.: ; H 9.: ; 4 O 6-P ' 9 " -: ;2D F D2 M; .? " -6 6 ? -2& , , !! 9°N: ;& L @!! 6?Q 9 " -: 2 &M; .B " -L 9 " : -2; M; .& " 6 + 6 + 9.: ;BD;2B 9.: , $ 9 : 2 ; 9.: ; = 7 , ? B&2 &?B 6F?2 C 6 -'& 9 : ' 7 2 ! $ $ 7 6> 97 !! ;:2 6 ,* ,! . 9 : 2 D * 9.: ; & 6* 6 9 : ** * 9 : 2& * 9 : 2 & C/ C 9 -" : ?(" ?F -" F &2&&& M; .? -" / 9 -" : (2-I 9.: H 9.: ; 4 O 6-P ' 9 " -: ;2D F D2 M; .? " -6 6 ? -2& , , !! 9°N: ;& L @!! 6?Q 9 " -: 2 &M; .B " -L 9 " : -2; M; .& " 6 + 6 + 9.: ;BD;2B 9.: , $ 9 : 2 ; 9.: ;= 7 , & B&2 &?B
2 6 $ 7 6*F ; **F 2; 7 2 $ ! 7 $' 9 ! 6* : 2 ! $ 2 ! ' $ ! ! . 2 6 $ 9 !! -: ; ! $ 7 2 !
,
?5 N
+
2
,
&5 N
+
)2
# ! $. 2 3 # ; $ $ 2 6 7 $ 9 : $ $ $ ! $ $ ! 2 # $ ! . 2 7 ' 9 **: $ $ $ 96*:' $ $ $ 2 7 7$ 7 ?2 ! $ $ $ ! !! (2 $ $ $ ! !! D2 4 7 ! $ $ 2 D U $ ! ;2B& 2
/ !! D5
!
$
9; $+
:2
/ !! (5
!
$
$ $
9;0;
:2
;; $ $ $ ! !! ; 2 4 7 ! 7 2 # ! $ ! ' 7 0 7 !! D' ! ! 7 2 ! "
/ !! ; 5
!
$
90 $;
:2
# ! $. 2 3 # ;
-
/
! 7 $ 2 E / ! $ $ ' $ 7 7 ! $ 2 $ ! 2 $ $ 2 ) $ $ 2 C ! $ $ 2 2 6 ! 2 @ 6 2 4 ! 7 J ! $' ! 6 !! 9 $; U:20
1
;2 6 ' 2 2 *! ' 2N2' ! ! 2' * ! 2 ;DB;' 15 2 A ' =4?D (&2 2 ;;B.; ;2 2 E ! ' E2 @ ' =2') W ! W ! 1 ! 2 V/ 2 A! . ?2 ?' / ! =W 5 =W 2 2 2 -2 E ! ' E2 @ ' =2') W ! W ! 1 ! 2 V/ 2 . ?2 ?' / ! =W 5 =W 2 2 2
;-.
.#" ( program Wasser; uses FPCMacOSAll; constTL = 0.01; // Afstand tussen Lamellen (m)
NL = 200 ; // Aantal Lamellen (-)
HL = 2 ; // Hoogte Lamellen (m)
LL = 0.5 ; // Lengte Lamellen (m)
DL = 0.005; // Dikte Lamellen (m)
WF = 4.1667e-4; // Waterflow (m3/sec)
GF = 8.3 ; // Gasflow (m3/sec)
NY = 200 ; // Aantal cellen hoog (-)
NX = 100 ; // Aantal cellen lang (-)
GasIN = 9.26e-4; // Concentratie NH3 instromend gas (mol/m3)
pHinit = 4 ; // pH instromend water
Temp = 15 ; // Temperatuur
ka = 6.05e-7; // zuurconstante NH4plus bij 15 graden (mol/m3)
km = 0.000031; // mass transfer constante (m/sec)
Henry = 1791.7; // Henry constante volgens hashimoto et albij T=15 graden
dt = 0.001; // Tijdstapje (sec)
n = 10000; // Aantal berekeningen (-)
var
NLK : integer; // Aantal lamelkanten (-)
WFLK : real; // Waterflow per lamelkant (m3/sec)
GFLK : real; // Gasflow per lamelkant (m3/sec)
H : real; // Celhoogte (m)
L : real; // Cellengte (m)
WCelV : real; // Celvolume waterkant (m3)
GCelV : real; // Celvolume gaskant (m3)
A : real; // Uitwisselend oppervlak per cel (m2)
WFC : real; // Waterflow per cel (m3/sec)
GFC : real; // Gasflow per cel (m3/sec)
VW : real; // Verversingsfactor volumeflow/volume cel water (-)
VG : real; // Verversingsfactor gasflow/volume cel gas (-)
WNuit : real; // Uitflow van molen uit de wasser in de waterfase (mol)
GNCuit : real; // Uitflow van NH3 uit de wasser in de gasfase (mol/m3)
step,i,j :integer; // tellers
GNH3 : array[0..(NX+1) , 0..(NY+1)] of double; // concentratie NH3 gasfase (mol/m3)
WN : array[0..(NX+1) , 0..(NY+1)] of double; // molen N in de waterfase (mol)
WNH3 : array[0..(NX+1) , 0..(NY+1)] of double; // concentratie NH3 waterfase (mol/m3)
WNH4 : array[0..(NX+1) , 0..(NY+1)] of double; // concentratie NH4 waterfase (mol/m3)
WHplus : array[0..(NX+1) , 0..(NY+1)] of double; // concentratie H+ waterfase (mol/m3)
Transfer : array[0..NX , 0..NY] of double; // transferred ammonia per cel(mol)
begin
// Per lamelkant basisgrootheden H := HL/NY; L := LL/NX; A := H*L; NLK := 2*NL; WFLK:= WF/NLK; GFLK:= GF/NLK; WFC := WFLK/NX; GFC := GFLK/NY; WCelV:= 0.5*DL*A; GCelV:= 0.5*TL*A; VW := (WFC*dt)/WCelV;
# ! $. 2 3 #
;?
VG := (GFC*dt)/GCelV;
writeln('Celhoogte = ',H:8:8,' (m)');
writeln('Cellengte = ',L:8:8,' (m)');
writeln('Uitw.oppervlak = ',A:8:8,' (m2)');
writeln('WCelvolume = ',WCelV:8:8,' (m3)');
writeln('GCelvolume = ',GCelV:8:8,' (m3)');
writeln('Waterflow Cel = ',WFC:8:8,' (m3/sec)');
writeln('Gasflow Cel = ',GFC:8:8,' (m3/sec)');
writeln('Verversing water= ',VW:8:8,' (-)');
writeln('Verversing gas = ',VG:8:8,' (-)');
// Initieren van de gas en waterfase met lege waarden
for i:= 0to NX+1do begin for j:= 0to NY+1do begin GNH3[i,j]:=0; WNH3[i,j]:=0; WNH4[i,j]:=0;
WHplus[i,j]:=exp(-pHinit*ln(10))*1000; // let op: x 1000, want mol/m3
end;
end;
// Initieren van de gas instroom
for j:= 1to NY do
begin
GNH3[0,j] := GasIN;
end;
// Initieren van de waterstroom
for i:= 1to NX do WNH4[i,0] := 0;
for i:=1to NX do // bereken WN (mol) voor elke cel
begin
for j:=0to (NY+1) do WN[i,j]:= ( WNH3[i,j]+WNH4[i,j] )*WCelV;
end;
WNuit:=0;
GNCuit:=0;
writeln;
// MAIN calculation loop
// ---
for step:= 1to n do
begin
// Print tussenresultaten
writeln('===== Step ',step,' ===== In: gas=',GasIN*GFLK,'mol/sec ==== Uit: water=',
WNuit*WFLK/(WCelV*NX),' mol/sec gas=',GNCuit*GFLK,' mol/sec ==== Rendement=',
100-(GNCuit/GasIN*100):4:4,'% ===='); writeln('WNH4 [1, 0]=',WNH4[1,0],' [20, 0]=',WNH4[20,0],' [40, 0]=',WNH4[40,0],' [60, 0]=', WNH4[60,0],' [80, 0]=',WNH4[80,0],' [100, 0]=',WNH4[100,0]); writeln('WNH4 [1, 1]=',WNH4[1,1],' [20, 1]=',WNH4[20,1],' [40, 1]=',WNH4[40,1],' [60, 1]=', WNH4[60,1],' [80, 1]=',WNH4[80,1],' [100, 1]=',WNH4[100,1]); for j:= 1to5do writeln('WNH4 [1,',(j*20):3,']=',WNH4[1,(j*20)],' [20,',(j*20):3,']=',WNH4[20,(j*20)], ' [40,',(j*20):3,']=',WNH4[40,(j*20)],' [60,',(j*20):3,']=',WNH4[60,(j*20)],' [80,',(j*20):3,']=', WNH4[80,(j*20)],' [100,',(j*20):3,']=',WNH4[100,(j*20)]); writeln(''); writeln('GNH3 [0, 0]=',GNH3[0,0],' [1, 0]=',GNH3[1,0],' [20, 0]=',GNH3[20,0],' [40, 0]=',GNH3[40,0], ' [60, 0]=',GNH3[60,0],' [80, 0]=',GNH3[80,0],' [100, 0]=',GNH3[100,0],' [101, 0]=' ,GNH3[101,0]); writeln('GNH3 [0, 1]=',GNH3[0,1],' [1, 1]=',GNH3[1,1],' [20, 1]=',GNH3[20,1],' [40, 1]=',GNH3[40,1], ' [60, 1]=',GNH3[60,1],' [80, 1]=',GNH3[80,1],' [100, 1]=',GNH3[100,1],' [101, 1]=' ,GNH3[101,1]); for j:= 1to5do writeln('GNH3 [0,',(j*20):3,']=',GNH3[0,(j*20)],' [1,',(j*20):3,']=',GNH3[1,(j*20)],
;& ' [20,',(j*20):3,']=',GNH3[20,(j*20)],' [40,',(j*20):3,']=',GNH3[40,(j*20)],' [60,',(j*20):3,']=', GNH3[60,(j*20)],' [80,',(j*20):3,']=',GNH3[80,(j*20)],' [100,',(j*20):3,']=',GNH3[100,(j*20)], ' [101,',(j*20):3,']=',GNH3[101,(j*20)]); writeln(''); writeln('WN [1, 1]=',wn[1,1],' [20, 1]=',wn[20,1],' [40, 1]=',wn[40,1],' [60, 1]=',wn[60,1],' [80, 1]=', wn[80,1],' [100, 1]=',wn[100,1]); for j:= 1to5do writeln('WN [1,',(j*20):3,']=',wn[1,(j*20)],' [20,',(j*20):3,']=',wn[20,(j*20)], ' [40,',(j*20):3,']=',wn[40,(j*20)],' [60,',(j*20):3,']=',wn[60,(j*20)],' [80,',(j*20):3,']=',wn[80,(j*20)], ' [100,',(j*20):3,']=',wn[100,(j*20)]); writeln('WN [1,101]=',wn[1,101],' [20,101]=',wn[20,101],' [40,101]=',wn[40,101],' [60,101]=', wn[60,101],' [80,101]=',wn[80,101],' [100,101]=',wn[100,101]); writeln('');
// transport water naar beneden met WNH3, WNH4 en WHplus nieuw uitrekenen
for i:=1to NX do begin
for j:= NY+1downto1do
begin
WN[i,j]:=WN[i,j] - (VW*WN[i,j]) + (VW*WN[i,(j-1)]); // stikstof doorstroom
WHplus[i,j]:=WHplus[i,j] - (VW*WHplus[i,j]) + (VW*WHplus[i,(j-1)]); // Hplus doorstroom
WNH4[i,j]:= WN[i,j]/( WCelV*(1 + (1/ (1+ (WHplus[i,j]/ka) )))); // herverdeling NH4
WNH3[i,j]:= (WN[i,j]/WCelV) - WNH4[i,j]; // herverdeling NH3
end;
end;
// Calculatie wasser uitflow (mol waterfase)
WNuit:=0;
for i:=1to nx do WNuit:=WNuit+WN[i,(ny+1)];
// Transport gas in gasrichting en bereken de nieuwe GNH3
for j:= 1to NY do
begin
for i:= nx+1downto1do GNH3[i,j]:=GNH3[i,j]-(VG*GNH3[i,j])+(VG*GNH3[i-1,j]);
end;
// Calculatie wasser uitflow (mol gasfase)
GNCuit:=0;
for j:=1to NY do GNCuit:=GNCuit+GNH3[(NX+1),j];
GNCuit:=GNCuit/NY;
// Mass transfer uitrekenen en berekenen nieuwe gas en waterfase pH wordt constant genomen
for i:=1to nx do begin
for j:= 1to ny do
begin
transfer[i,j]:=km*A*dt*( (Henry*GNH3[i,j]) - (ka*WNH4[i,j]/WHplus[i,j]) ); // aantal molen transfer
GNH3[i,j]:=GNH3[i,j]-(transfer[i,j]/GCelV); // nieuwe gasconc.
WN[i,j]:=WN[i,j]+transfer[i,j]; // nieuwe totale N in waterkant cel
WNH4[i,j]:=WN[i,j]/WCelV*(1- (ka/(WHPlus[i,j]+ka))); // nieuwe verdeling NH3 NH4plus
WNH3[i,j]:=(WN[i,j]/WCelV)-WNH4[i,j];
end;
end;
end; // Einde main loop van berekeningen