Cement Species
The manipulation of chemical formulas can also be done in cement notation. CemSpecies is a composite type similar to Species.
struct Species{T<:Number} <: AbstractSpecies
name::String
symbol::String
formula::Formula{T}
aggregate_state::AggregateState
class::Class
properties::OrderedDict{Symbol,PropertyType}
endCemSpecies construction
Here are several example of CemSpecies construction:
C3S = CemSpecies("C3S"; name="Alite", symbol="C₃S", aggregate_state=AS_CRYSTAL, class=SC_COMPONENT)
C2S = CemSpecies("C₂S"; name="Belite", symbol="C₂S", aggregate_state=AS_CRYSTAL, class=SC_COMPONENT)
C3A = CemSpecies("C3A"; name="Aluminate", symbol="C₃A", aggregate_state=AS_CRYSTAL, class=SC_COMPONENT)
C4AF = CemSpecies(Dict(:C => 4, :A => 1, :F => 1); name="Ferrite", symbol="C₄AF")CemSpecies{Int64, Int64}
name: Ferrite
symbol: C₄AF
cemformula: C4AF ◆ C₄AF
oxides: F => 1, A => 1, C => 4
formula: Ca4Al2Fe2O10 ◆ Ca₄Al₂Fe₂O₁₀
atoms: Fe => 2, O => 10, Al => 2, Ca => 4
charge: 0
aggregate_state: AS_UNDEF
class: SC_UNDEF
properties: M = 0.48595507663206433 kg mol⁻¹Not every molecule can be used to build a cement species. It is necessary for this molecule to decompose into a combination of the oxides present in the manufacturers' cement sheet (e.g. $CaO$, $SiO_2$, $Fe_2O_3$, $Al_2O_3$) and water. Thus, the following code will return an error.
CemSpecies(Species("Ca(OH)"))Numeric and Symbolic CemSpecies
The previous species were constructed from integer values of the number of chemical elements. However, other numerical value types are possible (as for formulas), such as fraction or Real values.
using ChemistryLab
ox = Dict(:C => 1.666667, :S => 1, :H => 2.1)
jennite = CemSpecies(ox)CemSpecies{Real, Real}
name: C₅//₃SH₂.₁
symbol: C₅//₃SH₂.₁
cemformula: C5//3SH2.1 ◆ C₅//₃SH₂.₁
oxides: H => 2.1, S => 1, C => 1.666667
formula: Ca5//3SiH21//5O5.76667 ◆ Ca₅//₃SiH₂₁//₅O₅.₇₆₆₆₇
atoms: H => 21//5, O => 5.76667, Si => 1, Ca => 5//3
charge: 0
aggregate_state: AS_UNDEF
class: SC_UNDEF
properties: M = 0.19137621993053117 kg mol⁻¹Symbolic values are also allowed. In this case, you need to use the SymPy library:
using ChemistryLab
using SymPy
â, ĝ = symbols("â ĝ", real = true)
ox = Dict(:C => â, :S => one(Sym), :H => ĝ)
CSH = CemSpecies(ox)The value of variables can be defined a posteriori.
jennite = CemSpecies(map(N, map(subs, cemformula(CSH), â => 1.666667, ĝ => 2.1)))Conversion of coefficient types can also be done.
floatCSH = Species(convert(Float64, formula(numCSH)))Conversion of Species to CemSpecies and vice versa
Convert species to cement notation and Unicode. Conversion can be done on simple species:
H2O = Species("H₂O")
cemH2O = CemSpecies(H2O)CemSpecies{Int64, Int64}
name: H₂O
symbol: H₂O
cemformula: H
oxides: H => 1
formula: H2O ◆ H₂O
atoms: H => 2, O => 1
charge: 0
aggregate_state: AS_UNDEF
class: SC_UNDEF
properties: M = 0.0180149999937744 kg mol⁻¹C3S = CemSpecies("C3S"; name="Alite", symbol="C₃S", aggregate_state=AS_CRYSTAL, class=SC_COMPONENT)
spC3S = Species(C3S)Species{Int64}
name: Alite
symbol: C₃S
formula: Ca3SiO5 ◆ Ca₃SiO₅
atoms: Ca => 3, O => 5, Si => 1
charge: 0
aggregate_state: AS_CRYSTAL
class: SC_COMPONENT
properties: M = 0.2283139999210996 kg mol⁻¹Or more complex one:
CSH = Species("(SiO2)1(CaO)1.666667(H2O)2.1")
jennite = CemSpecies(CSH)CemSpecies{Real, Real}
name: (SiO2)1(CaO)1.666667(H2O)2.1
symbol: (SiO2)1(CaO)1.666667(H2O)2.1
cemformula: C5//3SH2.1 ◆ C₅//₃SH₂.₁
oxides: C => 5//3, S => 1, H => 2.1
formula: Ca5//3SiH21//5O5.76667 ◆ Ca₅//₃SiH₂₁//₅O₅.₇₆₆₆₇
atoms: Ca => 5//3, O => 5.76667, Si => 1, H => 21//5
charge: 0
aggregate_state: AS_UNDEF
class: SC_UNDEF
properties: M = 0.1913762199305312 kg mol⁻¹