[CHNOSZ-commits] r810 - in pkg/CHNOSZ: . R inst inst/tinytest man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 15 05:21:13 CET 2023


Author: jedick
Date: 2023-11-15 05:21:12 +0100 (Wed, 15 Nov 2023)
New Revision: 810

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/info.R
   pkg/CHNOSZ/R/subcrt.R
   pkg/CHNOSZ/R/util.affinity.R
   pkg/CHNOSZ/R/util.misc.R
   pkg/CHNOSZ/inst/NEWS.Rd
   pkg/CHNOSZ/inst/tinytest/test-info.R
   pkg/CHNOSZ/inst/tinytest/test-subcrt.R
   pkg/CHNOSZ/man/diagram.Rd
   pkg/CHNOSZ/man/species.Rd
   pkg/CHNOSZ/man/subcrt.Rd
   pkg/CHNOSZ/man/thermo.Rd
   pkg/CHNOSZ/man/util.misc.Rd
   pkg/CHNOSZ/vignettes/FAQ.Rmd
   pkg/CHNOSZ/vignettes/OBIGT.Rmd
   pkg/CHNOSZ/vignettes/anintro.Rmd
Log:
Reword "phase transitions" to "polymorphic transitions"


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/DESCRIPTION	2023-11-15 04:21:12 UTC (rev 810)
@@ -1,6 +1,6 @@
-Date: 2023-11-14
+Date: 2023-11-15
 Package: CHNOSZ
-Version: 2.0.0-29
+Version: 2.0.0-30
 Title: Thermodynamic Calculations and Diagrams for Geochemistry
 Authors at R: c(
     person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),

Modified: pkg/CHNOSZ/R/info.R
===================================================================
--- pkg/CHNOSZ/R/info.R	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/R/info.R	2023-11-15 04:21:12 UTC (rev 810)
@@ -158,13 +158,13 @@
       otherstates[otherstates == mystate] <- thermo$OBIGT$name[ispecies.other[otherstates == mystate]]
     }
     transtext <- othertext <- ""
-    # We count, but don't show the states for phase transitions (cr2, cr3, etc)
+    # We count, but don't show the states for polymorphic transitions (cr2, cr3, etc)
     istrans <- otherstates %in% c("cr2", "cr3", "cr4", "cr5", "cr6", "cr7", "cr8", "cr9")
     if(mystate == "cr") {
-      # If we are "cr" we show the number of phase transitions
+      # If we are "cr" we show the number of polymorphic transitions
       ntrans <- sum(istrans)
-      if(ntrans == 1) transtext <- paste(" with", ntrans, "phase transition")
-      else if(ntrans > 1) transtext <- paste(" with", ntrans, "phase transitions")
+      if(ntrans == 1) transtext <- paste(" with", ntrans, "polymorphic transition")
+      else if(ntrans > 1) transtext <- paste(" with", ntrans, "polymorphic transitions")
     }
     myname <- NULL
     if(mystate != "aq") {

Modified: pkg/CHNOSZ/R/subcrt.R
===================================================================
--- pkg/CHNOSZ/R/subcrt.R	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/R/subcrt.R	2023-11-15 04:21:12 UTC (rev 810)
@@ -399,6 +399,7 @@
     outprops <- c(outprops,p.cgl)
   }
 
+
   # Water
   if(any(isH2O)) {
     p.H2O <- H2O.PT[, match(eosprop, colnames(H2O.PT)), drop = FALSE]
@@ -445,9 +446,9 @@
       # Assemble the Gibbs energies for each species
       for(j in 1:length(are.polymorphs)) {
         G.this <- outprops[[are.polymorphs[j]]]$G
-        if(sum(is.na(G.this)) > 0 & exceed.Ttr) warning(paste("subcrt: NAs found for G of ",
-          reaction$name[are.polymorphs[j]], " ", reaction$state[are.polymorphs[j]], " at T-P point(s) ", 
-          c2s(which(is.na(G.this)), sep = " "), sep = ""), call. = FALSE)
+#        if(sum(is.na(G.this)) > 0 & exceed.Ttr) warning(paste("subcrt: NAs found for G of ",
+#          reaction$name[are.polymorphs[j]], " ", reaction$state[are.polymorphs[j]], " at T-P point(s) ", 
+#          c2s(which(is.na(G.this)), sep = " "), sep = ""), call. = FALSE)
         if(j == 1) G <- as.data.frame(G.this)
         else G <- cbind(G, as.data.frame(G.this))
       }
@@ -494,7 +495,7 @@
   }
 
   outprops <- out.new
