====== Bt: Tindle, 1990 ====== Recalculation to 22 ox with F,Cl correction. Li2O and H2O calculations after Tindle and Webb, 1990. === Details === ^ Reference | | ^ Input | SiO2_wtp, TiO2_wtp, Al2O3_wtp, FeO_wtp, MnO_wtp, MgO_wtp, CaO_wtp, Na2O_wtp, K2O_wtp, SrO_wtp, BaO_wtp, Rb2O_wtp, Cs2O_wtp, ZnO_wtp, SnO2_wtp, Ga2O3_wtp, F_wtp, Cl_wtp, Cr2O3_wtp, NiO_wtp, CuO_wtp | ^ Results | pfu, Al_c4_pfu, Al_c6_pfu, Li_pfu, OH_pfu | * заголовок * краткое описание * статья * ссылка * карточка * подробное описание * код * тест === Source === recalc.bt_tindle <- function (wtp_data, ...) { base_names <- c('SiO2_wtp','TiO2_wtp','Al2O3_wtp','FeO_wtp','MnO_wtp','MgO_wtp','CaO_wtp','Na2O_wtp','K2O_wtp', 'SrO_wtp','BaO_wtp','Rb2O_wtp','Cs2O_wtp','ZnO_wtp','SnO2_wtp','Ga2O3_wtp', 'F_wtp','Cl_wtp','Cr2O3_wtp','NiO_wtp','CuO_wtp'); data <- selectNames(wtp_data,base_names); data$Li2O_wtp <- (0.287*data$SiO2_wtp)-9.552; data$Li2O_wtp <- ifelse(data$Li2O_wtp<0,0,data$Li2O_wtp); step1_coeff <- c(30.045,39.95,33.9867,71.85,70.94,40.31,56.08,61.98,94.22, 103.62,153.36,186.936,281.811,81.38,75.345,62.48, 19,35.45,50.6667,74.7,79.55,29.88); step1_data <- rowApply(`/`, data, step1_coeff); step1_sum <- rowSums(step1_data); F_Cl_corr <- step1_sum - step1_data$F_wtp - step1_data$Cl_wtp; Ox_Num <- 22/F_Cl_corr; step2_data <- rowApply(`*`, step1_data, Ox_Num); pfu_names <- c('Si_pfu','Ti_pfu','Al_pfu','Fe_pfu','Mn_pfu','Mg_pfu','Ca_pfu','Na_pfu','K_pfu', 'Sr_pfu','Ba_pfu','Rb_pfu','Cs_pfu','Zn_pfu','Sn_pfu','Ga_pfu', 'F_pfu','Cl_pfu','Cr_pfu','Ni_pfu','Cu_pfu','Li_pfu'); ox_norm <- c( 1/2,1/2,2/3,1/1,1/1,1/1,1/1,2/1,2/1, 1/1,1/1,2/1,2/1,1/1,1/2,2/3, 1,1,2/3,1/1,1/1,2/1); step3_data <- rowApply(`*`, step2_data, ox_norm) ; names(step3_data) <- pfu_names; step3_data$Al_c4_pfu <- ifelse(step3_data$Al_pfu > 8-step3_data$Si_pfu,8-step3_data$Si_pfu,step3_data$Al_pfu); step3_data$Al_c4_pfu <- ifelse(step3_data$Si_pfu>8,0,step3_data$Al_c4_pfu); step3_data$Al_c6_pfu <- ifelse(step3_data$Si_pfu+step3_data$Al_pfu<8,0,step3_data$Al_pfu-step3_data$Al_c4_pfu); step3_data$ОН_pfu <- 4 - step3_data$F_pfu - step3_data$Cl_pfu; step3_data$ОН_pfu <- ifelse(step3_data$ОН_pfu < 0, 0 , step3_data$ОН_pfu); step3_data$Name <- wtp_data$Name; return(step3_data[,c('Name',pfu_names,'Al_c4_pfu','Al_c6_pfu','ОН_pfu')]); } recalc.bt_tindle.test <- function () { src <- data.frame(Name='test',Na2O_wtp=0.28, MgO_wtp=9.31, Al2O3_wtp=19.56, SiO2_wtp=34.25, Cl_wtp = 0.07, K2O_wtp=9.43, CaO_wtp=0.02, TiO2_wtp=2.3,Cr2O3_wtp=0.06,FeO_wtp =20.36); result <- recalc.bt_tindle (src); expect_equal(object = result$Al_c4_pfu,2.781, tolerance = 0.005); expect_equal(object = result$Al_c6_pfu,0.732, tolerance = 0.005); expect_equal(object = result$Li_pfu,0.17, tolerance = 0.005); expect_equal(object = result$Mg_pfu,2.115, tolerance = 0.005); expect_equal(object = result$OH_pfu,3.982, tolerance = 0.005); }