Amp: Holland, 1995

Formula per 23 Oxygens with Fe2+ ↔ Fe3+ calculation by max-min averege. Involved components: SiO2_wtp, TiO2_wtp, Al2O3_wtp, FeO_wtp, MgO_wtp, MnO_wtp, CaO_wtp, Na2O_wtp, K2O_wtp, F_wtp, Cl_wtp.

Details

Reference Tim Holland, Jon Blundy Non-ideal interactions in calcic amphiboles and their bearing on amphibole-plagioclase thermometry, 1994 [ref]
Input SiO2_wtp, TiO2_wtp, Al2O3_wtp, FeO_wtp, MgO_wtp, MnO_wtp, CaO_wtp, Na2O_wtp, K2O_wtp, F_wtp, Cl_wtp
Results Al_c4_pfu, Al_c6_pfu, Fe_p2_M123_pfu, Fe_p3_pfu , Fe_p2_M4_pfu, Fe_p2_pfu, Ca_M123_pfu, Ca_M4_pfu, Ca_A_pfu, Na_M4_pfu, Na_A_pfu,OH_pfu

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

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

Source

recalc.amp_holland_blundy <- function (wtp_data, ...){

    ox_group <-c('SiO2_wtp','TiO2_wtp', 'Al2O3_wtp', 'FeO_wtp', 'MgO_wtp', 'MnO_wtp', 'CaO_wtp', 'Na2O_wtp', 'K2O_wtp', 'F_wtp', 'Cl_wtp');

    w <- selectNames(wtp_data,ox_group);

    # Stage 1:
    
    p <- data.frame(Name=wtp_data$Name);

    atom_prop <- w$SiO2_wtp/60.09*2+w$TiO2_wtp/79.9*2+w$Al2O3_wtp/101.94*3+w$FeO_wtp/71.85+w$MgO_wtp/40.32+w$MnO_wtp/70.94+w$CaO_wtp/56.08+w$Na2O_wtp/61.982+w$K2O_wtp/94.2;

    p$Si_pfu <- w$SiO2_wtp/60.09*2*23/atom_prop/2;
    p$Al_c4_pfu <- 8-p$Si_pfu;
    p$Al_c6_pfu <- w$Al2O3_wtp/101.94*3*23/atom_prop*2/3 - p$Al_c4_pfu;
    p$Al_pfu <- p$Al_c4_pfu + p$Al_c6_pfu;
    p$Ti_pfu <- w$TiO2_wtp/79.9*2*23/atom_prop/2;
    p$Mg_pfu <- w$MgO_wtp/40.32*23/atom_prop;
    p$Mn_pfu <- w$MnO_wtp/70.94*23/atom_prop;
    
    M123_occup <- 5 - (p$Al_c6_pfu+p$Ti_pfu+p$Mg_pfu+p$Mn_pfu);
    p$Fe_p2_M123_pfu <- w$FeO_wtp/71.85*23/atom_prop;
    p$Fe_p2_M123_pfu <- ifelse(M123_occup > p$Fe_p2_M123_pfu ,p$Fe_p2_M123_pfu, M123_occup);
    
    M123_sum <- (p$Al_c6_pfu+p$Ti_pfu+p$Mg_pfu+p$Mn_pfu+p$Fe_p2_M123_pfu);
    p$Ca_M123_pfu <- ifelse(M123_sum == 5,0,5-M123_sum);
    
    p$Fe_p2_M4_pfu <- w$FeO_wtp/71.85*23/atom_prop - p$Fe_p2_M123_pfu;
    p$Fe_p2_pfu <- p$Fe_p2_M4_pfu + p$Fe_p2_M123_pfu;

    p$Ca_M4_pfu <- w$CaO_wtp/56.08*23/atom_prop;
    p$Ca_M4_pfu <- ifelse(p$Fe_p2_M4_pfu+p$Ca_M4_pfu-p$Ca_M123_pfu<=2, p$Ca_M4_pfu-p$Ca_M123_pfu,2-p$Fe_p2_M4_pfu);

    p$Na_M4_pfu <- 2-p$Ca_M4_pfu-p$Fe_p2_M4_pfu;
    p$Na_M4_pfu <- ifelse(p$Na_M4_pfu>=0,p$Na_M4_pfu,0);
    
    p$Ca_pfu <- w$CaO_wtp/56.08*23/atom_prop;
    p$Ca_A_pfu <- p$Ca_pfu - p$Ca_M4_pfu - p$Ca_M123_pfu;
    
    p$Na_pfu <- w$Na2O_wtp/61.982*23/atom_prop*2;
    p$Na_A_pfu <- p$Na_pfu - p$Na_M4_pfu;
    
    p$K_pfu <- w$K2O_wtp/94.2*23/atom_prop*2;
    
    p$F_pfu <- w$F_wtp/19*23/atom_prop;
    p$Cl_pfu <- w$Cl_wtp/35.457*23/atom_prop;
    p$OH_pfu <- 2 - p$F_pfu - p$Cl_pfu;
    
    Cations <- 8+5+p$Fe_p2_M4_pfu+p$Ca_M4_pfu+p$Na_M4_pfu+p$K_pfu+p$Na_A_pfu+p$Ca_A_pfu;
    Cation_Chg <- (p$Si_pfu+p$Ti_pfu)*4+(p$Al_c4_pfu+p$Al_c6_pfu)*3+
                  (p$Mg_pfu+p$Mn_pfu+p$Fe_p2_M123_pfu+p$Ca_M123_pfu+p$Fe_p2_M4_pfu+p$Ca_M4_pfu+p$Ca_A_pfu)*2+
                  p$Na_M4_pfu+p$Na_A_pfu+p$K_pfu;
    
    p$f1 <- 16/Cations;
    p$f2 <- 8/p$Si_pfu;
    p$f3 <- 15/(Cations-(p$Na_M4_pfu+p$Na_A_pfu+p$K_pfu));
    p$f4 <- 2/(p$Ca_M4_pfu + p$Ca_A_pfu);
    p$f5 <- 1;
    p$f6 <- 8 / (p$Si_pfu + p$Al_pfu);
    p$f7 <- 15/(Cations-p$K_pfu);
    p$f8 <- 12.9 / (Cations-p$Ca_M123_pfu-p$Ca_M4_pfu-p$Na_M4_pfu-p$Ca_A_pfu-p$Na_A_pfu-p$K_pfu);
    p$f9 <- 36 / (46+p$Si_pfu+p$Al_pfu+p$Ti_pfu)
    p$f10 <- 1-(p$Fe_p2_M123_pfu/46)

    p$avgf <- (mapply(min,p$f1,p$f2,p$f3,p$f4,p$f5)+mapply(max,p$f6,p$f7,p$f8,p$f9,p$f10))/2;

    #Stage 2

    s <- data.frame(Name=wtp_data$Name);
    s$Si_pfu <- p$Si_pfu*p$avgf;
    s$Al_c4_pfu <- 8 - s$Si_pfu;
    s$Al_pfu <- p$Al_pfu*p$avgf;

    s$Al_c6_pfu <- s$Al_pfu - s$Al_c4_pfu;
    s$Ti_pfu <- p$Ti_pfu*p$avgf;
    s$Fe_p3_pfu <- ifelse(46*(1-p$avgf)<p$avgf*p$Fe_p2_pfu,46*(1-p$avgf),p$avgf*p$Fe_p2_pfu);
    s$Mg_pfu <- p$Mg_pfu*p$avgf;
    s$Mn_pfu <- p$Mn_pfu*p$avgf;
    M123_occupy <- s$Mn_pfu+s$Mg_pfu+s$Fe_p3_pfu+s$Ti_pfu+s$Al_c6_pfu;
    s$Fe_p2_M123_pfu <- ifelse((p$avgf*p$Fe_p2_pfu-s$Fe_p3_pfu+M123_occupy)>5,5-M123_occupy,p$avgf*p$Fe_p2_pfu-s$Fe_p3_pfu);
    M123_occupy <- s$Mn_pfu+s$Mg_pfu+s$Fe_p3_pfu+s$Ti_pfu+s$Al_c6_pfu + s$Fe_p2_M123_pfu;    
    s$Ca_M123_pfu <- ifelse(M123_occupy>=5,0,5-M123_occupy);
    
    s$Fe_p2_M4_pfu <- p$avgf*p$Fe_p2_pfu-s$Fe_p2_M123_pfu-s$Fe_p3_pfu;
    s$Fe_p2_pfu <-s$Fe_p2_M4_pfu+s$Fe_p2_M123_pfu;

    s$Ca_M4_pfu <- p$avgf*(p$Ca_pfu)-s$Ca_M123_pfu;
    s$Ca_M4_pfu <- ifelse(s$Ca_M4_pfu<2-s$Fe_p2_M4_pfu,s$Ca_M4_pfu,2-s$Fe_p2_M4_pfu);
    s$Na_M4_pfu <- ifelse(s$Fe_p2_M4_pfu+s$Ca_M4_pfu>=2,0,2-s$Fe_p2_M4_pfu-s$Ca_M4_pfu);
    
    s$Ca_A_pfu <- ifelse(s$Na_M4_pfu>=0,0,p$avgf*p$Ca_pfu-s$Ca_M123_pfu-s$Ca_M4_pfu);
    s$Na_A_pfu <- p$avgf*(p$Na_A_pfu+p$Na_M4_pfu)-s$Na_M4_pfu;
    s$K_pfu <- p$avgf*p$K_pfu;
    
    s$F_pfu <- p$F_pfu;
    s$Cl_pfu <- p$Cl_pfu;
    s$OH_pfu <- 2-p$F_pfu-p$Cl_pfu;
    
    s$Ca_pfu <- s$Ca_A_pfu + s$Ca_M4_pfu + s$Ca_M123_pfu;
    s$Na_pfu <- s$Na_A_pfu + s$Na_M4_pfu;    
    s$Fe_pfu <- s$Fe_p2_pfu + s$Fe_p3_pfu;    

return (data.frame(s));
}

recalc.amp_holland_blundy.test <- function (){

  src <- data.frame(Name='test', SiO2_wtp=46.42, TiO2_wtp=1.27, Al2O3_wtp=6.81, FeO_wtp=14.21,
                    MgO_wtp=16.67, MnO_wtp=0.76, CaO_wtp=11.59, Na2O_wtp=1.36, K2O_wtp=0.90, F_wtp = 0.0, Cl_wtp = 0.0);
 
  result <- recalc.amp_holland_blundy (src);
  
  print(result);
  
  expect_equal(object = result$Na_A_pfu,0.290, tolerance = 0.05);
  expect_equal(object = result$Fe_p2_pfu,1.258, tolerance = 0.05);
  expect_equal(object = result$Ti_pfu,0.141, tolerance = 0.05);
}