Click here to donate to keep PhreeqcUsers open
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
Conceptual Models
»
Incorporation PHREEQC in programming languages
»
PFAs kinetics working on phreeqc but not on phreeqcRM
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: PFAs kinetics working on phreeqc but not on phreeqcRM (Read 322 times)
oatteia
Top Contributor
Posts: 32
PFAs kinetics working on phreeqc but not on phreeqcRM
«
on:
October 28, 2024, 01:29:26 PM »
Hello,
I've already posted a topic on PFAs sorption on solid and air-wate rinterface. I made a new version which is now clearly able to make the correct calculation with phreeqc. when the air saturation is small all PFas are sorbed on the solid phase while when gas saturation incrase they are transferred to the air-water interface in correct amounts (even with sequential steps in kinetics as phreeqc does). However when I use the same file in phreeqcm (except toto=1 to use sw from the flow-transport code (openfoam) while toto=0 in phreeqc), it is not able to transfer moles to Pfas_aw which remains at the inital values. Moroever on phreeqc I can use a quite fast kinetics rate while on phreeqcRM a high rate breaks it all (by the way unsaturated with gas and kinetics work for other examples).
So I was wondering if there would not be a trick to use put and get in phreeqcRM?
thanks for the help!
sincerely
Olivier
phreeqc file :
Solution 1
units mol/kgw
Cl 1e-7
Na 1e-7
Ntg 1e-3
Oxg 2e-4
Surfact 1e-3
pH 7
pe 4
Pfas 4.55e-5
Pfas_aw 1e-7
Pfas_s 1.64e-4
RATES
################
Pfas
-start
1 # Pfas sorb on w-a interface and on solid
3 k= parm(1) # kinetic rate
4 a = parm(2)
5 b = parm(3) # given in cm2/cm3
6 Koc = parm(4) # sorption on solid
7 R = 8.31
8 T = 298.15 # fixed temperature 25?C
10 rhob = 1.6 # kg/dm3
12 rhos = 2.65 # solid kg/dm3
14 dgrain = 0.13 # mm geom mean calc from paper 1/2 clay 1/2 sand
16 moles=0
22 C = TOT("Pfas")
24 if C<1e-12 then goto 200
26 toto=0 # to use phreeqc and rm
30 if toto<1 then poro = 0.4 else poro = CALLBACK(CELL_NO, 0, "PORO")
32 if toto<1 then sw=0.45 else sw = CALLBACK(CELL_NO, 0, "WSAT")
34 if toto<1 then foc= 0.01 else foc = CALLBACK(CELL_NO, 0, "FOC")
36 if sw=0 or foc=0 then GOTO 200
38 thetaw = sw*poro
40 Aw=600*rhob/(dgrain*rhos)*(1-sw) # in dm2/dm3
42 Gam=0.0757-0.0001515*(T-273.15) #don't use Gamma, it is reserved for phreeqc
44 sumC = C+TOT("Pfas_aw")+Tot("Pfas_s")
46 B0 = thetaw/Aw*R*T/(10*b*Gam)
48 f = 1000
50 B1 = thetaw/(rhob*Koc*foc)
52 e0 = -f*(1+1/B1)
54 e1 = f*sumC-a*(1+1/B1)-1/B0
56 delta = e1^2-4*e0*a*sumC
#57 print foc,Koc,thetaw,B0, B1,e0,e1,delta
60 if delta>0 then sdelta=sqrt(delta) else goto 200
62 Ceq = (-e1 - sdelta)/(2*e0)
64 rate = k*(C-Ceq)/24/3600 # rate positive when C>Ceq
100 moles = rate * time
110 if moles>C then moles=C*0.999
112 dffC = C-Ceq
120 Cs = Ceq/B1
122 dffCs = Cs - Tot("Pfas_s")
124 Caw = sumC - Ceq - Cs
126 dffCaw = Caw - Tot("Pfas_aw")
130 molS = dffCs*moles/dffC
132 molAw = dffCaw*moles/dffC
#134 print "Ceq,moles,dffC,Cs,dffCs,Caw,dffCaw"
#135 print Ceq,moles,dffC,Cs,dffCs,Caw,dffCaw
140 put(molAw,1) # nb of moles of C (Pfas) transferred to Aw
144 put(molS,2) # nb of moles of C (Pfas) transferred to Solid
200 save moles
-end
##########
Pfas_aw
-start
10 moles = get(1)
20 save moles
-end
##########
Pfas_s
-start
10 moles = get(2)
20 save moles
-end
Kinetics
Pfas
-parms 40 0.059 0.12 90
-formula Pfas -1
Pfas_aw
-parms 0
-formula Pfas_aw 1
Pfas_s
-parms 0
-formula Pfas_s 1
-tol 1e-8
-steps 10000
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Conceptual Models
»
Incorporation PHREEQC in programming languages
»
PFAs kinetics working on phreeqc but not on phreeqcRM