Collections
The current EquationOfStates contain
EquationOfState
├─ AntonSchmidt
├─ BreenanStacey
├─ FiniteStrainEOS
│ ├─ BirchMurnaghan2nd
│ ├─ BirchMurnaghan3rd
│ ├─ BirchMurnaghan4th
│ ├─ BirchMurnaghan5th
│ ├─ PoirierTarantola2nd
│ ├─ PoirierTarantola3rd
│ ├─ PoirierTarantola4th
│ └─ PoirierTarantola5th
├─ Murnaghan
├─ PolynomialEOS
├─ Shanker
└─ VinetUsage
Construct an EquationOfState
We will use BirchMurnaghan3rd as an example.
A BirchMurnaghan3rd can be constructed from scratch, as shown above. It can also be constructed from an existing BirchMurnaghan3rd, with Setfield.jl @set! macro:
julia> using Setfield
julia> eos = Murnaghan(1, 2, 3.0)
Murnaghan{Float64}(1.0, 2.0, 3.0, 0.0)
julia> @set! eos.v0 = 4
Murnaghan{Float64}(4.0, 2.0, 3.0, 0.0)
julia> eos
Murnaghan{Float64}(4.0, 2.0, 3.0, 0.0)To modify multiple fields (say, :v0, :b′0, :b′′0, :e0) at a time, use @batchlens from Kaleido.jl:
julia> using Setfield, Kaleido
julia> lens = @batchlens(begin
_.v0
_.b′0
_.b′′0
_.e0
end)
IndexBatchLens(:v0, :b′0, :b′′0, :e0)
julia> eos = BirchMurnaghan4th(1, 2.0, 3, 4)
BirchMurnaghan4th{Float64}(1.0, 2.0, 3.0, 4.0, 0.0)
julia> set(eos, lens, (5, 6, 7, 8))
BirchMurnaghan4th{Float64}(5.0, 2.0, 6.0, 7.0, 8.0)Users can access BirchMurnaghan3rd's elements by "dot notation":
julia> eos = BirchMurnaghan3rd(1, 2, 3, 4.0)
4-element BirchMurnaghan3rd{Float64}:
1.0
2.0
3.0
4.0
julia> eos.v0
1.0Calculate energy on an EquationOfState
The $E(V)$ relation of equations of state are listed as below:
Murnaghan:\[E(V) = E_{0}+K_{0} V_{0}\left[\frac{1}{K_{0}^{\prime}\left(K_{0}^{\prime}-1\right)}\left(\frac{V}{V_{0}}\right)^{1-K_{0}^{\prime}}+\frac{1}{K_{0}^{\prime}} \frac{V}{V_{0}}-\frac{1}{K_{0}^{\prime}-1}\right].\]
BirchMurnaghan2nd:\[E(V) = E_{0} + \frac{9}{8} B_{0} V_{0} \left(\left( V / V_0 \right)^{-2 / 3}-1\right)^{2}.\]
BirchMurnaghan3rd:\[E(V) = E_{0}+\frac{9}{16} V_{0} B_{0} \frac{\left(x^{2 / 3}-1\right)^{2}}{x^{7 / 3}}\left\{x^{1 / 3}\left(B_{0}^{\prime}-4\right)-x\left(B_{0}^{\prime}-6\right)\right\}.\]
where
x = V / V_0, andf = \frac{ 1 }{ 2 } \bigg[ \bigg( \frac{ V_0 }{ V } \bigg)^{2/3} - 1 \bigg].BirchMurnaghan4th:\[E(V) = E_{0}+\frac{3}{8} V_{0} B_{0} f^{2}\left[\left(9 H-63 B_{0}^{\prime}+143\right) f^{2}+12\left(B_{0}^{\prime}-4\right) f+12\right].\]
where
H = B_0 B_0'' + (B_0')^2.PoirierTarantola2nd:\[E(V) = E_{0}+\frac{1}{2} B_{0} V_{0} \ln ^{2} x.\]
PoirierTarantola3rd:\[E(V) = E_{0}+\frac{1}{6} B_{0} V_{0} \ln ^{2} x\left[\left(B_{0}^{\prime}+2\right) \ln x+3\right].\]
PoirierTarantola4th:\[E(V) = E_{0}+\frac{1}{24} B_{0} V_{0} \ln ^{2} x\left\{\left(H+3 B_{0}^{\prime}+3\right) \ln ^{2} x\right. \left.+4\left(B_{0}^{\prime}+2\right) \ln x+12\right\}.\]
where
H = B_0 B_0'' + (B_0')^2.Vinet:\[E(V) = E_{0}+\frac{9}{16} V_{0} B_{0} \frac{\left(x^{2 / 3}-1\right)^{2}}{x^{7 / 3}}\left\{x^{1 / 3}\left(B_{0}^{\prime}-4\right)-x\left(B_{0}^{\prime}-6\right)\right\}.\]
AntonSchmidt:\[E(V)=\frac{\beta V_{0}}{n+1}\left(\frac{V}{V_{0}}\right)^{n+1}\left[\ln \left(\frac{V}{V_{0}}\right)-\frac{1}{n+1}\right]+E_{\infty}.\]
Calculate pressure on an EquationOfState
The $P(V)$ relation of equations of state are listed as below:
Murnaghan:\[P(V) = \frac{B_{0}}{B_{0}^{\prime}}\left[\left(\frac{V_{0}}{V}\right)^{B_{0}^{\prime}}-1\right].\]
BirchMurnaghan2nd:\[P(V) = \frac{3}{2} B_{0}\left(x^{-7 / 3}-x^{-5 / 3}\right).\]
BirchMurnaghan3rd:\[P(V) = \frac{3}{8} B_{0} \frac{x^{2 / 3}-1}{x^{10 / 3}}\left\{3 B_{0}^{\prime} x-16 x-3 x^{1 / 3}\left(B_{0}^{\prime}-4\right)\right\}.\]
BirchMurnaghan4th:\[P(V) = \frac{1}{2} B_{0}(2 f+1)^{5 / 2}\left\{\left(9 H-63 B_{0}^{\prime}+143\right) f^{2}\right.\left.+9\left(B_{0}^{\prime}-4\right) f+6\right\}.\]
PoirierTarantola2nd:\[P(V) = -\frac{B_{0}}{x} \ln x.\]
PoirierTarantola3rd:\[P(V) = -\frac{B_{0} \ln x}{2 x}\left[\left(B_{0}^{\prime}+2\right) \ln x+2\right].\]
PoirierTarantola4th:\[P(V) = -\frac{B_{0} \ln x}{6 x}\left\{\left(H+3 B_{0}^{\prime}+3\right) \ln ^{2} x+3\left(B_{0}^{\prime}+6\right) \ln x+6\right\}.\]
Vinet:\[P(V) = 3 B_{0} \frac{1-\eta}{\eta^{2}} \exp \left\{-\frac{3}{2}\left(B_{0}^{\prime}-1\right)(\eta-1)\right\}.\]
AntonSchmidt:\[P(V) = -\beta\left(\frac{V}{V_{0}}\right)^{n} \ln \left(\frac{V}{V_{0}}\right).\]
Calculate bulk modulus on an EquationOfState
The $B(V)$ relation of equations of state are listed as below:
BirchMurnaghan2nd:\[B(V) = B_{0}(7 f+1)(2 f+1)^{5 / 2}.\]
BirchMurnaghan3rd:\[B(V) = \frac{B_{0}}{8 x^{10 / 3}}\left\{x^{5 / 3}\left(15 B_{0}^{\prime}-80\right)-x\left(42 B_{0}^{\prime}-196\right)\right.\left.+27 x^{1 / 3}\left(B_{0}^{\prime}-4\right)\right\}.\]
BirchMurnaghan4th:\[B(V) = \frac{1}{6} B_{0}(2 f+1)^{5 / 2}\left\{\left(99 H-693 B_{0}^{\prime}+1573\right) f^{3}\right.\left.+\left(27 H-108 B_{0}^{\prime}+105\right) f^{2}+6\left(3 B_{0}^{\prime}-5\right) f+6\right\}.\]
PoirierTarantola2nd:\[B(V) = \frac{B_{0}}{x}(1-\ln x).\]
PoirierTarantola3rd:\[B(V) = -\frac{B_{0}}{2 x}\left[\left(B_{0}^{\prime}+2\right) \ln x(\ln x-1)-2\right].\]
PoirierTarantola4th:\[B(V) = -\frac{B_{0}}{6 x}\left\{\left(H+3 B_{0}^{\prime}+3\right) \ln ^{3} x-3\left(H+2 B_{0}^{\prime}+1\right) \ln ^{2} x\right.\left.-6\left(B_{0}^{\prime}+1\right) \ln x-6\right\}.\]
Vinet:\[B(V) = -\frac{B_{0}}{2 \eta^{2}}\left[3 \eta(\eta-1)\left(B_{0}^{\prime}-1\right)+2(\eta-2)\right]\times \exp \left\{-\frac{3}{2}\left(B_{0}^{\prime}-1\right)(\eta-1)\right\}.\]
AntonSchmidt:\[B(V) = \beta\left(\frac{V}{V_{0}}\right)^{n}\left[1+n \ln \frac{V}{V_{0}}\right].\]
Public interfaces
Missing docstring for Energy. Check Documenter's build log for details.
Missing docstring for Pressure. Check Documenter's build log for details.
Missing docstring for BulkModulus. Check Documenter's build log for details.
Missing docstring for EquationOfState. Check Documenter's build log for details.
EquationsOfState.Collections.FiniteStrainEOS — TypeFiniteStrainEOS{T} <: EOSParameters{T}An abstraction of finite strain equations of state, where T specifies the elements' common type.
EquationsOfState.Collections.Murnaghan — TypeMurnaghan(v0, b0, b′0, e0)Create a Murnaghan equation of state.
This equation of state can have units. The units are specified in Unitful.jl's @u_str style.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.b′0: the first-order pressure-derivative bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
Examples
julia> Murnaghan(1, 2, 3.0)
Murnaghan{Float64}(1.0, 2.0, 3.0, 0.0)
julia> Murnaghan(Int8(1), 2//1, 3.0, 4)
Murnaghan{Float64}(1.0, 2.0, 3.0, 4.0)
julia> Murnaghan(1u"nm^3", 2u"GPa", 3, 3.0u"eV")
Murnaghan{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 3.0, 3.0 eV)EquationsOfState.Collections.BirchMurnaghan2nd — TypeBirchMurnaghan2nd(v0, b0, e0)Create a Birch–Murnaghan 2nd order equation of state.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
See also: BirchMurnaghan3rd, BirchMurnaghan4th, BirchMurnaghan5th
Examples
julia> BirchMurnaghan2nd(1, 2.0)
BirchMurnaghan2nd{Float64}(1.0, 2.0, 0.0)
julia> BirchMurnaghan2nd(Int8(1), 2//1, 0.0)
BirchMurnaghan2nd{Float64}(1.0, 2.0, 0.0)
julia> BirchMurnaghan2nd(1u"nm^3", 2u"GPa", 3.0u"eV")
BirchMurnaghan2nd{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 3.0 eV)EquationsOfState.Collections.BirchMurnaghan3rd — TypeBirchMurnaghan3rd(v0, b0, b′0, e0)Create a Birch–Murnaghan 3rd order equation of state.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.b′0: the first-order pressure-derivative bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
See also: BirchMurnaghan2nd, BirchMurnaghan4th, BirchMurnaghan5th
Examples
julia> BirchMurnaghan3rd(1, 2.0, 3)
BirchMurnaghan3rd{Float64}(1.0, 2.0, 3.0, 0.0)
julia> BirchMurnaghan3rd(Int8(1), 2//1, 4, 0.0)
BirchMurnaghan3rd{Float64}(1.0, 2.0, 4.0, 0.0)
julia> BirchMurnaghan3rd(1u"nm^3", 2u"GPa", 4.0, 3u"eV")
BirchMurnaghan3rd{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 4.0, 3.0 eV)EquationsOfState.Collections.BirchMurnaghan4th — TypeBirchMurnaghan4th(v0, b0, b′0, b′′0, e0)Create a Birch–Murnaghan 4th order equation of state.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.b′0: the first-order pressure-derivative bulk modulus of solid at zero pressure.b′′0: the second-order pressure-derivative bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
See also: BirchMurnaghan2nd, BirchMurnaghan4th, BirchMurnaghan5th
Examples
julia> BirchMurnaghan4th(1, 2.0, 3, 4)
BirchMurnaghan4th{Float64}(1.0, 2.0, 3.0, 4.0, 0.0)
julia> BirchMurnaghan4th(Int8(1), 2//1, 4, 5.0, Float16(6))
BirchMurnaghan4th{Float64}(1.0, 2.0, 4.0, 5.0, 6.0)
julia> BirchMurnaghan4th(1u"nm^3", 2u"GPa", 3.0, 4u"1/GPa", 5u"eV")
BirchMurnaghan4th{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 3.0, 4.0 GPa⁻¹, 5.0 eV)EquationsOfState.Collections.BirchMurnaghan5th — TypeBirchMurnaghan5th(v0, b0, b′0, b′′0, b′′′0, e0)Create a Birch–Murnaghan 5th order equation of state.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.b′0: the first-order pressure-derivative bulk modulus of solid at zero pressure.b′′0: the second-order pressure-derivative bulk modulus of solid at zero pressure.b′′′0: the third-order pressure-derivative bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
See also: BirchMurnaghan2nd, BirchMurnaghan3rd, BirchMurnaghan4th
Examples
julia> BirchMurnaghan5th(1, 2.0, 3, 4, 5 // 1)
BirchMurnaghan5th{Float64}(1.0, 2.0, 3.0, 4.0, 5.0, 0.0)
julia> BirchMurnaghan5th(Int8(1), 2//1, 3.0, Float16(4), 5)
BirchMurnaghan5th{Float64}(1.0, 2.0, 3.0, 4.0, 5.0, 0.0)
julia> BirchMurnaghan5th(1u"nm^3", 2u"GPa", 3, 4u"1/GPa", 5u"1/GPa^2", 6.0u"eV")
BirchMurnaghan5th{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 3.0, 4.0 GPa⁻¹, 5.0 GPa⁻², 6.0 eV)EquationsOfState.Collections.PoirierTarantola2nd — TypePoirierTarantola2nd(v0, b0, e0)Create a Poirier–Tarantola order equation of state.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
See also: PoirierTarantola3rd, PoirierTarantola4th, PoirierTarantola5th
Examples
julia> PoirierTarantola2nd(1, 2.0)
PoirierTarantola2nd{Float64}(1.0, 2.0, 0.0)
julia> PoirierTarantola2nd(Int8(1), 2//1, 3.0)
PoirierTarantola2nd{Float64}(1.0, 2.0, 3.0)
julia> PoirierTarantola2nd(1u"nm^3", 2u"GPa", 3.0u"eV")
PoirierTarantola2nd{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 3.0 eV)EquationsOfState.Collections.PoirierTarantola3rd — TypePoirierTarantola3rd(v0, b0, b′0, e0)Create a Poirier–Tarantola 3rd order equation of state.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.b′0: the first-order pressure-derivative bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
See also: PoirierTarantola2nd, PoirierTarantola4th, PoirierTarantola5th
Examples
julia> PoirierTarantola3rd(1, 2.0, 3)
PoirierTarantola3rd{Float64}(1.0, 2.0, 3.0, 0.0)
julia> PoirierTarantola3rd(Int8(1), 2//1, 3.0, Float16(4))
PoirierTarantola3rd{Float64}(1.0, 2.0, 3.0, 4.0)
julia> PoirierTarantola3rd(1u"nm^3", 2u"GPa", 3, 4.0u"eV")
PoirierTarantola3rd{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 3.0, 4.0 eV)EquationsOfState.Collections.PoirierTarantola4th — TypePoirierTarantola4th(v0, b0, b′0, b′′0, e0)Create a Poirier–Tarantola 4th order equation of state.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.b′0: the first-order pressure-derivative bulk modulus of solid at zero pressure.b′′0: the second-order pressure-derivative bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
See also: PoirierTarantola2nd, PoirierTarantola3rd, PoirierTarantola5th
Examples
julia> PoirierTarantola4th(1, 2.0, 3, 4)
PoirierTarantola4th{Float64}(1.0, 2.0, 3.0, 4.0, 0.0)
julia> PoirierTarantola4th(Int8(1), 2//1, 3.0, Float16(4), 5)
PoirierTarantola4th{Float64}(1.0, 2.0, 3.0, 4.0, 5.0)
julia> PoirierTarantola4th(1u"nm^3", 2u"GPa", 3, 4u"1/GPa", 5.0u"eV")
PoirierTarantola4th{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 3.0, 4.0 GPa⁻¹, 5.0 eV)EquationsOfState.Collections.PoirierTarantola5th — TypePoirierTarantola5th(v0, b0, b′0, b′′0, b′′′0, e0)Create a Poirier–Tarantola 5th order equation of state.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.b′0: the first-order pressure-derivative bulk modulus of solid at zero pressure.b′′0: the second-order pressure-derivative bulk modulus of solid at zero pressure.b′′′0: the third-order pressure-derivative bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
See also: PoirierTarantola2nd, PoirierTarantola3rd, PoirierTarantola4th
Examples
julia> PoirierTarantola5th(1, 2.0, 3, 4, 5 // 1)
PoirierTarantola5th{Float64}(1.0, 2.0, 3.0, 4.0, 5.0, 0.0)
julia> PoirierTarantola5th(Int8(1), 2//1, 3.0, Float16(4), 5)
PoirierTarantola5th{Float64}(1.0, 2.0, 3.0, 4.0, 5.0, 0.0)
julia> PoirierTarantola5th(1u"nm^3", 2u"GPa", 3, 4u"1/GPa", 5u"1/GPa^2", 6.0u"eV")
PoirierTarantola5th{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 3.0, 4.0 GPa⁻¹, 5.0 GPa⁻², 6.0 eV)EquationsOfState.Collections.Vinet — TypeVinet(v0, b0, b′0, e0)Create a Vinet equation of state.
Arguments
v0: the volume of solid at zero pressure.b0: the bulk modulus of solid at zero pressure.b′0: the first-order pressure-derivative bulk modulus of solid at zero pressure.e0: the energy of solid at zero pressure. Its default value is0u"eV"(0), if other parameters have (no) units.
Examples
julia> Vinet(1, 2.0, 3)
Vinet{Float64}(1.0, 2.0, 3.0, 0.0)
julia> Vinet(Int8(1), 2//1, 3.0, Float16(4))
Vinet{Float64}(1.0, 2.0, 3.0, 4.0)
julia> Vinet(1u"nm^3", 2u"GPa", 3, 4.0u"eV")
Vinet{Quantity{Float64,D,U} where U where D}(1.0 nm³, 2.0 GPa, 3.0, 4.0 eV)