[CHNOSZ-commits] r215 - in pkg/CHNOSZ: . R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 25 11:13:17 CEST 2017


Author: jedick
Date: 2017-09-25 11:13:16 +0200 (Mon, 25 Sep 2017)
New Revision: 215

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/EOSregress.R
   pkg/CHNOSZ/R/hkf.R
   pkg/CHNOSZ/R/water.R
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/man/util.water.Rd
   pkg/CHNOSZ/man/water.Rd
Log:
in water.* functions, rename variable "diel" to "epsilon"


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2017-09-25 09:01:21 UTC (rev 214)
+++ pkg/CHNOSZ/DESCRIPTION	2017-09-25 09:13:16 UTC (rev 215)
@@ -1,6 +1,6 @@
 Date: 2017-09-25
 Package: CHNOSZ
-Version: 1.1.0-13
+Version: 1.1.0-14
 Title: Thermodynamic Calculations for Geobiochemistry
 Author: Jeffrey Dick
 Maintainer: Jeffrey Dick <j3ffdick at gmail.com>

Modified: pkg/CHNOSZ/R/EOSregress.R
===================================================================
--- pkg/CHNOSZ/R/EOSregress.R	2017-09-25 09:01:21 UTC (rev 214)
+++ pkg/CHNOSZ/R/EOSregress.R	2017-09-25 09:13:16 UTC (rev 215)
@@ -72,7 +72,7 @@
     "kT" = substitute(YYY%*%kappa[italic(T)], list(YYY=coeff)),
     "alpha" = substitute(YYY%*%alpha, list(YYY=coeff)),
     "beta" = substitute(YYY%*%beta, list(YYY=coeff)),
-    "diel" = substitute(YYY%*%epsilon, list(YYY=coeff)),
+    "epsilon" = substitute(YYY%*%epsilon, list(YYY=coeff)),
     "rho" = substitute(YYY%*%rho, list(YYY=coeff)),
     "NBorn" = substitute(YYY%*%italic(N), list(YYY=coeff)),
     "QBorn" = substitute(YYY%*%italic(Q), list(YYY=coeff)),

Modified: pkg/CHNOSZ/R/hkf.R
===================================================================
--- pkg/CHNOSZ/R/hkf.R	2017-09-25 09:01:21 UTC (rev 214)
+++ pkg/CHNOSZ/R/hkf.R	2017-09-25 09:13:16 UTC (rev 215)
@@ -24,7 +24,7 @@
   # get water properties
   # rho - for subcrt() output and derivatives of omega (if needed)
   # Born functions and epsilon - for HKF calculations
