[CHNOSZ-commits] r401 - in pkg/CHNOSZ: . R demo inst inst/extdata/OBIGT tests/testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 20 05:29:45 CET 2019


Author: jedick
Date: 2019-02-20 05:29:44 +0100 (Wed, 20 Feb 2019)
New Revision: 401

Added:
   pkg/CHNOSZ/inst/extdata/OBIGT/AkDi.csv
Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/info.R
   pkg/CHNOSZ/R/util.data.R
   pkg/CHNOSZ/demo/sources.R
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_gas.csv.xz
   pkg/CHNOSZ/inst/extdata/OBIGT/organic_aq.csv.xz
   pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv
   pkg/CHNOSZ/tests/testthat/test-eos.R
Log:
add Akinfiev-Diamond model parameters to OBIGT/AkDi.csv


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2019-02-19 22:57:50 UTC (rev 400)
+++ pkg/CHNOSZ/DESCRIPTION	2019-02-20 04:29:44 UTC (rev 401)
@@ -1,6 +1,6 @@
 Date: 2019-02-20
 Package: CHNOSZ
-Version: 1.2.0-8
+Version: 1.2.0-9
 Title: Thermodynamic Calculations and Diagrams for Geochemistry
 Authors at R: c(
     person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),

Modified: pkg/CHNOSZ/R/info.R
===================================================================
--- pkg/CHNOSZ/R/info.R	2019-02-19 22:57:50 UTC (rev 400)
+++ pkg/CHNOSZ/R/info.R	2019-02-20 04:29:44 UTC (rev 401)
@@ -249,7 +249,7 @@
   }
   # if we got here there were no approximate matches
   # 20190127 look for the species in optional data files 
