Skip to content

Commit 9f1613b

Browse files
Merge pull request #81 from brenhinkeller/jyao-statgeochem-branch
update Ayers sphene saturation functions
2 parents a7d9eea + df406cb commit 9f1613b

File tree

2 files changed

+62
-8
lines changed

2 files changed

+62
-8
lines changed

src/utilities/Geochemistry.jl

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -519,36 +519,87 @@
519519
return (10 * eCa) / (Al * Si)
520520
end
521521

522-
"""
522+
function Ayers_tspheneM(SiO2::Number, TiO2::Number, Al2O3::Number, FeOT::Number, MnO::Number, MgO::Number, CaO::Number, Na2O::Number, K2O::Number, P2O5::Number)
523+
#Cations
524+
Na = Na2O/30.9895
525+
K = K2O/47.0827
526+
Ca = CaO/56.0774
527+
Al = Al2O3/50.9806
528+
Si = SiO2/60.0843
529+
Ti = TiO2/79.865
530+
Fe = FeOT/71.8444
531+
Mg = MgO/24.3050
532+
Mn = MnO/70.9374
533+
P = P2O5/70.9723
534+
535+
# Normalize cation fractions
536+
normconst = nansum((Na, K, Ca, Al, Si, Ti, Fe, Mg, Mn, P))
537+
K, Na, Ca, Al, Si = (K, Na, Ca, Al, Si) ./ normconst
538+
539+
M = (Na + K + (2 * Ca))/(Al * Si)
540+
return M
541+
end
542+
543+
"""
523544
```julia
524545
TiO2Sat = Ayers_tspheneTiO2(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5, T)
525546
```
526547
Calculate sphene saturation TiO2 concentration (in wt. %) for a given temperature
548+
(in C) following the sphene saturation calibration of Ayers et al., 2022
549+
(doi: 10.1007/s00410-022-01902-z)
550+
"""
551+
function Ayers_tspheneTiO2(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5, TC)
552+
M = Ayers_tspheneM(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
553+
TiO2 = max((0.978*M)+(0.0048*(TC+273.15))-5.90, 0)
554+
return TiO2
555+
end
556+
export Ayers_tspheneTiO2
557+
558+
"""
559+
```julia
560+
TC = Ayers_tsphene(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
561+
```
562+
Calculate sphene saturation temperature in degrees Celsius
563+
Following the sphene saturation calibration of Ayers et al., 2022
564+
(doi: 10.1007/s00410-022-01902-z)
565+
"""
566+
function Ayers_tsphene(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
567+
M = Ayers_tspheneM(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
568+
TC = (TiO2 + 5.90 - (0.978*M))/0.0048 - 273.15
569+
return TC
570+
end
571+
export Ayers_tsphene
572+
573+
"""
574+
```julia
575+
TiO2Sat = Ayers_tspheneTiO2_18(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5, T)
576+
```
577+
Calculate sphene saturation TiO2 concentration (in wt. %) for a given temperature
527578
(in C) following the sphene saturation calibration of Ayers et al., 2018
528579
(doi: 10.1130/abs/2018AM-320568)
529580
"""
530-
function Ayers_tspheneTiO2(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5, TC)
581+
function Ayers_tspheneTiO2_18(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5, TC)
531582
C = Ayers_tspheneC(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
532583
TiO2 = max(0.79*C - 7993/(TC+273.15) + 7.88, 0)
533584
return TiO2
534585
end
535-
export Ayers_tspheneTiO2
586+
export Ayers_tspheneTiO2_18
536587

537588

538589
"""
539590
```julia
540-
TC = Ayers_tsphene(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
591+
TC = Ayers_tsphene_18(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
541592
```
542593
Calculate sphene saturation temperature in degrees Celsius
543594
Following the sphene saturation calibration of Ayers et al., 2018
544595
(doi: 10.1130/abs/2018AM-320568)
545596
"""
546-
function Ayers_tsphene(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
597+
function Ayers_tsphene_18(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
547598
C = Ayers_tspheneC(SiO2, TiO2, Al2O3, FeOT, MnO, MgO, CaO, Na2O, K2O, P2O5)
548599
TC = 7993/(0.79*C - TiO2 + 7.88) - 273.15
549600
return TC
550601
end
551-
export Ayers_tsphene
602+
export Ayers_tsphene_18
552603

553604
## --- Rutile saturation calculations
554605

test/testGeochemistry.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,13 @@
8787
@test tzircZr(majors..., 800) 826.1071302971219
8888
@test mean(tzircM((repeat([m],2) for m in majors)...,)) 2.328787411099651
8989

90-
@test StatGeochem.Ayers_tsphene(majors...) 637.7486728299519
91-
@test StatGeochem.Ayers_tspheneTiO2(majors..., 800) 2.3486842447760026
90+
@test StatGeochem.Ayers_tsphene_18(majors...) 637.7486728299519
91+
@test StatGeochem.Ayers_tspheneTiO2_18(majors..., 800) 2.3486842447760026
9292
@test mean(StatGeochem.Ayers_tspheneC.((repeat([m],2) for m in majors)...,)) 2.4263934899817188
9393

94+
@test StatGeochem.Ayers_tsphene(majors...) 694.4428983217797
95+
@test StatGeochem.Ayers_tspheneTiO2(majors..., 800) 1.5286740880554586
96+
9497
# SiO2, TiO2, Al2O3, FeOT, MgO, CaO, Na2O, K2O, Li2O, H2O
9598
montel_elems = [58.509, 1.022, 14.858, 4.371, 4.561, 5.912, 3.296, 2.399, 0.01, 4.0]
9699
@test StatGeochem.Montel_tmonaziteREE(montel_elems..., 750.0) 11.884450325741755

0 commit comments

Comments
 (0)