====== Grt-Opx-Pl-Qtz: Perkins, Newton, 1981 ====== === Details === This sensor from [[:about_tpf|TPF]] collection ^ Article | | ^ Collibration | | ^ Precision | | ^ Ranges | | ^ Renew sensors | | * заголовок * краткое описание * статья * ссылка * карточка * подробное описание * код * тест === Source === source("utilities_tpf.r"); sensors.p.grt_opx_pl_qtz_perkins_newton_1981 <- function(Grt, Opx, Pl, Qtz, Temp, ...){ T <- Temp; Opx <- tpf.recalc_minaral("OPX",Opx); Pl <- tpf.recalc_minaral("PL",Pl); Grt <- tpf.recalc_minaral("GRT",Grt); A <- (1 - (Opx$Al_c4_pfu + Opx$Al_c6_pfu) / 2 - Opx$Ti_pfu - Opx$Cr_pfu - Opx$Fe_p3_pfu) * Opx$Mg_pfu; B <- (1 - Opx$Mn_pfu - Opx$Ca_pfu - Opx$Na_pfu) * Opx$Mg_pfu; C <- (1 - (Opx$Al_c4_pfu + Opx$Al_c6_pfu) / 2 - Opx$Ti_pfu - Opx$Cr_pfu - Opx$Fe_p3_pfu) * Opx$Fe_p2_pfu; D <- 1 - (Opx$Al_c4_pfu + Opx$Al_c6_pfu) / 2 - Opx$Ti_pfu - Opx$Cr_pfu - Opx$Fe_p3_pfu + 1 - Opx$Mn_pfu - Opx$Ca_pfu - Opx$Na_pfu; X <- Grt$Ca_pfu / (Grt$Ca_pfu + Grt$Mg_pfu + Grt$Fe_p3_pfu + Grt$Fe_p2_pfu + Grt$Mn_pfu); Y <- Grt$Mg_pfu / (Grt$Ca_pfu + Grt$Mg_pfu + Grt$Fe_p3_pfu + Grt$Fe_p2_pfu + Grt$Mn_pfu); F <- (Grt$Fe_p3_pfu + Grt$Fe_p2_pfu) / (Grt$Ca_pfu + Grt$Mg_pfu + Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mn_pfu); Z <- Pl$Ca_pfu / (Pl$Ca_pfu + Pl$Na_pfu + Pl$K_pfu); G <- Pl$Na_pfu / (Pl$Ca_pfu + Pl$Na_pfu + Pl$K_pfu); TT <- T + 273.15; K <- exp((3300 - 1.5 * TT) * (Y^2 + Y * F) / (1.9872 * TT)); L <- exp((3300 - 1.5 * TT) * (X^2 + X * F) / (1.9872 * TT)); K <- X * K; L <- Y * L; A <- A * B / D / D; M <- exp(G^2 * (2025 + 2 * Z * (6746 - 2025)) / (1.9872 * TT)); M <- M * Z * (1 + Z)^2 / 4; P <- (3944 + 13.07 * TT + 3.5038 * TT * log(K * L^2 / A / M)) / 1000; warning(" ACCURACY +-1.5 KBAR"); return(data.frame(Name=paste0(Pl$Name,"-", Grt$Name,"-", Opx$Name),Temp=Temp,P_calc=P)); } sensors.p.grt_opx_pl_qtz_perkins_newton_1981.args <- function(){ ars <- list(); ars$minerals <- c("Grt", "Opx", "Pl", "Qtz"); ars$ranges <- c("Temp"); return(ars); } #sensors.p.grt_opx_pl_qtz_perkins_newton_1981.test <- function(){ # #} {{tag> tpf Pl Grt Opx }}