====== Cpx-Pl-Qtz: Ellis, 1980 ======
=== Details ===
This sensor from [[:about_tpf|TPF]] collection
^ Article | |
^ Collibration | |
^ Precision | |
^ Ranges | |
^ Renew sensors | |
* заголовок
* краткое описание
* статья
* ссылка
* карточка
* подробное описание
* код
* тест
=== Source ===
source("utilities_tpf.r");
sensors.p.cpx_pl_qtz_ellis_1980 <- function(Cpx, Pl, Temp, ...){
Name <- paste0(Cpx$Name,"-", Pl$Name);
T <- Temp;
Pl <- tpf.recalc_minaral("PL",Pl);
Cpx <- tpf.recalc_minaral("CPX",Cpx);
X <- Pl$Na_pfu / (Pl$Na_pfu + Pl$K_pfu + Pl$Ca_pfu);
Y <- Pl$Ca_pfu / (Pl$Na_pfu + Pl$K_pfu + Pl$Ca_pfu);
Z <- (Cpx$Al_c4_pfu + Cpx$Al_c6_pfu + Cpx$Cr_pfu) / 2 - Cpx$Na_pfu - Cpx$K_pfu;
TT <- T + 273;
K <- TT * (2.9876 + 1.9872 * log(Z / Y));
L <- X * Y * (967 + 715 * (X - Y));
M <- 26885 * ((Z * (1 - Z))^2);
P <- (5360 + K + 12864 * Z * (1 - Z) - M - L) / 0.349 / 1000;
return(data.frame(Name=Name,Temp=Temp,P_calc=P));
}
sensors.p.cpx_pl_qtz_ellis_1980.args <- function(){
ars <- list();
ars$minerals <- c("Cpx", "Pl");
ars$ranges <- c("Temp");
return(ars);
}
#sensors.p.cpx_pl_qtz_ellis_1980.test <- function(){
#
#}
{{tag> tpf Pl Cpx }}