This sensor from TPF collection
Article | |
---|---|
Collibration | |
Precision | |
Ranges | |
Renew sensors |
source("utilities_tpf.r"); sensors.t.ol_cpx_fonarev_1987 <- function(Ol, Cpx, P, ...){ Ol <- tpf.recalc_minaral("OL",Ol); Cpx <- tpf.recalc_minaral("CPX",Cpx); X <- (Cpx$Fe_p2_pfu + Cpx$Fe_p3_pfu) / (Cpx$Mg_pfu + Cpx$Fe_p2_pfu + Cpx$Fe_p3_pfu + Cpx$Ca_pfu); Y <- (Ol$Fe_p2_pfu + Ol$Fe_p3_pfu) / (Ol$Mg_pfu + Ol$Fe_p2_pfu + Ol$Fe_p3_pfu + Ol$Ca_pfu); Z <- Cpx$Al2O3_wtp + Cpx$Na2O_wtp + Cpx$TiO2_wtp + Cpx$MnO_wtp; if (X>0.1) { if (X<0.55) { if (Z<3) { if (P<20) { A <- 70.866 * X - 696.58 * X^2 + 1946.22 * X^3 - 1664.429 * X^4 - Y * (1.005 - 0.001 * P); B <- - 152.971 * X + 1461.15 * X^2 - 3989.798 * X^3 + 3362.192 * X^4; G <- 84.728 * X - 756.067 * X^2 + 2004.927 * X^3 - 1661.06 * X^4; T <- (2 * G * 1000 / ( - B + sqrt(B^2 - 4 * A * G))) - 273.15; if (T<820) { if (T>600) { if (T>820) { warning(" IS NOT TO BE USED FOR T>820 C"); } if (T<600) { warning(" IS NOT TO BE USED FOR T<600 C"); } } if (P>20) { warning(" IS NOT TO BE USED FOR P>20 KBAR"); } } if (Z>3) { warning(" IS NOT TO BE USED FOR (AL2O3+MNO+TIO2+NA2O) IN CPX >3 W."); } } if (X>0.55) { warning(" IS NOT TO BE USED FOR FE/(FE+MG+CA) IN CPX >0.55"); } } if (X<0.1) { warning(" IS NOT TO BE USED FOR FE/(FE+MG+CA) IN CPX <0.1"); }}} return(data.frame(Name=paste0(Cpx$Name,"-", Ol$Name),P=P,T_calc=T)); } sensors.t.ol_cpx_fonarev_1987.args <- function(){ ars <- list(); ars$minerals <- c("Ol", "Cpx"); ars$ranges <- c("P"); return(ars); } #sensors.t.ol_cpx_fonarev_1987.test <- function(){ # #}