====== Grt-Opx: Harley, Green, 1982 ====== === Details === This sensor from [[:about_tpf|TPF]] collection ^ Article | | ^ Collibration | | ^ Precision | | ^ Ranges | | ^ Renew sensors | | * заголовок * краткое описание * статья * ссылка * карточка * подробное описание * код * тест === Source === source("utilities_tpf.r"); sensors.p.grt_opx_harley_green_1982 <- function(Grt, Opx, Temp, ...){ T <- Temp; Opx <- tpf.recalc_minaral("OPX",Opx); Grt <- tpf.recalc_minaral("GRT",Grt); X <- (Opx$Fe_p2_pfu + Opx$Fe_p3_pfu) / (Opx$Fe_p2_pfu + Opx$Fe_p3_pfu + Opx$Mg_pfu); Y <- (Opx$Al_c4_pfu + Opx$Al_c6_pfu) / 2; C <- Grt$Ca_pfu / (Grt$Ca_pfu + Grt$Mg_pfu + Grt$Fe_p2_pfu + Grt$Fe_p3_pfu); F <- (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu) / (Grt$Fe_p2_pfu + Grt$Fe_p3_pfu + Grt$Ca_pfu + Grt$Mg_pfu); K <- Y * (1 - Y) / (1 - C) / (1 - C) / (1 - C); D <- - 183.3 - 178.98 * Y * (1 - Y); P <- ((1.9872 * log(K) - 2.93) * (T + 273) + 5650 + 5157 * (1 - Y) * (1 - 2 * Y) * X - 6300 * (C * F + C * C)) / D; return(data.frame(Name=paste0(Grt$Name,"-", Opx$Name),Temp=Temp,P_calc=P)); } sensors.p.grt_opx_harley_green_1982.args <- function(){ ars <- list(); ars$minerals <- c("Grt", "Opx"); ars$ranges <- c("Temp"); return(ars); } #sensors.p.grt_opx_harley_green_1982.test <- function(){ # #} {{tag> tpf Grt Opx }}