-  # Remove the rows that were added to keep track of phase transitions
+  # Remove the rows that were added to keep track of polymorphs
   reaction <- reaction.new[1:length(ispecies), ]
   # The manipulations above should get the correct species indices and state labels,
   # but if species are (intentionally) repeated, include only the first

Modified: pkg/CHNOSZ/R/util.affinity.R
===================================================================
--- pkg/CHNOSZ/R/util.affinity.R	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/R/util.affinity.R	2023-11-15 04:21:12 UTC (rev 810)
@@ -163,7 +163,7 @@
         ind <- as.vector(indmat)
         sout$out <- lapply(sout$out, function(x) x[indmat, ])
       }
-      # Species indices are updated by subcrt() for minerals with phase transitions
+      # Species indices are updated by subcrt() for minerals with polymorphic transitions
       # e.g. i <- info("chalcocite"); subcrt(i, T = 200)$species$ispecies == i + 1
       # so we should keep the original species index to be able to find the species in a provided 'sout'
       # (noted for Mosaic diagram section of anintro.Rmd 20190203)

Modified: pkg/CHNOSZ/R/util.misc.R
===================================================================
--- pkg/CHNOSZ/R/util.misc.R	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/R/util.misc.R	2023-11-15 04:21:12 UTC (rev 810)
@@ -3,7 +3,7 @@
 # speciate/thermo.R 20051021 jmd
 
 dPdTtr <- function(ispecies, ispecies2 = NULL) {
-  # Calculate dP/dT for a phase transition
+  # Calculate dP/dT for a polymorphic transition
   # (argument is index of the lower-T phase)
   thermo <- get("thermo", CHNOSZ)
   if(is.null(ispecies2)) ispecies2 <- ispecies + 1
@@ -21,7 +21,7 @@
 }
 
 Ttr <- function(ispecies, ispecies2 = NULL, P = 1, dPdT = NULL) {
-  # Calculate a phase transition temperature for given P
+  # Calculate polymorphic transition temperature for given P
   TtrPr <- get("thermo", CHNOSZ)$OBIGT$z.T[ispecies]
   # The constant slope, dP/dT
   if(is.null(dPdT)) dPdT <- dPdTtr(ispecies, ispecies2)

Modified: pkg/CHNOSZ/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/inst/NEWS.Rd	2023-11-15 04:21:12 UTC (rev 810)
@@ -24,7 +24,7 @@
         \item How should CHNOSZ be cited?
         \item What thermodynamic models are used in CHNOSZ?
         \item When and why do equal-activity boundaries depend on total activity?
-        \item How can minerals with phase transitions be added to the database?
+        \item How can minerals with polymorphic transitions be added to the database?
         \item How can I make a diagram with the trisulfur radical ion (S\s{3}\S{-})?
 
       }
@@ -31,7 +31,7 @@
 
       \item Add \code{use.polymorphs} argument to \code{subcrt()} to allow
       turning off automatic identification of stable polymorphs. This is used
