Grt-Cpx: Mercier, 1980 <B>

Details

This sensor from TPF collection

Article
Collibration
Precision
Ranges
Renew sensors

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

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

Source

source("utilities_tpf.r");

sensors.p.grt_cpx_mercier_1980_b <- function(Cpx, ...){
    Name = Cpx$Name;
    Cpx <- tpf.recalc_minaral("CPX",Cpx);

    A <- (Cpx$Al_c4_pfu + Cpx$Al_c6_pfu - 0.57 * Cpx$Na_pfu) / 2;
    W <- Cpx$Ca_pfu / (Cpx$Ca_pfu + Cpx$Mg_pfu + Cpx$Fe_p2_pfu + Cpx$Fe_p3_pfu + Cpx$Mn_pfu - 0.18 * Cpx$Na_pfu);
    FCR <- Cpx$Cr_pfu / (Cpx$Al_c4_pfu + Cpx$Al_c6_pfu + Cpx$Cr_pfu - 0.57 * Cpx$Na_pfu);
    MG <- Cpx$Mg_pfu;
    XKW <- (1 - 2 * W) / (0.833 + 0.334 * W);
    if (XKW<0.3785) {
    XKA <- A * (1 - A) * (3.298 - 1.781 * MG - 0.128 * log(XKW)) / (1 - 0.71 * FCR)^2;
    D <- log(XKA) * log(XKW) - 6.9010 * log(XKW) + 2.2595 * log(XKA) + 29.471;
    P <- (176.43 * log(XKW) - 706.14 * log(XKA) - 224.56) / D;
    }
    if (XKW>0.3785) {
    XKW <- (1 - 2 * W) / (0.862 + 0.276 * W);
    XKA <- A * (1 - A) * (3.298 - 1.781 * MG - 0.128 * log(XKW)) / (1 - 0.71 * FCR)^2;
    D <- log(XKA) * log(XKW) - 6.9010 * log(XKW) + 2.2595 * log(XKA) + 29.471;
    P <- (176.43 * log(XKW) - 706.14 * log(XKA) - 224.56) / D;
    }
    return(data.frame(Name=Name,P_calc=P));
}

sensors.p.grt_cpx_mercier_1980_b.args <- function(){
    ars <- list();
    ars$minerals <- c("Cpx");
    ars$ranges <- c();
    return(ars);
}

#sensors.p.grt_cpx_mercier_1980_b.test <- function(){
#
#}
,