====== Grt-Hbl-Pl-Qtz: Kohn, Spear, 1990 ====== === Details === This sensor from [[:about_tpf|TPF]] collection ^ Article | | ^ Collibration | | ^ Precision | | ^ Ranges | | ^ Renew sensors | | * заголовок * краткое описание * статья * ссылка * карточка * подробное описание * код * тест === Source === source("utilities_tpf.r"); sensors.p.grt_hbl_pl_qtz_kohn_spear_1990_b <- function(Grt, Hbl, Pl, Qtz, Temp, ...){ T <- Temp; Pl <- tpf.recalc_minaral("PL",Pl); Grt <- tpf.recalc_minaral("GRT",Grt); Hbl <- tpf.recalc_minaral("HBL",Hbl); PG <- Grt$Mg_pfu / (Grt$Mg_pfu + Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mn_pfu + Grt$Ca_pfu); AG <- (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu) / (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mg_pfu + Grt$Mn_pfu + Grt$Ca_pfu); SG <- Grt$Mn_pfu / (Grt$Mg_pfu + Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mn_pfu + Grt$Ca_pfu); GG <- Grt$Ca_pfu / (Grt$Mg_pfu + Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Mn_pfu + Grt$Ca_pfu); AN <- Pl$Ca_pfu / (Pl$Ca_pfu + Pl$Na_pfu + Pl$K_pfu); AB <- Pl$Na_pfu / (Pl$Ca_pfu + Pl$Na_pfu + Pl$K_pfu); FPRG1 <- 256 / 27 * (8 - Hbl$Si_pfu) / 4 * ((Hbl$Si_pfu - 4) / 4)^3; FPRG2 <- (Hbl$Fe_p2_pfu + Hbl$Fe_p3_pfu) / (Hbl$Fe_p2_pfu + Hbl$Fe_p3_pfu + Hbl$Mg_pfu); FTR <- ((Hbl$Si_pfu - 4) / 4)^4 * ((Hbl$Fe_p2_pfu + Hbl$Fe_p3_pfu) / (Hbl$Fe_p2_pfu + Hbl$Fe_p3_pfu + Hbl$Mg_pfu))^2; MNN <- Hbl$Ca_pfu; MGG <- Hbl$Ti_pfu; NAH <- Hbl$Na_pfu; KH <- Hbl$K_pfu; ALH <- Hbl$Al_c4_pfu + Hbl$Al_c6_pfu; XH <- (Hbl$Fe_p3_pfu + Hbl$Fe_p2_pfu) / (Hbl$Fe_p2_pfu + Hbl$Fe_p3_pfu + Hbl$Mg_pfu); FPRG <- FPRG1 * FPRG2; TT <- T + 273; AGR <- (GG * exp((13800 - 6.28 * TT) * (PG^2 + AG * PG + PG * SG) / 8.314 / TT))^3; AA <- (AG * exp((13800 - 6.28 * TT) * ( - PG * GG) / 8.314 / TT))^3; AAN <- AN * exp(610.34 / TT - 0.3837); K2 <- AGR^2 * AA * FPRG^3 / (AAN^6 * FTR^3); if (XH<0.7) { P <- (35327 + TT * (56.09 + 8.3144 * log(K2))) / 11906; warning("FE-EQUIVALENT OF BAROMETRY"); } if (XH>0.7) { warning(" ONLY FOR FE/(FE+MG) IN HBL <0.7"); } if (XH<0.4) { warning(" ONLY FOR FE/(FE+MG) IN HBL >0.4"); } if (KH>0.4001) { warning(" ONLY FOR K IN HBL <0.4"); } if (NAH>0.6001) { warning(" ONLY FOR NA IN HBL <0.6"); } if (NAH<0.2999) { warning(" ONLY FOR NA IN HBL >0.3"); } if (ALH>3.75001) { warning(" ONLY FOR AL IN HBL <3.75"); } if (ALH<1.8999) { warning(" ONLY FOR AL IN HBL >1.9"); } if (MGG>0.274) { warning(" ONLY FOR TI IN HBL <0.275"); } if (MNN<1.499) { warning(" ONLY FOR CA IN HBL >1.5"); } if (AN>0.75) { warning(" ONLY FOR CA/(CA+NA+K) IN PL <0.75"); } if (AN<0.15) { warning(" ONLY FOR CA/(CA+NA+K) IN PL >0.15"); } if (SG>0.15) { warning(" ONLDY FOR MN/(CA+FE+MG+MN) IN GRT <0.15"); } return(data.frame(Name=paste0(Pl$Name,"-", Hbl$Name,"-", Grt$Name),Temp=Temp,P_calc=P)); } sensors.p.grt_hbl_pl_qtz_kohn_spear_1990_b.args <- function(){ ars <- list(); ars$minerals <- c("Grt", "Hbl", "Pl", "Qtz"); ars$ranges <- c("Temp"); return(ars); } #sensors.p.grt_hbl_pl_qtz_kohn_spear_1990_b.test <- function(){ # #} {{tag> tpf Pl Hbl Grt }}