This sensor from TPF collection
Article | |
---|---|
Collibration | |
Precision | |
Ranges | |
Renew sensors |
source("utilities_tpf.r"); sensors.p.grt_bt_ms_pl_avchenko_kuznetsova_1988 <- function(Grt, Bt, Ms, Pl, Temp, ...){ Name <- paste0(Ms$Name,"-", Pl$Name,"-", Grt$Name,"-", Bt$Name); T <- Temp; Pl <- tpf.recalc_minaral("PL",Pl); Bt <- tpf.recalc_minaral("BT",Bt); Ms <- tpf.recalc_minaral("MS",Ms); Grt <- tpf.recalc_minaral("GRT",Grt); L <- Pl$Ca_pfu / (Pl$Ca_pfu + Pl$Na_pfu + Pl$K_pfu); X <- (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu) / (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mg_pfu + Grt$Ca_pfu + Grt$Mn_pfu); Y <- Grt$Ca_pfu / (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mg_pfu + Grt$Ca_pfu + Grt$Mn_pfu); Z <- Grt$Mg_pfu / (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mg_pfu + Grt$Ca_pfu + Grt$Mn_pfu); KB <- log(Bt$K_pfu * (Bt$Mg_pfu / (Bt$Mg_pfu + Bt$Fe_p2_pfu + Bt$Fe_p3_pfu + Bt$Mn_pfu + Bt$Ti_pfu + Bt$Al_c6_pfu))^3 * (4 - Bt$Si_pfu) * (Bt$Si_pfu / 3)^3); KM <- log(Ms$K_pfu * (Ms$Al_c6_pfu / (Ms$Mg_pfu + Ms$Fe_p2_pfu + Ms$Fe_p3_pfu + Ms$Mn_pfu + Ms$Ti_pfu + Ms$Al_c6_pfu))^2 * (4 - Ms$Si_pfu) * (Ms$Si_pfu / 3)^3); TT <- T + 273; G <- ((2404 + 0.258 * TT) * Y * (2 - Y) + (5704 - 1.242 * TT) * Z * (1 - Y) - (234 + 0.748 * TT)) / 1.9872 / TT; AG <- 3 * log(Y) + 3 * G; PI <- ((3300 - 1.5 * TT) * Y^2 + (5704 - 1.242 * TT) * Y * X) / 1.9872 / TT; AP <- 3 * log(Z) + 3 * PI; W <- L * (1 + L)^2 / 4; AA <- log(W) + (1 - L)^2 * (2050 + 9392 * L) / 1.9872 / TT; if (T>450.0) { if (T<750.0) { if (Z>0.1) { A <- 498; B <- 27.32; P <- (A + B * TT + 1.9872 * TT * (AG + AP + KM - AA * 3 - KB)) / (1.678 + 4.566 * (0.2 - Y)^2) / 1000; } } } if (Y<0.08) { warning(" IS NOT TO BE USED FOR CA/(MG+MN+FE+CA) IN GRT <0.08"); } if (Z<0.1) { warning(" IS NOT TO BE USED FOR MG/(MG+MN+FE+CA) IN GRT <0.1"); } if (T<450.0) { warning(" IS NOT TO BE USED FOR T<450 C"); } if (T>750.0) { warning(" IS NOT TO BE USED FOR T>750 C"); } return(data.frame(Name=Name,Temp=Temp,P_calc=P)); } sensors.p.grt_bt_ms_pl_avchenko_kuznetsova_1988.args <- function(){ ars <- list(); ars$minerals <- c("Grt", "Bt", "Ms", "Pl"); ars$ranges <- c("Temp"); return(ars); } #sensors.p.grt_bt_ms_pl_avchenko_kuznetsova_1988.test <- function(){ # #}