-  H2O.props <- c(H2O.props, "QBorn", "XBorn", "YBorn", "diel")
+  H2O.props <- c(H2O.props, "QBorn", "XBorn", "YBorn", "epsilon")
   if(grepl("SUPCRT", thermo$opt$water)) {
     # using H2O92D.f from SUPCRT92
     # (alpha, daldT, beta - for partial derivatives of omega (g function))
@@ -38,8 +38,8 @@
   H2O <- water(H2O.props, T = c(thermo$opt$Tr, T), P = c(thermo$opt$Pr, P))
   H2O.PrTr <- H2O[1, ]
   H2O.PT <- H2O[-1, ]
-  ZBorn <- -1 / H2O.PT$diel
-  ZBorn.PrTr <- -1 / H2O.PrTr$diel
+  ZBorn <- -1 / H2O.PT$epsilon
+  ZBorn.PrTr <- -1 / H2O.PrTr$epsilon
   # a list to store the result
   aq.out <- list()
   nspecies <- nrow(parameters)

Modified: pkg/CHNOSZ/R/water.R
===================================================================
--- pkg/CHNOSZ/R/water.R	2017-09-25 09:01:21 UTC (rev 214)
+++ pkg/CHNOSZ/R/water.R	2017-09-25 09:13:16 UTC (rev 215)
@@ -34,13 +34,13 @@
   # added 20130212 jmd
   if(formulation=="SUPCRT92")
     props <- c("A", "G", "S", "U", "H", "Cv", "Cp",
-    "Speed", "alpha", "beta", "diel", "visc",
+    "Speed", "alpha", "beta", "epsilon", "visc",
     "tcond", "surten", "tdiff", "Prndtl", "visck", "albe",
     "ZBorn", "YBorn", "QBorn", "daldT", "XBorn",
     "V", "rho", "Psat", "E", "kT")
   else if(formulation=="IAPWS95")
     props <- c("A", "G", "S", "U", "H", "Cv", "Cp",
-    "Speed", "diel",
+    "Speed", "epsilon",
     "YBorn", "QBorn", "XBorn", "NBorn", "UBorn",
     "V", "rho", "Psat", "de.dT", "de.dP", "P")
   return(props)
@@ -185,7 +185,7 @@
   speed <- function()
     return(IAPWS95('w',T=T,rho=my.rho)$w*100) # to cm/s
   ## electrostatic properties
-  diel <- function() return(water.AW90(T=T,rho=my.rho,P=convert(P,'MPa')))
+  epsilon <- function() return(water.AW90(T=T,rho=my.rho,P=convert(P,'MPa')))
   de.dt <- function() {
     p <- numeric()
     for(i in 1:length(T)) {
@@ -315,13 +315,13 @@
   out <- as.data.frame(out)
   colnames(out) <- property
   # calculate rho if it's needed for any other properties
-  if(any(c("rho", "V", "QBorn", "diel") %in% property)) rho <- calculateDensity(pressure, temperature)
+  if(any(c("rho", "V", "QBorn", "epsilon") %in% property)) rho <- calculateDensity(pressure, temperature)
   # fill in columns with values
   if("rho" %in% property) out$rho <- rho
   if("V" %in% property) out$V <- 18.01528/rho
   if("G" %in% property) out$G <- calculateGibbsOfWater(pressure, temperature)
   if("QBorn" %in% property) out$QBorn <- calculateQ(rho, temperature)
-  if("diel" %in% property) out$diel <- calculateEpsilon(rho, temperature)
+  if("epsilon" %in% property) out$epsilon <- calculateEpsilon(rho, temperature)
   out
 }
 

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2017-09-25 09:01:21 UTC (rev 214)
+++ pkg/CHNOSZ/inst/NEWS	2017-09-25 09:13:16 UTC (rev 215)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.1.0-13 (2017-09-25)
+CHANGES IN CHNOSZ 1.1.0-14 (2017-09-25)
 ---------------------------------------
 
 - water.lines() now works for diagrams of Eh, pe, logfO2, logaO2,
@@ -38,6 +38,8 @@
   calculateGibbsofWater(), calculateEpsilon(), calculateQ(), and
   the interface function water.DEW() for use by subcrt().
 
+- In water.* functions, rename the "diel" variable to "epsilon".
+
 CHANGES IN CHNOSZ 1.1.0 (2017-05-04)
 ------------------------------------
 

Modified: pkg/CHNOSZ/man/util.water.Rd
===================================================================
--- pkg/CHNOSZ/man/util.water.Rd	2017-09-25 09:01:21 UTC (rev 214)
+++ pkg/CHNOSZ/man/util.water.Rd	2017-09-25 09:13:16 UTC (rev 215)
@@ -35,7 +35,7 @@
 The \code{state} is set in calls by \code{\link{water.IAPWS95}} to the value in \code{thermo$opt$IAPWS.sat} (default \samp{liquid}) so that higher-level functions (\code{\link{water}}, \code{\link{subcrt}}) take properties for that state along the saturation curve.
 Diagnostic messages are printed if \code{trace} is positive (it is also included in the call to \code{uniroot}).
 
-\code{water.AW90} provides values of the static dielectric constant (\code{diel}) calculated using equations given by Archer and Wang, 1990.
+\code{water.AW90} provides values of the static dielectric constant (\code{epsilon}) calculated using equations given by Archer and Wang, 1990.
 }
 
 \examples{\dontshow{data(thermo)}

Modified: pkg/CHNOSZ/man/water.Rd
===================================================================
--- pkg/CHNOSZ/man/water.Rd	2017-09-25 09:01:21 UTC (rev 214)
+++ pkg/CHNOSZ/man/water.Rd	2017-09-25 09:13:16 UTC (rev 215)
@@ -56,7 +56,7 @@
      \code{Speed} \tab Speed of sound \tab cm s\eqn{^{-1}}{^-1} \tab NA \tab * \tab NA \cr
      \code{alpha} \tab Coefficient of isobaric expansivity \tab K\eqn{^{-1}}{^-1} \tab NA \tab * \tab NA \cr
      \code{beta} \tab Coefficient of isothermal compressibility \tab bar\eqn{^{-1}}{^-1} \tab NA \tab * \tab NA \cr
-     \code{diel} \tab Dielectric constant \tab dimensionless \tab NA \tab * \tab * \cr
+     \code{epsilon} \tab Dielectric constant \tab dimensionless \tab NA \tab * \tab * \cr
      \code{visc} \tab Dynamic viscosity \tab g cm\eqn{^{-1}}{^-1} s\eqn{^{-1}}{^-1} \tab NA \tab * \tab NA \cr
      \code{tcond} \tab Thermal conductivity \tab cal cm\eqn{^{-1}}{^-1} s\eqn{^{-1}}{^-1} K\eqn{^{-1}}{^-1} \tab NA \tab * \tab NA \cr
      \code{tdiff} \tab Thermal diffusivity \tab cm\eqn{^2} s\eqn{^{-1}}{^-1} \tab NA \tab * \tab NA \cr



More information about the CHNOSZ-commits mailing list