From noreply at r-forge.r-project.org Wed Mar 7 16:46:30 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 7 Mar 2018 16:46:30 +0100 (CET) Subject: [CHNOSZ-commits] r306 - in pkg/CHNOSZ: . R inst inst/extdata/Berman inst/extdata/Berman/unused man Message-ID: <20180307154630.A7E1F1892F8@r-forge.r-project.org> Author: jedick Date: 2018-03-07 16:46:30 +0100 (Wed, 07 Mar 2018) New Revision: 306 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/berman.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv pkg/CHNOSZ/inst/extdata/Berman/DS10.csv pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv pkg/CHNOSZ/inst/extdata/Berman/unused/BA96.csv pkg/CHNOSZ/man/extdata.Rd Log: extdata/Berman/*.csv: remove/change value multipliers Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/DESCRIPTION 2018-03-07 15:46:30 UTC (rev 306) @@ -1,6 +1,6 @@ -Date: 2018-02-27 +Date: 2018-03-07 Package: CHNOSZ -Version: 1.1.3-13 +Version: 1.1.3-14 Title: Thermodynamic Calculations for Geobiochemistry Authors at R: c( person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"), Modified: pkg/CHNOSZ/R/berman.R =================================================================== --- pkg/CHNOSZ/R/berman.R 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/R/berman.R 2018-03-07 15:46:30 UTC (rev 306) @@ -28,10 +28,10 @@ dat <- dat[!duplicated(dat$name), ] # remove the multipliers multexp <- c(0, 0, 0, 0, # Ber88 Table 2 - 0, -2, -5, -7, # Table 3a - 6, 12, 6, 10, # Table 4 - 0, 0, 0, 2, 5, 0, # Table 3b - 0, 0, 0, -3, -5, 2, 6, -4 # Table 5 + 0, 0, 0, 0, # Table 3a + 5, 5, 5, 8, # Table 4 + 0, 0, 0, 0, 0, 0, # Table 3b + 0, 0, 0, 0, 0, 0, 0, 0 # Table 5 ) dat[, 2:27] <- t(t(dat[, 2:27]) / 10^multexp) # if name is missing, return the entire data frame (used in test-berman.R) Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/NEWS 2018-03-07 15:46:30 UTC (rev 306) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.1.3-13 (2018-02-27) +CHANGES IN CHNOSZ 1.1.3-14 (2018-03-07) --------------------------------------- - Lines in 1-D diagram()s can optionally be drawn as splines using the @@ -34,6 +34,9 @@ - read.fasta(): add support for file connections created using archive::archive_read (https://github.com/jimhester/archive). +- Change files in extdata/Berman to be more like winTWQ format (no + value multipliers, except 10^5, 10^5, 10^5, and 10^8 on v1 to v4). + CHANGES IN CHNOSZ 1.1.3 (2017-11-13) ------------------------------------ Modified: pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv 2018-03-07 15:46:30 UTC (rev 306) @@ -1,2 +1,2 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-5483.63,8728.412,-1.485,4,27.2,80,,,,,,,,,,,,,, +antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,-0.1485,4E-07,2.72,0.8,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv 2018-03-07 15:46:30 UTC (rev 306) @@ -1,68 +1,68 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -akermanite,-3663786,-3860441,212,9.252,387.06,-29.388,0,-4.079,-0.785,0,25.011,67.224,358,298,0,0,0,452,,,,,,,, -albite,-3703293,-3921618,224.412,10.083,393.64,-24.155,-78.928,107.064,-1.945,4.861,26.307,32.407,,,,,,,,,,,,,, -"albite,high",-3703293,-3921618,224.412,10.083,393.64,-24.155,-78.928,107.064,-1.945,4.861,26.307,32.407,,,,,,,,,,,,,, -"albite,low",-3711715,-3935100,207.443,10.043,393.64,-24.155,-78.928,107.064,-1.945,4.861,26.307,32.407,,,,,,,,,,,,,, -almandine,-4941728,-5265502,339.927,11.511,573.96,-14.831,-292.92,502.208,-0.558,0.321,18.613,74.539,,,,,,,,,,,,,, -andalusite,-2441806,-2589972,91.434,5.147,236.48,-11.029,-75.268,93.644,-0.77,1.923,23.443,7.189,,,,,,,,,,,,,, -anorthite,-4003221,-4228730,200.186,10.075,439.37,-37.341,0,-31.702,-1.272,3.176,10.918,41.985,,,,,,,,,,,,,, -anthophyllite,-11342582,-12069032,535.195,26.56,1219.31,-57.665,-347.661,440.09,-1.259,0,27.06,31.325,,,,,,,,,,,,,, -antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-5483.63,8728.412,-1.978,4.944,24.965,39.444,,,,,,,,,,,,,, -brucite,-834868,-925937,63.064,2.468,136.84,-5.371,-43.619,55.269,-2.023,6.726,32.854,10.94,,,,,,,,,,,,,, -Ca-Al-pyroxene,-3122310,-3298767,140.751,6.356,310.7,-16.716,-74.553,94.878,-0.87,2.171,22.25,52.863,,,,,,,,,,,,,, -calcite,-1128295,-1206819,91.725,3.69,178.19,-16.577,-4.827,16.66,-1.4,0,8.907,227.402,,,,,,,,,,,,,, -chrysotile,-4035373,-4363356,220.134,10.72,610.02,-55.812,-18.573,19.547,-1.81,4.524,27.151,67.351,,,,,,,,,,,,,, -clinochlore,-8250546,-8909590,435.154,21.147,1214.28,-112.171,0,-125.625,-1.819,0,26.452,0,,,,,,,,,,,,,, -coesite,-852585,-907604,39.424,2.064,94.907,-7.673,-5.279,2.627,-1.037,3,7.396,43.605,,,,,,,,,,,,,, -cordierite,-8651517,-9158727,417.97,23.311,954.39,-79.623,-23.173,-37.021,-1.158,0,3.003,18.017,,,,,,,,,,,,,, -corundum,-1582199,-1675700,50.82,2.558,155.02,-8.284,-38.614,40.908,-0.385,0.375,21.342,47.18,,,,,,,,,,,,,, -"cristobalite,alpha",-853918,-907753,43.394,2.587,83.51,-3.747,-24.554,28.007,-2.515,0,20.824,0,535,298,0.048,-14.216,44.142,0,,,,,,,, -"cristobalite,beta",-853327,-906377,46.029,2.73,83.51,-3.747,-24.554,28.007,-1.1,5.535,3.189,0,,,,,,,,,,,,,, -diaspore,-920806,-999378,35.308,1.776,143.24,-15.404,-3.231,6.463,-0.599,0,29.718,0,,,,,,,,,,,,,, -diopside,-3026202,-3200583,142.5,6.62,305.41,-16.049,-71.66,92.184,-0.872,1.707,27.795,83.082,,,,,,,,,,,,,, -dolomite,-2162354,-2325248,154.89,6.432,328.48,-25.544,-46.885,79.038,-1.07,0,14.23,363.778,,,,,,,1423,298,-9.42,0,3.85,1.732,5.02,0 -"enstatite,clino",-1458601,-1545926,66.325,3.131,139.96,-4.97,-44.002,53.571,-0.75,0.448,21.915,74.92,,,,,,,,,,,,,, -enstatite,-1458181,-1545552,66.17,3.133,166.58,-12.006,-22.706,27.915,-0.749,0.447,24.656,74.67,,,,,,,,,,,,,, -"enstatite,proto",-1456965,-1543959,67.438,3.242,166.58,-12.006,-22.706,27.915,-0.75,0.448,16.832,116.65,,,,,,,,,,,,,, -fayalite,-1380154,-1479360,150.93,4.63,248.93,-19.239,0,-13.91,-0.73,0,26.546,79.482,,,,,,,,,,,,,, -ferrosilite,-1117472,-1194375,95.882,3.296,169.06,-11.93,-20.971,29.253,-0.99,0,31.808,75.85,,,,,,,,,,,,,, -forsterite,-2055023,-2174420,94.01,4.366,238.64,-20.013,0,-11.624,-0.791,1.351,29.464,88.633,,,,,,,,,,,,,, -gehlenite,-3785954,-3988158,198.6,9.033,373.09,-22.768,-47.785,47.791,-0.996,2.488,24.926,5.664,,,,,,,1600,698,-221.74,0,172.91,36.95,-146.9,0 -grossular,-6270974,-6632859,255.15,12.538,573.43,-20.394,-188.872,231.931,-0.654,1.635,18.994,79.756,,,,,,,,,,,,,, -hematite,-743681,-825627,87.437,3.027,146.86,0,-55.768,52.563,-0.479,0.304,38.31,1.65,955,298,0,-7.403,27.921,1287,,,,,,,, -ilmenite,-1155320,-1231947,108.628,3.17,150,-4.416,-33.237,34.815,-0.584,1.23,27.248,29.968,,,,,,,,,,,,,, -jadeite,-2846482,-3025118,133.574,6.034,311.29,-20.051,-53.503,66.257,-0.86,2.149,23.118,25.785,,,,,,,,,,,,,, -kaolinite,-3799770,-4120327,203.7,9.952,523.23,-44.267,-22.443,9.231,-1.2,0,32,0,,,,,,,,,,,,,, -kyanite,-2443370,-2594220,82.43,4.412,262.68,-20.014,-19.997,-6.318,-0.646,0,23.973,0,,,,,,,,,,,,,, -lawsonite,-4509709,-4865666,229.176,10.144,728.67,-82.481,0,85.056,-0.769,1.922,26.283,0,,,,,,,,,,,,,, -lime,-603350,-635090,37.75,1.676,58.79,-1.339,-11.471,10.298,-1.022,2.565,34.61,67.406,,,,,,,,,,,,,, -magnesite,-1029875,-1113636,65.21,2.803,162.3,-11.093,-48.826,87.466,-0.89,2.212,18.436,415.968,,,,,,,,,,,,,, -magnetite,-1014235,-1117403,146.114,4.452,207.93,0,-72.433,66.436,-0.582,1.751,30.291,138.47,848,298,0,-19.502,61.037,1565,,,,,,,, -margarite,-5852244,-6236603,265.084,12.958,699.8,-55.871,-68.077,73.432,-1.155,2.886,21.019,124.556,,,,,,,,,,,,,, -meionite,-13105915,-13849723,730,34.036,1511.35,-132.433,0,-75.161,-1.11,0,9.34,0,,,,,,,,,,,,,, -merwinite,-4309707,-4537497,251.777,9.847,453.62,-32.5,0,-34.423,-0.551,1.381,29.376,87.235,,,,,,,,,,,,,, -monticellite,-2132222,-2250027,108.3,5.148,226.34,-15.427,-11.797,-2.329,-0.904,2,27.863,76.339,,,,,,,,,,,,,, -muscovite,-5596723,-5976740,293.157,14.087,651.49,-38.732,-185.232,274.247,-1.717,4.295,33.527,0,,,,,,,,,,,,,, -paragonite,-5563572,-5944208,277.699,13.216,577.57,-14.728,-322.144,505.008,-1.973,4.933,39.424,59.701,,,,,,,,,,,,,, -periclase,-569209,-601500,26.951,1.125,61.11,-2.962,-6.212,0.584,-0.622,1.511,37.477,3.556,,,,,,,,,,,,,, -phlogopite,-5827224,-6207342,334.158,14.977,610.38,-20.838,-215.33,284.104,-1.697,0,34.447,0,,,,,,,,,,,,,, -K-feldspar,-3745415,-3970791,214.145,10.869,381.37,-19.41,-120.373,183.643,-1.805,5.112,15.145,54.85,,,,,,,1436,298,282.98,-4.83,36.21,-15.733,34.77,41.063 -"K-feldspar,high",-3738804,-3959704,229.157,10.896,381.37,-19.41,-120.373,183.643,-1.805,5.112,15.145,54.85,,,,,,,,,,,,,, -"K-feldspar,low",-3745415,-3970791,214.145,10.869,381.37,-19.41,-120.373,183.643,-1.805,5.112,15.145,54.85,,,,,,,,,,,,,, -prehnite,-5820154,-6198606,288.634,14.016,716.05,-64.046,-21.825,26.85,-1.427,0,1.468,1128.353,,,,,,,,,,,,,, -pyrope,-5936009,-6286548,266.359,11.316,640.72,-45.421,-47.019,0,-0.576,0.442,22.519,37.044,,,,,,,,,,,,,, -pyrophyllite,-5266865,-5640781,239.4,12.76,665.93,-58.974,-49.799,66.181,-1.354,0,12.637,381.661,,,,,,,,,,,,,, -quartz,-856288,-910700,41.46,2.269,80.01,-2.403,-35.467,49.157,-2.434,10.137,23.895,0,848,373,0.0237,-9.187,24.607,0,,,,,,,, -"quartz,beta",-855033,-908627,44.207,2.37,80.01,-2.403,-35.467,49.157,-1.238,7.087,0,0,,,,,,,,,,,,,, -rutile,-889497,-944750,50.46,1.882,77.84,0,-33.678,40.294,-0.454,0.584,25.716,15.409,,,,,,,,,,,,,, -sillimanite,-2439265,-2586091,95.93,4.983,256.73,-18.872,-29.774,25.096,-0.753,0,13.431,0,,,,,,,,,,,,,, -sphene,-2455134,-2596652,129.29,5.565,234.62,-10.403,-51.183,59.146,-0.59,0,25.2,0,,,,,,,,,,,,,, -spinel,-2176537,-2300313,84.535,3.977,235.9,-17.666,-17.104,4.062,-0.489,0,21.691,50.528,,,,,,,,,,,,,, -talc,-5517657,-5897387,261.24,13.61,664.11,-51.872,-21.472,-32.737,-1.699,5.665,29.447,0,,,,,,,,,,,,,, -tremolite,-11578548,-12305578,551.15,27.268,1229.36,-64.019,-320.899,420.881,-1.392,3.481,24.374,98.338,,,,,,,,,,,,,, -"tridymite,low",-854026,-907750,43.77,2.675,75.37,0,-59.581,95.825,-2.508,0,19.339,0,383,298,0,42.67,-144.575,130,,,,,,,, -"tridymite,high",-853844,-907045,45.524,2.737,75.37,0,-59.581,95.825,-0.74,3.735,4.829,0,,,,,,,,,,,,,, -wollastonite,-1546123,-1631500,81.81,3.983,149.07,-6.903,-36.593,48.435,-1.245,3.113,28.18,0,,,,,,,,,,,,,, -pseudowollastonite,-1543085,-1627427,85.279,4.016,141.16,-4.172,-58.576,94.074,-1.245,3.113,28.18,0,,,,,,,,,,,,,, -zoisite,-6494148,-6889488,297.576,13.588,749.17,-65.093,-23.805,12.486,-0.515,1.288,34.67,0,,,,,,,,,,,,,, -clinozoisite,-6496497,-6894968,287.076,13.673,749.17,-65.093,-23.805,12.486,-0.515,1.288,34.67,0,,,,,,,,,,,,,, +akermanite,-3663786,-3860441,212,9.252,387.06,-2938.8,0,-40790000,-0.0785,0,2.5011,0.67224,358,298,0,0,0,452,,,,,,,, +albite,-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +"albite,high",-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +"albite,low",-3711715,-3935100,207.443,10.043,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +almandine,-4941728,-5265502,339.927,11.511,573.96,-1483.1,-29292000,5022080000,-0.0558,3.21E-08,1.8613,0.74539,,,,,,,,,,,,,, +andalusite,-2441806,-2589972,91.434,5.147,236.48,-1102.9,-7526800,936440000,-0.077,1.923E-07,2.3443,0.07189,,,,,,,,,,,,,, +anorthite,-4003221,-4228730,200.186,10.075,439.37,-3734.1,0,-317020000,-0.1272,3.176E-07,1.0918,0.41985,,,,,,,,,,,,,, +anthophyllite,-11342582,-12069032,535.195,26.56,1219.31,-5766.5,-34766100,4400900000,-0.1259,0,2.706,0.31325,,,,,,,,,,,,,, +antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,-0.1978,4.944E-07,2.4965,0.39444,,,,,,,,,,,,,, +brucite,-834868,-925937,63.064,2.468,136.84,-537.1,-4361900,552690000,-0.2023,6.726E-07,3.2854,0.1094,,,,,,,,,,,,,, +Ca-Al-pyroxene,-3122310,-3298767,140.751,6.356,310.7,-1671.6,-7455300,948780000,-0.087,2.171E-07,2.225,0.52863,,,,,,,,,,,,,, +calcite,-1128295,-1206819,91.725,3.69,178.19,-1657.7,-482700,166600000,-0.14,0,0.8907,2.27402,,,,,,,,,,,,,, +chrysotile,-4035373,-4363356,220.134,10.72,610.02,-5581.2,-1857300,195470000,-0.181,4.524E-07,2.7151,0.67351,,,,,,,,,,,,,, +clinochlore,-8250546,-8909590,435.154,21.147,1214.28,-11217.1,0,-1256250000,-0.1819,0,2.6452,0,,,,,,,,,,,,,, +coesite,-852585,-907604,39.424,2.064,94.907,-767.3,-527900,26270000,-0.1037,3E-07,0.7396,0.43605,,,,,,,,,,,,,, +cordierite,-8651517,-9158727,417.97,23.311,954.39,-7962.3,-2317300,-370210000,-0.1158,0,0.3003,0.18017,,,,,,,,,,,,,, +corundum,-1582199,-1675700,50.82,2.558,155.02,-828.4,-3861400,409080000,-0.0385,3.75E-08,2.1342,0.4718,,,,,,,,,,,,,, +"cristobalite,alpha",-853918,-907753,43.394,2.587,83.51,-374.7,-2455400,280070000,-0.2515,0,2.0824,0,535,298,0.048,-0.14216,0.00044142,0,,,,,,,, +"cristobalite,beta",-853327,-906377,46.029,2.73,83.51,-374.7,-2455400,280070000,-0.11,5.535E-07,0.3189,0,,,,,,,,,,,,,, +diaspore,-920806,-999378,35.308,1.776,143.24,-1540.4,-323100,64630000,-0.0599,0,2.9718,0,,,,,,,,,,,,,, +diopside,-3026202,-3200583,142.5,6.62,305.41,-1604.9,-7166000,921840000,-0.0872,1.707E-07,2.7795,0.83082,,,,,,,,,,,,,, +dolomite,-2162354,-2325248,154.89,6.432,328.48,-2554.4,-4688500,790380000,-0.107,0,1.423,3.63778,,,,,,,1423,298,-9.42,0,385000,0.01732,5.02E-06,0 +"enstatite,clino",-1458601,-1545926,66.325,3.131,139.96,-497,-4400200,535710000,-0.075,4.48E-08,2.1915,0.7492,,,,,,,,,,,,,, +enstatite,-1458181,-1545552,66.17,3.133,166.58,-1200.6,-2270600,279150000,-0.0749,4.47E-08,2.4656,0.7467,,,,,,,,,,,,,, +"enstatite,proto",-1456965,-1543959,67.438,3.242,166.58,-1200.6,-2270600,279150000,-0.075,4.48E-08,1.6832,1.1665,,,,,,,,,,,,,, +fayalite,-1380154,-1479360,150.93,4.63,248.93,-1923.9,0,-139100000,-0.073,0,2.6546,0.79482,,,,,,,,,,,,,, +ferrosilite,-1117472,-1194375,95.882,3.296,169.06,-1193,-2097100,292530000,-0.099,0,3.1808,0.7585,,,,,,,,,,,,,, +forsterite,-2055023,-2174420,94.01,4.366,238.64,-2001.3,0,-116240000,-0.0791,1.351E-07,2.9464,0.88633,,,,,,,,,,,,,, +gehlenite,-3785954,-3988158,198.6,9.033,373.09,-2276.8,-4778500,477910000,-0.0996,2.488E-07,2.4926,0.05664,,,,,,,1600,698,-221.74,0,17291000,0.3695,-0.0001469,0 +grossular,-6270974,-6632859,255.15,12.538,573.43,-2039.4,-18887200,2319310000,-0.0654,1.635E-07,1.8994,0.79756,,,,,,,,,,,,,, +hematite,-743681,-825627,87.437,3.027,146.86,0,-5576800,525630000,-0.0479,3.04E-08,3.831,0.0165,955,298,0,-0.07403,0.00027921,1287,,,,,,,, +ilmenite,-1155320,-1231947,108.628,3.17,150,-441.6,-3323700,348150000,-0.0584,1.23E-07,2.7248,0.29968,,,,,,,,,,,,,, +jadeite,-2846482,-3025118,133.574,6.034,311.29,-2005.1,-5350300,662570000,-0.086,2.149E-07,2.3118,0.25785,,,,,,,,,,,,,, +kaolinite,-3799770,-4120327,203.7,9.952,523.23,-4426.7,-2244300,92310000,-0.12,0,3.2,0,,,,,,,,,,,,,, +kyanite,-2443370,-2594220,82.43,4.412,262.68,-2001.4,-1999700,-63180000,-0.0646,0,2.3973,0,,,,,,,,,,,,,, +lawsonite,-4509709,-4865666,229.176,10.144,728.67,-8248.1,0,850560000,-0.0769,1.922E-07,2.6283,0,,,,,,,,,,,,,, +lime,-603350,-635090,37.75,1.676,58.79,-133.9,-1147100,102980000,-0.1022,2.565E-07,3.461,0.67406,,,,,,,,,,,,,, +magnesite,-1029875,-1113636,65.21,2.803,162.3,-1109.3,-4882600,874660000,-0.089,2.212E-07,1.8436,4.15968,,,,,,,,,,,,,, +magnetite,-1014235,-1117403,146.114,4.452,207.93,0,-7243300,664360000,-0.0582,1.751E-07,3.0291,1.3847,848,298,0,-0.19502,0.00061037,1565,,,,,,,, +margarite,-5852244,-6236603,265.084,12.958,699.8,-5587.1,-6807700,734320000,-0.1155,2.886E-07,2.1019,1.24556,,,,,,,,,,,,,, +meionite,-13105915,-13849723,730,34.036,1511.35,-13243.3,0,-751610000,-0.111,0,0.934,0,,,,,,,,,,,,,, +merwinite,-4309707,-4537497,251.777,9.847,453.62,-3250,0,-344230000,-0.0551,1.381E-07,2.9376,0.87235,,,,,,,,,,,,,, +monticellite,-2132222,-2250027,108.3,5.148,226.34,-1542.7,-1179700,-23290000,-0.0904,2E-07,2.7863,0.76339,,,,,,,,,,,,,, +muscovite,-5596723,-5976740,293.157,14.087,651.49,-3873.2,-18523200,2742470000,-0.1717,4.295E-07,3.3527,0,,,,,,,,,,,,,, +paragonite,-5563572,-5944208,277.699,13.216,577.57,-1472.8,-32214400,5050080000,-0.1973,4.933E-07,3.9424,0.59701,,,,,,,,,,,,,, +periclase,-569209,-601500,26.951,1.125,61.11,-296.2,-621200,5840000,-0.0622,1.511E-07,3.7477,0.03556,,,,,,,,,,,,,, +phlogopite,-5827224,-6207342,334.158,14.977,610.38,-2083.8,-21533000,2841040000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +K-feldspar,-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 +"K-feldspar,high",-3738804,-3959704,229.157,10.896,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, +"K-feldspar,low",-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, +prehnite,-5820154,-6198606,288.634,14.016,716.05,-6404.6,-2182500,268500000,-0.1427,0,0.1468,11.28353,,,,,,,,,,,,,, +pyrope,-5936009,-6286548,266.359,11.316,640.72,-4542.1,-4701900,0,-0.0576,4.42E-08,2.2519,0.37044,,,,,,,,,,,,,, +pyrophyllite,-5266865,-5640781,239.4,12.76,665.93,-5897.4,-4979900,661810000,-0.1354,0,1.2637,3.81661,,,,,,,,,,,,,, +quartz,-856288,-910700,41.46,2.269,80.01,-240.3,-3546700,491570000,-0.2434,1.0137E-06,2.3895,0,848,373,0.0237,-0.09187,0.00024607,0,,,,,,,, +"quartz,beta",-855033,-908627,44.207,2.37,80.01,-240.3,-3546700,491570000,-0.1238,7.087E-07,0,0,,,,,,,,,,,,,, +rutile,-889497,-944750,50.46,1.882,77.84,0,-3367800,402940000,-0.0454,5.84E-08,2.5716,0.15409,,,,,,,,,,,,,, +sillimanite,-2439265,-2586091,95.93,4.983,256.73,-1887.2,-2977400,250960000,-0.0753,0,1.3431,0,,,,,,,,,,,,,, +sphene,-2455134,-2596652,129.29,5.565,234.62,-1040.3,-5118300,591460000,-0.059,0,2.52,0,,,,,,,,,,,,,, +spinel,-2176537,-2300313,84.535,3.977,235.9,-1766.6,-1710400,40620000,-0.0489,0,2.1691,0.50528,,,,,,,,,,,,,, +talc,-5517657,-5897387,261.24,13.61,664.11,-5187.2,-2147200,-327370000,-0.1699,5.665E-07,2.9447,0,,,,,,,,,,,,,, +tremolite,-11578548,-12305578,551.15,27.268,1229.36,-6401.9,-32089900,4208810000,-0.1392,3.481E-07,2.4374,0.98338,,,,,,,,,,,,,, +"tridymite,low",-854026,-907750,43.77,2.675,75.37,0,-5958100,958250000,-0.2508,0,1.9339,0,383,298,0,0.4267,-0.00144575,130,,,,,,,, +"tridymite,high",-853844,-907045,45.524,2.737,75.37,0,-5958100,958250000,-0.074,3.735E-07,0.4829,0,,,,,,,,,,,,,, +wollastonite,-1546123,-1631500,81.81,3.983,149.07,-690.3,-3659300,484350000,-0.1245,3.113E-07,2.818,0,,,,,,,,,,,,,, +pseudowollastonite,-1543085,-1627427,85.279,4.016,141.16,-417.2,-5857600,940740000,-0.1245,3.113E-07,2.818,0,,,,,,,,,,,,,, +zoisite,-6494148,-6889488,297.576,13.588,749.17,-6509.3,-2380500,124860000,-0.0515,1.288E-07,3.467,0,,,,,,,,,,,,,, +clinozoisite,-6496497,-6894968,287.076,13.673,749.17,-6509.3,-2380500,124860000,-0.0515,1.288E-07,3.467,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv 2018-03-07 15:46:30 UTC (rev 306) @@ -1,5 +1,5 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -almandine,-4943492,-5267216,340.007,11.511,573.96,-14.831,-292.92,502.208,-0.558,0.321,18.613,74.539,,,,,,,,,,,,,, -annite,-4793115,-5142800,420,15.408,727.21,-47.7504,-138.319,211.906,-1.697,0,34.447,0,,,,,,,,,,,,,, -ilmenite,-1155794,-1232448,108.628,3.17,150,-4.416,-33.237,34.815,-0.584,1.23,27.248,29.968,,,,,,,,,,,,,, -phlogopite,-5830350,-6210391,334.346,14.977,610.38,-20.838,-215.33,284.104,-1.697,0,34.447,0,,,,,,,,,,,,,, +almandine,-4943492,-5267216,340.007,11.511,573.96,-1483.1,-29292000,5022080000,-0.0558,3.21E-08,1.8613,0.74539,,,,,,,,,,,,,, +annite,-4793115,-5142800,420,15.408,727.21,-4775.04,-13831900,2119060000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +ilmenite,-1155794,-1232448,108.628,3.17,150,-441.6,-3323700,348150000,-0.0584,1.23E-07,2.7248,0.29968,,,,,,,,,,,,,, +phlogopite,-5830350,-6210391,334.346,14.977,610.38,-2083.8,-21533000,2841040000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/DS10.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/DS10.csv 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/extdata/Berman/DS10.csv 2018-03-07 15:46:30 UTC (rev 306) @@ -1,6 +1,6 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -hedenbergite,-2674300,-2837802.5,173.59,6.785,353.31148,-31.06646,20.47911742,-56.3018581,-1.7457,15.1,27.96487,0,,,,,,,,,,,,,, -andradite,-5419000,-5761985.8,316.4,13.167,569.7558,-14.4144,-224.41040802,314.6543781,-0.6539136,1.635,20.72525,56.1,,,,,,,,,,,,,, -ferro-actinolite,-9839000,-10518042.6,685.1,28.26,1321.15758,-89.66454,-217.05844286,323.6159154,-1.5,0,28.4,0,,,,,,,,,,,,,, -grunerite,-8964807,-9623000,725,27.8,1347.83,-93.5691,-202.2848,303.919,-1.5,0,28.4,0,,,,,,,,,,,,,, -ilvaite,-3440000,-3695605.5,291.5,10.016,682.79138,-87.87112,301.8356871,-566.6432624,-0.6838,0.24,18.01543,115.2,,,,,,,,,,,,,, +hedenbergite,-2674300,-2837802.5,173.59,6.785,353.31148,-3106.646,2047911.742,-563018581,-0.17457,1.51E-06,2.796487,0,,,,,,,,,,,,,, +andradite,-5419000,-5761985.8,316.4,13.167,569.7558,-1441.44,-22441040.802,3146543781,-0.06539136,1.635E-07,2.072525,0.561,,,,,,,,,,,,,, +ferro-actinolite,-9839000,-10518042.6,685.1,28.26,1321.15758,-8966.454,-21705844.286,3236159154,-0.15,0,2.84,0,,,,,,,,,,,,,, +grunerite,-8964807,-9623000,725,27.8,1347.83,-9356.91,-20228480,3039190000,-0.15,0,2.84,0,,,,,,,,,,,,,, +ilvaite,-3440000,-3695605.5,291.5,10.016,682.79138,-8787.112,30183568.71,-5666432624,-0.06838,2.4E-08,1.801543,1.152,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv 2018-03-07 15:46:30 UTC (rev 306) @@ -1,2 +1,2 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -aragonite,-1128353.67,-1207213.7,88.7,3.42,195,-21,-0.1,22,-1.345,1.7,41.8,0,,,,,,,,,,,,,, +aragonite,-1128353.67,-1207213.7,88.7,3.42,195,-2100,-10000,220000000,-0.1345,1.7E-07,4.18,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv 2018-03-07 15:46:30 UTC (rev 306) @@ -1,3 +1,3 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -glaucophane,-11225858,-11960500,535,26.05,1717.5,-192.72,70.5,0,-1.16,2.9,22,88,,,,,,,,,,,,,, -pumpellyite,-13448936,-14402300,584,29.55,1576,-106.038,-283.042,383.8351,-0.51516,1.288,34.67,0,,,,,,,,,,,,,, +glaucophane,-11225858,-11960500,535,26.05,1717.5,-19272,7050000,0,-0.116,2.9E-07,2.2,0.88,,,,,,,,,,,,,, +pumpellyite,-13448936,-14402300,584,29.55,1576,-10603.8,-28304200,3838351000,-0.051516,1.288E-07,3.467,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv 2018-03-07 15:46:30 UTC (rev 306) @@ -1,12 +1,12 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -muscovite,-5603417,-5983434,293.157,14.087,651.49,-38.732,-185.232,274.247,-1.717,4.295,33.527,0,,,,,,,,,,,,,, -phlogopite,-5837044,-6217085,334.346,14.977,610.38,-20.838,-215.33,284.104,-1.697,0,34.447,0,,,,,,,,,,,,,, -K-feldspar,-3752109,-3977485,214.145,10.869,381.37,-19.41,-120.373,183.643,-1.805,5.112,15.145,54.85,,,,,,,1436,298,282.98,-4.83,36.21,-15.733,34.77,41.063 -"K-feldspar,high",-3745498,-3966398,229.157,10.896,381.37,-19.41,-120.373,183.643,-1.805,5.112,15.145,54.85,,,,,,,,,,,,,, -"K-feldspar,low",-3752109,-3977485,214.145,10.869,381.37,-19.41,-120.373,183.643,-1.805,5.112,15.145,54.85,,,,,,,,,,,,,, -paragonite,-5570375,-5951011,277.699,13.216,577.57,-14.728,-322.144,505.008,-1.973,4.933,39.424,59.701,,,,,,,,,,,,,, -albite,-3710096,-3928421,224.412,10.083,393.64,-24.155,-78.928,107.064,-1.945,4.861,26.307,32.407,,,,,,,,,,,,,, -"albite,high",-3710096,-3928421,224.412,10.083,393.64,-24.155,-78.928,107.064,-1.945,4.861,26.307,32.407,,,,,,,,,,,,,, -"albite,low",-3718518,-3941903,207.443,10.043,393.64,-24.155,-78.928,107.064,-1.945,4.861,26.307,32.407,,,,,,,,,,,,,, -jadeite,-2853285,-3031921,133.574,6.034,311.29,-20.051,-53.503,66.257,-0.86,2.149,23.118,25.785,,,,,,,,,,,,,, -annite,-4799809,-5149494,420,15.408,727.21,-47.7504,-138.319,211.906,-1.697,0,34.447,0,,,,,,,,,,,,,, +muscovite,-5603417,-5983434,293.157,14.087,651.49,-3873.2,-18523200,2742470000,-0.1717,4.295E-07,3.3527,0,,,,,,,,,,,,,, +phlogopite,-5837044,-6217085,334.346,14.977,610.38,-2083.8,-21533000,2841040000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +K-feldspar,-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 +"K-feldspar,high",-3745498,-3966398,229.157,10.896,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, +"K-feldspar,low",-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, +paragonite,-5570375,-5951011,277.699,13.216,577.57,-1472.8,-32214400,5050080000,-0.1973,4.933E-07,3.9424,0.59701,,,,,,,,,,,,,, +albite,-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +"albite,high",-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +"albite,low",-3718518,-3941903,207.443,10.043,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +jadeite,-2853285,-3031921,133.574,6.034,311.29,-2005.1,-5350300,662570000,-0.086,2.149E-07,2.3118,0.25785,,,,,,,,,,,,,, +annite,-4799809,-5149494,420,15.408,727.21,-4775.04,-13831900,2119060000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv 2018-03-07 15:46:30 UTC (rev 306) @@ -1,11 +1,11 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -fluormuscovite,-5772803,-6111401,299.03,14.087,680.36024,-65.15743,0,11.058312,-1.7169021,4.2947,33.5273302,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, -fluorphlogopite,-6063382,-6403168,336.394,14.637,653.70816,-51.7519,0,-32.459472,-1.6969784,0,34.4473262,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, -fluorannite,-4983910,-5293254,422.291,15.075,742.82736,-68.1741,0,41.844184,-1.6969784,0,34.4473262,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, -fluortremolite,-11782144,-12457969,570.279,27.045,1272.64728,-94.93496,0,-1.05177392,-1.3917727,3.4809,24.3738877,98.338,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, -fluorapatite,-6443050,-6823447,387.857,15.753,668.77056,-45.34201,0,-74.634192,0,0,0,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, -hydroxyapatite,-6297702,-6694689,398.735,15.822,758.81024,-64.80598,0,-44.793904,0,0,0,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, -chlorapatite,-6217424,-6597260,399.907,16.403,663.87528,-44.35877,0,-69.023448,0,0,0,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, -fluortalc,-5717018,-6056244,264.052,13.33,602.74704,-47.66831,0,-29.2588712,-1.6988979,5.665,29.4468112,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, -chlorphlogopite,-5600840,-5939422,360.703,16.59,573.45904,-20.63549,-164.657136,210.576536,-1.6969784,0,34.4473262,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, -chlorannite,-4582036,-4890196,449.529,17.247,690.44368,-47.60137,-87.253136,137.682888,-1.6969784,0,34.4473262,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +fluormuscovite,-5772803,-6111401,299.03,14.087,680.36024,-6515.743,0,110583120,-0.17169021,4.2947E-07,3.35273302,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +fluorphlogopite,-6063382,-6403168,336.394,14.637,653.70816,-5175.19,0,-324594720,-0.16969784,0,3.44473262,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +fluorannite,-4983910,-5293254,422.291,15.075,742.82736,-6817.41,0,418441840,-0.16969784,0,3.44473262,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +fluortremolite,-11782144,-12457969,570.279,27.045,1272.64728,-9493.496,0,-10517739.2,-0.13917727,3.4809E-07,2.43738877,0.98338,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +fluorapatite,-6443050,-6823447,387.857,15.753,668.77056,-4534.201,0,-746341920,0,0,0,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +hydroxyapatite,-6297702,-6694689,398.735,15.822,758.81024,-6480.598,0,-447939040,0,0,0,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +chlorapatite,-6217424,-6597260,399.907,16.403,663.87528,-4435.877,0,-690234480,0,0,0,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +fluortalc,-5717018,-6056244,264.052,13.33,602.74704,-4766.831,0,-292588712,-0.16988979,5.665E-07,2.94468112,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +chlorphlogopite,-5600840,-5939422,360.703,16.59,573.45904,-2063.549,-16465713.6,2105765360,-0.16969784,0,3.44473262,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, +chlorannite,-4582036,-4890196,449.529,17.247,690.44368,-4760.137,-8725313.6,1376828880,-0.16969784,0,3.44473262,0,NA,NA,NA,NA,NA,NA,NA,NA,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/unused/BA96.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/unused/BA96.csv 2018-02-27 01:20:37 UTC (rev 305) +++ pkg/CHNOSZ/inst/extdata/Berman/unused/BA96.csv 2018-03-07 15:46:30 UTC (rev 306) @@ -1,21 +1,21 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -almandine,,-5265440,341.51,11.529,621.43,-32.879,-150.81,221.187,-0.57,0.434,18.599,74.711,,,,,,,,,,,,,, -anthophyllite,,-12074470,537.4,26.33,1233.79,-71.34,-221.638,233.394,-1.139,0,28.105,62.894,,,,,,,,,,,,,, -cordierite,,-9161480,416.23,23.311,954.39,-79.623,-23.173,-37.021,-1.158,0,3.003,18.017,,,,,,,,,,,,,, -Fe-cordierite,,-8430550,482.18,23.706,983.48,-84.037,-18.703,-8.568,-1.7,0,4.265,0,,,,,,,,,,,,,, -fayalite,,-1477170,151.73,4.639,252,-20.137,0,-6.219,-0.822,1.944,26.21,84.233,,,,,,,,,,,,,, -ferrosilite,,-1192910,96.47,3.295,174.2,-13.93,-4.544,-3.771,-0.911,0.303,31.406,80.4,,,,,,,,,,,,,, -forsterite,,-2174420,94.18,4.36,233.18,-18.016,0,-26.794,-0.791,1.351,29.464,88.633,,,,,,,,,,,,,, -geikelite,,-1570520,74.41,3.077,146.2,-4.16,-39.998,40.233,-0.529,0,23.314,88.328,,,,,,,,,,,,,, -hematite,,-826740,87.36,3.027,146.86,0,-55.768,52.563,-0.479,0.304,38.31,1.65,955,298,0,-7.403,27.921,1287,,,,,,,, -hercynite,,-1945360,123.13,4.08,251.77,-20.444,-13.483,13.15,-0.51,0,15.819,96.276,,,,,,,,,,,,,, -ilmenite,,-1233320,108.5,3.17,150,-4.416,-33.237,34.815,-0.529,0,23.314,88.328,,,,,,,,,,,,,, -iron-a,,0,27.45,0.709,51.87,-3.794,-25.43,50.68,-0.602,0,45.071,14.104,1042,298,-0.00057,-22.208,34.823,1000,,,,,,,, -iron-g,,7720,35.64,0.691,66.24,-12.371,63.733,-106.04,-0.467,-1.445,47.153,14.451,,,,,,,,,,,,,, -magnetite,,-1116960,146.04,4.452,207.93,0,-72.433,66.436,-0.582,1.751,30.291,138.47,848,298,0,-19.502,61.037,1565,,,,,,,, -enstatite,,-1546040,66.18,3.133,166.58,-12.006,-22.706,27.915,-0.749,0.447,24.656,74.67,,,,,,,,,,,,,, -orthocorundum,,-1634950,33.93,3.123,119.38,7.748,-65.091,42.288,-0.749,0.447,24.656,74.67,,,,,,,,,,,,,, -pyrope,,-6284740,268.8,11.311,590.9,-28.27,-133.208,126.033,-0.576,0.442,22.519,37.044,,,,,,,,,,,,,, -rutile,,-944750,50.88,1.883,77.84,0,-33.678,40.294,-0.454,0.585,25.716,15.409,,,,,,,,,,,,,, -spinel,,-2302160,80.37,3.978,244.67,-20.04,,,-0.489,0,21.691,50.528,,,,,,,,,,,,,, -talc,,-5898960,261.21,13.61,664.11,-51.872,-21.472,-32.737,-1.847,5.878,25.616,0,,,,,,,,,,,,,, +almandine,,-5265440,341.51,11.529,621.43,-3287.9,-15081000,2211870000,-0.057,4.34E-08,1.8599,0.74711,,,,,,,,,,,,,, +anthophyllite,,-12074470,537.4,26.33,1233.79,-7134,-22163800,2333940000,-0.1139,0,2.8105,0.62894,,,,,,,,,,,,,, +cordierite,,-9161480,416.23,23.311,954.39,-7962.3,-2317300,-370210000,-0.1158,0,0.3003,0.18017,,,,,,,,,,,,,, +Fe-cordierite,,-8430550,482.18,23.706,983.48,-8403.7,-1870300,-85680000,-0.17,0,0.4265,0,,,,,,,,,,,,,, +fayalite,,-1477170,151.73,4.639,252,-2013.7,0,-62190000,-0.0822,1.944E-07,2.621,0.84233,,,,,,,,,,,,,, +ferrosilite,,-1192910,96.47,3.295,174.2,-1393,-454400,-37710000,-0.0911,3.03E-08,3.1406,0.804,,,,,,,,,,,,,, +forsterite,,-2174420,94.18,4.36,233.18,-1801.6,0,-267940000,-0.0791,1.351E-07,2.9464,0.88633,,,,,,,,,,,,,, +geikelite,,-1570520,74.41,3.077,146.2,-416,-3999800,402330000,-0.0529,0,2.3314,0.88328,,,,,,,,,,,,,, +hematite,,-826740,87.36,3.027,146.86,0,-5576800,525630000,-0.0479,3.04E-08,3.831,0.0165,955,298,0,-0.07403,0.00027921,1287,,,,,,,, [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/chnosz -r 306 From noreply at r-forge.r-project.org Wed Mar 14 18:54:46 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 14 Mar 2018 18:54:46 +0100 (CET) Subject: [CHNOSZ-commits] r307 - in pkg/CHNOSZ: . R demo inst man tests/testthat vignettes Message-ID: <20180314175446.E19C11893B8@r-forge.r-project.org> Author: jedick Date: 2018-03-14 18:54:46 +0100 (Wed, 14 Mar 2018) New Revision: 307 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/diagram.R pkg/CHNOSZ/demo/buffer.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/buffer.Rd pkg/CHNOSZ/man/diagram.Rd pkg/CHNOSZ/tests/testthat/test-diagram.R pkg/CHNOSZ/vignettes/anintro.Rmd Log: diagram(): allow 'saturation' to be specified for 'type' of diagram Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2018-03-07 15:46:30 UTC (rev 306) +++ pkg/CHNOSZ/DESCRIPTION 2018-03-14 17:54:46 UTC (rev 307) @@ -1,6 +1,6 @@ -Date: 2018-03-07 +Date: 2018-03-15 Package: CHNOSZ -Version: 1.1.3-14 +Version: 1.1.3-15 Title: Thermodynamic Calculations for Geobiochemistry Authors at R: c( person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"), Modified: pkg/CHNOSZ/R/diagram.R =================================================================== --- pkg/CHNOSZ/R/diagram.R 2018-03-07 15:46:30 UTC (rev 306) +++ pkg/CHNOSZ/R/diagram.R 2018-03-14 17:54:46 UTC (rev 307) @@ -14,8 +14,8 @@ diagram <- function( # species affinities or activities eout, - # what to plot - what="loga.equil", alpha=FALSE, normalize=FALSE, as.residue=FALSE, balance=NULL, + # type of plot + type="auto", alpha=FALSE, normalize=FALSE, as.residue=FALSE, balance=NULL, groups=as.list(1:length(eout$values)), xrange=NULL, # figure size and sides for axis tick marks mar=NULL, yline=par("mgp")[1]+0.3, side=1:4, @@ -24,7 +24,7 @@ # sizes cex=par("cex"), cex.names=1, cex.axis=par("cex"), # line styles - lty=NULL, lwd=par("lwd"), dotted=NULL, spline.method=NULL, + lty=NULL, lwd=par("lwd"), dotted=NULL, spline.method=NULL, contour.method="edge", # colors col=par("col"), col.names=par("col"), fill=NULL, fill.NA="slategray1", limit.water=TRUE, @@ -41,25 +41,27 @@ ## check that eout is valid input if(!"sout" %in% names(eout)) stop("'eout' does not look like output from equil() or affinity()") - ## 'what' can be: - # loga.equil - equilibrium activities of species of interest (eout) - # basis species - equilibrium activity of a basis species (aout) - # missing - property from affinity() or predominances of species (aout) + ## 'type' can be: + # 'auto' - property from affinity() (1D) or maximum affinity (affinity 2D) (aout) or loga.equil (eout) + # 'loga.equil' - equilibrium activities of species of interest (eout) + # name of basis species - equilibrium activity of a basis species (aout) + # 'saturation' - affinity=0 line for each species (2D) eout.is.aout <- FALSE plot.loga.basis <- FALSE - if(missing(what)) { + if(type %in% c("auto", "saturation")) { if(!"loga.equil" %in% names(eout)) { eout.is.aout <- TRUE # get the balancing coefficients - n.balance <- balance(eout, balance) + if(type=="auto") n.balance <- balance(eout, balance) + else n.balance <- rep(1, length(eout$values)) } - } else if(what %in% rownames(eout$basis)) { + } else if(type %in% rownames(eout$basis)) { # to calculate the loga of basis species at equilibrium if(!missing(groups)) stop("can't plot equilibrium activities of basis species for grouped species") if(isTRUE(alpha) | is.character(alpha)) stop("equilibrium activities of basis species not available with alpha=TRUE") plot.loga.basis <- TRUE - } else if(what=="loga.equil" & !"loga.equil" %in% names(eout)) stop("'eout' is not the output from equil()") - else if(what!="loga.equil") stop(what, " is not a basis species or 'loga.equil'") + } else if(type=="loga.equil" & !"loga.equil" %in% names(eout)) stop("'eout' is not the output from equil()") + else if(type!="loga.equil") stop(type, " is not a valid diagram type") ## consider a different number of species if we're grouping them together ngroups <- length(groups) @@ -69,6 +71,11 @@ plotvals <- eout$loga.equil plotvar <- "loga.equil" + ## number of dimensions (T, P or chemical potentials that are varied) + # length(eout$vars) - the number of variables = the maximum number of dimensions + # length(dim(eout$values[[1]])) - nd=1 if it was a transect along multiple variables + nd <- min(length(eout$vars), length(dim(eout$values[[1]]))) + ## deal with output from affinity() if(eout.is.aout) { # plot property from affinity(), divided by balancing coefficients @@ -83,15 +90,12 @@ # 20171027 use parentheses to avoid ambiguity about order of operations if(plotvar=="A") { plotvar <- "A/(2.303RT)" - message("diagram: plotting A/(2.303RT) / n.balance (maximum affinity method for 2-D diagrams)") + if(nd==2 & type=="auto") message("diagram: using maximum affinity method for 2-D diagram") + else if(nd==2 & type=="saturation") message("diagram: plotting saturation lines for 2-D diagram") + else message("diagram: plotting A/(2.303RT) / n.balance") } else message(paste("diagram: plotting", plotvar, " / n.balance")) } - ## number of dimensions (T, P or chemical potentials that are varied) - # length(eout$vars) - the number of variables = the maximum number of dimensions - # length(dim(eout$values[[1]])) - nd=1 if it was a transect along multiple variables - nd <- min(length(eout$vars), length(dim(eout$values[[1]]))) - ## use molality instead of activity if the affinity calculation include ionic strength 20171101 use.molality <- "IS" %in% names(eout) @@ -125,10 +129,10 @@ ## calculate the equilibrium logarithm of activity of a basis species ## (such that affinities of formation reactions are zero) if(plot.loga.basis) { - ibasis <- match(what, rownames(eout$basis)) + ibasis <- match(type, rownames(eout$basis)) # the logarithm of activity used in the affinity calculation is.loga.basis <- can.be.numeric(eout$basis$logact[ibasis]) - if(!is.loga.basis) stop(paste("the logarithm of activity for basis species", what, "is not numeric - was a buffer selected?")) + if(!is.loga.basis) stop(paste("the logarithm of activity for basis species", type, "is not numeric - was a buffer selected?")) loga.basis <- as.numeric(eout$basis$logact[ibasis]) # the reaction coefficients for this basis species nu.basis <- eout$species[, ibasis] @@ -137,7 +141,7 @@ # eout$values is a strange name for affinity ... should be named something like eout$affinity ... loga.basis - eout$values[[x]]/nu.basis[x] }) - plotvar <- what + plotvar <- type } ## alpha: plot fractional degree of formation @@ -157,7 +161,7 @@ ## identify predominant species predominant <- NA - if(plotvar %in% c("loga.equil", "alpha", "A/(2.303RT)")) { + if(plotvar %in% c("loga.equil", "alpha", "A/(2.303RT)") & type!="saturation") { pv <- plotvals # some additional steps for affinity values, but not for equilibrated activities if(eout.is.aout) { @@ -197,9 +201,6 @@ } } - # a warning about that we can only show properties of the first species on a 2-D diagram - if(nd==2 & length(plotvals) > 1 & identical(predominant, NA)) warning("showing only first species in 2-D property diagram") - ## where we'll put extra output for predominance diagrams (lx, ly, is) out2D <- list() @@ -534,8 +535,31 @@ } # colors and curves (predominance), or contours (properties) if(identical(predominant, NA)) { - zs <- plotvals[[1]] - contour(xs, ys, zs, add=TRUE, col=col, lty=lty, lwd=lwd, labcex=cex) + if(type=="saturation") { + # for saturation plot, contour affinity=0 for all species + for(i in 1:length(plotvals)) { + zs <- plotvals[[i]] + # skip plotting if this species has no possible saturation line, or a line outside the plot range + if(length(unique(as.numeric(zs)))==1) { + message("diagram: no saturation line possible for ", names[i]) + next + } + if(all(zs < 0) | all(zs > 0)) { + message("diagram: beyond range for saturation line of ", names[i]) + next + } + if(identical(contour.method, NULL) | identical(contour.method, NA) | identical(contour.method, "")) + contour(xs, ys, zs, add=TRUE, col=col, lty=lty, lwd=lwd, labcex=cex, levels=0, labels=names[i], drawlabels=FALSE) + else contour(xs, ys, zs, add=TRUE, col=col, lty=lty, lwd=lwd, labcex=cex, levels=0, labels=names[i], method=contour.method) + } + } else { + # otherwise, make contours of properties using first species only + if(length(plotvals) > 1) warning("showing only first species in 2-D property diagram") + print('hello') + print(length(plotvals)) + zs <- plotvals[[1]] + contour(xs, ys, zs, add=TRUE, col=col, lty=lty, lwd=lwd, labcex=cex, method=contour.method) + } pn <- list(lx=NULL, ly=NULL, is=NULL) } else { # put predominance matrix in the right order for image() etc @@ -551,6 +575,14 @@ } # end if(nd==2) } # end if(plot.it) + # warn if we have a system with both Berman and Helgeson minerals 20180315 + ref1 <- get("thermo")$obigt$ref1 + ref2 <- get("thermo")$obigt$ref2 + ispecies <- eout$species$ispecies + hasHelgeson <- any(grepl("HDNB78", ref1[ispecies])) | any(grepl("HDNB78", ref2[ispecies])) + hasBerman <- any(get("thermo")$obigt$state[ispecies]=="cr_Berman") + if(hasHelgeson & hasBerman) warning("the system has minerals from both the Helgeson and Berman datasets; data may not be internally consistent") + out <- c(eout, list(plotvar=plotvar, plotvals=plotvals, names=names, predominant=predominant), out2D) return(invisible(out)) } Modified: pkg/CHNOSZ/demo/buffer.R =================================================================== --- pkg/CHNOSZ/demo/buffer.R 2018-03-07 15:46:30 UTC (rev 306) +++ pkg/CHNOSZ/demo/buffer.R 2018-03-14 17:54:46 UTC (rev 307) @@ -19,12 +19,12 @@ bufferline("QFM", 38) bufferline("PPM", 102) bufferline("HM", 51) -# method 2: in diagram(), use the `what` argument +# method 2: in diagram(), use the `type` argument basis("H2", 0) for(logact in c(-6, -10, -15)) { species(c("formaldehyde", "HCN"), logact) a <- affinity(T=xlim, P=300) - d <- diagram(a, what="H2", lty=c(3, 2), add=TRUE) + d <- diagram(a, type="H2", lty=c(3, 2), add=TRUE) text(a$vals[[1]][13], mean(sapply(d$plotvals, c)[13, ]), logact) } # add legends and title Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2018-03-07 15:46:30 UTC (rev 306) +++ pkg/CHNOSZ/inst/NEWS 2018-03-14 17:54:46 UTC (rev 307) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.1.3-14 (2018-03-07) +CHANGES IN CHNOSZ 1.1.3-15 (2018-03-15) --------------------------------------- - Lines in 1-D diagram()s can optionally be drawn as splines using the @@ -37,6 +37,12 @@ - Change files in extdata/Berman to be more like winTWQ format (no value multipliers, except 10^5, 10^5, 10^5, and 10^8 on v1 to v4). +- diagram(): rename 'what' argument to 'type'. + +- digram(): add new type of diagram, 'saturation', which is used to + plot saturation lines for minerals (where their affinity equals + zero). + CHANGES IN CHNOSZ 1.1.3 (2017-11-13) ------------------------------------ Modified: pkg/CHNOSZ/man/buffer.Rd =================================================================== --- pkg/CHNOSZ/man/buffer.Rd 2018-03-07 15:46:30 UTC (rev 306) +++ pkg/CHNOSZ/man/buffer.Rd 2018-03-14 17:54:46 UTC (rev 307) @@ -71,7 +71,7 @@ mod.buffer("AC",logact=-10) affinity(O2=c(-85,-70,4),T=c(25,100,4),return.buffer=TRUE) # see below for a different strategy using the -# 'what' argument of diagram +# 'type' argument of diagram ## buffer made of three species ## Pyrite-Pyrrhotite-Magnetite (PPM) @@ -133,7 +133,7 @@ affinity(return.buffer=TRUE) # one can solve for the logarithm of activity of a -# basis species using the 'what' argument of diagram +# basis species using the 'type' argument of diagram basis("CHNOS") basis("CO2", 999) species("acetic acid", -3) @@ -142,16 +142,16 @@ lCO2 <- axis.label("CO2") main <- substitute(a~~b~~c,list(a=lCO2, b="buffered by", c="acetic acid")) -d <- diagram(a, what="CO2", main=main) +d <- diagram(a, type="CO2", main=main) species(1, -10) a <- affinity(O2=c(-85, -70, 4), T=c(25, 100, 4)) -d <- diagram(a, what="CO2", add=TRUE, lty=2) +d <- diagram(a, type="CO2", add=TRUE, lty=2) # add a legend lAC <- expr.species("CH3COOH", log="aq") ltext <- c(as.expression(lAC), -3, -10) lty <- c(NA, 1, 2) legend("topright", legend=ltext, lty=lty, bg="white") -# do return.buffer and diagram(what) give the same results? +# do return.buffer and diagram(type=...) give the same results? and <- as.numeric(d$plotvals[[1]]) basis("CO2", "AC") mod.buffer("AC", logact=-10) Modified: pkg/CHNOSZ/man/diagram.Rd =================================================================== --- pkg/CHNOSZ/man/diagram.Rd 2018-03-07 15:46:30 UTC (rev 306) +++ pkg/CHNOSZ/man/diagram.Rd 2018-03-14 17:54:46 UTC (rev 307) @@ -12,8 +12,8 @@ diagram( # species affinities or activities eout, - # what to plot - what = "loga.equil", alpha = FALSE, normalize = FALSE, + # type plot + type = "auto", alpha = FALSE, normalize = FALSE, as.residue = FALSE, balance=NULL, groups=as.list(1:length(eout$values)), # figure size and sides for axis tick marks xrange=NULL, mar=NULL, yline=par("mgp")[1]+0.3, side=1:4, @@ -22,7 +22,7 @@ # character sizes cex=par("cex"), cex.names=1, cex.axis=par("cex"), # line styles - lty=NULL, lwd=par("lwd"), dotted=NULL, spline.method = NULL, + lty=NULL, lwd=par("lwd"), dotted=NULL, spline.method = NULL, contour.method = "edge", # colors col=par("col"), col.names=par("col"), fill=NULL, fill.NA="slategray1", limit.water=TRUE, @@ -39,7 +39,7 @@ \arguments{ \item{eout}{list, object returned by \code{\link{equilibrate}} or \code{\link{affinity}}} - \item{what}{character, what property to calculate and plot} + \item{type}{character, type of plot, or name of basis species whose activity to plot} \item{alpha}{logical or character (\samp{balance}), for speciation diagrams, plot degree of formation instead of activities?} \item{normalize}{logical, divide chemical affinities by balance coefficients (rescale to whole formulas)?} \item{as.residue}{logical, divide chemical affinities by balance coefficients (no rescaling)?} @@ -61,6 +61,7 @@ \item{lwd}{numeric, line width} \item{dotted}{numeric, how often to skip plotting points on predominance field boundaries (to gain the effect of dotted or dashed boundary lines)} \item{spline.method}{character, method used in \code{\link{splinefun}}} + \item{contour.method}{character, labelling method used in \code{\link{contour}} (use NULL for no labels).} \item{col}{character, color of activity lines (1D diagram) or predominance field boundaries (2D diagram), or colors of bars in a strip diagram (\code{strip})} \item{col.names}{character, colors for labels of species} \item{fill}{character, colors used to fill predominance fields} @@ -140,14 +141,16 @@ \section{Affinity Diagrams}{ The function behaves differently when the output from \code{affinity} is being used instead of the equilibrium activities from \code{equilibrate}. -If \code{what} is missing, and the number of dimensions is 0 or 1, a property of a reaction, such as the equilibrium constant (\samp{logK}), is plotted. +If \code{type} is \samp{auto}, and the number of dimensions is 0 or 1, the property computed by \code{\link{affinity}} for each species is plotted. +This is usually the affinity of the formation reaction, but can be set to some other property, such as the equilibrium constant (\samp{logK}). +If \code{type} is \samp{auto}, and the number of dimensions is 2, then equilibrium predominance (maximum affinity) fields are plotted. +This algorithm is based on a comparison of the affinities of the formation reactions scaled by the balancing coefficients that are determined by the \code{balance} argument. -If \code{what} is missing, and the number of dimensions is 2, then highest potential (equilibrium predominance) fields are plotted. -This algorithm is based on comparing the relative magnitudes of the affinities of the formation reactions, also referred to as the maximum affinity method. -In this case, the balancing coefficients are determined usingi the \code{balance} argument. - -If \code{what} is the name of a basis species, it indicates to plot the equilibrium activity of a selected basis species in all of the formation reactions. -A contour plot is made in the case of 2-D diagrams of the equilibrium activity of a basis species (see the \CO2-acetic acid example in \code{\link{buffer}}, and only the first species of interest is used in the calculation; a warning is produced if there is more than one. +If \code{type} is \samp{saturation}, the function plots the line for each species where the affinity of formation equals zero. +If for a given species no saturation line is possible or the range of the diagram is beyond the saturation line, the function prints a message instead. +If \code{type} is the name of a basis species, the equilibrium activity of the selected basis species in each of the formation reactions is plotted. +In the case of 2-D diagrams, both of these options use \code{\link{contour}} to draw the lines (see the \CO2-acetic acid example in \code{\link{buffer}}. +The \samp{saturation} diagram can handle multiple species, but if \code{type} is the name a basis species, then only the first species of interest is used in the calculation, and a warning is produced if there is more than one. } \section{Activity Coefficients}{ @@ -187,7 +190,7 @@ basis("CHNOS") species(c("ethanol", "lactic acid", "deoxyribose", "ribose")) a <- affinity(T=c(0, 150)) -diagram(a, what="O2", legend.x="topleft", col=rev(rainbow(4)), lwd=2) +diagram(a, type="O2", legend.x="topleft", col=rev(rainbow(4)), lwd=2) title(main="Equilibrium logfO2 for 1e-3 mol/kg of CO2 and ... ") ### 1-D diagrams: logarithms of activities Modified: pkg/CHNOSZ/tests/testthat/test-diagram.R =================================================================== --- pkg/CHNOSZ/tests/testthat/test-diagram.R 2018-03-07 15:46:30 UTC (rev 306) +++ pkg/CHNOSZ/tests/testthat/test-diagram.R 2018-03-14 17:54:46 UTC (rev 307) @@ -7,7 +7,7 @@ a <- affinity() expect_message(diagram(a, plot.it=FALSE), "balance: from moles of CO2 in formation reactions") e <- equilibrate(a) - expect_error(diagram(e, "Z"), "Z is not a basis species") + expect_error(diagram(e, "Z"), "Z is not a valid diagram type") }) test_that("expected messages, errors and results arise using output from affinity()", { @@ -81,9 +81,8 @@ basis("CHNOS") species(c("alanine", "glycine", "serine", "methionine")) a <- affinity(T=c(0, 200, 6), O2=c(-90, -60, 5)) - # TODO: fix plot.line() function in diagram() so that the plot can be made - #expect_equal(diagram(a), diagram(a, plot.it=FALSE)) - expect_warning(diagram(a, what="CO2", plot.it=FALSE), "showing only first species in 2-D property diagram") + # now the warning is invokes next to the actual plotting, so no warning is produced with plot.it=FALSE 20180315 + #expect_warning(diagram(a, type="CO2", plot.it=FALSE), "showing only first species in 2-D property diagram") }) test_that("NaN values from equilibrate() are preserved (as NA in predominance calculation)", { Modified: pkg/CHNOSZ/vignettes/anintro.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/anintro.Rmd 2018-03-07 15:46:30 UTC (rev 306) +++ pkg/CHNOSZ/vignettes/anintro.Rmd 2018-03-14 17:54:46 UTC (rev 307) @@ -807,7 +807,7 @@ * the buffers are active in calculations of affinity of other species; * use `mod.buffer()` to change or add buffers in `thermo$buffer`; * [`demo(buffer)`](../demo) uses it for mineral buffers (solid lines). -2. Use the `what` argument of `diagram()` to solve for the activity of the indicated basis species: +2. Use the `type` argument of `diagram()` to solve for the activity of the indicated basis species: * more convenient (the buffers come from the currently defined species of interest), but only a single basis species can be buffered, and it's not used in the calculation of affinity; * [`demo(buffer)`](../demo) uses it for aqueous organic species as buffers (dotted and dashed lines). From noreply at r-forge.r-project.org Tue Mar 27 09:57:23 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 27 Mar 2018 09:57:23 +0200 (CEST) Subject: [CHNOSZ-commits] r308 - in pkg/CHNOSZ: . R inst man Message-ID: <20180327075723.CC84A1894C8@r-forge.r-project.org> Author: jedick Date: 2018-03-27 09:57:23 +0200 (Tue, 27 Mar 2018) New Revision: 308 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/berman.R pkg/CHNOSZ/R/util.fasta.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/berman.Rd Log: berman(): read data from berman.csv if present in working directory Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2018-03-14 17:54:46 UTC (rev 307) +++ pkg/CHNOSZ/DESCRIPTION 2018-03-27 07:57:23 UTC (rev 308) @@ -1,6 +1,6 @@ -Date: 2018-03-15 +Date: 2018-03-27 Package: CHNOSZ -Version: 1.1.3-15 +Version: 1.1.3-16 Title: Thermodynamic Calculations for Geobiochemistry Authors at R: c( person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"), Modified: pkg/CHNOSZ/R/berman.R =================================================================== --- pkg/CHNOSZ/R/berman.R 2018-03-14 17:54:46 UTC (rev 307) +++ pkg/CHNOSZ/R/berman.R 2018-03-27 07:57:23 UTC (rev 308) @@ -22,8 +22,11 @@ DS10 <- read.csv(paste0(dir, "/DS10.csv"), as.is=TRUE) FDM14 <- read.csv(paste0(dir, "/FDM+14.csv"), as.is=TRUE) BDat17 <- read.csv(paste0(dir, "/BDat17.csv"), as.is=TRUE) - # assemble the files in reverse chronological order - dat <- rbind(BDat17, FDM14, DS10, JUN92, ZS92, SHD91, Ber90, Ber88) + if(file.exists("berman.csv")) { + BDat_user <- read.csv("berman.csv", as.is=TRUE) + # assemble the files in reverse chronological order + dat <- rbind(BDat_user, BDat17, FDM14, DS10, JUN92, ZS92, SHD91, Ber90, Ber88) + } else dat <- rbind(BDat17, FDM14, DS10, JUN92, ZS92, SHD91, Ber90, Ber88) # remove duplicates (only the first, i.e. most recent entry is kept) dat <- dat[!duplicated(dat$name), ] # remove the multipliers @@ -38,6 +41,7 @@ if(missing(name)) return(dat) # which row has data for this mineral? irow <- which(dat$name == name) + if(length(irow)==0) stop("Data for ", name, " not available. Please add it to berman.csv") # the function works fine with just the following assign() call, # but an explicit dummy assignment here is used to avoid "Undefined global functions or variables" in R CMD check GfPrTr <- HfPrTr <- SPrTr <- Tlambda <- Tmax <- Tmin <- Tref <- VPrTr <- Modified: pkg/CHNOSZ/R/util.fasta.R =================================================================== --- pkg/CHNOSZ/R/util.fasta.R 2018-03-14 17:54:46 UTC (rev 307) +++ pkg/CHNOSZ/R/util.fasta.R 2018-03-27 07:57:23 UTC (rev 308) @@ -42,7 +42,7 @@ nlines <- length(lines) message(nlines, " lines ... ", appendLF=FALSE) if(is.null(ihead)) ihead <- which(substr(lines,1,1)==">") - message(length(ihead), " sequence headers") + message(length(ihead), " sequences") linefun <- function(i1,i2) lines[i1:i2] # identify the lines that begin and end each sequence begin <- ihead + 1 Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2018-03-14 17:54:46 UTC (rev 307) +++ pkg/CHNOSZ/inst/NEWS 2018-03-27 07:57:23 UTC (rev 308) @@ -1,6 +1,21 @@ -CHANGES IN CHNOSZ 1.1.3-15 (2018-03-15) +CHANGES IN CHNOSZ 1.1.3-16 (2018-03-27) --------------------------------------- +BERMAN EQUATIONS AND DATA + +- berman() now reads data from a user-supplied file berman.csv if it is + present in the working directory. + +- Add mineral data from Berman and Aranovich, 1996 to + extdata/Berman/unused/BA96.csv. + +- Correct swapped v1 <-> v3 and v2 <-> v4 in extdata/Berman/DS10.csv. + +- Change files in extdata/Berman to be more like winTWQ format (no + value multipliers, except 10^5, 10^5, 10^5, and 10^8 on v1 to v4). + +OTHER CHANGES + - Lines in 1-D diagram()s can optionally be drawn as splines using the method for splinefun() given in the 'spline.method' argument (the default of NULL means no splines). @@ -10,11 +25,6 @@ - Add 'srt' argument to diagram() (rotation of line labels). -- Add mineral data from Berman and Aranovich, 1996 to - extdata/Berman/unused/BA96.csv. - -- Correct swapped v1 <-> v3 and v2 <-> v4 in extdata/Berman/DS10.csv. - - Fix a bug where subcrt()$reaction$coeffs was incorrect for reactions involving minerals with phase transitions. @@ -34,15 +44,13 @@ - read.fasta(): add support for file connections created using archive::archive_read (https://github.com/jimhester/archive). -- Change files in extdata/Berman to be more like winTWQ format (no - value multipliers, except 10^5, 10^5, 10^5, and 10^8 on v1 to v4). - - diagram(): rename 'what' argument to 'type'. - digram(): add new type of diagram, 'saturation', which is used to plot saturation lines for minerals (where their affinity equals zero). + CHANGES IN CHNOSZ 1.1.3 (2017-11-13) ------------------------------------ Modified: pkg/CHNOSZ/man/berman.Rd =================================================================== --- pkg/CHNOSZ/man/berman.Rd 2018-03-14 17:54:46 UTC (rev 307) +++ pkg/CHNOSZ/man/berman.Rd 2018-03-27 07:57:23 UTC (rev 308) @@ -24,12 +24,11 @@ \details{ This function calculates the thermodynamic properties of minerals at high \P and \T using equations given by Berman (1988). -Becuase they use a different set of parameters than Helgeson et al., 1978 (see \code{\link{cgl}}), the standard state thermodynamic properties and parameters for the calculations are stored in files under \code{extdata/Berman}. +The standard state thermodynamic properties and parameters for the calculations are stored in files under \code{extdata/Berman}, or can be read from a user-created file (if available) named \samp{berman.csv} in the working directory. If the function is called with missing \code{name}, the data frame of parameters for all available minerals is returned. -When \code{name} is given, it refers to a mineral that should listed in \code{thermo$obigt} with the state \samp{cr_Berman}. -\code{thermo$obigt} also holds the chemical formula, which is required for calculating the entropies of the elements in the mineral. -These entropies are used to convert the apparent Gibbs energies from the Berman-Brown convention to the the Benson-Helgeson convention (cf. Anderson, 2005). +When \code{name} is given, it refers to a mineral that should listed in \code{thermo$obigt} with the state \samp{cr_Berman} and the chemical formula, and optinally an abbreviation and references, but all other properties set to NA. +The chemical formula is required for calculating the entropies of the elements in the mineral, which are are used to convert the apparent Gibbs energies from the Berman-Brown convention to the the Benson-Helgeson convention (cf. Anderson, 2005). If \code{check.G} is TRUE, the tabulated value of DGfTrPr is compared with one calculated from DHfPrTr - T*DSPrTr (DS is the difference between the summed entropies of the elements and the tabulated entropy for the mineral). A warning is produced if the absolute value of the difference between tabulated and calculated DGfTrPr is greater than 1000 J/mol. From noreply at r-forge.r-project.org Tue Mar 27 17:19:33 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 27 Mar 2018 17:19:33 +0200 (CEST) Subject: [CHNOSZ-commits] r309 - in pkg/CHNOSZ: . R data demo inst inst/extdata/Berman/unused inst/extdata/OBIGT man tests/testthat vignettes Message-ID: <20180327151933.BDEE91896BE@r-forge.r-project.org> Author: jedick Date: 2018-03-27 17:19:33 +0200 (Tue, 27 Mar 2018) New Revision: 309 Added: pkg/CHNOSZ/inst/extdata/OBIGT/SUPCRT92.csv Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/berman.R pkg/CHNOSZ/R/cgl.R pkg/CHNOSZ/R/diagram.R pkg/CHNOSZ/R/info.R pkg/CHNOSZ/R/subcrt.R pkg/CHNOSZ/R/util.data.R pkg/CHNOSZ/R/util.misc.R pkg/CHNOSZ/data/refs.csv pkg/CHNOSZ/demo/DEW.R pkg/CHNOSZ/demo/activity_ratios.R pkg/CHNOSZ/demo/go-IU.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/Berman/unused/BA96_obigt.csv pkg/CHNOSZ/inst/extdata/OBIGT/Berman_cr.csv pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz pkg/CHNOSZ/man/berman.Rd pkg/CHNOSZ/man/diagram.Rd pkg/CHNOSZ/man/info.Rd pkg/CHNOSZ/man/util.misc.Rd pkg/CHNOSZ/tests/testthat/test-basis.R pkg/CHNOSZ/tests/testthat/test-berman.R pkg/CHNOSZ/tests/testthat/test-makeup.R pkg/CHNOSZ/tests/testthat/test-subcrt.R pkg/CHNOSZ/vignettes/anintro.Rmd pkg/CHNOSZ/vignettes/obigt.Rmd Log: Helgeson minerals are superseded by Berman dataset Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/DESCRIPTION 2018-03-27 15:19:33 UTC (rev 309) @@ -1,6 +1,6 @@ Date: 2018-03-27 Package: CHNOSZ -Version: 1.1.3-16 +Version: 1.1.3-17 Title: Thermodynamic Calculations for Geobiochemistry Authors at R: c( person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"), Modified: pkg/CHNOSZ/R/berman.R =================================================================== --- pkg/CHNOSZ/R/berman.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/R/berman.R 2018-03-27 15:19:33 UTC (rev 309) @@ -49,7 +49,7 @@ # assign values to the variables used below for(i in 1:ncol(dat)) assign(colnames(dat)[i], dat[irow, i]) # get the entropy of the elements using the chemical formula in thermo$obigt - if(is.null(thisinfo)) thisinfo <- info(info(name, "cr_Berman", check.it=FALSE)) + if(is.null(thisinfo)) thisinfo <- info(info(name, "cr", check.it=FALSE)) SPrTr_elements <- convert(entropy(thisinfo$formula), "J") # check that G in data file is the G of formation from the elements --> Benson-Helgeson convention (DG = DH - T*DS) if(check.G) { Modified: pkg/CHNOSZ/R/cgl.R =================================================================== --- pkg/CHNOSZ/R/cgl.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/R/cgl.R 2018-03-27 15:19:33 UTC (rev 309) @@ -14,7 +14,7 @@ for(k in 1:nrow(parameters)) { # the parameters for *this* species PAR <- parameters[k, ] - if(PAR$state=="cr_Berman") { + if(all(is.na(PAR[8:20]))) { # use Berman equations (parameters not in thermo$obigt) properties <- berman(PAR$name, T=T, P=P, thisinfo=PAR) iprop <- match(property, colnames(properties)) Modified: pkg/CHNOSZ/R/diagram.R =================================================================== --- pkg/CHNOSZ/R/diagram.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/R/diagram.R 2018-03-27 15:19:33 UTC (rev 309) @@ -575,14 +575,6 @@ } # end if(nd==2) } # end if(plot.it) - # warn if we have a system with both Berman and Helgeson minerals 20180315 - ref1 <- get("thermo")$obigt$ref1 - ref2 <- get("thermo")$obigt$ref2 - ispecies <- eout$species$ispecies - hasHelgeson <- any(grepl("HDNB78", ref1[ispecies])) | any(grepl("HDNB78", ref2[ispecies])) - hasBerman <- any(get("thermo")$obigt$state[ispecies]=="cr_Berman") - if(hasHelgeson & hasBerman) warning("the system has minerals from both the Helgeson and Berman datasets; data may not be internally consistent") - out <- c(eout, list(plotvar=plotvar, plotvals=plotvals, names=names, predominant=predominant), out2D) return(invisible(out)) } Modified: pkg/CHNOSZ/R/info.R =================================================================== --- pkg/CHNOSZ/R/info.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/R/info.R 2018-03-27 15:19:33 UTC (rev 309) @@ -131,11 +131,7 @@ # if a single name matches, use that one (useful for distinguishing pseudo-H4SiO4 and H4SiO4) 20171020 matches.name <- matches.species & thermo$obigt$name==species if(sum(matches.name)==1) ispecies.out <- which(matches.name) - else { - # prefer the Berman minerals? - if(thermo$opt$Berman & "cr_Berman" %in% thermo$obigt$state[ispecies]) ispecies.out <- ispecies[thermo$obigt$state[ispecies]=="cr_Berman"] - else ispecies.out <- ispecies[1] # otherwise, return only the first species that matches - } + else ispecies.out <- ispecies[1] # otherwise, return only the first species that matches # let user know if there is more than one state for this species mystate <- thermo$obigt$state[ispecies.out] ispecies.other <- ispecies[!ispecies %in% ispecies.out] Modified: pkg/CHNOSZ/R/subcrt.R =================================================================== --- pkg/CHNOSZ/R/subcrt.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/R/subcrt.R 2018-03-27 15:19:33 UTC (rev 309) @@ -147,15 +147,6 @@ ton <- thermo$obigt$name tos <- thermo$obigt$state - # warn if we're running a reaction with both Berman and Helgeson minerals 20171110 - if(do.reaction) { - ref1 <- thermo$obigt$ref1 - ref2 <- thermo$obigt$ref2 - hasHelgeson <- any(grepl("HDNB78", ref1[sinfo])) | any(grepl("HDNB78", ref2[sinfo])) - hasBerman <- any(tos[sinfo]=="cr_Berman") - if(hasHelgeson & hasBerman) warning("the reaction has minerals from both the Helgeson and Berman datasets; data may not be internally consistent") - } - # stop if species not found noname <- is.na(sinfo) if(TRUE %in% noname) @@ -310,7 +301,7 @@ } # crystalline, gas, liquid (except water) species - cglstates <- c("liq", "cr", "gas", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", "cr8", "cr9", "cr_Berman") + cglstates <- c("liq", "cr", "gas", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", "cr8", "cr9") iscgl <- reaction$state %in% cglstates & reaction$name != "water" if(TRUE %in% iscgl) { @@ -330,8 +321,8 @@ # name and state myname <- reaction$name[i] mystate <- reaction$state[i] - # don't proceed if the state is cr_Berman - if(mystate=="cr_Berman") next +# # don't proceed if the state is cr_Berman +# if(mystate=="cr_Berman") next # if this phase is cr2 or higher, check if we're below the transition temperature if(!(reaction$state[i] %in% c('liq','cr','gas'))) { Ttr <- Ttr(inpho[i]-1,P=P,dPdT=dPdTtr(inpho[i]-1)) Modified: pkg/CHNOSZ/R/util.data.R =================================================================== --- pkg/CHNOSZ/R/util.data.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/R/util.data.R 2018-03-27 15:19:33 UTC (rev 309) @@ -256,6 +256,7 @@ if(what=="OBIGT") tdata <- get("thermo")$obigt else if(what=="DEW") tdata <- read.csv(system.file("extdata/OBIGT/DEW_aq.csv", package="CHNOSZ"), as.is=TRUE) else if(what=="SUPCRTBL") tdata <- read.csv(system.file("extdata/OBIGT/SUPCRTBL.csv", package="CHNOSZ"), as.is=TRUE) + else if(what=="SUPCRT92") tdata <- read.csv(system.file("extdata/OBIGT/SUPCRT92.csv", package="CHNOSZ"), as.is=TRUE) ntot <- nrow(tdata) # where to keep the results DCp <- DV <- DG <- rep(NA,ntot) @@ -288,6 +289,7 @@ # check optional data out <- rbind(out, checkfun("DEW")) out <- rbind(out, checkfun("SUPCRTBL")) + out <- rbind(out, checkfun("SUPCRT92")) # set differences within a tolerance to NA out$DCp[abs(out$DCp) < 1] <- NA out$DV[abs(out$DV) < 1] <- NA @@ -356,15 +358,17 @@ # dump all thermodynamic data in CHNOSZ 20171121 dumpdata <- function(file=NULL) { # default database (OBIGT) - Odata <- get("thermo")$obigt - Odata <- cbind(source="OBIGT", Odata) + dat <- get("thermo")$obigt + OBIGT <- cbind(source="OBIGT", dat) # optional data - Ddata <- read.csv(system.file("extdata/OBIGT/DEW_aq.csv", package="CHNOSZ"), as.is=TRUE) - Ddata <- cbind(source="DEW", Ddata) - Sdata <- read.csv(system.file("extdata/OBIGT/SUPCRTBL.csv", package="CHNOSZ"), as.is=TRUE) - Sdata <- cbind(source="SUPCRTBL", Sdata) + dat <- read.csv(system.file("extdata/OBIGT/DEW_aq.csv", package="CHNOSZ"), as.is=TRUE) + DEW <- cbind(source="DEW", dat) + dat <- read.csv(system.file("extdata/OBIGT/SUPCRTBL.csv", package="CHNOSZ"), as.is=TRUE) + SUPCRTBL <- cbind(source="SUPCRTBL", dat) + dat <- read.csv(system.file("extdata/OBIGT/SUPCRT92.csv", package="CHNOSZ"), as.is=TRUE) + SUPCRT92 <- cbind(source="SUPCRT92", dat) # put it all together - out <- rbind(Odata, Ddata, Sdata) + out <- rbind(OBIGT, DEW, SUPCRTBL, SUPCRT92) # quote columns 2 (name) and 3 (abbrv) because they have commas for some entries if(!is.null(file)) write.csv(out, file, row.names=FALSE, quote=c(2, 3)) else(return(out)) Modified: pkg/CHNOSZ/R/util.misc.R =================================================================== --- pkg/CHNOSZ/R/util.misc.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/R/util.misc.R 2018-03-27 15:19:33 UTC (rev 309) @@ -7,13 +7,13 @@ # (argument is index of the lower-T phase) thermo <- get("thermo") pars <- info(c(ispecies, ispecies+1), check.it=FALSE) - # the special handling for quartz and coesite interferece with this function, + # if these aren't the same mineral all we can say is zero + # actually, should be infinity ... the volume change is zero + if(as.character(pars$name[1]) != as.character(pars$name[2])) return(Inf) + # the special handling for quartz and coesite interfere with this function, # so we convert to uppercase names to prevent cgl() from calling quartz_coesite() pars$name <- toupper(pars$name) props <- cgl(c("G", "S", "V"), pars, P=0, T=thermo$obigt$z.T[ispecies]) - # if these aren't the same mineral all we can say is zero - # actually, should be infinity ... the volume change is zero - if(as.character(pars$name[1]) != as.character(pars$name[2])) return(Inf) # we really hope the G's are the same ... #if(abs(props[[2]]$G - props[[1]]$G) > 0.1) warning('dP.dT: inconsistent values of G for different phases of ',ispecies,call.=FALSE) dP.dT <- convert( ( props[[2]]$S - props[[1]]$S ) / ( props[[2]]$V - props[[1]]$V ), 'cm3bar' ) Modified: pkg/CHNOSZ/data/refs.csv =================================================================== --- pkg/CHNOSZ/data/refs.csv 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/data/refs.csv 2018-03-27 15:19:33 UTC (rev 309) @@ -6,12 +6,13 @@ Pan70,"L. B. Pankratz",1970,"U. S. Bureau of Mines Report of Investigations 7430",chlorargyrite,http://www.worldcat.org/oclc/14154245 PK70,"L. B. Pankratz and E. G. King",1970,"U. S. Bureau of Mines Report of Investigations 7435","bornite and chalcopyrite",http://www.worldcat.org/oclc/14154292 FSR76,"M. J. Ferrante et al.",1976,"U. S. Bureau of Mines Report of Investigations 8129","dawsonite Cp (value at 25 °C as listed by @BPAH07; not present in spronsbl.dat)",http://www.worldcat.org/oclc/932914138 -HDNB78,"H. C. Helgeson, J. M. Delany et al.",1978,"Am. J. Sci. 278A, 1-229","data for minerals (n = 167) and phase transitions",http://www.worldcat.org/oclc/13594862 +HDNB78,"H. C. Helgeson, J. M. Delany et al.",1978,"Am. J. Sci. 278A, 1-229","data for minerals and phase transitions",http://www.worldcat.org/oclc/13594862 HDNB78.1,"H. C. Helgeson, J. M. Delany et al.",1978,"Am. J. Sci. 278A, 1-229","litharge S, V, and Cp parameters",http://www.worldcat.org/oclc/13594862 -RHF78,"R. A. Robie, B. S. Hemingway and J. R. Fisher",1978,"U. S. Geological Survey Bull. 1452","chlorargyrite, rutile, and titanite",http://pubs.er.usgs.gov/publication/b1452 +RHF78,"R. A. Robie, B. S. Hemingway and J. R. Fisher",1978,"U. S. Geological Survey Bull. 1452","chlorargyrite",http://pubs.er.usgs.gov/publication/b1452 RHF78.1,"R. A. Robie, B. S. Hemingway and J. R. Fisher",1978,"U. S. Geological Survey Bull. 1452","dickite, fluorphlogopite, halloysite, and pyrope",http://pubs.er.usgs.gov/publication/b1452 RHF78.2,"R. A. Robie, B. S. Hemingway and J. R. Fisher",1978,"U. S. Geological Survey Bull. 1452",iron,http://pubs.er.usgs.gov/publication/b1452 RHF78.3,"R. A. Robie, B. S. Hemingway and J. R. Fisher",1978,"U. S. Geological Survey Bull. 1452","gibbsite GHS",http://pubs.er.usgs.gov/publication/b1452 +RHF78.4,"R. A. Robie, B. S. Hemingway and J. R. Fisher",1978,"U. S. Geological Survey Bull. 1452","rutile and titanite",http://pubs.er.usgs.gov/publication/b1452 PB82,"L. N. Plummer and E. Busenberg",1982,"Geochim. Cosmochim. Acta 46, 1011-1040","aragonite and calcite",https://doi.org/10.1016/0016-7037(82)90056-4 WEP+82,"D. D. Wagman, W. H. Evans et al.",1982,"J. Phys. Chem. Ref. Data 11, Suppl. 2, 1-392","gases GHS",https://srd.nist.gov/JPCRD/jpcrdS2Vol11.pdf WEP+82.1,"D. D. Wagman, W. H. Evans et al.",1982,"J. Phys. Chem. Ref. Data 11, Suppl. 2, 1-392",manganosite,https://srd.nist.gov/JPCRD/jpcrdS2Vol11.pdf Modified: pkg/CHNOSZ/demo/DEW.R =================================================================== --- pkg/CHNOSZ/demo/DEW.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/demo/DEW.R 2018-03-27 15:19:33 UTC (rev 309) @@ -26,9 +26,9 @@ PT20.0 <- data.frame(P=20000, T=seq(200, 800, 10)) PT <- rbind(PT0.5, PT1.0, PT2.0, PT5.0, PT10.0, PT20.0) # reaction 1: quartz = SiO2(aq) [equivalent to quartz + 3 H2O = Si(OH)4] -SiO2_logK <- subcrt(c("quartz", "SiO2"), c("cr_Berman", "aq"), c(-1, 1), P=PT$P, T=PT$T)$out$logK +SiO2_logK <- subcrt(c("quartz", "SiO2"), c("cr", "aq"), c(-1, 1), P=PT$P, T=PT$T)$out$logK # reaction 2: 2 quartz = Si2O4(aq) [equivalent to 2 quartz + 3 H2O = Si2O(OH)6] -Si2O4_logK <- subcrt(c("quartz", "Si2O4"), c("cr_Berman", "aq"), c(-2, 1), P=PT$P, T=PT$T)$out$logK +Si2O4_logK <- subcrt(c("quartz", "Si2O4"), c("cr", "aq"), c(-2, 1), P=PT$P, T=PT$T)$out$logK # plot the sum of molalities (== activities) for each pressure plot(c(200, 1000), c(-2.5, 0.5), type="n", xlab=axis.label("T"), ylab="log molality") for(P in unique(PT$P)) { @@ -45,8 +45,7 @@ t1 <- quote("Solubility of"~alpha*"-quartz") t2 <- "after Sverjensky et al., 2014a" mtitle(as.expression(c(t1, t2))) -# TODO: lines are a little low at highest P and P ... -# does the Berman, 1988 quartz data increase high-PT solubilities? +# TODO: lines are a little low at highest P and T ... ########### #### plot 2: correlations between non-solvation volume and HKF a1 parameter @@ -146,10 +145,8 @@ add.obigt("DEW", c(inorganics, organics[-4])) ## set basis species basis(c("Fe", "SiO2", "CO3-2", "H2O", "oxygen", "H+")) -## define a QFM buffer using Berman's equations for minerals -mod.buffer("QFM_Berman", c("quartz", "fayalite", "magnetite"), "cr_Berman", 0) ## calculate logfO2 in QFM buffer -basis("O2", "QFM_Berman") +basis("O2", "QFM") T <- seq(600, 1000, 100) buf <- affinity(T=T, P=50000, return.buffer=TRUE) ## add species Modified: pkg/CHNOSZ/demo/activity_ratios.R =================================================================== --- pkg/CHNOSZ/demo/activity_ratios.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/demo/activity_ratios.R 2018-03-27 15:19:33 UTC (rev 309) @@ -6,6 +6,13 @@ res <- 200 fill <- "terrain" +data(thermo) +## get data for gibbsite from the SUPCRT92 database, without loading minerals that +## have been superseded by the Berman dataset (the default in CHNOSZ) +add.obigt("SUPCRT92", "gibbsite") +## or, get data for gibbsite and Al-bearing aqueous species from the SUPCRTBL database +#add.obigt("SUPCRTBL") + ## K2O-Al2O3-SiO2-H2O, 25 degree C, 1 bar ## Steinmann et al., 1994 (http://ccm.geoscienceworld.org/content/42/2/197) ## Garrels and Christ, p. 361 (http://www.worldcat.org/oclc/517586) @@ -45,7 +52,7 @@ ## CaO-Al2O3-MgO-SiO2-H2O at 300 degree C and 500 bar ## Bach and Klein, 2009 (https://doi.org/10.1016/j.lithos.2008.10.022) basis(c("Ca+2", "Al+3", "Mg+2", "SiO2", "H2O", "O2", "H+")) -species(c("clinochlore,14a", "clinozoisite", "prehnite", "grossular")) +species(c("clinochlore", "clinozoisite", "prehnite", "grossular")) a <- affinity(SiO2 = c(-5, 0, res), `Ca+2` = c(6, 11, res), T = 300, P = 500) diagram(a, ylab = ratlab("Ca+2"), balance = "Al+3", fill = fill, yline = 1.7) # (Hmmm... where is clinochlore? it doesn't appear on our diagram) Modified: pkg/CHNOSZ/demo/go-IU.R =================================================================== --- pkg/CHNOSZ/demo/go-IU.R 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/demo/go-IU.R 2018-03-27 15:19:33 UTC (rev 309) @@ -21,18 +21,20 @@ thermo.plot.new(xlim=range(T), ylim=c(-3.5, -1.5), xlab = axis.label("T"), ylab=axis.label("SiO2")) points(xT, xlogaSiO2) basis(delete=TRUE) -## first calculation: CHNOSZ default (SiO2 from SHS89, kaolinite and boehmite from HDNB78) +## first calculation: after SUPCRT92 (SiO2(aq) from SHS89) +add.obigt("SUPCRT92") # gets kaolinite and boehmite from HDNB78 r1 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T=T, P=1000, exceed.Ttr = TRUE) # we need exceed.Ttr = TRUE because the T limit for boehmite is 500 K (Helgeson et al., 1978) ## second calculation: kaolinite from Berman, 1988 -Kln_Berman <- info("kaolinite", "cr_Berman") -r2 <- subcrt(c("boehmite", "H2O", "SiO2", Kln_Berman), c(-1, -0.5, -1, 0.5), T=T, P=1000, exceed.Ttr = TRUE) +data(thermo) +add.obigt("SUPCRT92", "boehmite") # gets only boehmite from HDNB78 +r2 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T=T, P=1000, exceed.Ttr = TRUE) ## third calculation: boehmite from Hemingway et al., 1991 add.obigt("SUPCRTBL", "boehmite") -r3 <- subcrt(c("boehmite", "H2O", "SiO2", Kln_Berman), c(-1, -0.5, -1, 0.5), T=T, P=1000) +r3 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T=T, P=1000) ## fourth calculation: SiO2 from Apps and Spycher, 2004 add.obigt("SUPCRTBL", "SiO2") -r4 <- subcrt(c("boehmite", "H2O", "SiO2", Kln_Berman), c(-1, -0.5, -1, 0.5), T=T, P=1000) +r4 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T=T, P=1000) ## log activity of SiO2 is -ve logK lines(T, -r1$out$logK) lines(T, -r2$out$logK, lty=2) @@ -41,7 +43,7 @@ ## add points calculated using the SUPCRTBL package points(seq(125, 350, 25), -c(3.489, 3.217, 2.967, 2.734, 2.517, 2.314, 2.124, 1.946, 1.781, 1.628), pch=4, col="red") ## add labels, legend, and title -text(182.5, -3.17, "SUPCRT92\n(CHNOSZ default)", srt=48, cex=0.7, font=2) +text(182.5, -3.17, "SUPCRT92", srt=48, cex=0.7, font=2) text(154, -3.04, "circa SUPCRTBL", srt=45, cex=0.7, font=2, col="red") legend("topleft", lty=c(1, 2, 2, 1, 0), pch=c(NA, NA, NA, NA, 4), col=c("black", "black", "red", "red", "red"), bty="n", cex=0.9, Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/inst/NEWS 2018-03-27 15:19:33 UTC (rev 309) @@ -1,8 +1,27 @@ -CHANGES IN CHNOSZ 1.1.3-16 (2018-03-27) +CHANGES IN CHNOSZ 1.1.3-17 (2018-03-27) --------------------------------------- -BERMAN EQUATIONS AND DATA +THERMODYNAMIC DATA +- The Berman data (Berman, 1988 and later additions) have replaced the + SUPCRT92 data (based on Helgeson et al., 1978) for most minerals in + the default database (i.e. the one loaded by data(thermo)). Only + native elements, sulfides, halides, sulfates, and selected carbonates + and oxides from SUPCRT92 that do not duplicate any in the Berman + dataset are loaded by default. + +- The superseded SUPCRT92 minerals (primarily the silicates and + Al-bearing minerals, as well as calcite, dolomite, hematite, and + magnetite) are in the file extdata/OBIGT/SUPCRT92.csv, which can be + loaded with add.obigt("SUPCRT92"). This is used in some examples for + comparing the datasets (see ?berman and demo(go-IU.R)), but should not + be needed by most users. + +- In thermo$obigt, the minerals using the Berman equations are + identified as those having NA values for all thermodynamic properties + (columns 8-20). These minerals have the state of "cr" (not "cr_Berman" + as before). + - berman() now reads data from a user-supplied file berman.csv if it is present in the working directory. Modified: pkg/CHNOSZ/inst/extdata/Berman/unused/BA96_obigt.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/unused/BA96_obigt.csv 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/inst/extdata/Berman/unused/BA96_obigt.csv 2018-03-27 15:19:33 UTC (rev 309) @@ -1,21 +1,21 @@ 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 -almandine,Alm,Si3Fe3Al2O12,cr_Berman,BA96.1,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -anthophyllite,Ath,Mg7Si8O24H2,cr_Berman,BA96.1,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -cordierite,Cd,Mg2Al4Si5O18,cr_Berman,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -enstatite,En,MgSiO3,cr_Berman,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -fayalite,Fa,Fe2SiO4,cr_Berman,BA96.1,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -ferrosilite,Fsl,SiFeO3,cr_Berman,BA96.1,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -forsterite,Fo,Mg2SiO4,cr_Berman,Ber88,BA96.3,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -hematite,Hm,Fe2O3,cr_Berman,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -ilmenite,Ilm,FeTiO3,cr_Berman,Ber88,BA96.4,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -magnetite,Mt,Fe3O4,cr_Berman,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -pyrope,Py,Mg3Al2Si3O12,cr_Berman,Ber88,BA96.3,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -rutile,Rt,TiO2,cr_Berman,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -spinel,Sp,MgAl2O4,cr_Berman,Ber88,BA96.3,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -talc,Tc,Mg3Si4O12H2,cr_Berman,Ber88,BA96.4,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -Fe-cordierite,fCd,Fe2Al4Si5O18,cr_Berman,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -geikelite,Gk,MgTiO3,cr_Berman,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -hercynite,Hc,FeAl2O4,cr_Berman,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -iron-a,aFe,Fe,cr_Berman,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -iron-g,gFe,Fe,cr_Berman,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -orthocorundum,Ok,Al2O3,cr_Berman,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +almandine,Alm,Si3Fe3Al2O12,cr,BA96.1,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +anthophyllite,Ath,Mg7Si8O24H2,cr,BA96.1,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +cordierite,Cd,Mg2Al4Si5O18,cr,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +enstatite,En,MgSiO3,cr,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +fayalite,Fa,Fe2SiO4,cr,BA96.1,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +ferrosilite,Fsl,SiFeO3,cr,BA96.1,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +forsterite,Fo,Mg2SiO4,cr,Ber88,BA96.3,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +hematite,Hm,Fe2O3,cr,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +ilmenite,Ilm,FeTiO3,cr,Ber88,BA96.4,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +magnetite,Mt,Fe3O4,cr,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +pyrope,Py,Mg3Al2Si3O12,cr,Ber88,BA96.3,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +rutile,Rt,TiO2,cr,Ber88,BA96.2,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +spinel,Sp,MgAl2O4,cr,Ber88,BA96.3,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +talc,Tc,Mg3Si4O12H2,cr,Ber88,BA96.4,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +Fe-cordierite,fCd,Fe2Al4Si5O18,cr,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +geikelite,Gk,MgTiO3,cr,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +hercynite,Hc,FeAl2O4,cr,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +iron-a,aFe,Fe,cr,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +iron-g,gFe,Fe,cr,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +orthocorundum,Ok,Al2O3,cr,BA96,NA,12.Dec.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA Modified: pkg/CHNOSZ/inst/extdata/OBIGT/Berman_cr.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/Berman_cr.csv 2018-03-27 07:57:23 UTC (rev 308) +++ pkg/CHNOSZ/inst/extdata/OBIGT/Berman_cr.csv 2018-03-27 15:19:33 UTC (rev 309) @@ -1,87 +1,87 @@ 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 -akermanite,Ak,Ca2MgSi2O7,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -albite,Ab,NaAlSi3O8,cr_Berman,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"albite,high",hAb,NaAlSi3O8,cr_Berman,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"albite,low",lAb,NaAlSi3O8,cr_Berman,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -almandine,Alm,Si3Fe3Al2O12,cr_Berman,Ber88,Ber90.1,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -andalusite,And,Al2SiO5,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -anorthite,An,Al2CaSi2O8,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -anthophyllite,Ath,Mg7Si8O24H2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -antigorite,Atg,Mg48Si34O99H62O48,cr_Berman,Ber88,BDat17.1,09.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -brucite,Br,MgO2H2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -Ca-Al-pyroxene,CTs,CaAl2SiO6,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -calcite,Cc,CaCO3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -chrysotile,Chr,Mg3Si2O9H4,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -clinochlore,Chl,Mg5Al2Si3O18H8,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -coesite,Cs,SiO2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -cordierite,Cd,Mg2Al4Si5O18,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -corundum,Co,Al2O3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"cristobalite,alpha",aCr,SiO2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"cristobalite,beta",bCr,SiO2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -diaspore,Dsp,AlO2H,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -diopside,Di,MgCaSi2O6,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -dolomite,Do,MgCaC2O6,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"enstatite,clino",cEn,MgSiO3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -enstatite,En,MgSiO3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"enstatite,proto",pEn,MgSiO3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -fayalite,Fa,Fe2SiO4,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -ferrosilite,Fsl,SiFeO3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -forsterite,Fo,Mg2SiO4,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -gehlenite,Ge,Al2Ca2SiO7,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -grossular,Gr,Ca3Al2Si3O12,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -hematite,Hm,Fe2O3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -ilmenite,Ilm,FeTiO3,cr_Berman,Ber88,Ber90.1,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -jadeite,Jd,NaAlSi2O6,cr_Berman,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -kaolinite,Kln,Al2Si2O9H4,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -kyanite,Ky,Al2SiO5,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -lawsonite,Lw,CaAl2Si2O10H4,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -lime,Lm,CaO,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -magnesite,Mst,MgCO3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -magnetite,Mt,Fe3O4,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -margarite,Mrg,CaAl4Si2O12H2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -meionite,Me,Ca4Al6Si6O27C,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -merwinite,Mw,Ca3MgSi2O8,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -monticellite,Mo,CaMgSiO4,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -muscovite,Ms,KAl3Si3O12H2,cr_Berman,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -paragonite,Pg,NaAl3Si3O12H2,cr_Berman,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -periclase,Pe,MgO,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -phlogopite,Phl,KMg3AlSi3O12H2,cr_Berman,Ber88,SHD91.1,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -K-feldspar,Kfs,KAlSi3O8,cr_Berman,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"K-feldspar,high",Sa,KAlSi3O8,cr_Berman,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"K-feldspar,low",Mcr,KAlSi3O8,cr_Berman,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -prehnite,Prh,Ca2Al2Si3O12H2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -pyrope,Py,Mg3Al2Si3O12,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -pyrophyllite,Prl,Al2Si4O12H2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -quartz,aQz,SiO2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"quartz,beta",bQz,SiO2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -rutile,Rt,TiO2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -sillimanite,Si,Al2SiO5,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -sphene,Sph,CaTiSiO5,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -spinel,Sp,MgAl2O4,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -talc,Tc,Mg3Si4O12H2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -tremolite,Tr,Ca2Mg5Si8O24H2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"tridymite,high",hTr,SiO2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -"tridymite,low",lTr,SiO2,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -wollastonite,Wo,CaSiO3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -pseudowollastonite,pWo,CaSiO3,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -zoisite,Zo,Ca2Al3Si3O13H,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -clinozoisite,cZo,Ca2Al3Si3O13H,cr_Berman,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -annite,Ann,Si3Fe3AlKH2O12,cr_Berman,Ber90,SHD91.2,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -fluormuscovite,Flms,KAl3Si3O10F2,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -fluorphlogopite,Fphl,KMg3AlSi3O10F2,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -fluorannite,Flan,Si3Fe3AlKO10F2,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -fluortremolite,Fltr,Ca2Mg5Si8O22F2,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -fluorapatite,Flap,Ca5P3O12F,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -hydroxyapatite,Hyap,Ca5P3O13H,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -chlorapatite,Clap,Ca5P3O12Cl,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -fluortalc,Fltc,Mg3Si4O10F2,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -chlorphlogopite,Cphl,KMg3AlSi3O10Cl2,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -chlorannite,Clan,Si3Fe3AlKO10Cl2,cr_Berman,ZS92,NA,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -glaucophane,Glc,Na2Al2Mg3Si8O24H2,cr_Berman,Eva90,JUN92,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -pumpellyite,Pmp,Ca4Al5MgSi6O28H7,cr_Berman,Eva90,JUN92,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -aragonite,Arg,CaCO3,cr_Berman,FDM+14.1,NA,08.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -hedenbergite,Hd,CaFeSi2O6,cr_Berman,DS10,NA,08.Nov.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -andradite,Adr,Ca3Fe2Si3O12,cr_Berman,DS10,NA,08.Nov.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -ferro-actinolite,Fac,Ca2Fe5Si8O22(OH)2,cr_Berman,DS10,NA,08.Nov.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -grunerite,Gru,Fe7Si8O22(OH)2,cr_Berman,DS10,NA,08.Nov.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA -ilvaite,Ilv,CaFe2FeSi2O7O(OH),cr_Berman,DS10,NA,08.Nov.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +akermanite,Ak,Ca2MgSi2O7,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +albite,Ab,NaAlSi3O8,cr,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +"albite,high",hAb,NaAlSi3O8,cr,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +"albite,low",lAb,NaAlSi3O8,cr,Ber88,SHD91,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +almandine,Alm,Si3Fe3Al2O12,cr,Ber88,Ber90.1,03.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +andalusite,And,Al2SiO5,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +anorthite,An,Al2CaSi2O8,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +anthophyllite,Ath,Mg7Si8O24H2,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +antigorite,Atg,Mg48Si34O99H62O48,cr,Ber88,BDat17.1,09.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +brucite,Br,MgO2H2,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +Ca-Al-pyroxene,CTs,CaAl2SiO6,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +calcite,Cc,CaCO3,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +chrysotile,Chr,Mg3Si2O9H4,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +clinochlore,Chl,Mg5Al2Si3O18H8,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +coesite,Cs,SiO2,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +cordierite,Cd,Mg2Al4Si5O18,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA +corundum,Co,Al2O3,cr,Ber88,NA,01.Oct.17,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/chnosz -r 309 From noreply at r-forge.r-project.org Wed Mar 28 06:31:41 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 28 Mar 2018 06:31:41 +0200 (CEST) Subject: [CHNOSZ-commits] r310 - in pkg/CHNOSZ: . R inst inst/extdata/Berman inst/extdata/Berman/unused inst/extdata/OBIGT man man/macros Message-ID: <20180328043141.B8517189CB8@r-forge.r-project.org> Author: jedick Date: 2018-03-28 06:31:38 +0200 (Wed, 28 Mar 2018) New Revision: 310 Added: pkg/CHNOSZ/inst/extdata/Berman/sympy.R Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/berman.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv pkg/CHNOSZ/inst/extdata/Berman/DS10.csv pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv pkg/CHNOSZ/inst/extdata/Berman/unused/BA96.csv pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz pkg/CHNOSZ/man/berman.Rd pkg/CHNOSZ/man/extdata.Rd pkg/CHNOSZ/man/macros/macros.Rd Log: berman(): add k4, k5, k6 to Cp equation Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/DESCRIPTION 2018-03-28 04:31:38 UTC (rev 310) @@ -1,6 +1,6 @@ -Date: 2018-03-27 +Date: 2018-03-28 Package: CHNOSZ -Version: 1.1.3-17 +Version: 1.1.3-18 Title: Thermodynamic Calculations for Geobiochemistry Authors at R: c( person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"), Modified: pkg/CHNOSZ/R/berman.R =================================================================== --- pkg/CHNOSZ/R/berman.R 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/R/berman.R 2018-03-28 04:31:38 UTC (rev 310) @@ -29,14 +29,10 @@ } else dat <- rbind(BDat17, FDM14, DS10, JUN92, ZS92, SHD91, Ber90, Ber88) # remove duplicates (only the first, i.e. most recent entry is kept) dat <- dat[!duplicated(dat$name), ] - # remove the multipliers - multexp <- c(0, 0, 0, 0, # Ber88 Table 2 - 0, 0, 0, 0, # Table 3a - 5, 5, 5, 8, # Table 4 - 0, 0, 0, 0, 0, 0, # Table 3b - 0, 0, 0, 0, 0, 0, 0, 0 # Table 5 - ) - dat[, 2:27] <- t(t(dat[, 2:27]) / 10^multexp) + # remove the multipliers on volume parameters + vcols <- 13:16 # columns with v1, v2, v3, v4 + multexp <- c(5, 5, 5, 8) + dat[, vcols] <- t(t(dat[, vcols]) / 10^multexp) # if name is missing, return the entire data frame (used in test-berman.R) if(missing(name)) return(dat) # which row has data for this mineral? @@ -45,7 +41,8 @@ # the function works fine with just the following assign() call, # but an explicit dummy assignment here is used to avoid "Undefined global functions or variables" in R CMD check GfPrTr <- HfPrTr <- SPrTr <- Tlambda <- Tmax <- Tmin <- Tref <- VPrTr <- - d0 <- d1 <- d2 <- d3 <- d4 <- d5 <- dTdP <- k0 <- k1 <- k2 <- k3 <- l1 <- l2 <- v1 <- v2 <- v3 <- v4 <- NA + d0 <- d1 <- d2 <- d3 <- d4 <- d5 <- dTdP <- k0 <- k1 <- k2 <- k3 <- + k4 <- k5 <- k6 <- l1 <- l2 <- v1 <- v2 <- v3 <- v4 <- NA # assign values to the variables used below for(i in 1:ncol(dat)) assign(colnames(dat)[i], dat[irow, i]) # get the entropy of the elements using the chemical formula in thermo$obigt @@ -63,26 +60,31 @@ ### thermodynamic properties ### # calculate Cp and V (Berman, 1988 Eqs. 4 and 5) - Cp <- k0 + k1 * T^-0.5 + k2 * T^-2 + k3 * T^-3 + # k4, k5, k6 terms from winTWQ documentation (doi:10.4095/223425) + Cp <- k0 + k1 * T^-0.5 + k2 * T^-2 + k3 * T^-3 + k4 * T^-1 + k5 * T + k6 * T^2 P_Pr <- P - Pr T_Tr <- T - Tr V <- VPrTr * (1 + v1 * P_Pr + v2 * P_Pr^2 + v3 * T_Tr + v4 * T_Tr^2) - # calculate Ga (Ber88 Eq. 6) --> Berman-Brown convention (DG = DH - T*S) - Ga <- HfPrTr - T * SPrTr + k0 * ( (T - Tr) - T * (log(T) - log(Tr)) ) + - 2 * k1 * ( (T^0.5 - Tr^0.5) + T*(T^-0.5 - Tr^-0.5) ) - - k2 * ( (T^-1 - Tr^-1) - T / 2 * (T^-2 - Tr^-2) ) - - k3 * ( (T^-2 - Tr^-2) / 2 - T / 3 * (T^-3 - Tr^-3) ) + - VPrTr * ( (v1 / 2 - v2) * (P^2 - Pr^2) + v2 / 3 * (P^3 - Pr^3) + - (1 - v1 + v2 + v3 * (T - Tr) + v4 * (T - Tr)^2) * (P - Pr) ) + ## calculate Ga (Ber88 Eq. 6) (superseded 20180328 as it does not include k4, k5, k6) + #Ga <- HfPrTr - T * SPrTr + k0 * ( (T - Tr) - T * (log(T) - log(Tr)) ) + + # 2 * k1 * ( (T^0.5 - Tr^0.5) + T*(T^-0.5 - Tr^-0.5) ) - + # k2 * ( (T^-1 - Tr^-1) - T / 2 * (T^-2 - Tr^-2) ) - + # k3 * ( (T^-2 - Tr^-2) / 2 - T / 3 * (T^-3 - Tr^-3) ) + + # VPrTr * ( (v1 / 2 - v2) * (P^2 - Pr^2) + v2 / 3 * (P^3 - Pr^3) + + # (1 - v1 + v2 + v3 * (T - Tr) + v4 * (T - Tr)^2) * (P - Pr) ) # calculate Ha (symbolically integrated using sympy - expressions not simplified) - intCp <- T*k0 - Tr*k0 + k2/Tr - k2/T + k3/(2*Tr^2) - k3/(2*T^2) + 2.0*k1*T^0.5 - 2.0*k1*Tr^0.5 + intCp <- T*k0 - Tr*k0 + k2/Tr - k2/T + k3/(2*Tr^2) - k3/(2*T^2) + 2.0*k1*T^0.5 - 2.0*k1*Tr^0.5 + + k4*log(T) - k4*log(Tr) + k5*T^2/2 - k5*Tr^2/2 - k6*Tr^3/3 + k6*T^3/3 intVminusTdVdT <- -VPrTr + P*(VPrTr + VPrTr*v2 - VPrTr*v1 - Tr*VPrTr*v3 + VPrTr*v4*Tr^2 - VPrTr*v4*T^2) + P^2*(VPrTr*v1/2 - VPrTr*v2) + VPrTr*v1/2 - VPrTr*v2/3 + Tr*VPrTr*v3 + VPrTr*v4*T^2 - VPrTr*v4*Tr^2 + VPrTr*v2*P^3/3 Ha <- HfPrTr + intCp + intVminusTdVdT # calculate S (also symbolically integrated) - intCpoverT <- k0*log(T) - k0*log(Tr) - k3/(3*T^3) + k3/(3*Tr^3) + k2/(2*Tr^2) - k2/(2*T^2) + 2.0*k1*Tr^-0.5 - 2.0*k1*T^-0.5 + intCpoverT <- k0*log(T) - k0*log(Tr) - k3/(3*T^3) + k3/(3*Tr^3) + k2/(2*Tr^2) - k2/(2*T^2) + 2.0*k1*Tr^-0.5 - 2.0*k1*T^-0.5 + + k4/Tr - k4/T + T*k5 - Tr*k5 + k6*T**2/2 - k6*Tr**2/2 intdVdT <- -VPrTr*(v3 + v4*(-2*Tr + 2*T)) + P*VPrTr*(v3 + v4*(-2*Tr + 2*T)) S <- SPrTr + intCpoverT - intdVdT + # calculate Ga --> Berman-Brown convention (DG = DH - T*S, no S(element)) + Ga <- Ha - T * S ### polymorphic transition properties *** if(!is.na(Tlambda) & !is.na(Tref) & any(T > Tref) & calc.transition) { Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/inst/NEWS 2018-03-28 04:31:38 UTC (rev 310) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.1.3-17 (2018-03-27) +CHANGES IN CHNOSZ 1.1.3-18 (2018-03-28) --------------------------------------- THERMODYNAMIC DATA @@ -22,6 +22,14 @@ (columns 8-20). These minerals have the state of "cr" (not "cr_Berman" as before). +- The heat capacity equation in berman() has been expanded to + Cp = k0 + k1T-1/2 + k2T-2 + k3T-3 + k4T-1 + k5T + k6T2 (as used in + winTWQ). + +- Multipliers on values in the Berman data files (extdata/Berman/*.csv) + have been removed, except for 10^5, 10^5, 10^5, and 10^8 on v1 to v4 + (to be consistent with the winTWQ data format). + - berman() now reads data from a user-supplied file berman.csv if it is present in the working directory. @@ -30,9 +38,6 @@ - Correct swapped v1 <-> v3 and v2 <-> v4 in extdata/Berman/DS10.csv. -- Change files in extdata/Berman to be more like winTWQ format (no - value multipliers, except 10^5, 10^5, 10^5, and 10^8 on v1 to v4). - OTHER CHANGES - Lines in 1-D diagram()s can optionally be drawn as splines using the Modified: pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv 2018-03-28 04:31:38 UTC (rev 310) @@ -1,2 +1,2 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,-0.1485,4E-07,2.72,0.8,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 +antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,0,0,0,-0.1485,4E-07,2.72,0.8,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv 2018-03-28 04:31:38 UTC (rev 310) @@ -1,68 +1,68 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -akermanite,-3663786,-3860441,212,9.252,387.06,-2938.8,0,-40790000,-0.0785,0,2.5011,0.67224,358,298,0,0,0,452,,,,,,,, -albite,-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -"albite,high",-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -"albite,low",-3711715,-3935100,207.443,10.043,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -almandine,-4941728,-5265502,339.927,11.511,573.96,-1483.1,-29292000,5022080000,-0.0558,3.21E-08,1.8613,0.74539,,,,,,,,,,,,,, -andalusite,-2441806,-2589972,91.434,5.147,236.48,-1102.9,-7526800,936440000,-0.077,1.923E-07,2.3443,0.07189,,,,,,,,,,,,,, -anorthite,-4003221,-4228730,200.186,10.075,439.37,-3734.1,0,-317020000,-0.1272,3.176E-07,1.0918,0.41985,,,,,,,,,,,,,, -anthophyllite,-11342582,-12069032,535.195,26.56,1219.31,-5766.5,-34766100,4400900000,-0.1259,0,2.706,0.31325,,,,,,,,,,,,,, -antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,-0.1978,4.944E-07,2.4965,0.39444,,,,,,,,,,,,,, -brucite,-834868,-925937,63.064,2.468,136.84,-537.1,-4361900,552690000,-0.2023,6.726E-07,3.2854,0.1094,,,,,,,,,,,,,, -Ca-Al-pyroxene,-3122310,-3298767,140.751,6.356,310.7,-1671.6,-7455300,948780000,-0.087,2.171E-07,2.225,0.52863,,,,,,,,,,,,,, -calcite,-1128295,-1206819,91.725,3.69,178.19,-1657.7,-482700,166600000,-0.14,0,0.8907,2.27402,,,,,,,,,,,,,, -chrysotile,-4035373,-4363356,220.134,10.72,610.02,-5581.2,-1857300,195470000,-0.181,4.524E-07,2.7151,0.67351,,,,,,,,,,,,,, -clinochlore,-8250546,-8909590,435.154,21.147,1214.28,-11217.1,0,-1256250000,-0.1819,0,2.6452,0,,,,,,,,,,,,,, -coesite,-852585,-907604,39.424,2.064,94.907,-767.3,-527900,26270000,-0.1037,3E-07,0.7396,0.43605,,,,,,,,,,,,,, -cordierite,-8651517,-9158727,417.97,23.311,954.39,-7962.3,-2317300,-370210000,-0.1158,0,0.3003,0.18017,,,,,,,,,,,,,, -corundum,-1582199,-1675700,50.82,2.558,155.02,-828.4,-3861400,409080000,-0.0385,3.75E-08,2.1342,0.4718,,,,,,,,,,,,,, -"cristobalite,alpha",-853918,-907753,43.394,2.587,83.51,-374.7,-2455400,280070000,-0.2515,0,2.0824,0,535,298,0.048,-0.14216,0.00044142,0,,,,,,,, -"cristobalite,beta",-853327,-906377,46.029,2.73,83.51,-374.7,-2455400,280070000,-0.11,5.535E-07,0.3189,0,,,,,,,,,,,,,, -diaspore,-920806,-999378,35.308,1.776,143.24,-1540.4,-323100,64630000,-0.0599,0,2.9718,0,,,,,,,,,,,,,, -diopside,-3026202,-3200583,142.5,6.62,305.41,-1604.9,-7166000,921840000,-0.0872,1.707E-07,2.7795,0.83082,,,,,,,,,,,,,, -dolomite,-2162354,-2325248,154.89,6.432,328.48,-2554.4,-4688500,790380000,-0.107,0,1.423,3.63778,,,,,,,1423,298,-9.42,0,385000,0.01732,5.02E-06,0 -"enstatite,clino",-1458601,-1545926,66.325,3.131,139.96,-497,-4400200,535710000,-0.075,4.48E-08,2.1915,0.7492,,,,,,,,,,,,,, -enstatite,-1458181,-1545552,66.17,3.133,166.58,-1200.6,-2270600,279150000,-0.0749,4.47E-08,2.4656,0.7467,,,,,,,,,,,,,, -"enstatite,proto",-1456965,-1543959,67.438,3.242,166.58,-1200.6,-2270600,279150000,-0.075,4.48E-08,1.6832,1.1665,,,,,,,,,,,,,, -fayalite,-1380154,-1479360,150.93,4.63,248.93,-1923.9,0,-139100000,-0.073,0,2.6546,0.79482,,,,,,,,,,,,,, -ferrosilite,-1117472,-1194375,95.882,3.296,169.06,-1193,-2097100,292530000,-0.099,0,3.1808,0.7585,,,,,,,,,,,,,, -forsterite,-2055023,-2174420,94.01,4.366,238.64,-2001.3,0,-116240000,-0.0791,1.351E-07,2.9464,0.88633,,,,,,,,,,,,,, -gehlenite,-3785954,-3988158,198.6,9.033,373.09,-2276.8,-4778500,477910000,-0.0996,2.488E-07,2.4926,0.05664,,,,,,,1600,698,-221.74,0,17291000,0.3695,-0.0001469,0 -grossular,-6270974,-6632859,255.15,12.538,573.43,-2039.4,-18887200,2319310000,-0.0654,1.635E-07,1.8994,0.79756,,,,,,,,,,,,,, -hematite,-743681,-825627,87.437,3.027,146.86,0,-5576800,525630000,-0.0479,3.04E-08,3.831,0.0165,955,298,0,-0.07403,0.00027921,1287,,,,,,,, -ilmenite,-1155320,-1231947,108.628,3.17,150,-441.6,-3323700,348150000,-0.0584,1.23E-07,2.7248,0.29968,,,,,,,,,,,,,, -jadeite,-2846482,-3025118,133.574,6.034,311.29,-2005.1,-5350300,662570000,-0.086,2.149E-07,2.3118,0.25785,,,,,,,,,,,,,, -kaolinite,-3799770,-4120327,203.7,9.952,523.23,-4426.7,-2244300,92310000,-0.12,0,3.2,0,,,,,,,,,,,,,, -kyanite,-2443370,-2594220,82.43,4.412,262.68,-2001.4,-1999700,-63180000,-0.0646,0,2.3973,0,,,,,,,,,,,,,, -lawsonite,-4509709,-4865666,229.176,10.144,728.67,-8248.1,0,850560000,-0.0769,1.922E-07,2.6283,0,,,,,,,,,,,,,, -lime,-603350,-635090,37.75,1.676,58.79,-133.9,-1147100,102980000,-0.1022,2.565E-07,3.461,0.67406,,,,,,,,,,,,,, -magnesite,-1029875,-1113636,65.21,2.803,162.3,-1109.3,-4882600,874660000,-0.089,2.212E-07,1.8436,4.15968,,,,,,,,,,,,,, -magnetite,-1014235,-1117403,146.114,4.452,207.93,0,-7243300,664360000,-0.0582,1.751E-07,3.0291,1.3847,848,298,0,-0.19502,0.00061037,1565,,,,,,,, -margarite,-5852244,-6236603,265.084,12.958,699.8,-5587.1,-6807700,734320000,-0.1155,2.886E-07,2.1019,1.24556,,,,,,,,,,,,,, -meionite,-13105915,-13849723,730,34.036,1511.35,-13243.3,0,-751610000,-0.111,0,0.934,0,,,,,,,,,,,,,, -merwinite,-4309707,-4537497,251.777,9.847,453.62,-3250,0,-344230000,-0.0551,1.381E-07,2.9376,0.87235,,,,,,,,,,,,,, -monticellite,-2132222,-2250027,108.3,5.148,226.34,-1542.7,-1179700,-23290000,-0.0904,2E-07,2.7863,0.76339,,,,,,,,,,,,,, -muscovite,-5596723,-5976740,293.157,14.087,651.49,-3873.2,-18523200,2742470000,-0.1717,4.295E-07,3.3527,0,,,,,,,,,,,,,, -paragonite,-5563572,-5944208,277.699,13.216,577.57,-1472.8,-32214400,5050080000,-0.1973,4.933E-07,3.9424,0.59701,,,,,,,,,,,,,, -periclase,-569209,-601500,26.951,1.125,61.11,-296.2,-621200,5840000,-0.0622,1.511E-07,3.7477,0.03556,,,,,,,,,,,,,, -phlogopite,-5827224,-6207342,334.158,14.977,610.38,-2083.8,-21533000,2841040000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, -K-feldspar,-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 -"K-feldspar,high",-3738804,-3959704,229.157,10.896,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, -"K-feldspar,low",-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, -prehnite,-5820154,-6198606,288.634,14.016,716.05,-6404.6,-2182500,268500000,-0.1427,0,0.1468,11.28353,,,,,,,,,,,,,, -pyrope,-5936009,-6286548,266.359,11.316,640.72,-4542.1,-4701900,0,-0.0576,4.42E-08,2.2519,0.37044,,,,,,,,,,,,,, -pyrophyllite,-5266865,-5640781,239.4,12.76,665.93,-5897.4,-4979900,661810000,-0.1354,0,1.2637,3.81661,,,,,,,,,,,,,, -quartz,-856288,-910700,41.46,2.269,80.01,-240.3,-3546700,491570000,-0.2434,1.0137E-06,2.3895,0,848,373,0.0237,-0.09187,0.00024607,0,,,,,,,, -"quartz,beta",-855033,-908627,44.207,2.37,80.01,-240.3,-3546700,491570000,-0.1238,7.087E-07,0,0,,,,,,,,,,,,,, -rutile,-889497,-944750,50.46,1.882,77.84,0,-3367800,402940000,-0.0454,5.84E-08,2.5716,0.15409,,,,,,,,,,,,,, -sillimanite,-2439265,-2586091,95.93,4.983,256.73,-1887.2,-2977400,250960000,-0.0753,0,1.3431,0,,,,,,,,,,,,,, -sphene,-2455134,-2596652,129.29,5.565,234.62,-1040.3,-5118300,591460000,-0.059,0,2.52,0,,,,,,,,,,,,,, -spinel,-2176537,-2300313,84.535,3.977,235.9,-1766.6,-1710400,40620000,-0.0489,0,2.1691,0.50528,,,,,,,,,,,,,, -talc,-5517657,-5897387,261.24,13.61,664.11,-5187.2,-2147200,-327370000,-0.1699,5.665E-07,2.9447,0,,,,,,,,,,,,,, -tremolite,-11578548,-12305578,551.15,27.268,1229.36,-6401.9,-32089900,4208810000,-0.1392,3.481E-07,2.4374,0.98338,,,,,,,,,,,,,, -"tridymite,low",-854026,-907750,43.77,2.675,75.37,0,-5958100,958250000,-0.2508,0,1.9339,0,383,298,0,0.4267,-0.00144575,130,,,,,,,, -"tridymite,high",-853844,-907045,45.524,2.737,75.37,0,-5958100,958250000,-0.074,3.735E-07,0.4829,0,,,,,,,,,,,,,, -wollastonite,-1546123,-1631500,81.81,3.983,149.07,-690.3,-3659300,484350000,-0.1245,3.113E-07,2.818,0,,,,,,,,,,,,,, -pseudowollastonite,-1543085,-1627427,85.279,4.016,141.16,-417.2,-5857600,940740000,-0.1245,3.113E-07,2.818,0,,,,,,,,,,,,,, -zoisite,-6494148,-6889488,297.576,13.588,749.17,-6509.3,-2380500,124860000,-0.0515,1.288E-07,3.467,0,,,,,,,,,,,,,, -clinozoisite,-6496497,-6894968,287.076,13.673,749.17,-6509.3,-2380500,124860000,-0.0515,1.288E-07,3.467,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 +akermanite,-3663786,-3860441,212,9.252,387.06,-2938.8,0,-40790000,0,0,0,-0.0785,0,2.5011,0.67224,358,298,0,0,0,452,,,,,,,, +albite,-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +"albite,high",-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +"albite,low",-3711715,-3935100,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +almandine,-4941728,-5265502,339.927,11.511,573.96,-1483.1,-29292000,5022080000,0,0,0,-0.0558,3.21E-08,1.8613,0.74539,,,,,,,,,,,,,, +andalusite,-2441806,-2589972,91.434,5.147,236.48,-1102.9,-7526800,936440000,0,0,0,-0.077,1.923E-07,2.3443,0.07189,,,,,,,,,,,,,, +anorthite,-4003221,-4228730,200.186,10.075,439.37,-3734.1,0,-317020000,0,0,0,-0.1272,3.176E-07,1.0918,0.41985,,,,,,,,,,,,,, +anthophyllite,-11342582,-12069032,535.195,26.56,1219.31,-5766.5,-34766100,4400900000,0,0,0,-0.1259,0,2.706,0.31325,,,,,,,,,,,,,, +antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,0,0,0,-0.1978,4.944E-07,2.4965,0.39444,,,,,,,,,,,,,, +brucite,-834868,-925937,63.064,2.468,136.84,-537.1,-4361900,552690000,0,0,0,-0.2023,6.726E-07,3.2854,0.1094,,,,,,,,,,,,,, +Ca-Al-pyroxene,-3122310,-3298767,140.751,6.356,310.7,-1671.6,-7455300,948780000,0,0,0,-0.087,2.171E-07,2.225,0.52863,,,,,,,,,,,,,, +calcite,-1128295,-1206819,91.725,3.69,178.19,-1657.7,-482700,166600000,0,0,0,-0.14,0,0.8907,2.27402,,,,,,,,,,,,,, +chrysotile,-4035373,-4363356,220.134,10.72,610.02,-5581.2,-1857300,195470000,0,0,0,-0.181,4.524E-07,2.7151,0.67351,,,,,,,,,,,,,, +clinochlore,-8250546,-8909590,435.154,21.147,1214.28,-11217.1,0,-1256250000,0,0,0,-0.1819,0,2.6452,0,,,,,,,,,,,,,, +coesite,-852585,-907604,39.424,2.064,94.907,-767.3,-527900,26270000,0,0,0,-0.1037,3E-07,0.7396,0.43605,,,,,,,,,,,,,, +cordierite,-8651517,-9158727,417.97,23.311,954.39,-7962.3,-2317300,-370210000,0,0,0,-0.1158,0,0.3003,0.18017,,,,,,,,,,,,,, +corundum,-1582199,-1675700,50.82,2.558,155.02,-828.4,-3861400,409080000,0,0,0,-0.0385,3.75E-08,2.1342,0.4718,,,,,,,,,,,,,, +"cristobalite,alpha",-853918,-907753,43.394,2.587,83.51,-374.7,-2455400,280070000,0,0,0,-0.2515,0,2.0824,0,535,298,0.048,-0.14216,0.00044142,0,,,,,,,, +"cristobalite,beta",-853327,-906377,46.029,2.73,83.51,-374.7,-2455400,280070000,0,0,0,-0.11,5.535E-07,0.3189,0,,,,,,,,,,,,,, +diaspore,-920806,-999378,35.308,1.776,143.24,-1540.4,-323100,64630000,0,0,0,-0.0599,0,2.9718,0,,,,,,,,,,,,,, +diopside,-3026202,-3200583,142.5,6.62,305.41,-1604.9,-7166000,921840000,0,0,0,-0.0872,1.707E-07,2.7795,0.83082,,,,,,,,,,,,,, +dolomite,-2162354,-2325248,154.89,6.432,328.48,-2554.4,-4688500,790380000,0,0,0,-0.107,0,1.423,3.63778,,,,,,,1423,298,-9.42,0,385000,0.01732,5.02E-06,0 +"enstatite,clino",-1458601,-1545926,66.325,3.131,139.96,-497,-4400200,535710000,0,0,0,-0.075,4.48E-08,2.1915,0.7492,,,,,,,,,,,,,, +enstatite,-1458181,-1545552,66.17,3.133,166.58,-1200.6,-2270600,279150000,0,0,0,-0.0749,4.47E-08,2.4656,0.7467,,,,,,,,,,,,,, +"enstatite,proto",-1456965,-1543959,67.438,3.242,166.58,-1200.6,-2270600,279150000,0,0,0,-0.075,4.48E-08,1.6832,1.1665,,,,,,,,,,,,,, +fayalite,-1380154,-1479360,150.93,4.63,248.93,-1923.9,0,-139100000,0,0,0,-0.073,0,2.6546,0.79482,,,,,,,,,,,,,, +ferrosilite,-1117472,-1194375,95.882,3.296,169.06,-1193,-2097100,292530000,0,0,0,-0.099,0,3.1808,0.7585,,,,,,,,,,,,,, +forsterite,-2055023,-2174420,94.01,4.366,238.64,-2001.3,0,-116240000,0,0,0,-0.0791,1.351E-07,2.9464,0.88633,,,,,,,,,,,,,, +gehlenite,-3785954,-3988158,198.6,9.033,373.09,-2276.8,-4778500,477910000,0,0,0,-0.0996,2.488E-07,2.4926,0.05664,,,,,,,1600,698,-221.74,0,17291000,0.3695,-0.0001469,0 +grossular,-6270974,-6632859,255.15,12.538,573.43,-2039.4,-18887200,2319310000,0,0,0,-0.0654,1.635E-07,1.8994,0.79756,,,,,,,,,,,,,, +hematite,-743681,-825627,87.437,3.027,146.86,0,-5576800,525630000,0,0,0,-0.0479,3.04E-08,3.831,0.0165,955,298,0,-0.07403,0.00027921,1287,,,,,,,, +ilmenite,-1155320,-1231947,108.628,3.17,150,-441.6,-3323700,348150000,0,0,0,-0.0584,1.23E-07,2.7248,0.29968,,,,,,,,,,,,,, +jadeite,-2846482,-3025118,133.574,6.034,311.29,-2005.1,-5350300,662570000,0,0,0,-0.086,2.149E-07,2.3118,0.25785,,,,,,,,,,,,,, +kaolinite,-3799770,-4120327,203.7,9.952,523.23,-4426.7,-2244300,92310000,0,0,0,-0.12,0,3.2,0,,,,,,,,,,,,,, +kyanite,-2443370,-2594220,82.43,4.412,262.68,-2001.4,-1999700,-63180000,0,0,0,-0.0646,0,2.3973,0,,,,,,,,,,,,,, +lawsonite,-4509709,-4865666,229.176,10.144,728.67,-8248.1,0,850560000,0,0,0,-0.0769,1.922E-07,2.6283,0,,,,,,,,,,,,,, +lime,-603350,-635090,37.75,1.676,58.79,-133.9,-1147100,102980000,0,0,0,-0.1022,2.565E-07,3.461,0.67406,,,,,,,,,,,,,, +magnesite,-1029875,-1113636,65.21,2.803,162.3,-1109.3,-4882600,874660000,0,0,0,-0.089,2.212E-07,1.8436,4.15968,,,,,,,,,,,,,, +magnetite,-1014235,-1117403,146.114,4.452,207.93,0,-7243300,664360000,0,0,0,-0.0582,1.751E-07,3.0291,1.3847,848,298,0,-0.19502,0.00061037,1565,,,,,,,, +margarite,-5852244,-6236603,265.084,12.958,699.8,-5587.1,-6807700,734320000,0,0,0,-0.1155,2.886E-07,2.1019,1.24556,,,,,,,,,,,,,, +meionite,-13105915,-13849723,730,34.036,1511.35,-13243.3,0,-751610000,0,0,0,-0.111,0,0.934,0,,,,,,,,,,,,,, +merwinite,-4309707,-4537497,251.777,9.847,453.62,-3250,0,-344230000,0,0,0,-0.0551,1.381E-07,2.9376,0.87235,,,,,,,,,,,,,, +monticellite,-2132222,-2250027,108.3,5.148,226.34,-1542.7,-1179700,-23290000,0,0,0,-0.0904,2E-07,2.7863,0.76339,,,,,,,,,,,,,, +muscovite,-5596723,-5976740,293.157,14.087,651.49,-3873.2,-18523200,2742470000,0,0,0,-0.1717,4.295E-07,3.3527,0,,,,,,,,,,,,,, +paragonite,-5563572,-5944208,277.699,13.216,577.57,-1472.8,-32214400,5050080000,0,0,0,-0.1973,4.933E-07,3.9424,0.59701,,,,,,,,,,,,,, +periclase,-569209,-601500,26.951,1.125,61.11,-296.2,-621200,5840000,0,0,0,-0.0622,1.511E-07,3.7477,0.03556,,,,,,,,,,,,,, +phlogopite,-5827224,-6207342,334.158,14.977,610.38,-2083.8,-21533000,2841040000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +K-feldspar,-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 +"K-feldspar,high",-3738804,-3959704,229.157,10.896,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, +"K-feldspar,low",-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, +prehnite,-5820154,-6198606,288.634,14.016,716.05,-6404.6,-2182500,268500000,0,0,0,-0.1427,0,0.1468,11.28353,,,,,,,,,,,,,, +pyrope,-5936009,-6286548,266.359,11.316,640.72,-4542.1,-4701900,0,0,0,0,-0.0576,4.42E-08,2.2519,0.37044,,,,,,,,,,,,,, +pyrophyllite,-5266865,-5640781,239.4,12.76,665.93,-5897.4,-4979900,661810000,0,0,0,-0.1354,0,1.2637,3.81661,,,,,,,,,,,,,, +quartz,-856288,-910700,41.46,2.269,80.01,-240.3,-3546700,491570000,0,0,0,-0.2434,1.0137E-06,2.3895,0,848,373,0.0237,-0.09187,0.00024607,0,,,,,,,, +"quartz,beta",-855033,-908627,44.207,2.37,80.01,-240.3,-3546700,491570000,0,0,0,-0.1238,7.087E-07,0,0,,,,,,,,,,,,,, +rutile,-889497,-944750,50.46,1.882,77.84,0,-3367800,402940000,0,0,0,-0.0454,5.84E-08,2.5716,0.15409,,,,,,,,,,,,,, +sillimanite,-2439265,-2586091,95.93,4.983,256.73,-1887.2,-2977400,250960000,0,0,0,-0.0753,0,1.3431,0,,,,,,,,,,,,,, +sphene,-2455134,-2596652,129.29,5.565,234.62,-1040.3,-5118300,591460000,0,0,0,-0.059,0,2.52,0,,,,,,,,,,,,,, +spinel,-2176537,-2300313,84.535,3.977,235.9,-1766.6,-1710400,40620000,0,0,0,-0.0489,0,2.1691,0.50528,,,,,,,,,,,,,, +talc,-5517657,-5897387,261.24,13.61,664.11,-5187.2,-2147200,-327370000,0,0,0,-0.1699,5.665E-07,2.9447,0,,,,,,,,,,,,,, +tremolite,-11578548,-12305578,551.15,27.268,1229.36,-6401.9,-32089900,4208810000,0,0,0,-0.1392,3.481E-07,2.4374,0.98338,,,,,,,,,,,,,, +"tridymite,low",-854026,-907750,43.77,2.675,75.37,0,-5958100,958250000,0,0,0,-0.2508,0,1.9339,0,383,298,0,0.4267,-0.00144575,130,,,,,,,, +"tridymite,high",-853844,-907045,45.524,2.737,75.37,0,-5958100,958250000,0,0,0,-0.074,3.735E-07,0.4829,0,,,,,,,,,,,,,, +wollastonite,-1546123,-1631500,81.81,3.983,149.07,-690.3,-3659300,484350000,0,0,0,-0.1245,3.113E-07,2.818,0,,,,,,,,,,,,,, +pseudowollastonite,-1543085,-1627427,85.279,4.016,141.16,-417.2,-5857600,940740000,0,0,0,-0.1245,3.113E-07,2.818,0,,,,,,,,,,,,,, +zoisite,-6494148,-6889488,297.576,13.588,749.17,-6509.3,-2380500,124860000,0,0,0,-0.0515,1.288E-07,3.467,0,,,,,,,,,,,,,, +clinozoisite,-6496497,-6894968,287.076,13.673,749.17,-6509.3,-2380500,124860000,0,0,0,-0.0515,1.288E-07,3.467,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv 2018-03-28 04:31:38 UTC (rev 310) @@ -1,5 +1,5 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -almandine,-4943492,-5267216,340.007,11.511,573.96,-1483.1,-29292000,5022080000,-0.0558,3.21E-08,1.8613,0.74539,,,,,,,,,,,,,, -annite,-4793115,-5142800,420,15.408,727.21,-4775.04,-13831900,2119060000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, -ilmenite,-1155794,-1232448,108.628,3.17,150,-441.6,-3323700,348150000,-0.0584,1.23E-07,2.7248,0.29968,,,,,,,,,,,,,, -phlogopite,-5830350,-6210391,334.346,14.977,610.38,-2083.8,-21533000,2841040000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 +almandine,-4943492,-5267216,340.007,11.511,573.96,-1483.1,-29292000,5022080000,0,0,0,-0.0558,3.21E-08,1.8613,0.74539,,,,,,,,,,,,,, +annite,-4793115,-5142800,420,15.408,727.21,-4775.04,-13831900,2119060000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +ilmenite,-1155794,-1232448,108.628,3.17,150,-441.6,-3323700,348150000,0,0,0,-0.0584,1.23E-07,2.7248,0.29968,,,,,,,,,,,,,, +phlogopite,-5830350,-6210391,334.346,14.977,610.38,-2083.8,-21533000,2841040000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/DS10.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/DS10.csv 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/inst/extdata/Berman/DS10.csv 2018-03-28 04:31:38 UTC (rev 310) @@ -1,6 +1,6 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -hedenbergite,-2674300,-2837802.5,173.59,6.785,353.31148,-3106.646,2047911.742,-563018581,-0.17457,1.51E-06,2.796487,0,,,,,,,,,,,,,, -andradite,-5419000,-5761985.8,316.4,13.167,569.7558,-1441.44,-22441040.802,3146543781,-0.06539136,1.635E-07,2.072525,0.561,,,,,,,,,,,,,, -ferro-actinolite,-9839000,-10518042.6,685.1,28.26,1321.15758,-8966.454,-21705844.286,3236159154,-0.15,0,2.84,0,,,,,,,,,,,,,, -grunerite,-8964807,-9623000,725,27.8,1347.83,-9356.91,-20228480,3039190000,-0.15,0,2.84,0,,,,,,,,,,,,,, -ilvaite,-3440000,-3695605.5,291.5,10.016,682.79138,-8787.112,30183568.71,-5666432624,-0.06838,2.4E-08,1.801543,1.152,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 +hedenbergite,-2674300,-2837802.5,173.59,6.785,353.31148,-3106.646,2047911.742,-563018581,0,0,0,-0.17457,1.51E-06,2.796487,0,,,,,,,,,,,,,, +andradite,-5419000,-5761985.8,316.4,13.167,569.7558,-1441.44,-22441040.802,3146543781,0,0,0,-0.06539136,1.635E-07,2.072525,0.561,,,,,,,,,,,,,, +ferro-actinolite,-9839000,-10518042.6,685.1,28.26,1321.15758,-8966.454,-21705844.286,3236159154,0,0,0,-0.15,0,2.84,0,,,,,,,,,,,,,, +grunerite,-8964807,-9623000,725,27.8,1347.83,-9356.91,-20228480,3039190000,0,0,0,-0.15,0,2.84,0,,,,,,,,,,,,,, +ilvaite,-3440000,-3695605.5,291.5,10.016,682.79138,-8787.112,30183568.71,-5666432624,0,0,0,-0.06838,2.4E-08,1.801543,1.152,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv 2018-03-28 04:31:38 UTC (rev 310) @@ -1,2 +1,2 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -aragonite,-1128353.67,-1207213.7,88.7,3.42,195,-2100,-10000,220000000,-0.1345,1.7E-07,4.18,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 +aragonite,-1128353.67,-1207213.7,88.7,3.42,195,-2100,-10000,220000000,0,0,0,-0.1345,1.7E-07,4.18,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv 2018-03-28 04:31:38 UTC (rev 310) @@ -1,3 +1,3 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -glaucophane,-11225858,-11960500,535,26.05,1717.5,-19272,7050000,0,-0.116,2.9E-07,2.2,0.88,,,,,,,,,,,,,, -pumpellyite,-13448936,-14402300,584,29.55,1576,-10603.8,-28304200,3838351000,-0.051516,1.288E-07,3.467,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 +glaucophane,-11225858,-11960500,535,26.05,1717.5,-19272,7050000,0,0,0,0,-0.116,2.9E-07,2.2,0.88,,,,,,,,,,,,,, +pumpellyite,-13448936,-14402300,584,29.55,1576,-10603.8,-28304200,3838351000,0,0,0,-0.051516,1.288E-07,3.467,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv 2018-03-28 04:31:38 UTC (rev 310) @@ -1,12 +1,12 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -muscovite,-5603417,-5983434,293.157,14.087,651.49,-3873.2,-18523200,2742470000,-0.1717,4.295E-07,3.3527,0,,,,,,,,,,,,,, -phlogopite,-5837044,-6217085,334.346,14.977,610.38,-2083.8,-21533000,2841040000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, -K-feldspar,-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 -"K-feldspar,high",-3745498,-3966398,229.157,10.896,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, -"K-feldspar,low",-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, -paragonite,-5570375,-5951011,277.699,13.216,577.57,-1472.8,-32214400,5050080000,-0.1973,4.933E-07,3.9424,0.59701,,,,,,,,,,,,,, -albite,-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -"albite,high",-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -"albite,low",-3718518,-3941903,207.443,10.043,393.64,-2415.5,-7892800,1070640000,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -jadeite,-2853285,-3031921,133.574,6.034,311.29,-2005.1,-5350300,662570000,-0.086,2.149E-07,2.3118,0.25785,,,,,,,,,,,,,, -annite,-4799809,-5149494,420,15.408,727.21,-4775.04,-13831900,2119060000,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 +muscovite,-5603417,-5983434,293.157,14.087,651.49,-3873.2,-18523200,2742470000,0,0,0,-0.1717,4.295E-07,3.3527,0,,,,,,,,,,,,,, +phlogopite,-5837044,-6217085,334.346,14.977,610.38,-2083.8,-21533000,2841040000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +K-feldspar,-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 +"K-feldspar,high",-3745498,-3966398,229.157,10.896,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, +"K-feldspar,low",-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, +paragonite,-5570375,-5951011,277.699,13.216,577.57,-1472.8,-32214400,5050080000,0,0,0,-0.1973,4.933E-07,3.9424,0.59701,,,,,,,,,,,,,, +albite,-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +"albite,high",-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +"albite,low",-3718518,-3941903,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, +jadeite,-2853285,-3031921,133.574,6.034,311.29,-2005.1,-5350300,662570000,0,0,0,-0.086,2.149E-07,2.3118,0.25785,,,,,,,,,,,,,, +annite,-4799809,-5149494,420,15.408,727.21,-4775.04,-13831900,2119060000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv 2018-03-27 15:19:33 UTC (rev 309) +++ pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv 2018-03-28 04:31:38 UTC (rev 310) @@ -1,11 +1,11 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/chnosz -r 310 From noreply at r-forge.r-project.org Wed Mar 28 08:01:11 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 28 Mar 2018 08:01:11 +0200 (CEST) Subject: [CHNOSZ-commits] r311 - in pkg/CHNOSZ: . R data inst inst/extdata/Berman man tests/testthat vignettes Message-ID: <20180328060111.9A9FB1895FF@r-forge.r-project.org> Author: jedick Date: 2018-03-28 08:01:10 +0200 (Wed, 28 Mar 2018) New Revision: 311 Added: pkg/CHNOSZ/inst/extdata/Berman/testing/ Removed: pkg/CHNOSZ/inst/extdata/Berman/unused/ Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/berman.R pkg/CHNOSZ/data/opt.csv pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/berman.Rd pkg/CHNOSZ/man/data.Rd pkg/CHNOSZ/man/extdata.Rd pkg/CHNOSZ/tests/testthat/test-berman.R pkg/CHNOSZ/vignettes/obigt.Rmd Log: berman(): read user-supplied data from file specified in thermo$opt$Berman Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2018-03-28 04:31:38 UTC (rev 310) +++ pkg/CHNOSZ/DESCRIPTION 2018-03-28 06:01:10 UTC (rev 311) @@ -1,6 +1,6 @@ Date: 2018-03-28 Package: CHNOSZ -Version: 1.1.3-18 +Version: 1.1.3-19 Title: Thermodynamic Calculations for Geobiochemistry Authors at R: c( person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"), Modified: pkg/CHNOSZ/R/berman.R =================================================================== --- pkg/CHNOSZ/R/berman.R 2018-03-28 04:31:38 UTC (rev 310) +++ pkg/CHNOSZ/R/berman.R 2018-03-28 06:01:10 UTC (rev 311) @@ -22,11 +22,19 @@ DS10 <- read.csv(paste0(dir, "/DS10.csv"), as.is=TRUE) FDM14 <- read.csv(paste0(dir, "/FDM+14.csv"), as.is=TRUE) BDat17 <- read.csv(paste0(dir, "/BDat17.csv"), as.is=TRUE) - if(file.exists("berman.csv")) { - BDat_user <- read.csv("berman.csv", as.is=TRUE) - # assemble the files in reverse chronological order - dat <- rbind(BDat_user, BDat17, FDM14, DS10, JUN92, ZS92, SHD91, Ber90, Ber88) - } else dat <- rbind(BDat17, FDM14, DS10, JUN92, ZS92, SHD91, Ber90, Ber88) + userfile <- get("thermo")$opt$Berman + userfileexists <- FALSE + dat <- rbind(BDat17, FDM14, DS10, JUN92, ZS92, SHD91, Ber90, Ber88) + if(!is.na(userfile)) { + if(userfile!="") { + if(file.exists(userfile)) { + userfileexists <- TRUE + BDat_user <- read.csv(userfile, as.is=TRUE) + # assemble the files in reverse chronological order + dat <- rbind(BDat_user, BDat17, FDM14, DS10, JUN92, ZS92, SHD91, Ber90, Ber88) + } else stop("the file named in thermo$opt$Berman (", userfile, ") does not exist") + } + } # remove duplicates (only the first, i.e. most recent entry is kept) dat <- dat[!duplicated(dat$name), ] # remove the multipliers on volume parameters @@ -37,7 +45,10 @@ if(missing(name)) return(dat) # which row has data for this mineral? irow <- which(dat$name == name) - if(length(irow)==0) stop("Data for ", name, " not available. Please add it to berman.csv") + if(length(irow)==0) { + if(userfileexists) stop("Data for ", name, " not available. Please add it to ", userfile) + if(!userfileexists) stop("Data for ", name, " not available. Please add it to your_data_file.csv and run thermo$obigt$Berman <<- 'path/to/your_data_file.csv'") + } # the function works fine with just the following assign() call, # but an explicit dummy assignment here is used to avoid "Undefined global functions or variables" in R CMD check GfPrTr <- HfPrTr <- SPrTr <- Tlambda <- Tmax <- Tmin <- Tref <- VPrTr <- Modified: pkg/CHNOSZ/data/opt.csv =================================================================== --- pkg/CHNOSZ/data/opt.csv 2018-03-28 04:31:38 UTC (rev 310) +++ pkg/CHNOSZ/data/opt.csv 2018-03-28 06:01:10 UTC (rev 311) @@ -1,2 +1,2 @@ cutoff,E.units,T.units,P.units,state,water,G.tol,Cp.tol,V.tol,varP,IAPWS.sat,paramin,ideal.H,ideal.e,nonideal,Berman -1E-10,cal,C,bar,aq,SUPCRT92,100,1,1,FALSE,liquid,1000,TRUE,TRUE,Helgeson,FALSE +1E-10,cal,C,bar,aq,SUPCRT92,100,1,1,FALSE,liquid,1000,TRUE,TRUE,Helgeson,NA Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2018-03-28 04:31:38 UTC (rev 310) +++ pkg/CHNOSZ/inst/NEWS 2018-03-28 06:01:10 UTC (rev 311) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.1.3-18 (2018-03-28) +CHANGES IN CHNOSZ 1.1.3-19 (2018-03-28) --------------------------------------- THERMODYNAMIC DATA @@ -30,11 +30,12 @@ have been removed, except for 10^5, 10^5, 10^5, and 10^8 on v1 to v4 (to be consistent with the winTWQ data format). -- berman() now reads data from a user-supplied file berman.csv if it is - present in the working directory. +- berman() now reads data from a user-supplied file specified in + thermo$opt$Berman. - Add mineral data from Berman and Aranovich, 1996 to - extdata/Berman/unused/BA96.csv. + extdata/Berman/testing/BA96.csv and an example of using this file via + thermo$opt$Berman (see ?berman). - Correct swapped v1 <-> v3 and v2 <-> v4 in extdata/Berman/DS10.csv. Modified: pkg/CHNOSZ/man/berman.Rd =================================================================== --- pkg/CHNOSZ/man/berman.Rd 2018-03-28 04:31:38 UTC (rev 310) +++ pkg/CHNOSZ/man/berman.Rd 2018-03-28 06:01:10 UTC (rev 311) @@ -126,6 +126,26 @@ legend=c("Helgeson et al., 1978 (unadjusted)", "Berman, 1988", " (adjusted by Sverjensky et al., 1991)"), bty="n") title(main="Comparison of Helgeson and Berman datasets at 1000 bar") + +## Getting data from a user-supplied file +## Ol-Opx exchange equilibrium, after Berman and Aranovich, 1996 +E.units("J") +species <- c("fayalite", "enstatite", "ferrosilite", "forsterite") +coeffs <- c(-1, -2, 2, 1) +T <- seq(600, 1500, 50) +Gex_Ber88 <- subcrt(species, coeffs, T=T, P=1)$out$G +# add data from BA96 +datadir <- system.file("extdata/Berman/testing", package="CHNOSZ") +add.obigt(file.path(datadir, "BA96_obigt.csv")) +thermo$opt$Berman <<- file.path(datadir, "BA96.csv") +Gex_BA96 <- subcrt(species, coeffs, T=seq(600, 1500, 50), P=1)$out$G +# Ber88 is lower than BA96 at low T +stopifnot((Gex_BA96 - Gex_Ber88)[1] > 0) +# the curves cross at about 725 deg C (BA96 Fig. 8) +# (actually, in our calculation they cross closer to 800 deg C) +stopifnot(T[which.min(abs(Gex_BA96 - Gex_Ber88))] == 800) +# reset the database (thermo$opt$E.units, thermo$obigt, and thermo$opt$Berman) +data(thermo) } \references{ @@ -133,6 +153,8 @@ Berman, R. G. (1988) Internally-consistent thermodynamic data for minerals in the system Na{\s2}O-K{\s2}O-CaO-MgO-FeO-Fe{\s2}O{\s3}-Al{\s2}O{\s3}-SiO{\s2}-TiO{\s2}-H{\s2}O-CO{\s2}. \emph{J. Petrol.} \bold{29}, 445-522. \url{https://doi.org/10.1093/petrology/29.2.445} +Berman, R. G. and Aranovich, L. Ya. (1996) Optimized standard state and solution properties of minerals. I. Model calibration for olivine, orthopyroxene, cordierite, garnet, and ilmenite in the system FeO-MgO-CaO-Al{\s2}O{\s3}-TiO{\s2}-SiO{\s2}. \emph{Contrib. Mineral. Petrol.} \bold{126}, 1-24. \url{https://doi.org/10.1007/s004100050233} + Berman, R. G. (2007) winTWQ (version 2.3): A software package for performing internally-consistent thermobarometric calculations. \emph{Open File} \bold{5462}, Geological Survey of Canada, 41 p. \url{https://doi.org/10.4095/223425} Helgeson, H. C., Delany, J. M., Nesbitt, H. W. and Bird, D. K. (1978) Summary and critique of the thermodynamic properties of rock-forming minerals. \emph{Am. J. Sci.} \bold{278-A}, 1--229. \url{http://www.worldcat.org/oclc/13594862} Modified: pkg/CHNOSZ/man/data.Rd =================================================================== --- pkg/CHNOSZ/man/data.Rd 2018-03-28 04:31:38 UTC (rev 310) +++ pkg/CHNOSZ/man/data.Rd 2018-03-28 06:01:10 UTC (rev 311) @@ -22,7 +22,7 @@ The computational settings are changed using \code{\link{water}}, \code{\link{P.units}}, \code{\link{T.units}}, \code{\link{E.units}}, and some other commands (e.g. \code{\link{mod.buffer}}). Some settings can only be changed by direct manipulation of \code{thermo$opt}. -In an interactive session, this should be done using the super-assignment operator (e.g. \code{thermo$opt$Berman <<- TRUE}) so that the \code{thermo} object is not copied to the global environment. +In an interactive session, this should be done using the super-assignment operator (e.g. \code{thermo$opt$ideal.H <<- FALSE}) so that the \code{thermo} object is not copied to the global environment. (Doing so would cause problems, as many functions are designed to access the \code{thermo} object in the \code{CHNOSZ} environment.) To restore the default computational settings, thermodynamic database, and system settings, run \code{data(thermo)}. @@ -59,7 +59,7 @@ \code{ideal.H} \tab logical \tab Should \code{\link{nonideal}} ignore the proton? [\code{TRUE}] \cr \code{ideal.e} \tab logical \tab Should \code{\link{nonideal}} ignore the electron? [\code{TRUE}] \cr \code{nonideal} \tab character \tab Method for \code{\link{nonideal}} [\code{Helgeson}] \cr - \code{Berman} \tab logical \tab Should \code{\link{info}} preferentially return Berman minerals? [\code{FALSE}] + \code{Berman} \tab character \tab User data file for mineral parameters in the Berman equations [\code{NA}] } \item \code{thermo$element} Modified: pkg/CHNOSZ/man/extdata.Rd =================================================================== --- pkg/CHNOSZ/man/extdata.Rd 2018-03-28 04:31:38 UTC (rev 310) +++ pkg/CHNOSZ/man/extdata.Rd 2018-03-28 06:01:10 UTC (rev 311) @@ -17,6 +17,7 @@ Following conventions used in other data files, the names of sanidine and microcline were changed to K-feldspar,high and K-feldspar,low. \item \code{*.csv} contain thermodynamic data from other sources. \item \code{sympy.R} is an R script used to symbolically integrate heat capacity and volume (to calculate enthalpy, entropy and Gibbs energy), using \CRANpkg{rSymPy}. + \item The \code{testing} directory contains data files based on Berman and Aranovich (1996). These are used to demonstrate the addition of data from a user-supplied file (see \code{\link{berman}}). } Files in \code{abundance} contain protein abundance and microbial occurrence data: @@ -114,6 +115,8 @@ Berman, R. G. (1988) Internally-consistent thermodynamic data for minerals in the system Na{\s2}O-K{\s2}O-CaO-MgO-FeO-Fe{\s2}O{\s3}-Al{\s2}O{\s3}-SiO{\s2}-TiO{\s2}-H{\s2}O-CO{\s2}. \emph{J. Petrol.} \bold{29}, 445-522. \url{https://doi.org/10.1093/petrology/29.2.445} +Berman, R. G. and Aranovich, L. Ya. (1996) Optimized standard state and solution properties of minerals. I. Model calibration for olivine, orthopyroxene, cordierite, garnet, and ilmenite in the system FeO-MgO-CaO-Al{\s2}O{\s3}-TiO{\s2}-SiO{\s2}. \emph{Contrib. Mineral. Petrol.} \bold{126}, 1-24. \url{https://doi.org/10.1007/s004100050233} + Dayhoff, M. O. and Lippincott, E. R. and Eck, R. V. (1964) Thermodynamic Equilibria In Prebiological Atmospheres. \emph{Science} \bold{146}, 1461--1464. \url{https://doi.org/10.1126/science.146.3650.1461} Dayhoff, M. O. and Lippincott, E. R., Eck, R. V. and Nagarajan (1967) Thermodynamic Equilibrium In Prebiological Atmospheres of C, H, O, N, P, S, and Cl. Report SP-3040, National Aeronautics and Space Administration. Modified: pkg/CHNOSZ/tests/testthat/test-berman.R =================================================================== --- pkg/CHNOSZ/tests/testthat/test-berman.R 2018-03-28 04:31:38 UTC (rev 310) +++ pkg/CHNOSZ/tests/testthat/test-berman.R 2018-03-28 06:01:10 UTC (rev 311) @@ -79,3 +79,12 @@ # we are less consistent with the reference values at high T expect_maxdiff(Kfs$G[3:4], Kfs_G[3:4], 350) }) + +test_that("nonexistent or incomplete user data file is handled properly", { + thermo$opt$Berman <<- "XxXxXx.csv" + expect_error(berman("calcite"), "the file named in thermo\\$opt\\$Berman \\(XxXxXx.csv\\) does not exist") + thermo$opt$Berman <<- system.file("extdata/Berman/testing/BA96.csv", package="CHNOSZ") + expect_error(berman("xxx"), "Data for xxx not available. Please add it to") + thermo$opt$Berman <<- NA + expect_error(berman("xxx"), "Data for xxx not available. Please add it to your_data_file.csv") +}) Modified: pkg/CHNOSZ/vignettes/obigt.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/obigt.Rmd 2018-03-28 04:31:38 UTC (rev 310) +++ pkg/CHNOSZ/vignettes/obigt.Rmd 2018-03-28 06:01:10 UTC (rev 311) @@ -123,7 +123,7 @@ * Updates included with [SUPCRTBL](http://www.indiana.edu/~hydrogeo/supcrtbl.html) are listed under **Optional Data** / **SUPCRTBL**. -* Data from SUPCRT92 which have been superseded in CHNOSZ by the Berman data are listed under **Optional Data** / **SUPCRT92**. +* Data from SUPCRT92 which have been superseded by the Berman data are listed under **Optional Data** / **SUPCRT92**. # Sources of data {.tabset .tabset-fade} From noreply at r-forge.r-project.org Fri Mar 30 16:50:10 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 30 Mar 2018 16:50:10 +0200 (CEST) Subject: [CHNOSZ-commits] r312 - in pkg/CHNOSZ: . R inst man tests/testthat Message-ID: <20180330145010.AC4B6188AED@r-forge.r-project.org> Author: jedick Date: 2018-03-30 16:50:10 +0200 (Fri, 30 Mar 2018) New Revision: 312 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/equilibrate.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/berman.Rd pkg/CHNOSZ/tests/testthat/test-diagram.R pkg/CHNOSZ/tests/testthat/test-equilibrate.R Log: fix minor typos Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2018-03-28 06:01:10 UTC (rev 311) +++ pkg/CHNOSZ/DESCRIPTION 2018-03-30 14:50:10 UTC (rev 312) @@ -1,6 +1,6 @@ -Date: 2018-03-28 +Date: 2018-03-30 Package: CHNOSZ -Version: 1.1.3-19 +Version: 1.1.3-20 Title: Thermodynamic Calculations for Geobiochemistry Authors at R: c( person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"), Modified: pkg/CHNOSZ/R/equilibrate.R =================================================================== --- pkg/CHNOSZ/R/equilibrate.R 2018-03-28 06:01:10 UTC (rev 311) +++ pkg/CHNOSZ/R/equilibrate.R 2018-03-30 14:50:10 UTC (rev 312) @@ -295,7 +295,7 @@ } # the name of the basis species (need this if we got ibalance which which.balance, above) balance <- colnames(aout$species)[ibalance[1]] - message(paste("balance: from moles of", balance, "in formation reactions")) + message(paste("balance: moles of", balance, "in formation reactions")) # the balance vector n.balance <- aout$species[, ibalance[1]] # we check if that all formation reactions contain this basis species Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2018-03-28 06:01:10 UTC (rev 311) +++ pkg/CHNOSZ/inst/NEWS 2018-03-30 14:50:10 UTC (rev 312) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.1.3-19 (2018-03-28) +CHANGES IN CHNOSZ 1.1.3-20 (2018-03-30) --------------------------------------- THERMODYNAMIC DATA Modified: pkg/CHNOSZ/man/berman.Rd =================================================================== --- pkg/CHNOSZ/man/berman.Rd 2018-03-28 06:01:10 UTC (rev 311) +++ pkg/CHNOSZ/man/berman.Rd 2018-03-30 14:50:10 UTC (rev 312) @@ -33,7 +33,7 @@ The equation used for volume is \I{V}(\P, \T) / \I{V}(1 bar, 298.15 K) = 1 + v1 * (\T - 298.15) + v2 * (\T - 298.15)\S{2} + v3 * (\P - 1) + v4 * (\P - 1)\S{2}. The parameters correspond to Tables 2 (\code{GfPrTr}, \code{HfPrTr}, \code{SPrTr}, \code{VPrTr}), 3a (\code{k0} to \code{k3}), 4 (\code{v1} to \code{v4}), 3b (transition parameters: \code{Tlambda} to \code{dTH}), and 5 (disorder parameters: \code{Tmax}, \code{Tmin}, and \code{d1} to \code{d5}) of Berman (1988). Following the winTWQ data format, multipliers are applied to the volume parameters only (see below). -Note that \code{VPrTr} is tabulated in J mol\S{-1}, which is equal to 10 cm\S{3} mol\S{-1}. +Note that \code{VPrTr} is tabulated in J bar\S{-1} mol\S{-1}, which is equal to 10 cm\S{3} mol\S{-1}. A value for \code{GfPrTr} is optional and is not used in the calculations (see below). Numeric values (possibly 0) should be assigned for all of \code{HfPrTr}, \code{SPrTr}, \code{VPrTr}, \code{k0} to \code{k6} and \code{v1} to \code{v4}. Modified: pkg/CHNOSZ/tests/testthat/test-diagram.R =================================================================== --- pkg/CHNOSZ/tests/testthat/test-diagram.R 2018-03-28 06:01:10 UTC (rev 311) +++ pkg/CHNOSZ/tests/testthat/test-diagram.R 2018-03-30 14:50:10 UTC (rev 312) @@ -5,7 +5,7 @@ basis("CHNOS") species(c("glycine", "alanine")) a <- affinity() - expect_message(diagram(a, plot.it=FALSE), "balance: from moles of CO2 in formation reactions") + expect_message(diagram(a, plot.it=FALSE), "balance: moles of CO2 in formation reactions") e <- equilibrate(a) expect_error(diagram(e, "Z"), "Z is not a valid diagram type") }) @@ -22,7 +22,7 @@ # we can't calculate the equilibrium activity of a basis species if it's externally buffered expect_error(diagram(a, "O2"), "is not numeric - was a buffer selected\\?") # this one works - a barplot of A/2.303RT - expect_message(diagram(a, plot.it=FALSE), "balance: from moles of CO2 in formation reactions") + expect_message(diagram(a, plot.it=FALSE), "balance: moles of CO2 in formation reactions") # if we're plotting A/2.303RT the values can be divided by balancing coefficient or not d.1 <- diagram(a, balance=1, plot.it=FALSE) d.CO2 <- diagram(a, plot.it=FALSE) Modified: pkg/CHNOSZ/tests/testthat/test-equilibrate.R =================================================================== --- pkg/CHNOSZ/tests/testthat/test-equilibrate.R 2018-03-28 06:01:10 UTC (rev 311) +++ pkg/CHNOSZ/tests/testthat/test-equilibrate.R 2018-03-30 14:50:10 UTC (rev 312) @@ -19,7 +19,7 @@ test_that("equilibrate() gives expected messages and errors for balance calculation", { # the following error is triggered by equil.react, not equil.boltzmann expect_error(equilibrate(aone), "at least two species needed") - expect_message(equilibrate(aacid), "balance: from moles of CO2") + expect_message(equilibrate(aacid), "balance: moles of CO2") expect_message(equilibrate(aacid), "n.balance is 2 1 1 2") expect_message(equilibrate(aacid), "loga.balance is -2.221848") expect_message(equilibrate(aacid, loga.balance=-3), "loga.balance is -3") From noreply at r-forge.r-project.org Sat Mar 31 06:45:10 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 31 Mar 2018 06:45:10 +0200 (CEST) Subject: [CHNOSZ-commits] r313 - in pkg/CHNOSZ: . R inst inst/extdata/Berman inst/extdata/Berman/testing man tests/testthat Message-ID: <20180331044510.7F93D1890DE@r-forge.r-project.org> Author: jedick Date: 2018-03-31 06:45:08 +0200 (Sat, 31 Mar 2018) New Revision: 313 Added: pkg/CHNOSZ/inst/extdata/Berman/testing/BA96_berman.csv Removed: pkg/CHNOSZ/inst/extdata/Berman/testing/BA96.csv Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/berman.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv pkg/CHNOSZ/inst/extdata/Berman/DS10.csv pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv pkg/CHNOSZ/man/berman.Rd pkg/CHNOSZ/tests/testthat/test-berman.R Log: reorder volume parameters in extdata/Berman/*.csv, following winTWQ format Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/DESCRIPTION 2018-03-31 04:45:08 UTC (rev 313) @@ -1,6 +1,6 @@ -Date: 2018-03-30 +Date: 2018-03-31 Package: CHNOSZ -Version: 1.1.3-20 +Version: 1.1.3-21 Title: Thermodynamic Calculations for Geobiochemistry Authors at R: c( person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"), Modified: pkg/CHNOSZ/R/berman.R =================================================================== --- pkg/CHNOSZ/R/berman.R 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/R/berman.R 2018-03-31 04:45:08 UTC (rev 313) @@ -52,7 +52,7 @@ # the function works fine with just the following assign() call, # but an explicit dummy assignment here is used to avoid "Undefined global functions or variables" in R CMD check GfPrTr <- HfPrTr <- SPrTr <- Tlambda <- Tmax <- Tmin <- Tref <- VPrTr <- - d0 <- d1 <- d2 <- d3 <- d4 <- d5 <- dTdP <- k0 <- k1 <- k2 <- k3 <- + d0 <- d1 <- d2 <- d3 <- d4 <- Vad <- dTdP <- k0 <- k1 <- k2 <- k3 <- k4 <- k5 <- k6 <- l1 <- l2 <- v1 <- v2 <- v3 <- v4 <- NA # assign values to the variables used below for(i in 1:ncol(dat)) assign(colnames(dat)[i], dat[irow, i]) @@ -75,24 +75,24 @@ Cp <- k0 + k1 * T^-0.5 + k2 * T^-2 + k3 * T^-3 + k4 * T^-1 + k5 * T + k6 * T^2 P_Pr <- P - Pr T_Tr <- T - Tr - V <- VPrTr * (1 + v1 * P_Pr + v2 * P_Pr^2 + v3 * T_Tr + v4 * T_Tr^2) + V <- VPrTr * (1 + v1 * T_Tr + v2 * T_Tr^2 + v3 * P_Pr + v4 * P_Pr^2) ## calculate Ga (Ber88 Eq. 6) (superseded 20180328 as it does not include k4, k5, k6) #Ga <- HfPrTr - T * SPrTr + k0 * ( (T - Tr) - T * (log(T) - log(Tr)) ) + # 2 * k1 * ( (T^0.5 - Tr^0.5) + T*(T^-0.5 - Tr^-0.5) ) - # k2 * ( (T^-1 - Tr^-1) - T / 2 * (T^-2 - Tr^-2) ) - # k3 * ( (T^-2 - Tr^-2) / 2 - T / 3 * (T^-3 - Tr^-3) ) + - # VPrTr * ( (v1 / 2 - v2) * (P^2 - Pr^2) + v2 / 3 * (P^3 - Pr^3) + - # (1 - v1 + v2 + v3 * (T - Tr) + v4 * (T - Tr)^2) * (P - Pr) ) + # VPrTr * ( (v3 / 2 - v4) * (P^2 - Pr^2) + v4 / 3 * (P^3 - Pr^3) + + # (1 - v3 + v4 + v1 * (T - Tr) + v2 * (T - Tr)^2) * (P - Pr) ) # calculate Ha (symbolically integrated using sympy - expressions not simplified) intCp <- T*k0 - Tr*k0 + k2/Tr - k2/T + k3/(2*Tr^2) - k3/(2*T^2) + 2.0*k1*T^0.5 - 2.0*k1*Tr^0.5 + k4*log(T) - k4*log(Tr) + k5*T^2/2 - k5*Tr^2/2 - k6*Tr^3/3 + k6*T^3/3 - intVminusTdVdT <- -VPrTr + P*(VPrTr + VPrTr*v2 - VPrTr*v1 - Tr*VPrTr*v3 + VPrTr*v4*Tr^2 - VPrTr*v4*T^2) + - P^2*(VPrTr*v1/2 - VPrTr*v2) + VPrTr*v1/2 - VPrTr*v2/3 + Tr*VPrTr*v3 + VPrTr*v4*T^2 - VPrTr*v4*Tr^2 + VPrTr*v2*P^3/3 + intVminusTdVdT <- -VPrTr + P*(VPrTr + VPrTr*v4 - VPrTr*v3 - Tr*VPrTr*v1 + VPrTr*v2*Tr^2 - VPrTr*v2*T^2) + + P^2*(VPrTr*v3/2 - VPrTr*v4) + VPrTr*v3/2 - VPrTr*v4/3 + Tr*VPrTr*v1 + VPrTr*v2*T^2 - VPrTr*v2*Tr^2 + VPrTr*v4*P^3/3 Ha <- HfPrTr + intCp + intVminusTdVdT # calculate S (also symbolically integrated) intCpoverT <- k0*log(T) - k0*log(Tr) - k3/(3*T^3) + k3/(3*Tr^3) + k2/(2*Tr^2) - k2/(2*T^2) + 2.0*k1*Tr^-0.5 - 2.0*k1*T^-0.5 + k4/Tr - k4/T + T*k5 - Tr*k5 + k6*T**2/2 - k6*Tr**2/2 - intdVdT <- -VPrTr*(v3 + v4*(-2*Tr + 2*T)) + P*VPrTr*(v3 + v4*(-2*Tr + 2*T)) + intdVdT <- -VPrTr*(v1 + v2*(-2*Tr + 2*T)) + P*VPrTr*(v1 + v2*(-2*Tr + 2*T)) S <- SPrTr + intCpoverT - intdVdT # calculate Ga --> Berman-Brown convention (DG = DH - T*S, no S(element)) Ga <- Ha - T * S @@ -152,9 +152,11 @@ d2*(Tds^-1 - Tmin^-1)/-1 + d3*(Tds^2 - Tmin^2)/2 + d4*(Tds^3 - Tmin^3)/3 Sds[iTds] <- d0*(log(Tds) - log(Tmin)) + d1*(Tds^-0.5 - Tmin^-0.5)/-0.5 + d2*(Tds^-2 - Tmin^-2)/-2 + d3*(Tds - Tmin) + d4*(Tds^2 - Tmin^2)/2 - # Eq. 18; we can't do this if d5 == 0 (dolomite and gehlenite) # "d5 is a constant computed in such as way as to scale the disordring enthalpy to the volume of disorder" (Berman, 1988) - if(d5 != 0) Vds <- Hds / d5 + # 20180331: however, having a "d5" that isn't a coefficient in the same equation as d0, d1, d2, d3, d4 is confusing notation + # therefore, CHNOSZ now uses "Vad" for this variable, following the notation in the Theriak-Domino manual + # Eq. 18; we can't do this if Vad == 0 (dolomite and gehlenite) + if(Vad != 0) Vds <- Hds / Vad # Berman puts the Vds term directly into Eq. 19 (commented below), but that necessarily makes Gds != Hds - T * Sds #Gds <- Hds - T * Sds + Vds * (P - Pr) # instead, we include the Vds term with Hds Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/inst/NEWS 2018-03-31 04:45:08 UTC (rev 313) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.1.3-20 (2018-03-30) +CHANGES IN CHNOSZ 1.1.3-21 (2018-03-31) --------------------------------------- THERMODYNAMIC DATA @@ -34,11 +34,15 @@ thermo$opt$Berman. - Add mineral data from Berman and Aranovich, 1996 to - extdata/Berman/testing/BA96.csv and an example of using this file via - thermo$opt$Berman (see ?berman). + extdata/Berman/testing and an example of loading these data via + add.obigt() and thermo$opt$Berman (see ?berman). - Correct swapped v1 <-> v3 and v2 <-> v4 in extdata/Berman/DS10.csv. +- To reduce confusion that "d5" might be a coefficient in the same + equation as d0 .. d4, rename "d5" (constant that scales disordering + enthalpy to volume) to "Vad" (notation used in Theriak-Domino manual). + OTHER CHANGES - Lines in 1-D diagram()s can optionally be drawn as splines using the Modified: pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/inst/extdata/Berman/BDat17.csv 2018-03-31 04:45:08 UTC (rev 313) @@ -1,2 +1,2 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,0,0,0,-0.1485,4E-07,2.72,0.8,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,Vad +antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,0,0,0,2.72,0.0008,-0.1485,0.0004,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/inst/extdata/Berman/Ber88.csv 2018-03-31 04:45:08 UTC (rev 313) @@ -1,68 +1,68 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -akermanite,-3663786,-3860441,212,9.252,387.06,-2938.8,0,-40790000,0,0,0,-0.0785,0,2.5011,0.67224,358,298,0,0,0,452,,,,,,,, -albite,-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -"albite,high",-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -"albite,low",-3711715,-3935100,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -almandine,-4941728,-5265502,339.927,11.511,573.96,-1483.1,-29292000,5022080000,0,0,0,-0.0558,3.21E-08,1.8613,0.74539,,,,,,,,,,,,,, -andalusite,-2441806,-2589972,91.434,5.147,236.48,-1102.9,-7526800,936440000,0,0,0,-0.077,1.923E-07,2.3443,0.07189,,,,,,,,,,,,,, -anorthite,-4003221,-4228730,200.186,10.075,439.37,-3734.1,0,-317020000,0,0,0,-0.1272,3.176E-07,1.0918,0.41985,,,,,,,,,,,,,, -anthophyllite,-11342582,-12069032,535.195,26.56,1219.31,-5766.5,-34766100,4400900000,0,0,0,-0.1259,0,2.706,0.31325,,,,,,,,,,,,,, -antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,0,0,0,-0.1978,4.944E-07,2.4965,0.39444,,,,,,,,,,,,,, -brucite,-834868,-925937,63.064,2.468,136.84,-537.1,-4361900,552690000,0,0,0,-0.2023,6.726E-07,3.2854,0.1094,,,,,,,,,,,,,, -Ca-Al-pyroxene,-3122310,-3298767,140.751,6.356,310.7,-1671.6,-7455300,948780000,0,0,0,-0.087,2.171E-07,2.225,0.52863,,,,,,,,,,,,,, -calcite,-1128295,-1206819,91.725,3.69,178.19,-1657.7,-482700,166600000,0,0,0,-0.14,0,0.8907,2.27402,,,,,,,,,,,,,, -chrysotile,-4035373,-4363356,220.134,10.72,610.02,-5581.2,-1857300,195470000,0,0,0,-0.181,4.524E-07,2.7151,0.67351,,,,,,,,,,,,,, -clinochlore,-8250546,-8909590,435.154,21.147,1214.28,-11217.1,0,-1256250000,0,0,0,-0.1819,0,2.6452,0,,,,,,,,,,,,,, -coesite,-852585,-907604,39.424,2.064,94.907,-767.3,-527900,26270000,0,0,0,-0.1037,3E-07,0.7396,0.43605,,,,,,,,,,,,,, -cordierite,-8651517,-9158727,417.97,23.311,954.39,-7962.3,-2317300,-370210000,0,0,0,-0.1158,0,0.3003,0.18017,,,,,,,,,,,,,, -corundum,-1582199,-1675700,50.82,2.558,155.02,-828.4,-3861400,409080000,0,0,0,-0.0385,3.75E-08,2.1342,0.4718,,,,,,,,,,,,,, -"cristobalite,alpha",-853918,-907753,43.394,2.587,83.51,-374.7,-2455400,280070000,0,0,0,-0.2515,0,2.0824,0,535,298,0.048,-0.14216,0.00044142,0,,,,,,,, -"cristobalite,beta",-853327,-906377,46.029,2.73,83.51,-374.7,-2455400,280070000,0,0,0,-0.11,5.535E-07,0.3189,0,,,,,,,,,,,,,, -diaspore,-920806,-999378,35.308,1.776,143.24,-1540.4,-323100,64630000,0,0,0,-0.0599,0,2.9718,0,,,,,,,,,,,,,, -diopside,-3026202,-3200583,142.5,6.62,305.41,-1604.9,-7166000,921840000,0,0,0,-0.0872,1.707E-07,2.7795,0.83082,,,,,,,,,,,,,, -dolomite,-2162354,-2325248,154.89,6.432,328.48,-2554.4,-4688500,790380000,0,0,0,-0.107,0,1.423,3.63778,,,,,,,1423,298,-9.42,0,385000,0.01732,5.02E-06,0 -"enstatite,clino",-1458601,-1545926,66.325,3.131,139.96,-497,-4400200,535710000,0,0,0,-0.075,4.48E-08,2.1915,0.7492,,,,,,,,,,,,,, -enstatite,-1458181,-1545552,66.17,3.133,166.58,-1200.6,-2270600,279150000,0,0,0,-0.0749,4.47E-08,2.4656,0.7467,,,,,,,,,,,,,, -"enstatite,proto",-1456965,-1543959,67.438,3.242,166.58,-1200.6,-2270600,279150000,0,0,0,-0.075,4.48E-08,1.6832,1.1665,,,,,,,,,,,,,, -fayalite,-1380154,-1479360,150.93,4.63,248.93,-1923.9,0,-139100000,0,0,0,-0.073,0,2.6546,0.79482,,,,,,,,,,,,,, -ferrosilite,-1117472,-1194375,95.882,3.296,169.06,-1193,-2097100,292530000,0,0,0,-0.099,0,3.1808,0.7585,,,,,,,,,,,,,, -forsterite,-2055023,-2174420,94.01,4.366,238.64,-2001.3,0,-116240000,0,0,0,-0.0791,1.351E-07,2.9464,0.88633,,,,,,,,,,,,,, -gehlenite,-3785954,-3988158,198.6,9.033,373.09,-2276.8,-4778500,477910000,0,0,0,-0.0996,2.488E-07,2.4926,0.05664,,,,,,,1600,698,-221.74,0,17291000,0.3695,-0.0001469,0 -grossular,-6270974,-6632859,255.15,12.538,573.43,-2039.4,-18887200,2319310000,0,0,0,-0.0654,1.635E-07,1.8994,0.79756,,,,,,,,,,,,,, -hematite,-743681,-825627,87.437,3.027,146.86,0,-5576800,525630000,0,0,0,-0.0479,3.04E-08,3.831,0.0165,955,298,0,-0.07403,0.00027921,1287,,,,,,,, -ilmenite,-1155320,-1231947,108.628,3.17,150,-441.6,-3323700,348150000,0,0,0,-0.0584,1.23E-07,2.7248,0.29968,,,,,,,,,,,,,, -jadeite,-2846482,-3025118,133.574,6.034,311.29,-2005.1,-5350300,662570000,0,0,0,-0.086,2.149E-07,2.3118,0.25785,,,,,,,,,,,,,, -kaolinite,-3799770,-4120327,203.7,9.952,523.23,-4426.7,-2244300,92310000,0,0,0,-0.12,0,3.2,0,,,,,,,,,,,,,, -kyanite,-2443370,-2594220,82.43,4.412,262.68,-2001.4,-1999700,-63180000,0,0,0,-0.0646,0,2.3973,0,,,,,,,,,,,,,, -lawsonite,-4509709,-4865666,229.176,10.144,728.67,-8248.1,0,850560000,0,0,0,-0.0769,1.922E-07,2.6283,0,,,,,,,,,,,,,, -lime,-603350,-635090,37.75,1.676,58.79,-133.9,-1147100,102980000,0,0,0,-0.1022,2.565E-07,3.461,0.67406,,,,,,,,,,,,,, -magnesite,-1029875,-1113636,65.21,2.803,162.3,-1109.3,-4882600,874660000,0,0,0,-0.089,2.212E-07,1.8436,4.15968,,,,,,,,,,,,,, -magnetite,-1014235,-1117403,146.114,4.452,207.93,0,-7243300,664360000,0,0,0,-0.0582,1.751E-07,3.0291,1.3847,848,298,0,-0.19502,0.00061037,1565,,,,,,,, -margarite,-5852244,-6236603,265.084,12.958,699.8,-5587.1,-6807700,734320000,0,0,0,-0.1155,2.886E-07,2.1019,1.24556,,,,,,,,,,,,,, -meionite,-13105915,-13849723,730,34.036,1511.35,-13243.3,0,-751610000,0,0,0,-0.111,0,0.934,0,,,,,,,,,,,,,, -merwinite,-4309707,-4537497,251.777,9.847,453.62,-3250,0,-344230000,0,0,0,-0.0551,1.381E-07,2.9376,0.87235,,,,,,,,,,,,,, -monticellite,-2132222,-2250027,108.3,5.148,226.34,-1542.7,-1179700,-23290000,0,0,0,-0.0904,2E-07,2.7863,0.76339,,,,,,,,,,,,,, -muscovite,-5596723,-5976740,293.157,14.087,651.49,-3873.2,-18523200,2742470000,0,0,0,-0.1717,4.295E-07,3.3527,0,,,,,,,,,,,,,, -paragonite,-5563572,-5944208,277.699,13.216,577.57,-1472.8,-32214400,5050080000,0,0,0,-0.1973,4.933E-07,3.9424,0.59701,,,,,,,,,,,,,, -periclase,-569209,-601500,26.951,1.125,61.11,-296.2,-621200,5840000,0,0,0,-0.0622,1.511E-07,3.7477,0.03556,,,,,,,,,,,,,, -phlogopite,-5827224,-6207342,334.158,14.977,610.38,-2083.8,-21533000,2841040000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, -K-feldspar,-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 -"K-feldspar,high",-3738804,-3959704,229.157,10.896,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, -"K-feldspar,low",-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, -prehnite,-5820154,-6198606,288.634,14.016,716.05,-6404.6,-2182500,268500000,0,0,0,-0.1427,0,0.1468,11.28353,,,,,,,,,,,,,, -pyrope,-5936009,-6286548,266.359,11.316,640.72,-4542.1,-4701900,0,0,0,0,-0.0576,4.42E-08,2.2519,0.37044,,,,,,,,,,,,,, -pyrophyllite,-5266865,-5640781,239.4,12.76,665.93,-5897.4,-4979900,661810000,0,0,0,-0.1354,0,1.2637,3.81661,,,,,,,,,,,,,, -quartz,-856288,-910700,41.46,2.269,80.01,-240.3,-3546700,491570000,0,0,0,-0.2434,1.0137E-06,2.3895,0,848,373,0.0237,-0.09187,0.00024607,0,,,,,,,, -"quartz,beta",-855033,-908627,44.207,2.37,80.01,-240.3,-3546700,491570000,0,0,0,-0.1238,7.087E-07,0,0,,,,,,,,,,,,,, -rutile,-889497,-944750,50.46,1.882,77.84,0,-3367800,402940000,0,0,0,-0.0454,5.84E-08,2.5716,0.15409,,,,,,,,,,,,,, -sillimanite,-2439265,-2586091,95.93,4.983,256.73,-1887.2,-2977400,250960000,0,0,0,-0.0753,0,1.3431,0,,,,,,,,,,,,,, -sphene,-2455134,-2596652,129.29,5.565,234.62,-1040.3,-5118300,591460000,0,0,0,-0.059,0,2.52,0,,,,,,,,,,,,,, -spinel,-2176537,-2300313,84.535,3.977,235.9,-1766.6,-1710400,40620000,0,0,0,-0.0489,0,2.1691,0.50528,,,,,,,,,,,,,, -talc,-5517657,-5897387,261.24,13.61,664.11,-5187.2,-2147200,-327370000,0,0,0,-0.1699,5.665E-07,2.9447,0,,,,,,,,,,,,,, -tremolite,-11578548,-12305578,551.15,27.268,1229.36,-6401.9,-32089900,4208810000,0,0,0,-0.1392,3.481E-07,2.4374,0.98338,,,,,,,,,,,,,, -"tridymite,low",-854026,-907750,43.77,2.675,75.37,0,-5958100,958250000,0,0,0,-0.2508,0,1.9339,0,383,298,0,0.4267,-0.00144575,130,,,,,,,, -"tridymite,high",-853844,-907045,45.524,2.737,75.37,0,-5958100,958250000,0,0,0,-0.074,3.735E-07,0.4829,0,,,,,,,,,,,,,, -wollastonite,-1546123,-1631500,81.81,3.983,149.07,-690.3,-3659300,484350000,0,0,0,-0.1245,3.113E-07,2.818,0,,,,,,,,,,,,,, -pseudowollastonite,-1543085,-1627427,85.279,4.016,141.16,-417.2,-5857600,940740000,0,0,0,-0.1245,3.113E-07,2.818,0,,,,,,,,,,,,,, -zoisite,-6494148,-6889488,297.576,13.588,749.17,-6509.3,-2380500,124860000,0,0,0,-0.0515,1.288E-07,3.467,0,,,,,,,,,,,,,, -clinozoisite,-6496497,-6894968,287.076,13.673,749.17,-6509.3,-2380500,124860000,0,0,0,-0.0515,1.288E-07,3.467,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,Vad +akermanite,-3663786,-3860441,212,9.252,387.06,-2938.8,0,-40790000,0,0,0,2.5011,0.00067224,-0.0785,0,358,298,0,0,0,452,,,,,,,, +albite,-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, +"albite,high",-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, +"albite,low",-3711715,-3935100,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, +almandine,-4941728,-5265502,339.927,11.511,573.96,-1483.1,-29292000,5022080000,0,0,0,1.8613,0.00074539,-0.0558,3.21E-05,,,,,,,,,,,,,, +andalusite,-2441806,-2589972,91.434,5.147,236.48,-1102.9,-7526800,936440000,0,0,0,2.3443,7.189E-05,-0.077,0.0001923,,,,,,,,,,,,,, +anorthite,-4003221,-4228730,200.186,10.075,439.37,-3734.1,0,-317020000,0,0,0,1.0918,0.00041985,-0.1272,0.0003176,,,,,,,,,,,,,, +anthophyllite,-11342582,-12069032,535.195,26.56,1219.31,-5766.5,-34766100,4400900000,0,0,0,2.706,0.00031325,-0.1259,0,,,,,,,,,,,,,, +antigorite,-66076529,-71364156,3602.996,174.246,7394.51,0,-548363000,87284120000,0,0,0,2.4965,0.00039444,-0.1978,0.0004944,,,,,,,,,,,,,, +brucite,-834868,-925937,63.064,2.468,136.84,-537.1,-4361900,552690000,0,0,0,3.2854,0.0001094,-0.2023,0.0006726,,,,,,,,,,,,,, +Ca-Al-pyroxene,-3122310,-3298767,140.751,6.356,310.7,-1671.6,-7455300,948780000,0,0,0,2.225,0.00052863,-0.087,0.0002171,,,,,,,,,,,,,, +calcite,-1128295,-1206819,91.725,3.69,178.19,-1657.7,-482700,166600000,0,0,0,0.8907,0.00227402,-0.14,0,,,,,,,,,,,,,, +chrysotile,-4035373,-4363356,220.134,10.72,610.02,-5581.2,-1857300,195470000,0,0,0,2.7151,0.00067351,-0.181,0.0004524,,,,,,,,,,,,,, +clinochlore,-8250546,-8909590,435.154,21.147,1214.28,-11217.1,0,-1256250000,0,0,0,2.6452,0,-0.1819,0,,,,,,,,,,,,,, +coesite,-852585,-907604,39.424,2.064,94.907,-767.3,-527900,26270000,0,0,0,0.7396,0.00043605,-0.1037,0.0003,,,,,,,,,,,,,, +cordierite,-8651517,-9158727,417.97,23.311,954.39,-7962.3,-2317300,-370210000,0,0,0,0.3003,0.00018017,-0.1158,0,,,,,,,,,,,,,, +corundum,-1582199,-1675700,50.82,2.558,155.02,-828.4,-3861400,409080000,0,0,0,2.1342,0.0004718,-0.0385,3.75E-05,,,,,,,,,,,,,, +"cristobalite,alpha",-853918,-907753,43.394,2.587,83.51,-374.7,-2455400,280070000,0,0,0,2.0824,0,-0.2515,0,535,298,0.048,-0.14216,0.00044142,0,,,,,,,, +"cristobalite,beta",-853327,-906377,46.029,2.73,83.51,-374.7,-2455400,280070000,0,0,0,0.3189,0,-0.11,0.0005535,,,,,,,,,,,,,, +diaspore,-920806,-999378,35.308,1.776,143.24,-1540.4,-323100,64630000,0,0,0,2.9718,0,-0.0599,0,,,,,,,,,,,,,, +diopside,-3026202,-3200583,142.5,6.62,305.41,-1604.9,-7166000,921840000,0,0,0,2.7795,0.00083082,-0.0872,0.0001707,,,,,,,,,,,,,, +dolomite,-2162354,-2325248,154.89,6.432,328.48,-2554.4,-4688500,790380000,0,0,0,1.423,0.00363778,-0.107,0,,,,,,,1423,298,-9.42,0,385000,0.01732,5.02E-06,0 +"enstatite,clino",-1458601,-1545926,66.325,3.131,139.96,-497,-4400200,535710000,0,0,0,2.1915,0.0007492,-0.075,4.48E-05,,,,,,,,,,,,,, +enstatite,-1458181,-1545552,66.17,3.133,166.58,-1200.6,-2270600,279150000,0,0,0,2.4656,0.0007467,-0.0749,4.47E-05,,,,,,,,,,,,,, +"enstatite,proto",-1456965,-1543959,67.438,3.242,166.58,-1200.6,-2270600,279150000,0,0,0,1.6832,0.0011665,-0.075,4.48E-05,,,,,,,,,,,,,, +fayalite,-1380154,-1479360,150.93,4.63,248.93,-1923.9,0,-139100000,0,0,0,2.6546,0.00079482,-0.073,0,,,,,,,,,,,,,, +ferrosilite,-1117472,-1194375,95.882,3.296,169.06,-1193,-2097100,292530000,0,0,0,3.1808,0.0007585,-0.099,0,,,,,,,,,,,,,, +forsterite,-2055023,-2174420,94.01,4.366,238.64,-2001.3,0,-116240000,0,0,0,2.9464,0.00088633,-0.0791,0.0001351,,,,,,,,,,,,,, +gehlenite,-3785954,-3988158,198.6,9.033,373.09,-2276.8,-4778500,477910000,0,0,0,2.4926,5.664E-05,-0.0996,0.0002488,,,,,,,1600,698,-221.74,0,17291000,0.3695,-0.0001469,0 +grossular,-6270974,-6632859,255.15,12.538,573.43,-2039.4,-18887200,2319310000,0,0,0,1.8994,0.00079756,-0.0654,0.0001635,,,,,,,,,,,,,, +hematite,-743681,-825627,87.437,3.027,146.86,0,-5576800,525630000,0,0,0,3.831,1.65E-05,-0.0479,3.04E-05,955,298,0,-0.07403,0.00027921,1287,,,,,,,, +ilmenite,-1155320,-1231947,108.628,3.17,150,-441.6,-3323700,348150000,0,0,0,2.7248,0.00029968,-0.0584,0.000123,,,,,,,,,,,,,, +jadeite,-2846482,-3025118,133.574,6.034,311.29,-2005.1,-5350300,662570000,0,0,0,2.3118,0.00025785,-0.086,0.0002149,,,,,,,,,,,,,, +kaolinite,-3799770,-4120327,203.7,9.952,523.23,-4426.7,-2244300,92310000,0,0,0,3.2,0,-0.12,0,,,,,,,,,,,,,, +kyanite,-2443370,-2594220,82.43,4.412,262.68,-2001.4,-1999700,-63180000,0,0,0,2.3973,0,-0.0646,0,,,,,,,,,,,,,, +lawsonite,-4509709,-4865666,229.176,10.144,728.67,-8248.1,0,850560000,0,0,0,2.6283,0,-0.0769,0.0001922,,,,,,,,,,,,,, +lime,-603350,-635090,37.75,1.676,58.79,-133.9,-1147100,102980000,0,0,0,3.461,0.00067406,-0.1022,0.0002565,,,,,,,,,,,,,, +magnesite,-1029875,-1113636,65.21,2.803,162.3,-1109.3,-4882600,874660000,0,0,0,1.8436,0.00415968,-0.089,0.0002212,,,,,,,,,,,,,, +magnetite,-1014235,-1117403,146.114,4.452,207.93,0,-7243300,664360000,0,0,0,3.0291,0.0013847,-0.0582,0.0001751,848,298,0,-0.19502,0.00061037,1565,,,,,,,, +margarite,-5852244,-6236603,265.084,12.958,699.8,-5587.1,-6807700,734320000,0,0,0,2.1019,0.00124556,-0.1155,0.0002886,,,,,,,,,,,,,, +meionite,-13105915,-13849723,730,34.036,1511.35,-13243.3,0,-751610000,0,0,0,0.934,0,-0.111,0,,,,,,,,,,,,,, +merwinite,-4309707,-4537497,251.777,9.847,453.62,-3250,0,-344230000,0,0,0,2.9376,0.00087235,-0.0551,0.0001381,,,,,,,,,,,,,, +monticellite,-2132222,-2250027,108.3,5.148,226.34,-1542.7,-1179700,-23290000,0,0,0,2.7863,0.00076339,-0.0904,0.0002,,,,,,,,,,,,,, +muscovite,-5596723,-5976740,293.157,14.087,651.49,-3873.2,-18523200,2742470000,0,0,0,3.3527,0,-0.1717,0.0004295,,,,,,,,,,,,,, +paragonite,-5563572,-5944208,277.699,13.216,577.57,-1472.8,-32214400,5050080000,0,0,0,3.9424,0.00059701,-0.1973,0.0004933,,,,,,,,,,,,,, +periclase,-569209,-601500,26.951,1.125,61.11,-296.2,-621200,5840000,0,0,0,3.7477,3.556E-05,-0.0622,0.0001511,,,,,,,,,,,,,, +phlogopite,-5827224,-6207342,334.158,14.977,610.38,-2083.8,-21533000,2841040000,0,0,0,3.4447,0,-0.1697,0,,,,,,,,,,,,,, +K-feldspar,-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,1.5145,0.0005485,-0.1805,0.0005112,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 +"K-feldspar,high",-3738804,-3959704,229.157,10.896,381.37,-1941,-12037300,1836430000,0,0,0,1.5145,0.0005485,-0.1805,0.0005112,,,,,,,,,,,,,, +"K-feldspar,low",-3745415,-3970791,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,1.5145,0.0005485,-0.1805,0.0005112,,,,,,,,,,,,,, +prehnite,-5820154,-6198606,288.634,14.016,716.05,-6404.6,-2182500,268500000,0,0,0,0.1468,0.01128353,-0.1427,0,,,,,,,,,,,,,, +pyrope,-5936009,-6286548,266.359,11.316,640.72,-4542.1,-4701900,0,0,0,0,2.2519,0.00037044,-0.0576,4.42E-05,,,,,,,,,,,,,, +pyrophyllite,-5266865,-5640781,239.4,12.76,665.93,-5897.4,-4979900,661810000,0,0,0,1.2637,0.00381661,-0.1354,0,,,,,,,,,,,,,, +quartz,-856288,-910700,41.46,2.269,80.01,-240.3,-3546700,491570000,0,0,0,2.3895,0,-0.2434,0.0010137,848,373,0.0237,-0.09187,0.00024607,0,,,,,,,, +"quartz,beta",-855033,-908627,44.207,2.37,80.01,-240.3,-3546700,491570000,0,0,0,0,0,-0.1238,0.0007087,,,,,,,,,,,,,, +rutile,-889497,-944750,50.46,1.882,77.84,0,-3367800,402940000,0,0,0,2.5716,0.00015409,-0.0454,5.84E-05,,,,,,,,,,,,,, +sillimanite,-2439265,-2586091,95.93,4.983,256.73,-1887.2,-2977400,250960000,0,0,0,1.3431,0,-0.0753,0,,,,,,,,,,,,,, +sphene,-2455134,-2596652,129.29,5.565,234.62,-1040.3,-5118300,591460000,0,0,0,2.52,0,-0.059,0,,,,,,,,,,,,,, +spinel,-2176537,-2300313,84.535,3.977,235.9,-1766.6,-1710400,40620000,0,0,0,2.1691,0.00050528,-0.0489,0,,,,,,,,,,,,,, +talc,-5517657,-5897387,261.24,13.61,664.11,-5187.2,-2147200,-327370000,0,0,0,2.9447,0,-0.1699,0.0005665,,,,,,,,,,,,,, +tremolite,-11578548,-12305578,551.15,27.268,1229.36,-6401.9,-32089900,4208810000,0,0,0,2.4374,0.00098338,-0.1392,0.0003481,,,,,,,,,,,,,, +"tridymite,low",-854026,-907750,43.77,2.675,75.37,0,-5958100,958250000,0,0,0,1.9339,0,-0.2508,0,383,298,0,0.4267,-0.00144575,130,,,,,,,, +"tridymite,high",-853844,-907045,45.524,2.737,75.37,0,-5958100,958250000,0,0,0,0.4829,0,-0.074,0.0003735,,,,,,,,,,,,,, +wollastonite,-1546123,-1631500,81.81,3.983,149.07,-690.3,-3659300,484350000,0,0,0,2.818,0,-0.1245,0.0003113,,,,,,,,,,,,,, +pseudowollastonite,-1543085,-1627427,85.279,4.016,141.16,-417.2,-5857600,940740000,0,0,0,2.818,0,-0.1245,0.0003113,,,,,,,,,,,,,, +zoisite,-6494148,-6889488,297.576,13.588,749.17,-6509.3,-2380500,124860000,0,0,0,3.467,0,-0.0515,0.0001288,,,,,,,,,,,,,, +clinozoisite,-6496497,-6894968,287.076,13.673,749.17,-6509.3,-2380500,124860000,0,0,0,3.467,0,-0.0515,0.0001288,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/inst/extdata/Berman/Ber90.csv 2018-03-31 04:45:08 UTC (rev 313) @@ -1,5 +1,5 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -almandine,-4943492,-5267216,340.007,11.511,573.96,-1483.1,-29292000,5022080000,0,0,0,-0.0558,3.21E-08,1.8613,0.74539,,,,,,,,,,,,,, -annite,-4793115,-5142800,420,15.408,727.21,-4775.04,-13831900,2119060000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, -ilmenite,-1155794,-1232448,108.628,3.17,150,-441.6,-3323700,348150000,0,0,0,-0.0584,1.23E-07,2.7248,0.29968,,,,,,,,,,,,,, -phlogopite,-5830350,-6210391,334.346,14.977,610.38,-2083.8,-21533000,2841040000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,Vad +almandine,-4943492,-5267216,340.007,11.511,573.96,-1483.1,-29292000,5022080000,0,0,0,1.8613,0.00074539,-0.0558,3.21E-05,,,,,,,,,,,,,, +annite,-4793115,-5142800,420,15.408,727.21,-4775.04,-13831900,2119060000,0,0,0,3.4447,0,-0.1697,0,,,,,,,,,,,,,, +ilmenite,-1155794,-1232448,108.628,3.17,150,-441.6,-3323700,348150000,0,0,0,2.7248,0.00029968,-0.0584,0.000123,,,,,,,,,,,,,, +phlogopite,-5830350,-6210391,334.346,14.977,610.38,-2083.8,-21533000,2841040000,0,0,0,3.4447,0,-0.1697,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/DS10.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/DS10.csv 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/inst/extdata/Berman/DS10.csv 2018-03-31 04:45:08 UTC (rev 313) @@ -1,6 +1,6 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -hedenbergite,-2674300,-2837802.5,173.59,6.785,353.31148,-3106.646,2047911.742,-563018581,0,0,0,-0.17457,1.51E-06,2.796487,0,,,,,,,,,,,,,, -andradite,-5419000,-5761985.8,316.4,13.167,569.7558,-1441.44,-22441040.802,3146543781,0,0,0,-0.06539136,1.635E-07,2.072525,0.561,,,,,,,,,,,,,, -ferro-actinolite,-9839000,-10518042.6,685.1,28.26,1321.15758,-8966.454,-21705844.286,3236159154,0,0,0,-0.15,0,2.84,0,,,,,,,,,,,,,, -grunerite,-8964807,-9623000,725,27.8,1347.83,-9356.91,-20228480,3039190000,0,0,0,-0.15,0,2.84,0,,,,,,,,,,,,,, -ilvaite,-3440000,-3695605.5,291.5,10.016,682.79138,-8787.112,30183568.71,-5666432624,0,0,0,-0.06838,2.4E-08,1.801543,1.152,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,Vad +hedenbergite,-2674300,-2837802.5,173.59,6.785,353.31148,-3106.646,2047911.742,-563018581,0,0,0,2.796487,0,-0.17457,0.00151,,,,,,,,,,,,,, +andradite,-5419000,-5761985.8,316.4,13.167,569.7558,-1441.44,-22441040.802,3146543781,0,0,0,2.072525,0.000561,-0.06539136,0.0001635,,,,,,,,,,,,,, +ferro-actinolite,-9839000,-10518042.6,685.1,28.26,1321.15758,-8966.454,-21705844.286,3236159154,0,0,0,2.84,0,-0.15,0,,,,,,,,,,,,,, +grunerite,-8964807,-9623000,725,27.8,1347.83,-9356.91,-20228480,3039190000,0,0,0,2.84,0,-0.15,0,,,,,,,,,,,,,, +ilvaite,-3440000,-3695605.5,291.5,10.016,682.79138,-8787.112,30183568.71,-5666432624,0,0,0,1.801543,0.001152,-0.06838,2.4E-05,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/inst/extdata/Berman/FDM+14.csv 2018-03-31 04:45:08 UTC (rev 313) @@ -1,2 +1,2 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -aragonite,-1128353.67,-1207213.7,88.7,3.42,195,-2100,-10000,220000000,0,0,0,-0.1345,1.7E-07,4.18,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,Vad +aragonite,-1128353.67,-1207213.7,88.7,3.42,195,-2100,-10000,220000000,0,0,0,4.18,0,-0.1345,0.00017,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/inst/extdata/Berman/JUN92.csv 2018-03-31 04:45:08 UTC (rev 313) @@ -1,3 +1,3 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -glaucophane,-11225858,-11960500,535,26.05,1717.5,-19272,7050000,0,0,0,0,-0.116,2.9E-07,2.2,0.88,,,,,,,,,,,,,, -pumpellyite,-13448936,-14402300,584,29.55,1576,-10603.8,-28304200,3838351000,0,0,0,-0.051516,1.288E-07,3.467,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,Vad +glaucophane,-11225858,-11960500,535,26.05,1717.5,-19272,7050000,0,0,0,0,2.2,0.00088,-0.116,0.00029,,,,,,,,,,,,,, +pumpellyite,-13448936,-14402300,584,29.55,1576,-10603.8,-28304200,3838351000,0,0,0,3.467,0,-0.051516,0.0001288,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv 2018-03-30 14:50:10 UTC (rev 312) +++ pkg/CHNOSZ/inst/extdata/Berman/SHD91.csv 2018-03-31 04:45:08 UTC (rev 313) @@ -1,12 +1,12 @@ -name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,d5 -muscovite,-5603417,-5983434,293.157,14.087,651.49,-3873.2,-18523200,2742470000,0,0,0,-0.1717,4.295E-07,3.3527,0,,,,,,,,,,,,,, -phlogopite,-5837044,-6217085,334.346,14.977,610.38,-2083.8,-21533000,2841040000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, -K-feldspar,-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 -"K-feldspar,high",-3745498,-3966398,229.157,10.896,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, -"K-feldspar,low",-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,-0.1805,5.112E-07,1.5145,0.5485,,,,,,,,,,,,,, -paragonite,-5570375,-5951011,277.699,13.216,577.57,-1472.8,-32214400,5050080000,0,0,0,-0.1973,4.933E-07,3.9424,0.59701,,,,,,,,,,,,,, -albite,-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -"albite,high",-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -"albite,low",-3718518,-3941903,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,-0.1945,4.861E-07,2.6307,0.32407,,,,,,,,,,,,,, -jadeite,-2853285,-3031921,133.574,6.034,311.29,-2005.1,-5350300,662570000,0,0,0,-0.086,2.149E-07,2.3118,0.25785,,,,,,,,,,,,,, -annite,-4799809,-5149494,420,15.408,727.21,-4775.04,-13831900,2119060000,0,0,0,-0.1697,0,3.4447,0,,,,,,,,,,,,,, +name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,Vad +muscovite,-5603417,-5983434,293.157,14.087,651.49,-3873.2,-18523200,2742470000,0,0,0,3.3527,0,-0.1717,0.0004295,,,,,,,,,,,,,, +phlogopite,-5837044,-6217085,334.346,14.977,610.38,-2083.8,-21533000,2841040000,0,0,0,3.4447,0,-0.1697,0,,,,,,,,,,,,,, +K-feldspar,-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,1.5145,0.0005485,-0.1805,0.0005112,,,,,,,1436,298,282.98,-4830,3621000,-0.15733,3.477E-05,410630 +"K-feldspar,high",-3745498,-3966398,229.157,10.896,381.37,-1941,-12037300,1836430000,0,0,0,1.5145,0.0005485,-0.1805,0.0005112,,,,,,,,,,,,,, +"K-feldspar,low",-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,1.5145,0.0005485,-0.1805,0.0005112,,,,,,,,,,,,,, +paragonite,-5570375,-5951011,277.699,13.216,577.57,-1472.8,-32214400,5050080000,0,0,0,3.9424,0.00059701,-0.1973,0.0004933,,,,,,,,,,,,,, +albite,-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, +"albite,high",-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, +"albite,low",-3718518,-3941903,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, +jadeite,-2853285,-3031921,133.574,6.034,311.29,-2005.1,-5350300,662570000,0,0,0,2.3118,0.00025785,-0.086,0.0002149,,,,,,,,,,,,,, +annite,-4799809,-5149494,420,15.408,727.21,-4775.04,-13831900,2119060000,0,0,0,3.4447,0,-0.1697,0,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/ZS92.csv 2018-03-30 14:50:10 UTC (rev 312) [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/chnosz -r 313