[CHNOSZ-commits] r763 - in pkg/CHNOSZ: . R demo man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Dec 29 05:53:18 CET 2022


Author: jedick
Date: 2022-12-29 05:53:18 +0100 (Thu, 29 Dec 2022)
New Revision: 763

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/nonideal.R
   pkg/CHNOSZ/demo/yttrium.R
   pkg/CHNOSZ/man/NaCl.Rd
Log:
Minor changes


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2022-12-13 12:52:21 UTC (rev 762)
+++ pkg/CHNOSZ/DESCRIPTION	2022-12-29 04:53:18 UTC (rev 763)
@@ -1,6 +1,6 @@
-Date: 2022-12-13
+Date: 2022-12-29
 Package: CHNOSZ
-Version: 1.9.9-54
+Version: 1.9.9-55
 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/nonideal.R
===================================================================
--- pkg/CHNOSZ/R/nonideal.R	2022-12-13 12:52:21 UTC (rev 762)
+++ pkg/CHNOSZ/R/nonideal.R	2022-12-29 04:53:18 UTC (rev 763)
@@ -8,7 +8,7 @@
   # number of species, same length as speciesprops list
   # T in Kelvin, same length as nrows of speciespropss
   # arguments A_DH and B_DH are needed for all methods other than "Alberty", and P is needed for "bgamma"
-  # m_start is the total molality of all dissolved species; if not given, it is taken to be equal to ionic strength
+  # m_star is the total molality of all dissolved species; if not given, it is taken to be equal to ionic strength
 
   mettext <- function(method) {
     mettext <- paste(method, "equation")

Modified: pkg/CHNOSZ/demo/yttrium.R
===================================================================
--- pkg/CHNOSZ/demo/yttrium.R	2022-12-13 12:52:21 UTC (rev 762)
+++ pkg/CHNOSZ/demo/yttrium.R	2022-12-29 04:53:18 UTC (rev 763)
@@ -125,7 +125,7 @@
   }
 }
 
-# Run the functions to amke plots for the demo
+# Run the functions to make plots for the demo
 opar <- par(no.readonly = TRUE)
 add.Y.species(800, plot.it = TRUE)
 add.Y.species(1000, plot.it = TRUE)

Modified: pkg/CHNOSZ/man/NaCl.Rd
===================================================================
--- pkg/CHNOSZ/man/NaCl.Rd	2022-12-13 12:52:21 UTC (rev 762)
+++ pkg/CHNOSZ/man/NaCl.Rd	2022-12-29 04:53:18 UTC (rev 763)
@@ -21,14 +21,15 @@
 \details{
 Thermodynamic models for metal solubility and speciation involving chloride complexes are commonly specified in terms of amount of NaCl rather than activity (or molality) of Cl\S{-} as an independent variable.
 This function calculates distribution of species and ionic strength in a simple aqueous solution given a total amount (\code{m_tot}, in mol/kg) of NaCl.
-The aqueous Cl-bearing species considered in the system are Cl\S{-}, NaCl, and optionally HCl, and Na\S{+} is present as a basis species; other Na-bearing species such as NaOH are not considered.
-The activity coefficients of charged species are calculated using the Debye-Hückel equation (see \code{\link{nonideal}}) via the \code{IS} argument of \code{\link{affinity}}.
+The aqueous Cl-bearing species considered in the system are Cl\S{-}, NaCl, and optionally HCl.
+Na\S{+} is present as a basis species, but the formation of Na-bearing species such as NaOH is not considered.
+The activity coefficients of charged species are calculated using the extended Debye-Hückel equation (see \code{\link{nonideal}}) via the \code{IS} argument of \code{\link{affinity}}.
 The function first sets the molality of Na\S{+} and ionic strength equal to \code{m_tot}, then calculates the distribution of Cl-bearing species.
 Based on mass balance of Na atoms, the molality of NaCl is then used to recalculate the molality of Na\S{+}, followed by ionic strength.
 To find a solution, the function iterates until the change of molality of Na\S{+} and ionic strength are both less than \code{m_tot} / 100.
 
-In some cases, the iteration may oscillate around the true values without converging.
-Setting \code{attenuate} to TRUE, which halves the amount of change of these values in each step, may help with convergence.
+At very high NaCl concentrations, which are beyond the applicability limits of the extended Debye-Hückel model and therefore not recommended for normal use, the iterations tend to oscillate without converging.
+Setting \code{attenuate} to TRUE, which halves the amount of change in each step, may help with convergence.
 If a solution is not found after 100 iterations, the function stops with an error.
 
 If \code{pH} is NA (the default), then HCl is not included in the calculation and its molality in the output is also assigned NA.



More information about the CHNOSZ-commits mailing list