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

Details

This sensor from TPF collection

Article
Collibration
Precision
Ranges
Renew sensors

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

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

Source

source("utilities_tpf.r");

sensors.t.grt_cpx_pattison_newton_1989_b <- function(Grt, Cpx, P, ...){
    Grt <- tpf.recalc_minaral("GRT2",Grt);
    Cpx <- tpf.recalc_minaral("CPX1",Cpx);
    Cpx <- tpf.recalc_minaral("CPX",Cpx);

    XX <- Grt$Fe_p2_pfu / Grt$Mg_pfu;
    Y <- Grt$Ca_pfu / (Grt$Fe_p2_pfu + Grt$Mg_pfu + Grt$Mn_pfu + Grt$Ca_pfu);
    X <- Grt$Mg_pfu / (Grt$Fe_p2_pfu + Grt$Mg_pfu);
    Z <- Cpx$Fe_p2_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.3) {
    warning(" CANNOT BE USED FOR CA/(FE2+MG+CA+MN) IN GRT <0.3");
    }
    if (Y>0.3) {
    if (Y<0.4) {
    D <- 10 * (Y - 0.3);
    A0 <- 15.87 + D * (14.64 - 15.87);
    B0 <-  - 20.3 + D * ( - 18.72 + 20.3);
    C0 <- 7.468 + D * (6.94 - 7.468);
    D0 <-  - 0.1479 + D * ( - 0.2583 + 0.1479);
    A1 <- 43210 + D * (44900 - 43210);
    B1 <-  - 53230 + D * ( - 55250 + 53230);
    C1 <- 18120 + D * (18820 - 18120);
    D1 <- 776 + D * (712 - 776);
    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(" ONLY FE2 IS INVOLVED IN CALCULATIONS");
    }
    }
    if (Y>0.4) {
    warning(" CANNOT BE USED FOR CA/(FE2+MG+CA+MN) IN GRT >0.4");
    }
    }
    }
    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_b.args <- function(){
    ars <- list();
    ars$minerals <- c("Grt", "Cpx");
    ars$ranges <- c("P");
    return(ars);
}

#sensors.t.grt_cpx_pattison_newton_1989_b.test <- function(){
#
#}
, ,
  • sensors/t/grt_cpx_pattison_newton_1989_b.txt
  • Последние изменения: 2018/11/12 15:07
  • (внешнее изменение)