====== Grt-Sil-Pl-Qtz: Avchenko, Kuznetsova, 1988 ======
=== Details ===
This sensor from [[:about_tpf|TPF]] collection
^ Article | |
^ Collibration | |
^ Precision | |
^ Ranges | |
^ Renew sensors | |
* заголовок
* краткое описание
* статья
* ссылка
* карточка
* подробное описание
* код
* тест
=== Source ===
source("utilities_tpf.r");
sensors.p.grt_sil_pl_qtz_avchenko_kuznetsova_1988 <- function(Grt, Sil, Pl, Qtz, Temp, ...){
T <- Temp;
Pl <- tpf.recalc_minaral("PL",Pl);
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);
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;
W <- L * (1 + L)^2 / 4;
AA <- log(W) + (1 - L)^2 * (2050 + 9392 * L) / 1.9872 / TT;
if (T>450.0) {
if (T<1050.0) {
if (Z>0.1) {
A <- - 5393.01 - 2.33 * TT + 0.000216 * TT^2;
B <- 22.372 + 0.00813 * TT - 0.000002833 * TT^2;
P <- (A + B * TT + 1.9872 * TT * (AG - 3 * AA)) / (1.213 + 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>1050.0) {
warning(" IS NOT TO BE USED FOR T>1050 C");
}
return(data.frame(Name=paste0(Pl$Name,"-", Grt$Name),Temp=Temp,P_calc=P));
}
sensors.p.grt_sil_pl_qtz_avchenko_kuznetsova_1988.args <- function(){
ars <- list();
ars$minerals <- c("Grt", "Sil", "Pl", "Qtz");
ars$ranges <- c("Temp");
return(ars);
}
#sensors.p.grt_sil_pl_qtz_avchenko_kuznetsova_1988.test <- function(){
#
#}
{{tag> tpf Pl Grt }}