source: trunk/LMDZ.VENUS/libf/phyvenus/cloudvenus/psatsa.F90 @ 3556

Last change on this file since 3556 was 1661, checked in by slebonnois, 8 years ago

SL: Cloud model for Venus. Not validated yet.

File size: 7.4 KB
Line 
1!     Saturated sulfuric acid vapor pressure
2!     over plane sulfuric acid solution.
3!
4!     Source: Zeleznik
5!
6!     Input:  TAIR: Temperature  (K)
7!             WSA:  Weight fraction of H2SO4  [0;1]
8!     Output: H2SO4 vapor pressure
9!             over sulfuric acid solution    (Pa) )
10!
11!     External functions needed for calculation of activity coefficients
12!****************************************************************
13
14FUNCTION PSASAS_ZELE(TAIR,WSA)                                       
15 
16  IMPLICIT NONE
17 
18  REAL, INTENT(in) :: TAIR,WSA
19  REAL :: ADOT,BDOT,CDOT
20  REAL :: MMHGPA, PSASAS_ZELE
21  REAL :: pstand,x1,lpar,acidps,act(2)
22 
23  pstand=1.01325D5 !Pa  1 atm pressure
24
25  !     Mole fraction needed for zeleznik
26  x1=(wsa/98.08D0)/(wsa/98.08D0 + ((1.0-wsa)/18.106D0))
27
28  call zeleznik(x1,tair,act)
29 
30  !     Pure acid satur vapor pressure
31  lpar= -11.695D0+LOG(pstand) ! Zeleznik
32
33  acidps=1.0/360.15D0-1.0/tair+0.38D0/545.0D0 &
34       & *(1.0+LOG(360.15D0/tair)-360.15D0/tair)
35 
36  acidps = 10156.0D0*acidps +lpar
37  acidps = EXP(acidps)    !Pa
38
39  !     Sat.vap.pres over mixture (flat surface) in Pa:
40  psasas_zele=act(2)*acidps
41
42
43
44  RETURN
45END FUNCTION PSASAS_ZELE
46
47!****************************************************************
48SUBROUTINE Zeleznik(x,T,act)
49   
50  !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
51  !     Water and sulfuric acid activities in liquid
52  !     aqueous solutions.
53  !     Frank J. Zeleznik, Thermodynnamic properties
54  !     of the aqueous sulfuric acid system to 220K-350K,
55  !     mole fraction 0,...,1
56  !     J. Phys. Chem. Ref. Data, Vol. 20, No. 6,pp.1157, 1991
57  !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
58 
59  IMPLICIT NONE
60 
61  REAL, INTENT(inout) :: x
62  REAL, INTENT(in) :: T
63  REAL, INTENT(out), DIMENSION(2):: act
64  REAL, external :: activitya, activityw
65
66  if (x .gt. 0.99D0) then
67     x=0.99D0
68  endif
69
70  act(2)=activitya(x,T)
71  act(1)=activityw(x,T)
72 
73END SUBROUTINE Zeleznik
74
75!****************************************************************
76FUNCTION activitya(xal,T)
77
78  IMPLICIT NONE
79 
80  REAL, INTENT(in) :: T,xal
81  REAL :: activitya
82  REAL, external :: lnAa
83
84  activitya = EXP(lnAa(xal,T)-lnAa(0.999999,T))
85
86END FUNCTION activitya
87 
88!****************************************************************
89FUNCTION activityw(xal,T)
90 
91  IMPLICIT NONE
92 
93  REAL, intent(in) :: T,xal
94  REAL :: activityw
95  REAL, external :: lnAw
96 
97  activityw=EXP(lnAw(xal,T)-lnAw(0.000001,T))
98 
99END FUNCTION activityw
100
101!****************************************************************
102FUNCTION lnAa(x1,T)
103 
104  IMPLICIT NONE
105
106  REAL :: lnAa
107  REAL, INTENT(in) :: T,x1
108  REAL, external :: m111,m121,m221,m122
109  REAL, external :: e111,e121,e211,e122,e212,e221
110
111  lnAa=-( &
112       &    (2*m111(T)+e111(T)*(2*log(x1)+1))*x1 &
113       &    +(2*m121(T)+e211(T)*log(1-x1)+e121(T)*(log(x1)+1))*(1-x1) &
114       &    -(m111(T)+e111(T)*(log(x1)+1))*x1*x1 &
115       &    -(2*m121(T)+e121(T)*(log(x1)+1)+e211(T)*(log(1-x1)+1) &
116       &    -(2*m122(T)+e122(T)*log(x1) &
117       &           +e212(T)*log(1-x1))*(1-x1))*x1*(1-x1) &
118       &    -(m221(T)+e221(T)*(log(1-x1)+1))*(1-x1)**2 &
119       &    -x1*(1-x1)*( &
120       &                  (6*m122(T)+e122(T)*(3*log(x1)+1) &
121       &                          +e212(T)*(3*log(1-x1)+1) &
122       &                   )*x1*(1-x1) &
123       &                -(2*m122(T)+e122(T)*(log(x1)+1) &
124       &                                   +e212(T)*log(1-x1) &
125       &                    )*(1-x1)) &
126       &     )
127
128END FUNCTION lnAa
129
130!****************************************************************
131FUNCTION lnAw(x1,T)
132 
133  IMPLICIT NONE
134 
135  REAL, intent(in) :: T,x1
136  REAL :: lnAw
137  REAL, external :: m111,m121,m221,m122
138  REAL, external :: e111,e121,e211,e122,e212,e221
139 
140  lnAw=-( &
141       &  (2*m121(T)+e121(T)*log(x1)+e211(T)*(log(1-x1)+1))*x1 &
142       &  +(2*m221(T)+e221(T)*(2*log(1-x1)+1))*(1-x1) &
143       &  -(m111(T)+e111(T)*(log(x1)+1))*x1*x1 &
144       & -(2*m121(T)+e121(T)*(log(x1)+1) &
145       &            +e211(T)*(log(1-x1)+1))*x1*(1-x1) &
146       &        -(m221(T)+e221(T)*(log(1-x1)+1))*(1-x1)**2 &
147       &   +x1*(2*m122(T)+e122(T)*log(x1)+e212(T)*log(1-x1))*x1*(1-x1) &
148       &  +x1*(1-x1)*((2*m122(T)+e122(T)*log(x1) &
149       &                        +e212(T)*(log(1-x1)+1))*x1 &
150       &               -(6*m122(T)+e122(T)*(3*log(x1)+1) &
151       &                        +e212(T)*(3*log(1-x1)+1))*(1-x1)*x1) &
152       &     )
153
154END FUNCTION lnAw
155!****************************************************************
156FUNCTION m111(T)
157       
158  IMPLICIT NONE
159 
160  REAL, INTENT(in) :: T
161  REAL :: m111
162   
163  m111=-23.524503387D0 +  &
164       &    0.0406889449841D0*T -  &
165       &    0.151369362907D-4*T**2+2961.44445015D0/T + &
166       &    0.492476973663D0*log(T)
167
168END FUNCTION m111
169
170!****************************************************************
171FUNCTION m121(T)
172 
173  IMPLICIT NONE
174  REAL, INTENT(in) :: T
175  REAL :: m121 
176
177  m121=1114.58541077D0-1.1833078936D0*T - &
178       &    0.00209946114412D0*T**2-246749.842271D0/T + &
179       &    34.1234558134D0*log(T)
180
181END FUNCTION m121
182
183!****************************************************************
184FUNCTION m221(T)
185 
186  IMPLICIT NONE
187 
188  REAL, INTENT(in) :: T
189  REAL :: m221
190 
191  m221=-80.1488100747D0-0.0116246143257D0*T  &
192       &    +0.606767928954D-5*T**2+3092.72150882D0/T  &
193       &    +12.7601667471D0*log(T)
194
195END FUNCTION m221
196
197!****************************************************************
198FUNCTION m122(T)
199
200  IMPLICIT NONE
201 
202  REAL, INTENT(in) :: T
203  REAL :: m122
204 
205  m122=888.711613784D0-2.50531359687D0*T + &
206       &    0.000605638824061D0*T**2-196985.296431D0/T + &
207       &    74.550064338D0*log(T)
208
209END FUNCTION m122
210
211!****************************************************************
212FUNCTION e111(T)
213 
214  IMPLICIT NONE
215 
216  REAL, INTENT(in) :: T
217  REAL :: e111
218 
219  e111=2887.31663295D0-3.32602457749D0*T &
220       &    -0.2820472833D-2*T**2-528216.112353D0/T &
221       &    +0.68699743564D0*log(T)
222
223END FUNCTION e111
224
225!****************************************************************
226FUNCTION e121(T)
227   
228  IMPLICIT NONE
229 
230  REAL, INTENT(in) :: T
231  REAL :: e121
232 
233  e121=-370.944593249D0-0.690310834523D0*T &
234       &    +0.56345508422D-3*T**2-3822.52997064D0/T &
235       &    +94.2682037574D0*log(T)
236
237END FUNCTION e121
238 
239!****************************************************************
240FUNCTION e211(T)
241 
242  IMPLICIT NONE
243 
244  REAL, INTENT(in) :: T
245  REAL :: e211
246 
247  e211=38.3025318809D0-0.0295997878789D0*T &
248       &    +0.120999746782D-4*T**2-3246.97498999D0/T &
249       &    -3.83566039532D0*log(T)
250
251END FUNCTION e211
252
253!****************************************************************
254FUNCTION e221(T)
255 
256  IMPLICIT NONE
257 
258  REAL, INTENT(in) :: T
259  REAL :: e221
260 
261  e221=2324.76399402D0-0.141626921317D0*T &
262       &    -0.00626760562881D0*T**2-450590.687961D0/T &
263       &    -61.2339472744D0*log(T)
264
265END FUNCTION e221
266 
267!****************************************************************
268FUNCTION e122(T)
269 
270  IMPLICIT NONE
271 
272  REAL, INTENT(in) :: T
273  REAL :: e122
274 
275  e122=-1633.85547832D0-3.35344369968D0*T &
276       &    +0.00710978119903D0*T**2+198200.003569D0/T &
277       &    +246.693619189D0*log(T)
278
279END FUNCTION e122
280
281!****************************************************************
282FUNCTION e212(T)
283 
284  IMPLICIT NONE
285 
286  REAL :: e212
287  REAL, INTENT(in) :: T
288 
289  e212=1273.75159848D0+1.03333898148D0*T &
290       &    +0.00341400487633D0*T**2+195290.667051D0/T &
291       &    -431.737442782D0*log(T)
292
293END FUNCTION e212
Note: See TracBrowser for help on using the repository browser.