Grt-Cpx: Pattison, Newton, 1989 <D>

Details

This sensor from TPF collection

Article
Collibration
Precision
Ranges
Renew sensors

Использовать Проверить

  • заголовок
  • краткое описание
  • статья
  • ссылка
  • карточка
  • подробное описание
  • код
  • тест

Source

source("utilities_tpf.r");

sensors.t.grt_cpx_pattison_newton_1989_d <- function(Grt, Cpx, P, ...){
    Grt <- tpf.recalc_minaral("GRT",Grt);
    Cpx <- tpf.recalc_minaral("CPX",Cpx);

    XX <- (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu) / Grt$Mg_pfu;
    Y <- Grt$Ca_pfu / (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mg_pfu + Grt$Mn_pfu + Grt$Ca_pfu);
    X <- Grt$Mg_pfu / (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mg_pfu);
    Z <- (Cpx$Fe_p2_pfu + Cpx$Fe_p3_pfu) / Cpx$Mg_pfu;
    N <- Cpx$Na2O_wtp;
    if (N>2.2) {
    warning(" CANNOT BE USED FOR NA2O IN CPX >2.2 W. ");
    }
    if (N<2.2) {
    if (X<0.6) {
    if (X<0.125) {
    warning(" CANNOT BE USED FOR MG/(FE2+MG) IN GRT <0.125 ");
    }
    if (X>0.125) {
    if (Y<0.17) {
    warning(" CANNOT BE USED FOR CA/(FE2+MG+CA+MN) IN GRT <0.17");
    }
    if (Y>0.17) {
    if (Y<0.30) {
    C <- 10 * (Y - 0.2);
    B0 <-  - 5.172 + C * ( - 20.3 + 5.172);
    C0 <- 2.317 + C * (7.468 - 2.317);
    D0 <- 0.1742 + C * ( - 0.1479 - 0.1742);
    A1 <- 26370 + C * (43210 - 26370);
    B1 <-  - 32460 + C * ( - 53230 + 32460);
    C1 <- 11050 + C * (18120 - 11050);
    D1 <- 1012 + C * (776 - 1012);
    K <- log(XX / Z);
    T <- (A1 * X^3 + B1 * X^2 + C1 * X + D1) / (K + A0 * X^3 + B0 * X^2 + C0 * X + D0) + 5.5 * (P - 15) - 273;
    warning(" FE2 AND FE3 ARE INVOLVED IN CALCULATIONS");
    }
    }
    if (Y>0.3) {
    warning(" CANNOT BE USED FOR CA/(FE2+MG+CA+MN) IN GRT >0.3");
    }
    }
    }
    if (X>0.6) {
    warning(" CANNOT BE USED FOR MG/(FE2+MG) IN GRT > 0.6");
    }
    }
    return(data.frame(Name=paste0(Cpx$Name,"-", Grt$Name),P=P,T_calc=T));
}

sensors.t.grt_cpx_pattison_newton_1989_d.args <- function(){
    ars <- list();
    ars$minerals <- c("Grt", "Cpx");
    ars$ranges <- c("P");
    return(ars);
}

#sensors.t.grt_cpx_pattison_newton_1989_d.test <- function(){
#
#}
, ,