====== Cal-Dol: Covey-Crump, Rutter, 1989 ======
=== Details ===
This sensor from [[:about_tpf|TPF]] collection
^ Article | |
^ Collibration | |
^ Precision | |
^ Ranges | |
^ Renew sensors | |
* заголовок
* краткое описание
* статья
* ссылка
* карточка
* подробное описание
* код
* тест
=== Source ===
source("utilities_tpf.r");
sensors.t.cal_dol_covey_rutter_1989 <- function(Cal, Dol, P, ...){
Cal <- tpf.recalc_minaral("CAL",Cal);
X <- Cal$Mg_pfu / (Cal$Fe_p2_pfu + Cal$Fe_p3_pfu + Cal$Mn_pfu + Cal$Mg_pfu + Cal$Ca_pfu);
if (P<3.99999) {
warning(" CANNOT BE USED FOR P<4 KBAR.");
}
if (P>6.000) {
warning(" CANNOT BE USED FOR P>6 KBAR.");
}
if (P<6.000) {
if (P>3.99999) {
if (X<0.0700) {
T <- 1000 / (0.5528 - 0.2996 * log(2 * X)) - 273;
}
if (X>0.07000) {
T <- 1000 / (0.6693 - 0.2397 * log(2 * X)) - 273;
}
}
}
return(data.frame(Name=paste0(Cal$Name),P=P,T_calc=T));
}
sensors.t.cal_dol_covey_rutter_1989.args <- function(){
ars <- list();
ars$minerals <- c("Cal", "Dol");
ars$ranges <- c("P");
return(ars);
}
#sensors.t.cal_dol_covey_rutter_1989.test <- function(){
#
#}
{{tag> tpf Cal }}