====== Grt-Pl-Qtz-Ky: Ghent, 1979 ======
=== Details ===
This sensor from [[:about_tpf|TPF]] collection
^ Article | |
^ Collibration | |
^ Precision | |
^ Ranges | |
^ Renew sensors | |
* заголовок
* краткое описание
* статья
* ссылка
* карточка
* подробное описание
* код
* тест
=== Source ===
source("utilities_tpf.r");
sensors.p.grt_pl_qtz_ky_ghent_1979 <- function(Grt, Pl, Qtz, Ky, Temp, ...){
T <- Temp;
Pl <- tpf.recalc_minaral("PL",Pl);
Grt <- tpf.recalc_minaral("GRT",Grt);
X <- Pl$Ca_pfu / (Pl$Ca_pfu + Pl$Na_pfu + Pl$K_pfu);
N <- Grt$Ca_pfu;
M <- Grt$Mg_pfu + Grt$Mn_pfu;
Z <- Grt$Fe_p2_pfu + Grt$Fe_p3_pfu;
A <- Grt$Ca_pfu + Grt$Mg_pfu + Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mn_pfu + Grt$Al_pfu;
E <- Grt$Al_pfu + 4 * Grt$Si_pfu;
B <- 5 / A;
L <- 2 * A * B + E * B;
Y <- 24 - L;
if (Y>0) {
F <- Z - Y;
C <- N - 1.5 * Y;
K <- C / (C + F + M);
P <- ((T + 273) / 0.3448 * (8.3969 - 3272 / (T + 273) + 3 * log(K) - 3 * log(X) - 0.4) - 1) / 1000;
warning(" ACCURACY +-1 KBAR");
}
if (Y<0) {
K <- N / (N + M + Z);
P <- ((T + 273) / 0.3448 * (8.3969 - 3272 / (T + 273) + 3 * log(K) - 3 * log(X) - 0.4) - 1) / 1000;
warning(" ACCURACY +-1 KBAR");
}
return(data.frame(Name=paste0(Pl$Name,"-", Grt$Name),Temp=Temp,P_calc=P));
}
sensors.p.grt_pl_qtz_ky_ghent_1979.args <- function(){
ars <- list();
ars$minerals <- c("Grt", "Pl", "Qtz", "Ky");
ars$ranges <- c("Temp");
return(ars);
}
#sensors.p.grt_pl_qtz_ky_ghent_1979.test <- function(){
#
#}
{{tag> tpf Pl Grt }}