-      in the FAQ (\dQuote{How can minerals with phase transitions be added to
+      in the FAQ (\dQuote{How can minerals with polymorphic transitions be added to
       the database?}).
 
       \item Restore \file{EOSregress.R} and its reverse dependencies

Modified: pkg/CHNOSZ/inst/tinytest/test-info.R
===================================================================
--- pkg/CHNOSZ/inst/tinytest/test-info.R	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/inst/tinytest/test-info.R	2023-11-15 04:21:12 UTC (rev 810)
@@ -7,7 +7,7 @@
 expect_message(CHNOSZ:::info.character("methane", "cr"), "only 'gas' 'liq' are available", info = info)
 expect_message(CHNOSZ:::info.character("methane"), "also available in liq", info = info)
 expect_message(CHNOSZ:::info.character("SiO2", "cr"), "also available in.*quartz", info = info)
-expect_message(CHNOSZ:::info.character("chalcocite"), "found chalcocite\\(cr\\) with 2 phase transitions", info = info)
+expect_message(CHNOSZ:::info.character("chalcocite"), "found chalcocite\\(cr\\) with 2 polymorphic transitions", info = info)
 # H2O is a special case
 expect_equal(CHNOSZ:::info.character("H2O", "aq"), CHNOSZ:::info.character("H2O", "liq"), info = info)
 

Modified: pkg/CHNOSZ/inst/tinytest/test-subcrt.R
===================================================================
--- pkg/CHNOSZ/inst/tinytest/test-subcrt.R	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/inst/tinytest/test-subcrt.R	2023-11-15 04:21:12 UTC (rev 810)
@@ -31,7 +31,7 @@
 s.C7 <- subcrt(c("S2O3-2", "H2O", "O2", "SO4-2", "H+", "S"), c("aq", "liq", "aq", "aq", "aq", "cr"), c(-5, -1, -4, 6, 2, 4), T = T)
 sout.C7 <- s.C7$out
 expect_true(maxdiff(sout.C7$G/1000, AS01.C7) < 0.06, info = info)
-# We can also check that sulfur has expected phase transitions
+# We can also check that sulfur has expected polymorphic transitions
 expect_equal(s.C7$polymorphs$sulfur, c(1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3), info = info)
 
 info <- "Subzero degree C calculations are possible"
@@ -116,7 +116,7 @@
 info <- "More calculations for quartz are nearly consistent with SUPCRT92"
 add.OBIGT("SUPCRT92")
 # Output from SUPCRT92 for reaction specified as "1 QUARTZ" run at 1 bar
-# (SUPCRT shows phase transition at 574.850 deg C, and does not give Cp values around the transition)
+# (SUPCRT shows polymorphic transition at 574.850 deg C, and does not give Cp values around the transition)
 S92_1bar <- read.table(header = TRUE, text = "
     T       G       H    S       V
   573	-214507	-209517	24.7	23.3
@@ -130,7 +130,7 @@
 expect_equal(round(CHNOSZ_1bar$S, 1), S92_1bar$S, info = info)
 expect_equal(round(CHNOSZ_1bar$V, 1), S92_1bar$V, info = info)
 
-# 5000 bar: SUPCRT shows phase transition at 704.694 deg C
+# 5000 bar: SUPCRT shows polymorphic transition at 704.694 deg C
 S92_5000bar <- read.table(header = TRUE, text = "
     T       G       H    S       V
   703	-215044	-204913	26.7	23.3
@@ -148,8 +148,8 @@
 
 } # end if(FALSE)
 
-info <- "Duplicated species yield correct phase transitions"
-# If a mineral with phase transitions is in both the basis and species lists,
+info <- "Duplicated species yield correct polymorphic transitions"
+# If a mineral with polymorphic transitions is in both the basis and species lists,
 # energy()'s call to subcrt() will have duplicated species.
 # This wasn't working (produced NAs at low T) for a long time prior to 20171003.
 s1 <- subcrt("chalcocite", T = c(100, 1000), P = 1000)
@@ -185,7 +185,7 @@
 s2 <- subcrt(c("Na+", "quartz"), T = 450, P = c(400, 450, 500), exceed.rhomin = TRUE)
 expect_equal(sum(is.na(s2$out$`Na+`$logK)), 0, info = info)
 
-info <- "Combining minerals with phase transitions and aqueous species with IS > 0 does not mangle output"
+info <- "Combining minerals with polymorphic transitions and aqueous species with IS > 0 does not mangle output"
 # s2 was giving quartz an extraneous loggam column and incorrect G and logK 20181107
 add.OBIGT("SUPCRT92")
 s1 <- subcrt(c("quartz", "K+"), T = 25, IS = 1)

Modified: pkg/CHNOSZ/man/diagram.Rd
===================================================================
--- pkg/CHNOSZ/man/diagram.Rd	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/man/diagram.Rd	2023-11-15 04:21:12 UTC (rev 810)
@@ -257,7 +257,7 @@
 basis(c("Fe", "oxygen", "S2"))
 species(c("iron", "ferrous-oxide", "magnetite",
   "hematite", "pyrite", "pyrrhotite"))
-# The calculations include the phase transitions of
+# The calculations include the polymorphic transitions of
 # pyrrhotite; no additional step is needed
 a <- affinity(S2 = c(-50, 0), O2 = c(-90, -10), T=200)
 diagram(a, fill = "heat")

Modified: pkg/CHNOSZ/man/species.Rd
===================================================================
--- pkg/CHNOSZ/man/species.Rd	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/man/species.Rd	2023-11-15 04:21:12 UTC (rev 810)
@@ -26,8 +26,8 @@
 
 The \code{state} argument can be omitted, in which case the first matching species in any state is added (in many cases, this means the aqueous species).
 If there are multiple matches for a species, the one that is in the state given by \code{thermo()$opt$state} is chosen, otherwise the matching (or \eqn{n}{n}'th matching duplicate) species is used.
-Note that the \code{state}s of species representing phases of minerals that undergo phase transitions are coded as \samp{cr} (lowest-T phase), \samp{cr2}, \samp{cr3}, \code{...} (phases with increasing temperature).
-If \code{state} is \samp{cr} when one of these minerals is matched, all the phase species are added.
+Note that the \code{state}s of species representing phases of minerals that undergo polymorphic transitions are coded as \samp{cr} (lowest-T phase), \samp{cr2}, \samp{cr3}, \code{...} (phases with increasing temperature).
+If \code{state} is \samp{cr} when one of these minerals is matched, all the polymorphs are added.
 
 The data frame in \code{thermo()$species} holds the species names and indices as well as the stoichiometric reaction coefficients for the formation reaction from the basis species and the logarithms of activities or fugacities that are used by \code{\link{affinity}}.
 The default values for logarithms of activities are -3 for aqueous (\samp{aq}) species and 0 for others. 

Modified: pkg/CHNOSZ/man/subcrt.Rd
===================================================================
--- pkg/CHNOSZ/man/subcrt.Rd	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/man/subcrt.Rd	2023-11-15 04:21:12 UTC (rev 810)
@@ -101,7 +101,7 @@
 (This is not an inherent limitation in either formulation, but it is just a matter of implementation.)
 }
 
-\section{Note on phase transitions}{
+\section{Note on polymorphic transitions}{
 Minerals with polymorphic transitions (denoted in OBIGT by having states \samp{cr} (lowest-\T phase), \samp{cr2}, etc.) can be specified by name with \samp{cr} for the \code{state} or by using a numeric species index for the lowest-\T polymorph.
 If \code{use.polymorphs} is TRUE, \code{subcrt} uses the transition temperatures calculated from those at P = 1 bar given in OBIGT together with functions of the entropies and volumes of transitions (see \code{\link{dPdTtr}}) to determine the stable polymorph at each grid point and uses the properties of that polymorph in the output.
 A \code{polymorph} column is added to the output to indicate the stable polymorph at each \T-\P condition.
@@ -114,7 +114,7 @@
 A list of length two or three.
 If the properties of a reaction were calculated, the first element of the list (named \samp{reaction}) contains a dataframe with the reaction parameters; the second element, named \samp{out}, is a dataframe containing the calculated properties.
 Otherwise, the properties of species (not reactions) are returned: the first element, named \samp{species}, contains a dataframe with the species identification; the second element, named \samp{out}, is itself a list, each element of which is a dataframe of properties for a given species.
-If minerals with phase transitions are present, a third element (a dataframe) in the list indicates for all such minerals the stable phase at each grid point.
+If minerals with polymorphic transitions are present, a third element (a dataframe) in the list indicates for all such minerals the stable phase at each grid point.
 }
 
 \seealso{
@@ -165,7 +165,7 @@
 # (suppressWarnings is used so that checks of examples don't raise warnings)
 suppressWarnings(subcrt("alanine", T = seq(0, 5000, by = 1000)))
 
-## Minerals with phase transitions
+## Minerals with polymorphic transitions
 # Compare calculated values of heat capacity of iron with
 # values from Robie and Hemingway, 1995
 T.units("K")

Modified: pkg/CHNOSZ/man/thermo.Rd
===================================================================
--- pkg/CHNOSZ/man/thermo.Rd	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/man/thermo.Rd	2023-11-15 04:21:12 UTC (rev 810)
@@ -145,7 +145,7 @@
       \code{Z}  \tab numeric \tab Charge
     }
 
-Columns 15-22 for crystalline, gas and liquid species (\eqn{Cp} = \eqn{a} + \eqn{bT} + \eqn{cT}\S{-2} + \eqn{dT}\S{-0.5} + \eqn{eT}\S{2} + \eqn{fT}\S{lambda}).
+Columns 15-22 for crystalline, gas and liquid species (\Cp = \eqn{a} + \eqn{bT} + \eqn{cT}\S{-2} + \eqn{dT}\S{-0.5} + \eqn{eT}\S{2} + \eqn{fT}\S{lambda}).
 NOTE: As of CHNOSZ 2.0.0, OOM scaling for heat capacity coefficients has been removed, and new entries use units of Joules unless indicated by setting \code{E_units} to \samp{cal}.
 
     \tabular{lll}{
@@ -156,8 +156,8 @@
       \code{e} \tab numeric \tab \eqn{e} (J K\S{-3} mol\S{-1})\cr
       \code{f} \tab numeric \tab \eqn{f} (J K\S{-lambda-1} mol\S{-1})\cr
       \code{lambda} \tab numeric \tab \lambda (exponent on the \eqn{f} term)\cr
-      \code{T} \tab numeric \tab Temperature of phase transition or upper\cr
-      \tab \tab temperature limit of validity of extrapolation (K)
+      \code{T} \tab numeric \tab Positive value: Temperature (K) of polymorphic transition or phase stability limit\cr
+      \code{T} \tab numeric \tab Negative value: Opposite of temperature (K) limit of \Cp equation (see \viglink{FAQ} for details)\cr
     }
 
 Columns 15-17 for aqueous species using the Akinfiev-Diamond model. Note that the \code{c} column is used to store the \eqn{\xi}{xi} parameter. Columns 18-22 are not used.
@@ -186,7 +186,7 @@
 
     \item \code{thermo()$buffers}
 
-    Dataframe which contains definitions of buffers of chemical activity. Each named buffer can be composed of one or more species, which may include any species in the thermodynamic database and/or any protein. The calculations provided by \code{\link{buffer}} do not take into account phase transitions of minerals, so individual phase species of such minerals must be specified in the buffers.
+    Dataframe which contains definitions of buffers of chemical activity. Each named buffer can be composed of one or more species, which may include any species in the thermodynamic database and/or any protein. The calculations provided by \code{\link{buffer}} do not take into account polymorphic transitions of minerals, so individual polymorphs of such minerals must be specified in the buffers.
     \tabular{lll}{
       \code{name} \tab character \tab Name of buffer\cr
       \code{species} \tab character \tab Name of species\cr
@@ -249,16 +249,12 @@
 
 } % end of format
 
-\section{Note on phase transitions}{
-In order to represent thermodynamic data for minerals with phase transitions, the higher-temperature phases of these minerals are represented as phase species that have states denoted by \samp{cr2}, \samp{cr3}, etc.
-The standard molar thermodynamic properties at 25 \degC and 1 bar (\eqn{T_r}{Pr} and \eqn{P_r}{Pr}) of the \samp{cr2} phase species of minerals were generated by first calculating those of the \samp{cr} (lowest-T) phase species at the transition temperature (\eqn{T_{tr}}{Ttr}) and 1 bar then taking account of the volume and entropy of transition (the latter can be retrieved by combining the former with the Clausius-Clapeyron equation and values of \eqn{(dP/dT)} of transitions taken from the \acronym{SUPCRT92} data file) to calculate the standard molar entropy of the \samp{cr2} phase species at \eqn{T_{tr}}{Ttr}, and taking account of the enthalpy of transition (\eqn{{\Delta}H^{\circ}}{DeltaH0}, taken from the \acronym{SUPCRT92} data file) to calculate the standard molar enthalpy of the \samp{cr2} phase species at \eqn{T_{tr}}{Ttr}.
-The standard molar properties of the \samp{cr2} phase species at \eqn{T_{tr}}{Ttr} and 1 bar calculated in this manner were combined with the equations-of-state parameters of the species to generate values of the standard molar properties at 25 \degC and 1 bar.
-This process was repeated as necessary to generate the standard molar properties of phase species represented by \samp{cr3} and \samp{cr4}, referencing at each iteration the previously calculated values of the standard molar properties of the lower-temperature phase species (i.e., \samp{cr2} and \samp{cr3}).
-A consequence of tabulating the standard molar thermodynamic properties of the phase species is that the values of \eqn{(dP/dT)} and \eqn{{\Delta}H^{\circ}}{DeltaH0} of phase transitions can be calculated using the equations of state and therefore do not need to be stored in the thermodynamic database.
-However, the transition temperatures (\eqn{T_{tr}}{Ttr}) generally can not be assessed by comparing the Gibbs energies of phase species; instead, they are tabulated in the database.
+\section{Note on polymorphic transitions}{
+To enable the calculation of thermodynamic properties of polymorphic transitions, higher-temperature polymorphs of minerals are listed in OBIGT with states \samp{cr2}, \samp{cr3}, etc.
+The standard thermodynamic properties of high-temperature polymorphs at 25 \degC and 1 bar are apparent values that are consistent with given values of enthalpy of transition (where available) at the transition temperature (\eqn{T_{tr}}{Ttr}).
+See the \viglink{FAQ} question \dQuote{How can minerals with polymorphic transitions be added to the database?} for details of the retrieval of standard thermodynamic properties of polymorphs used in OBIGT.
 }
 
-
 \seealso{
 Other data files, including those supporting the examples and vignettes, are documented separately at \code{\link{extdata}}. 
 }

Modified: pkg/CHNOSZ/man/util.misc.Rd
===================================================================
--- pkg/CHNOSZ/man/util.misc.Rd	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/man/util.misc.Rd	2023-11-15 04:21:12 UTC (rev 810)
@@ -7,7 +7,7 @@
 \alias{unitize}
 \title{Functions for Miscellaneous Tasks}
 \description{
-Calculate \eqn{dP/dT}{dP/dT} and temperature of phase transitions; scale logarithms of activity to a desired total activity.
+Calculate \eqn{dP/dT}{dP/dT} and temperature of polymorphic transitions; scale logarithms of activity to a desired total activity.
 }
 
 \usage{
@@ -21,7 +21,7 @@
   \item{ispecies}{numeric, species index of a mineral phase}
   \item{ispecies2}{numeric, species index of next mineral phase (the default is ispecies + 1)}
   \item{P}{numeric, pressure (bar)}
-  \item{dPdT}{numeric, values of (\eqn{dP/dT}{dP/dT}) of phase transitions (\code{Ttr})}
+  \item{dPdT}{numeric, values of (\eqn{dP/dT}{dP/dT}) of polymorphic transitions (\code{Ttr})}
   \item{Htr}{numeric, enthalpy(ies) of transition (cal/mol)}
   \item{logact}{numeric, logarithms of activity}
   \item{length}{numeric, numbers of residues}
@@ -29,8 +29,8 @@
 }
 
 \details{
-\code{dPdTtr} returns values of \eqn{(dP/dT)_{Ttr}}{(dP/dT)Ttr}, where \eqn{Ttr}{Ttr} represents the transition temperature, of the phase transition at the high-\eqn{T}{T} stability limit of the \code{ispecies} in \code{thermo()$OBIGT} (other than checking that the names match, the function does not check that the species in fact represent different phases of the same mineral).
-\code{dPdTtr} takes account of the Clapeyron equation, \eqn{(dP/dT)_{Ttr}}{(dP/dT)Ttr}=\eqn{{\Delta}S/{\Delta}V}{DS/DV}, where \eqn{{\Delta}S}{DS} and \eqn{{\Delta}V}{DV} represent the changes in entropy and volume of phase transition, and are calculated using \code{subcrt} at Ttr from the standard molal entropies and volumes of the two phases involved.
+\code{dPdTtr} returns values of \eqn{(dP/dT)_{Ttr}}{(dP/dT)Ttr}, where \eqn{Ttr}{Ttr} represents the transition temperature, of the polymorphic transition at the high-\eqn{T}{T} stability limit of the \code{ispecies} in \code{thermo()$OBIGT} (other than checking that the names match, the function does not check that the species in fact represent different phases of the same mineral).
+\code{dPdTtr} takes account of the Clapeyron equation, \eqn{(dP/dT)_{Ttr}}{(dP/dT)Ttr}=\eqn{{\Delta}S/{\Delta}V}{DS/DV}, where \eqn{{\Delta}S}{DS} and \eqn{{\Delta}V}{DV} represent the changes in entropy and volume of polymorphic transition, and are calculated using \code{subcrt} at Ttr from the standard molal entropies and volumes of the two phases involved.
 Using values of \code{dPdT} calculated using \code{dPdTtr} or supplied in the arguments, \code{Ttr} returns as a function of \code{P} values of the upper transition temperature of the mineral phase represented by \code{ispecies}.
 
 \code{GHS_Tr} can be used to calculate values of G, H, and S at Tr for the cr2, cr3, and cr4 phases in the database.

Modified: pkg/CHNOSZ/vignettes/FAQ.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/FAQ.Rmd	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/vignettes/FAQ.Rmd	2023-11-15 04:21:12 UTC (rev 810)
@@ -309,9 +309,9 @@
 
 *Answered on 2023-05-17.*
 
-## How can minerals with phase transitions be added to the database?
+## How can minerals with polymorphic transitions be added to the database?
 
-Many minerals undergo phase transitions upon heating.
+Many minerals undergo polymorphic transitions upon heating.
 The stable phases at different temperatures are called polymorphs.
 Each polymorph for a given mineral should have its own entry in OBIGT, including values of the standard thermodynamic properties (Δ*G*°~*f*~, Δ*H*°~*f*~, and *S*°) at 25 °C.
 The 25 °C (or 298.15 K) values for high-temperature polymorphs are often not listed in thermodynamic tables, but they can be calculated.

Modified: pkg/CHNOSZ/vignettes/OBIGT.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/OBIGT.Rmd	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/vignettes/OBIGT.Rmd	2023-11-15 04:21:12 UTC (rev 810)
@@ -111,7 +111,7 @@
   assign("csvfile", csvfile, parent.frame())
   file <- system.file(paste0("extdata/OBIGT/", csvfile), package="CHNOSZ")
   dat <- read.csv(file, as.is=TRUE)
-  ## Exclude entries for phase transitions
+  ## Exclude entries for high-T polymorphs
   #dat <- dat[!dat$state %in% c("cr2", "cr3", "cr4", "cr5", "cr6", "cr7", "cr8", "cr9"), ]
   # The state and class of substance (used as section header), followed by number of species
   basename <- gsub(".csv", "", csvfile)
@@ -137,7 +137,7 @@
     dat <- read.csv(file, as.is=TRUE)
     whichref <- "ref1"
   }
-  ## Exclude entries for phase transitions
+  ## Exclude entries for high-T polymorphs
   #dat <- dat[!dat$state %in% c("cr2", "cr3", "cr4", "cr5", "cr6", "cr7", "cr8", "cr9"), ]
   # Count number of times each reference is used
   tab <- table(dat[, whichref])

Modified: pkg/CHNOSZ/vignettes/anintro.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rmd	2023-11-14 10:53:32 UTC (rev 809)
+++ pkg/CHNOSZ/vignettes/anintro.Rmd	2023-11-15 04:21:12 UTC (rev 810)
@@ -675,8 +675,8 @@
 species(c("chalcocite", "tenorite", "cuprite", "copper"), add = TRUE)
 ```
 
-Note that chalcocite (Cu<sub>2</sub>S) undergoes phase transitions.
-To get the temperatures of the phase transitions from `thermo()$OBIGT` (in Kelvin, regardless of the <span style="color:red">`T.units()`</span>), we can use <span style="color:green">`info()`</span>.
+Note that chalcocite (Cu<sub>2</sub>S) undergoes polymorphic transitions.
+To get the temperatures of the polymorphic transitions from `thermo()$OBIGT` (in Kelvin, regardless of the <span style="color:red">`T.units()`</span>), we can use <span style="color:green">`info()`</span>.
 We see that at 200 °C (473.15 K) the second phase is stable; this one is automatially used by CHNOSZ for this diagram.
 ```{r info_chalcocite, message=FALSE}
 info(info("chalcocite", c("cr", "cr2", "cr3")))$T
@@ -810,7 +810,7 @@
 ##    0    0    0
 ```
 
-We use <span style="color:red">`mod.buffer()`</span> to choose the `cr2` phase of pyrrhotite, which is stable at this temperature ([see above](#mosaic-diagrams) for how to get this information for minerals with phase transitions).
+We use <span style="color:red">`mod.buffer()`</span> to choose the `cr2` phase of pyrrhotite, which is stable at this temperature ([see above](#mosaic-diagrams) for how to get this information for minerals with polymorphic transitions).
 Then, we set up H<sub>2</sub>S and `r o2` to be buffered by PPM, and inspect their buffered activities:
 ```{r PPM_setup, results="hide"}
 mod.buffer("PPM", "pyrrhotite", "cr2")



More information about the CHNOSZ-commits mailing list