-  for(opt in c("SLOP98", "SUPCRT92", "OldAA")) {
+  for(opt in c("SLOP98", "SUPCRT92", "OldAA", "AkDi")) {
     optdat <- read.csv(system.file(paste0("extdata/OBIGT/", opt, ".csv"), package="CHNOSZ"), as.is=TRUE)
     if(species %in% optdat$name) {
       message('info.approx: ', species, ' is in an optional database; use add.obigt("', opt, '", "', species, '") to load it')

Modified: pkg/CHNOSZ/R/util.data.R
===================================================================
--- pkg/CHNOSZ/R/util.data.R	2019-02-19 22:57:50 UTC (rev 400)
+++ pkg/CHNOSZ/R/util.data.R	2019-02-20 04:29:44 UTC (rev 401)
@@ -265,6 +265,7 @@
     else if(what=="SUPCRT92") tdata <- read.csv(system.file("extdata/OBIGT/SUPCRT92.csv", package="CHNOSZ"), as.is=TRUE)
     else if(what=="OldAA") tdata <- read.csv(system.file("extdata/OBIGT/OldAA.csv", package="CHNOSZ"), as.is=TRUE)
     else if(what=="AS04") tdata <- read.csv(system.file("extdata/OBIGT/AS04.csv", package="CHNOSZ"), as.is=TRUE)
+    else if(what=="AkDi") tdata <- read.csv(system.file("extdata/OBIGT/AkDi.csv", package="CHNOSZ"), as.is=TRUE)
     ntot <- nrow(tdata)
     # where to keep the results
     DCp <- DV <- DG <- rep(NA,ntot)
@@ -401,7 +402,7 @@
     isAkDi <- is.na(obigt$z.T)
     # remove scaling factors for the HKF species, but not for the AkDi species
     obigt[!isAkDi, 13:20] <- t(t(obigt[!isAkDi, 13:20]) * 10^c(-1,2,0,4,0,4,5,0))
-    # for AkDi specie, set NA values in remaining columns (for display only)
+    # for AkDi species, set NA values in remaining columns (for display only)
     obigt[isAkDi, 16:19] <- NA
     # if all of the species are AkDi, change the variable names
     if(all(isAkDi)) colnames(obigt)[13:20] <- c('a','b','xi','XX1','XX2','XX3','XX4','Z') 

Modified: pkg/CHNOSZ/demo/sources.R
===================================================================
--- pkg/CHNOSZ/demo/sources.R	2019-02-19 22:57:50 UTC (rev 400)
+++ pkg/CHNOSZ/demo/sources.R	2019-02-20 04:29:44 UTC (rev 401)
@@ -22,8 +22,11 @@
 tdata <- read.csv(system.file("extdata/OBIGT/AS04.csv", package="CHNOSZ"), as.is=TRUE)
 os9 <- gsub("\ .*", "", tdata$ref1)
 os10 <- gsub("\ .*", "", tdata$ref2)
+tdata <- read.csv(system.file("extdata/OBIGT/AkDi.csv", package="CHNOSZ"), as.is=TRUE)
+os11 <- gsub("\ .*", "", tdata$ref1)
+os12 <- gsub("\ .*", "", tdata$ref2)
 # all of the thermodynamic data sources - some of them might be NA
-obigt.source <- unique(c(ps1, ps2, os1, os2, os3, os4, os5, os6, os7, os8, os9, os10))
+obigt.source <- unique(c(ps1, ps2, os1, os2, os3, os4, os5, os6, os7, os8, os9, os10, os11, os12))
 obigt.source <- obigt.source[!is.na(obigt.source)]
 # these all produce character(0) if the sources are all accounted for
 print("missing these sources for thermodynamic properties:")

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2019-02-19 22:57:50 UTC (rev 400)
+++ pkg/CHNOSZ/inst/NEWS	2019-02-20 04:29:44 UTC (rev 401)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.2.0-8 (2019-02-20)
+CHANGES IN CHNOSZ 1.2.0-9 (2019-02-20)
 --------------------------------------
 
 CRAN COMPLIANCE
@@ -32,6 +32,9 @@
 
 - Move H2AsO3- from OBIGT/SLOP98.csv to OBIGT/SUPCRT92.csv.
 
+- Add OBIGT/AkDi.csv as optional data file for species using
+  Akinfiev-Diamond model.
+
 DOCUMENTATION
 
 - In demo/NaCl.R, indicate region not considered by Shock et al., 1992

Added: pkg/CHNOSZ/inst/extdata/OBIGT/AkDi.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/OBIGT/AkDi.csv	                        (rev 0)
+++ pkg/CHNOSZ/inst/extdata/OBIGT/AkDi.csv	2019-02-20 04:29:44 UTC (rev 401)
@@ -0,0 +1,11 @@
+name,abbrv,formula,state,ref1,ref2,date,G,H,S,Cp,V,a1.a,a2.b,a3.c,a4.d,c1.e,c2.f,omega.lambda,z.T
+Ar,NA,Ar,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,-8.5139,11.921,0.0733,NA,NA,NA,NA,NA
+H2S,NA,H2S,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,-11.2303,12.6104,-0.2102,NA,NA,NA,NA,NA
+O2,NA,O2,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,-9.754,12.9411,0.026,NA,NA,NA,NA,NA
+N2,NA,N2,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,-11.538,14.6278,-0.032,NA,NA,NA,NA,NA
+NH3,NA,NH3,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,-4.7245,4.9782,-0.0955,NA,NA,NA,NA,NA
+H2,NA,H2,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,-8.4596,10.8301,0.309,NA,NA,NA,NA,NA
+methane,NA,CH4,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,-11.8462,14.8615,-0.1131,NA,NA,NA,NA,NA
+CO2,NA,CO2,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,-8.8321,11.2684,-0.085,NA,NA,NA,NA,NA
+benzene,NA,C6H6,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,-21.0084,22.934,-1.101,NA,NA,NA,NA,NA
+HCl,NA,HCl,aq,AD03,NA,20.Feb.19,NA,NA,NA,NA,NA,11.642,-7.4244,-0.28,NA,NA,NA,NA,NA

Modified: pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_gas.csv.xz
===================================================================
--- pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_gas.csv.xz	2019-02-19 22:57:50 UTC (rev 400)
+++ pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_gas.csv.xz	2019-02-20 04:29:44 UTC (rev 401)
@@ -1,5 +1,5 @@
-ý7zXZ  æÖ´F !   t/å£à.}] 7Iýúb‹¿ñ9²¶Ë¦¨•TB;qý"½qù¦cL;ù"ß“<²ëbï¨gò;ø¥Kä‡¥Šfœ‘1Æw?oz†ÆCþ­aì]IØŽ¨Ý5i‡*s@/¦L¶ŸeßEJd1
-~HtÙ«ëˆpÃ<¤¬×ŒüzG–ÕÛ?ÄŸÌžÞ¡e©½X¼ÐÓE¡agÐQ–9ÊÇW=Bã
-ZPî¬
-Æès¬ôŠVN÷I,ÆœçËsÍź3¥\\Þ6’Ž^ï*6û›_NÜ`øËaî>¥ÌÇ!ïáÀ{îßQ,ì0ªuY­˜Ô dý¼Þ…×Ö…f¶²ù¼ì°Y¤©	fÈbQ£‹ÑÍ*ДvtP‹t°ŽÝ?‘Ž¥âÀÚ7ÅA+ø‹a0"c1›ÛÍ<êEâ²9ªEú<騅,£3â“UšÆ0†ƒ_pYp'ð›SÆö·”ô—Rf¤«Ž†WŽ<ìÞ:Vâçá'äSg4ˆ‘—n¿rž' ½ÝAOü¸‹Il+ž—q¥DÒ,‘–âÐwÎöæ¥Ñ§Å’Né3ãÍeöÿ&cãÊ7‡Ç u|Xå-_£—:´H$=øœäμcäc+r÷&§,Ø[Šî|ijE‚Ôpó›è°ÍÞ¶…Y)‰Ço-Ü Ê;Î\}qž¥zb¹¥«¥~£ö^)1žÍ=3ù¥WðÜQå‰ÌÚ”®@V×ÎÆ"ÓN§ï÷U?ª`ÞA•1ÂàÀÉDîÕbecŸ¯~Xñcn±ÕŽ
-8¿.©xD'°n;ûe{-Ù¨‹. ݍuäw1Ø3§ø\—ø     )kqÀýÞ#X ™¯  8J.±Ägû    YZ
\ No newline at end of file
+ý7zXZ  æÖ´F !   t/å£àýÇ] 7Iýúb‹¿ñ9²¶Ë¦¨•TB;qý"½qù¦cL;ù"ß“<²ëbï¨gò;ø¥Kä‡¥Šfœ‘1Æw?oz†ÆCþ­aì]IØŽ¨Ý5i‡*s@/¦L¶ŸeßEEK8uÊAˆÑ*€s‚ÁæÓ7dõ/Ñô= ¨CÙxÇ+Z§x¢“ù°:ÆyÏÏ;Hæw i«p/½|Üý‡A¥ÍaCÄõG!âV- @´žA"Iö#ÿ\zNù¢u© ¦õWu,a2¢…‰&T#I‡îéOžå9Ä}‰©¾Ïv/ûC„¹Ï8€aUØGñ¯ç_ÒÕ¡‘Xå-:;t 2:ü²HbœC*3š¨ÈEôÓÖ0´ŽT‡¨ÎÒ¬9~bÿ†|øúm©Ý"qÙœõ>ãWˆIªçãåþûÖuw(’¦ÇŸkšÐní§»Õf;¸
+뵏?«}zÕ
+yŽõà`¦IxÓ}Œi–£ÔçÕzÕ;vùÇ}ªüXÀÃqìQNI_y™ŠSÍ?Ù²¡ËqLHÒ0Óy	ëÔ¼£
+Y-¨W_Ž4&}Ó_WVè]eF<Ö ¢ù%H¸ìEçÒÕ[(3«ÿˆÕ³u³‹Dƒ‹[’C
+õDç´7r|\ì ÅQ»"‰½ŠkuŠ¥ú(™&}Ï‘¦•7ÁŽùwã¿Ñ%U¾ ¼¨éEÀ1‚[£éTQü}_JÆ„¢×$´ˆõ‚}q§¥Dc`o™*&:fDÐñ`7׃=gòûÀþæVRˆ“Hd·'ÚÚ&Ûïý/«¡H_ÈžˆÇíÜ$º(pfÁÖ(ÍË¥ÎÏéð£…íÝáýþz×Êg×õé§gK÷üà mÌ;ôe_{&geéy!ˆLqÒÚKt.³¬Ÿdz͐(YhðµSGq®•Ž–PUˆ õMøÊrŸ~  š¤¹…ÒЬ ãþ  (€ö±Ägû    YZ
\ No newline at end of file

Modified: pkg/CHNOSZ/inst/extdata/OBIGT/organic_aq.csv.xz
===================================================================
--- pkg/CHNOSZ/inst/extdata/OBIGT/organic_aq.csv.xz	2019-02-19 22:57:50 UTC (rev 400)
+++ pkg/CHNOSZ/inst/extdata/OBIGT/organic_aq.csv.xz	2019-02-20 04:29:44 UTC (rev 401)
@@ -1,4 +1,4 @@
-ý7zXZ  æÖ´F !   t/å£áj¥hå] 7Iýúb‹¿ñ9²¶Ë¦¨•TB;qý"½qù¦cL;ù"ß“<²ëbï¨gò;ø¥Kä‡¥Šfœ‘1Æw?oz†ÆCþ­aì]IØŽ¨Ý5iˆš¢ñü<óŒ¾Ã!A	êeôC;иMÜ'ˆ†ö~1ëÝhJOÙq=Ñ{
+ý7zXZ  æÖ´F !   t/å£ájŸhØ] 7Iýúb‹¿ñ9²¶Ë¦¨•TB;qý"½qù¦cL;ù"ß“<²ëbï¨gò;ø¥Kä‡¥Šfœ‘1Æw?oz†ÆCþ­aì]IØŽ¨Ý5iˆš¢ñü<óŒ¾Ã!A	êeôC;иMÜ'ˆ†ö~1ëÝhJOÙq=Ñ{
 !Sá¡l®J0­woÖ±Ó¢VÏ)*+‹Fº·~„ p60p¤¼
 %ñ¹úd‰ôH4Z¼Äÿëžs÷9œð¨l„åuA at +ômÌGá]#ú|AnÂØcB½°.*ãÎöÐi¶6Y6­½lʈ×>ò x!#׍ï0NŠï’ûéþ®øV˜qËëP×@oî*å~ç„!Á~&¸Æüð­§xú{;Å ÏQ(TŒ{ÁµÜê~W¹ÿUÏ@Ñ»
 rà&”3¨íf1(\F¶^“è=W<϶OöN ³È߶ãD?|ùï­}É%¬biΞ°­—6¨¹ž’÷N_[6¦³˜çD *Þ¢˜üÍåÿd1*÷|ÕøÔQUè1õö¬—³uüPúµ/aËvT¯¢ƒºÜö"Jþ.!f³‘Ò§ìt
@@ -196,21 +196,16 @@
 GzXq%Â!¯à@b3³G¥µN:µÔÎp at JàðÑÐòQñ&¢#fïVuJ	ŒË¨¬a…Z˜;ÌðÞèüjú숯–\™Ñ<Àjƒ‡ß"O`L3°ü%ǘ* ï5Ûp©®£Kdœ¦<?uöèB†Ç*ÎßOÚ0
 Vš¯ùoVãüò^Ñøˆ†˜û­[µåÕ7Ýq-iYŠd~K-›ñ9i}ë)]ƒdq?YKÛ¤‡FÌ)haŠêμ‡2v´Oçïgb7v-ž^¬£ÂÈè\?WH3ÌÙæTiŠ£y¶BVA€O °Ú‡®­ˆ®Oú(¾`¨$l²é2•Ë@hùÙ,:0¹1q¯‹éqÉT›ß\jz 3‘Éìßmx<`æé7Lb‚ÔoÉ W\–„ÌÚõ» %‹YÜÎÊ•MøÉ‘Év.Æî–¿{§Ÿñò¸ÌÖ“4ÀÅV/¢=ûµÅíI¢³9%	$ xÒFÊ2Î"6Œ í}`ù/ñ:*‰‰¥<ÍNùª[×Þ¿Ùõü¦nªÜS½xFúCÑæ›éÈñ•êÖÐB,TH‚×–hYc¤}Ý¢zá
 ¢¤ZÄ Nv}b¤f-¾iN„#’øM\ZØÉÈÜO­9†åýI{³”
-ßúÑ%_ölrëø²øùéP{:IYnc8×ò÷:ÿš¾Ü©ÐøL¯Cwn6¾žáKÇÝœ’s=i»Ià ݵE6ØTéÙ’#FbÍUßÙI+Å…òÛ²ê}c ©¡ÖUýÙî•“Yå¹±ÍÐ1N	²+X«YŒæ&0qLʼ^UØ˜V«ã‰TÒPæ˜&æÏS”e?Y %Þ
-Zøô65Ÿ
-1¥;xö£_õ¤ý:?oAMM‹ÅÅë•Úu
-­ÔZôõšø¿‹KB’¬üŽ—žÔ ±ôxuêÖnî=àZ>¢xõø]ëw»gõºO’|X®G¡ÒÉfO“tOA¯òûÆYï‡|ÈN¾²tg!3|Îò
-<!N»Î$Ëäž»¡ÒE7À^©_¬©¦§Óñh†
-SqRóz‡\mØžaˆEŽä@Lû
-JäÙ’2§KëAØÖm{ªÒ]#’_ó'uc@î!ÐNè'È^E#1'jë˜Ñ0(6^áê¡sÁ´+føûª«vL¤Á¤á5ò¸HÒe’“àÑí£ü`”·làaԐ)!)Ïb×â‹ÆëlÂòPDœz2ÜíâK3¡Sf/‘·½×ü„bӝ'èv›GÅÛ¥û-	£º ÇßnvtS/JÂPà+4a)(ãlزç3z[‡Äš¬Š,Ç*ŽÖ%bFé"°5WìúƬØWÛÚìëÙ%³åJ~~'ïê¸sH
-È™žI§Óx°ÝU<-j_M>§+Çm°ìþшÝyè«‚'ÑcðŒUmÍVVÎ—‡íl
-l¬Ïé9à ~ø½T…Þ$ÕÖ(e&ÞÏïtJž£bÙb⣋*	ôïmÀ¾¦ªÞ©—+&¼k½±v\W¤Œ84àyCdØH&¸ÎrÃ
-Ò¿¼-;âË ˆZ•5¥Ï(ÇŽÖN䂘’oA•™¡´5ô¬ÕÅrKrñ´‰A°=¶<d%ëQã"I!ÍTc¯~ÀL~<ål¦S^•üþ?˜´‹³S“ftã0ª†Yë7>Þƒ™oöa\òŸ7·’èqÒ	îÕ½1¸Ï¦ñÌ¤™Üùµ®JÁ‘˜ê¡ôvªÌJ£ø#2~“óK¶_TaYKóÕ³+ØÛnf}÷—
-¯§vJŠ#ZÝò>dÌAÖ’¬î |_„jï>w©@Ž…Ö®šEšQ[õRmº¿½ÿçÇ쫳ÚãÄLÉçd{µ†áX[ót ½•¿€~Ú´ôýÐ<×V`A0/€/–
-DÿÅ3{?ÄšDµƒ(©]ï8u¼ ÛY»¯ir.æ…ŒvV¤É¡K3«Šïî 3€pºLæ¼ò÷Ÿáó÷€‘¸ñ¿0ª©…µ^²ä¸¶){§›¨?Ž,Ô20cÍ‚’˪ûtÕ8¡¡ƒþP^å4D4ÖeZqS¤82²'¬·`v¿œƒ8ËTãÒÃ
-ëˆ5U« "š‹h<Ñ×B	MÀR”¤k„eÓÚ²@ù·
-èƶÐ~½ë&À)0pù`º-ù½bã®%t7”»¬óy{Düúr¦-²x/oÄÙù«oì”î.¯®¬©³Fœ|÷K’ŸÚ¾õ4ò
-DÏš¹ÈÖ
-ÏhË56Ú•Š†[nJ”_à°rs)||=tP’¥—E;žn+ÓƒôDƒc9Õ’*´Døè(ý¤Ûõ×­L°DUÄa/ª´V i@ÒC%G6ªùÔX½s1§¥1¨oûÞ8Š~(9èèaîí
-bæ¯¿å¿ `Ô:¯Í—<‚ªŸÃl at QÔ"Úå~ªI7wOfIÚŒ€Qo÷äi=É(¯Þ™V'O›)5Ï› i²½’ùD!qF’R—*‚o×ÌðvW›G(ÀOM*…F-Ä纤QxKÙu	ùvª´³×\ý5Kƽ[V8tþý)tÇŒQ¼6PVÿÖ¶蝢¸u¾À	ŠdÃ@,nV—ŽÐ>9.ÓñÍ¥[€ñ]f‚¹ñí!
-Þ©;¾TÙ›瀞’žDô®‡Çµ	ˆ^¤Ø ®n$ø£˜ÂE8üB"É»¹Ö¡zŠÑbÓNŤЬå§ùú9>öíT2‘YYHBÈÔž     lUÆŒßû Ò¦Õû¼à±Ägû    YZ
\ No newline at end of file
+ßúÑ%_ölrëø²øùéP{:IYnc8×ò÷:KÄÒ ÆÜfúÂ	Õ³ÿˆ<ï.†r@ßÝ%NÉ—Ì
+>Tø.îÄyR*ÜôO†ææÃÙ	M?í:'4] ²ùû£%Ñ›ùÈ, at e¢*VjýsL{¨×}“Ç°éŒZ `ÐóHê!6 üýîœjRóÍLú˜!Åjm]$ö@W[æsëšËiûKÔÌ°2GK¯!ù@ºõü6/KÞãr~ÉbSA·_mFhqÈ+{³Ÿû½@Û•mýGåRÔ÷Ö‘Gû¸O„']Ó
+_§éåð.ŽÌñ§§LƒXÃ3z72>¥bè
+“Âu+à2TULúÞêëqkKÞÅÁüœÒ)<ýÁ‹ùƒáÂÇ$£o‚NΡœ¶&¬£‹:;щ*9§y¦M¯À®ƒú%(‡?r奖Ï{•]ô×€…ŽÙZsUƒ/æ}øÀÂñ-8xcðJ6Ћ“´û§ÎܾÏ
+^øŠ)ñf¸´'v$Æ-Å{H3‘œðËÏÎ(Ó…ˆ<XmÜ@&BGúzKÇÖR^#ºèŠÈ›î®	XþZÉ\Å÷¾ØPåÿ¿5Ž[Üºcnoöhaiƒ±Š7D©›BüÑ!àD€-•ýÜuEÁ\i9_ j|Œžî[ó€J¯*X—´’ðÁ$墼LþJ­áÊìgwO8šˍÆL´¤%Ï¿Ì{nZÕ’?k/bpü÷ynyÏÍ|Ñ›ÊoQ°ÑQQ¼aÔ÷Üþ:Þ?qRâµ]ñòª{…•-þHˆ y»t”1¨„h{h­Þô0Y’A‘±Lb¼u°‚U۝‚¨.Pn¦°E
+-ë…âŠÅhð:X¶o	·›ÎÒƽM¹q ´™¡ïfÎ3Š¡“åÇÔ•{;eÍŸÙ]ZŸV¦Šm'Ã-*œhSzÞT ´¡8Æú¡gdÚ£uþ]¿Ã	ÞâŸp? eMw¦É£ƒùÏÓæ„ÄÁ³)<´Z3}|þÉaî¿ËfQ÷ÿ!âÙ¡Û¶œñ€dÃg\L¦¬§4Á3‘Úq¨-⽤2P.سYq§<ÄÆü¢ÏþÛþ£ô³' m4AÜ¡–ý0{¹^› z(/÷“¼êû“Á18
+':¶à7cMk²–A+!£&…­,‰åµù®×ù~ÚÓyvÚþ›7$ó§uY˜^”ßE0F5kVß«õËæ5ýiâÀj)Í°ÝMõˆÜ{­úùF<N›¼eÔÈÔ¥û7í2lÁ"ÕRÍ ¯’6g=›É[ÀB&CUê%L¡ï|c¥8¤ú3á²ð5Å
+0‰Ãj»™T8¹ëfӥϔØü•™Ä(òÜ™M@ìF¿†á}"8&©ž×Ø(6ºÕ{gÞÎQéŒîÃan9ƒé½~i,·W ÷|‚¶z6pQþI*>yU9l*_¬DV.7užîëÎêî'è2"³ªä_X<CÚ6*Ø…IÑ“ ·ÎÉÅ=«“筍çÖ¼â˜þ)`€y К'%£Ö¯é'I
+d-ÍQô©á2<4dál
+šëß~
+aq&Ã0Ô©|Íʉ¯TMHnÌNOxÕˆyj’qó~ø‡ð^3ZñKíxMƒ.ò5cÜU%¬Lnà#(ES®l„
+iÔ/_ À<üå“ÍÒGSQD/‡¾S®›Ž+ú6O•ï?í,ø¡Åo-ð;	ÆØp“S Q±£ùL®Eg×9⌰ÙK3HÑK
+`êíÕÇZÈ †ˆ‹2Wóú"»‘`&B’Ô~̤}	ã¹ÎÎe„X|Œ9Yõ#{ät؃hÈßµ“)d¨„‰öE‰´$c³þŸSIÒwsÊé‘O©'šü›ãળQ:ëÚš4rÆÀ]Ë ˆ¼*9ÆkíBŠWamùôUþݤ^a_ù{¬÷ÍÈxîÑþvÞ‘LïÊ!ѵ:l)*ÓŒ§š‘­Ây6æ\hjñt·ì5a¹f«Èìªè$Ô–YJûÆ(·9Ûøàzåßè×WIV·è²z‹§cD×MH.>¯PŸÃî Ì”Ž £ÉH ôÑ Õë&"±Ägû    YZ
\ No newline at end of file

Modified: pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv	2019-02-19 22:57:50 UTC (rev 400)
+++ pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv	2019-02-20 04:29:44 UTC (rev 401)
@@ -57,10 +57,11 @@
 PH95,"V. A. Pokrovskii and H. C. Helgeson",1995,"Am. J. Sci. 295, 1255-1342","aluminum species",https://doi.org/10.2475/ajs.295.10.1255
 PK95,"V. B. Parker and I. L. Khodakovskii",1995,"J. Phys. Chem. Ref. Data 24, 1699-1745",melanterite,https://doi.org/10.1063/1.555964
 RH95,"R. A. Robie and B. S. Hemingway",1995,"U. S. Geological Survey Bull. 2131","gypsum GHS",http://pubs.er.usgs.gov/publication/b2131
+RH95.1,"R. A. Robie and B. S. Hemingway",1995,"U. S. Geological Survey Bull. 2131","hydrogen chloride (HCl gas)",http://pubs.er.usgs.gov/publication/b2131
 SK95,"E. L. Shock and C. M. Koretsky",1995,"Geochim. Cosmochim. Acta 59, 1497-1532","metal-organic acid complexes",https://doi.org/10.1016/0016-7037(95)00058-8
 SK95.1,"E. L. Shock and C. M. Koretsky",1995,"Geochim. Cosmochim. Acta 59, 1497-1532","alanate, glycinate and their complexes with metals. Values are taken from slop98.dat, which notes corrected values for some species.",https://doi.org/10.1016/0016-7037(95)00058-8
 Sho95,"E. L. Shock",1995,"Am. J. Sci. 295, 496-580","carboxylic acids",https://doi.org/10.2475/ajs.295.5.496
-DPS+96,"I. Diakonov, G. Pokrovski et al.",1996,"Geochim. Cosmochim. Acta 60, 197-211",NaAl(OH)<sub>4</sub>,http://dx.doi.org/10.1016/0016-7037(95)00403-3
+DPS+96,"I. Diakonov, G. Pokrovski et al.",1996,"Geochim. Cosmochim. Acta 60, 197-211",NaAl(OH)<sub>4</sub>,https://doi.org/10.1016/0016-7037(95)00403-3
 AH97b,"J. P. Amend and H. C. Helgeson",1997,"J. Chem. Soc., Faraday Trans. 93, 1927-1941","amino acids GHS",https://doi.org/10.1039/A608126F
 AH97b.1,"J. P. Amend and H. C. Helgeson",1997,"J. Chem. Soc., Faraday Trans. 93, 1927-1941","alanate and glycinate GHS",https://doi.org/10.1039/A608126F
 AH97b.2,"J. P. Amend and H. C. Helgeson",1997,"J. Chem. Soc., Faraday Trans. 93, 1927-1941","glycine, glycinium, and methionine GHS",https://doi.org/10.1039/A608126F
@@ -106,10 +107,11 @@
 PS01,"A. V. Plyasunov and E. L. Shock",2001,"Geochim. Cosmochim. Acta 65, 3879-3900","aqueous nonelectrolytes",https://doi.org/10.1016/S0016-7037(01)00678-0
 PS01.1,"A. V. Plyasunov and E. L. Shock",2001,"Geochim. Cosmochim. Acta 65, 3879-3900","acetic acid, propanoic acid, and methane",https://doi.org/10.1016/S0016-7037(01)00678-0
 Ric01,"L. Richard",2001,"Geochim. Cosmochim. Acta 65, 3827-3877","organic sulfur compounds",https://doi.org/10.1016/S0016-7037(01)00761-X
-Ste01,"A. Stefansson",2001,"Chem. Geol. 172, 225-250","aqueous H<sub>4</sub>SiO<sub>4</sub>",http://dx.doi.org/10.1016/S0009-2541(00)00263-1
+Ste01,"A. Stefansson",2001,"Chem. Geol. 172, 225-250","aqueous H<sub>4</sub>SiO<sub>4</sub>",https://doi.org/10.1016/S0009-2541(00)00263-1
 SSW01,"M. D. Schulte, E. L. Shock and R. H. Wood",2001,"Geochim. Cosmochim. Acta 65, 3919-3930","AsH<sub>3</sub>, CF<sub>4</sub>, CH<sub>3</sub>F, Cl<sub>2</sub>, ClO<sub>2</sub>, N<sub>2</sub>O, NF<sub>3</sub>, NO, PH<sub>3</sub>, and SF<sub>6</sub>",https://doi.org/10.1016/S0016-7037(01)00717-7
-TS01,"B. Tagirov and J. Schott",2001,"Geochim. Cosmochim. Acta 65, 3965-3992","aqueous Al species",http://dx.doi.org/10.1016/S0016-7037(01)00705-0
-GKL02,"R. N. Goldberg et al.",2002,"J. Phys. Chem. Ref. Data 31, 231-370","glycine, diglycine, and triglycine (+1 and -1 ions) GHS",http://dx.doi.org/10.1063/1.1416902
+TS01,"B. Tagirov and J. Schott",2001,"Geochim. Cosmochim. Acta 65, 3965-3992","aqueous Al species",https://doi.org/10.1016/S0016-7037(01)00705-0
+GKL02,"R. N. Goldberg et al.",2002,"J. Phys. Chem. Ref. Data 31, 231-370","glycine, diglycine, and triglycine (+1 and -1 ions) GHS",https://doi.org/10.1063/1.1416902
+AD03,"N. N. Akinfiev and L. W. Diamond",2003,"Geochim. Cosmochim. Acta 67, 613-629","aqueous nonelectrolytes",https://doi.org/10.1016/S0016-7037(02)01141-9
 MGN03,"J. Majzlan, K.-D. Grevel and A. Navrotsky",2003,"Am. Mineral. 88, 855-859","goethite, lepidocrocite, and maghemite GHS",https://doi.org/10.2138/am-2003-5-614
 NA03,"D. K. Nordstrom and D. G. Archer",2003,"Arsenic thermodynamic data and environmental geochemistry. In Arsenic in Groundwater, eds. Welch and Stollenwerk, Kluwer","As oxide and sulfide minerals",
 NA03.1,"D. K. Nordstrom and D. G. Archer",2003,"Arsenic thermodynamic data and environmental geochemistry. In Arsenic in Groundwater, eds. Welch and Stollenwerk, Kluwer","aqueous As oxides and sulfides",

Modified: pkg/CHNOSZ/tests/testthat/test-eos.R
===================================================================
--- pkg/CHNOSZ/tests/testthat/test-eos.R	2019-02-19 22:57:50 UTC (rev 400)
+++ pkg/CHNOSZ/tests/testthat/test-eos.R	2019-02-20 04:29:44 UTC (rev 401)
@@ -80,7 +80,7 @@
 
 test_that("AkDi produces expected results", {
   # 20190220
-  # add an aqueous species conforming to the AkDi model: it has NA for Z
+  # modify aqueous CO2 to use the AkDi model: it has NA for Z
   iCO2 <- mod.obigt("CO2", a=-8.8321, b=11.2684, c=-0.0850, z=NA)
   # do the properties we calculate match previously calculated values?
   P <- "Psat"
@@ -99,7 +99,19 @@
   G_calc <- convert(G_calc, "J", T=convert(T, "K"))
   expect_equal(round(G_calc, 1), G_ref)
 
+  # compare Gibbs energies at 25 degrees calculatwith with AkDi model to database values
+  iAkDi <- add.obigt("AkDi")
+  # this would produce an error if any of the corresponding gases were unavailable
+  sAkDi <- subcrt(iAkDi, T = 25)
+  GAkDi <- do.call(rbind, sAkDi$out)$G
+  # now get the parameters from default OBIGT
   reset()
+  GOBIGT <- info(iAkDi)$G
+  # calculate the differences and add names
+  Gdiff <- GAkDi - GOBIGT
+  names(Gdiff) <- info(iAkDi)$name
+  # the differences are not that big, except for HCl(aq)
+  expect_lt(max(abs(Gdiff)), 300)
 })
 
 # reference



More information about the CHNOSZ-commits mailing list