library(knitr) ## Use pngquant to reduce size of PNG images knit_hooks$set(pngquant = hook_pngquant) pngquant <- "--speed=1 --quality=0-25" # In case pngquant isn't available if (!nzchar(Sys.which("pngquant"))) pngquant <- NULL
# Thermodynamic properties DG0f <- "Δ<i>G</i>°<sub><i>f</i></sub>" S0 <- "<i>S</i>°" Cp <- "<i>C<sub>p</sub></i>" logK <- "log <i>K</i>" logfO2 <- "log<i>f</i><sub>O<sub>2</sub></sub>"
This vignette runs the code to make selected plots from the following paper:
von der Heyden BP, Dick J, Rosenfels RC, Carlton L, Lilova K, Navrotsky A, Subramani T, Woodfield BF, Gibson A 2024. Growth and stability of stratiform carrollite (CuCo~2~S~4~) in the Tenke-Fungurume ore district, Central African Copperbelt. The Canadian Journal of Mineralogy and Petrology 62(1): 77--93. doi: 10.3389/feart.2019.00180
This vignette was compiled on r Sys.Date()
with JMDplots r packageDescription("JMDplots")$Version
and CHNOSZ r packageDescription("CHNOSZ")$Version
.
library(JMDplots) # Set plot resolution res <- if(nzchar(Sys.getenv("BUILD_LARGE_VIGNETTES"))) 400 else 75
This compares the thermodynamic parameters for carrollite in the OBIGT database with values calculated on-the-fly. The latter values include computed parameters for the high-temperature polymorph and heat capacity coefficients for both polymorphs. After the test, we reset the OBIGT database so the testing data don't get in the way of the following calculations.
# Calculate parameters calc <- calc_carrollite() # Get parameters stored in OBIGT ref <- info(info("carrollite", c("cr", "cr2"))) # Columns of OBIGT with parameters to check ichk <- 10:22 stopifnot(all.equal(calc$cr[, ichk], ref[1, ichk], check.attributes = FALSE, tolerance = 1e-4)) stopifnot(all.equal(calc$cr2[, ichk], ref[2, ichk], check.attributes = FALSE, tolerance = 1e-4)) reset()
This uses CHNOSZ::logB.to.OBIGT()
to fit formation constants for aqueous Co complexes [@MZW11] to an equation with two adjustable parameters (r DG0f
and r S0
) that are then added to OBIGT.
complexes <- add_Co_aqueous()
The fitted parameters are listed below for comparison with Table 1 in the paper.
Co <- info(info(c("CoCl+", "CoCl2", "CoCl3-", "CoCl4-2"))) Co$G <- round(Co$G) Co$H <- round(Co$H) Co$S <- round(Co$S, 3) rownames(Co) <- Co$name kable(Co[, c("G", "H", "S")])
r logfO2
-pH diagram with carrollite (Figure 5)carrollite_5(res)
carrollite_8(res)
r Cp
for carrollite (Figure S3)carrollite_S3()
carrollite_S4(complexes)
r logK
of reactions showing temperatures of linnaeite in and carrollite out (Figure S5)carrollite_S5()
CHNOSZ::solubility()
calculation for Co or Cu without carrollite (Figure S6)carrollite_S6(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.