FeO only.
Reference | Ian D. MacGregor Empirical geothermometers and geothermobarometers for spinel peridotite phase assemblages, 2015 [ref] |
---|---|
Input | SiO2_wtp, TiO2_wtp, Al2O3_wtp, Cr2O3_wtp, FeO_wtp, MnO_wtp, MgO_wtp, NiO_wtp, CaO_wtp, Na2O_wtp, K2O_wtp |
Output | Si_pfu, Ti_pfu, Al_pfu, Cr_pfu, Fe_pfu, Mn_pfu, Mg_pfu, Ni_pfu, Ca_pfu, Na_pfu, K_pfu |
recalc.ol_macgreg <- function (wtp_data, ...) { nms =c('SiO2_wtp', 'TiO2_wtp', 'Al2O3_wtp', 'Cr2O3_wtp', 'FeO_wtp', 'MnO_wtp', 'MgO_wtp', 'NiO_wtp', 'CaO_wtp', 'Na2O_wtp', 'K2O_wtp'); wct =c( 15.021, 19.97, 16.9935, 25.3317, 35.923, 35.469, 20.156, 29.347, 28.04, 30.9895, 47.098 ); hd =c( 4, 4, 3, 3, 2, 2, 2, 2, 2, 1, 1 ); pnms =c( 'Si_pfu', 'Ti_pfu', 'Al_pfu', 'Cr_pfu', 'Fe_pfu', 'Mn_pfu', 'Mg_pfu', 'Ni_pfu', 'Ca_pfu', 'Na_pfu', 'K_pfu'); ds <- selectNames(wtp_data, nms); dsDiv <- rowApply('/', ds, wct); dDiv <- rowSums(dsDiv)*hd; dRes <- 8*rowApply('/', ds, wct) / dDiv; names(dRes) <- pnms; res <-data.frame(Name=wtp_data$Name); return(cbind(res,dRes)); } recalc.ol_macgreg.test <- function () { src <- data.frame(Name='test', SiO2_wtp=41.83, Al2O3_wtp=0.01, Cr2O3_wtp=0.01, FeO_wtp=9.86, MgO_wtp=45.63, CaO_wtp=0.08); result <- recalc.ol_macgreg(src); expect_equal(object = result$Si_pfu, 1.0171, tolerance = 0.05); expect_equal(object = result$Fe_pfu, 0.2005, tolerance = 0.05); expect_equal(object = result$Mg_pfu, 1.7624, tolerance = 0.05); }