Cations on the basis of 6 oxygens, Fe2/3 by Lindley.
Reference | K. D. Putirka Thermometers and Barometers for Volcanic Systems, 2008 [ref] |
---|---|
Input | SiO2_wtp, TiO2_wtp, Al2O3_wtp, FeO_wtp, MnO_wtp, MgO_wtp, CaO_wtp, Na2O_wtp, K2O_wtp, Cr2O3_wtp |
Output | Fe_p2_pfu, Fe_p3_pfu, Al_c4_pfu, Al_c6_pfu |
Calculate |
recalc.px_putirka <- function (wtp_data, ...) { ox_names <- c('SiO2_wtp','TiO2_wtp', 'Al2O3_wtp', 'FeO_wtp', 'MnO_wtp', 'MgO_wtp', 'CaO_wtp', 'Na2O_wtp', 'K2O_wtp', 'Cr2O3_wtp'); pfu_names <-c('Si_pfu','Ti_pfu', 'Al_pfu', 'Fe_pfu', 'Mn_pfu', 'Mg_pfu', 'Ca_pfu', 'Na_pfu', 'K_pfu', 'Cr_pfu'); wtp_group <- selectNames(wtp_data,ox_names); mwt <- c(60.0843, 79.8788, 101.961, 71.8464, 70.9375, 40.3044, 56.0774, 61.9789, 94.196, 151.9982); oxnum <- c(2,2,3,1,1,1,1,1,1,3); catnum <- c(1,1,2,1,1,1,1,2,2,2); mw <- rowApply('/', wtp_group, mwt); oxc <- rowApply('*', mw, oxnum); ox_factor <- 6/rowSums(oxc); pfu <- rowApply('*', mw, catnum) * ox_factor; names(pfu) <- pfu_names; pfu$Name <- wtp_data$Name; pfu$Al_c4_pfu <- 2 - pfu$Si_pfu; pfu$Al_c6_pfu <- ifelse(pfu$Al_pfu - pfu$Al_c4_pfu > 0, pfu$Al_pfu - pfu$Al_c4_pfu, 0); pfu$Fe_p3_pfu <- ifelse(pfu$Na_pfu+pfu$Al_c4_pfu-pfu$Al_c6_pfu-2*pfu$Ti_pfu-pfu$Cr_pfu>0, pfu$Na_pfu+pfu$Al_c4_pfu-pfu$Al_c6_pfu-2*pfu$Ti_pfu-pfu$Cr_pfu, 0); pfu$Fe_p2_pfu <- pfu$Fe_pfu - pfu$Fe_p3_pfu; return (pfu[,c('Name',pfu_names,'Al_c4_pfu','Al_c6_pfu','Fe_p2_pfu','Fe_p3_pfu')]); }