====== Grt-Cpx: Mercier, 1980 ====== === Details === This sensor from [[:about_tpf|TPF]] collection ^ Article | | ^ Collibration | | ^ Precision | | ^ Ranges | | ^ Renew sensors | | * заголовок * краткое описание * статья * ссылка * карточка * подробное описание * код * тест === Source === source("utilities_tpf.r"); sensors.t.grt_cpx_mercier_1980_a <- function(Grt, Cpx, ...){ Cpx <- tpf.recalc_minaral("CPX",Cpx); A <- (Cpx$Al_c4_pfu + Cpx$Al_c6_pfu - 0.57 * Cpx$Na_pfu) / 2; W <- Cpx$Ca_pfu / (Cpx$Ca_pfu + Cpx$Mg_pfu + Cpx$Fe_p2_pfu + Cpx$Fe_p3_pfu + Cpx$Mn_pfu - 0.18 * Cpx$Na_pfu); FCR <- Cpx$Cr_pfu / (Cpx$Al_c4_pfu + Cpx$Al_c6_pfu + Cpx$Cr_pfu - 0.57 * Cpx$Na_pfu); MG <- Cpx$Mg_pfu; XKW <- (1 - 2 * W) / (0.833 + 0.334 * W); if (XKW<0.3785) { XKA <- A * (1 - A) * (3.298 - 1.781 * MG - 0.128 * log(XKW)) / (1 - 0.71 * FCR)^2; D <- log(XKA) * log(XKW) - 6.9010 * log(XKW) + 2.2595 * log(XKA) + 29.471; T <- (53754 - 3168.1 * log(XKW)) / D - 273.15; } if (XKW>0.3785) { XKW <- (1 - 2 * W) / (0.862 + 0.276 * W); XKA <- A * (1 - A) * (3.298 - 1.781 * MG - 0.128 * log(XKW)) / (1 - 0.71 * FCR)^2; D <- log(XKA) * log(XKW) - 6.9010 * log(XKW) + 2.2595 * log(XKA) + 29.471; T <- (53754 - 3168.1 * log(XKW)) / D - 273.15; } return(data.frame(Name=paste0(Cpx$Name),T_calc=T)); } sensors.t.grt_cpx_mercier_1980_a.args <- function(){ ars <- list(); ars$minerals <- c("Grt", "Cpx"); ars$ranges <- c(); return(ars); } #sensors.t.grt_cpx_mercier_1980_a.test <- function(){ # #} {{tag> tpf Cpx }}