Collections
The current Parameters
s contain
EquationsOfState.EquationOfStateOfSolidsParameters
├─ EquationsOfStateOfSolids.AntonSchmidt
├─ EquationsOfStateOfSolids.FiniteStrainParameters
│ ├─ BirchMurnaghan
│ │ ├─ BirchMurnaghan2nd
│ │ ├─ BirchMurnaghan3rd
│ │ └─ BirchMurnaghan4th
│ └─ PoirierTarantola
│ ├─ EquationsOfStateOfSolids.PoirierTarantola4th
│ ├─ PoirierTarantola2nd
│ └─ PoirierTarantola3rd
├─ EquationsOfStateOfSolids.Holzapfel
├─ Murnaghan
│ ├─ EquationsOfStateOfSolids.Murnaghan2nd
│ └─ Murnaghan1st
└─ Vinet
Here the leaves of the type tree are concrete types and can be constructed.
Usage
Construct a Parameters
instance
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.0
Evaluate energy
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}.\]
Evaluate pressure
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).\]
Evaluate bulk modulus
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) = B_{0}(2 f+1)^{5 / 2} \left\{ 1 + (3B_{0}^{\prime} - 5) f + \frac{ 27 }{ 2 }(B_{0}^{\prime} - 4) f^2 \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
EquationsOfStateOfSolids.Murnaghan1st
— TypeMurnaghan1st(v0, b0, b′0, e0=zero(v0 * b0))
Create a Murnaghan first order 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.
EquationsOfStateOfSolids.BirchMurnaghan
— TypeBirchMurnaghan(args...)
Construct a BirchMurnaghan
based on the length of arguments, where e0
must be provided.
See also: BirchMurnaghan2nd
, BirchMurnaghan3rd
, BirchMurnaghan4th
EquationsOfStateOfSolids.BirchMurnaghan2nd
— TypeBirchMurnaghan2nd(v0, b0, e0=zero(v0 * b0))
Create a Birch–Murnaghan second order 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.e0
: the energy of solid at zero pressure.
EquationsOfStateOfSolids.BirchMurnaghan3rd
— TypeBirchMurnaghan3rd(v0, b0, b′0, e0=zero(v0 * b0))
Create a Birch–Murnaghan third order 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.
The third-order equation (Equation (22)) becomes identical to the second-order equation when $b′0 = 4$ (not $0$!).
EquationsOfStateOfSolids.BirchMurnaghan4th
— TypeBirchMurnaghan4th(v0, b0, b′0, b″0, e0=zero(v0 * b0))
Create a Birch–Murnaghan fourth order 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.b″0
: the second-order pressure-derivative bulk modulus of solid at zero pressure.e0
: the energy of solid at zero pressure.
The fourth-order equation becomes identical to the third-order equation when
\[b″0 = -\frac{ 1 }{ 9b0 } (9b′0^2 - 63b′0 + 143).\]
EquationsOfStateOfSolids.PoirierTarantola
— TypePoirierTarantola(args...)
Construct a PoirierTarantola
based on the length of arguments, where e0
must be provided.
See also: PoirierTarantola2nd
, PoirierTarantola3rd
, PoirierTarantola4th
EquationsOfStateOfSolids.PoirierTarantola2nd
— TypePoirierTarantola2nd(v0, b0, e0=zero(v0 * b0))
Create a Poirier–Tarantola second order 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.e0
: the energy of solid at zero pressure.
EquationsOfStateOfSolids.PoirierTarantola3rd
— TypePoirierTarantola3rd(v0, b0, b′0, e0=zero(v0 * b0))
Create a Poirier–Tarantola third order 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.
EquationsOfStateOfSolids.Vinet
— TypeVinet(v0, b0, b′0, e0=zero(v0 * b0))
Create a Vinet 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.
EquationsOfStateOfSolids.EnergyEquation
— TypeEnergyEquation{T} <: EquationOfStateOfSolids{T}
EnergyEquation(parameters::Parameters)
Construct an equation of state which evaluates the energy of the given parameters
.
EquationsOfStateOfSolids.PressureEquation
— TypePressureEquation{T} <: EquationOfStateOfSolids{T}
PressureEquation(parameters::Parameters)
Construct an equation of state which evaluates the pressure of the given parameters
.
EquationsOfStateOfSolids.BulkModulusEquation
— TypeBulkModulusEquation{T} <: EquationOfStateOfSolids{T}
BulkModulusEquation(parameters::Parameters)
Construct an equation of state which evaluates the bulk modulus of the given parameters
.
EquationsOfStateOfSolids.getparam
— Functiongetparam(eos::EquationOfStateOfSolids)
Get the Parameters
from an EquationOfStateOfSolids
.
EquationsOfStateOfSolids.orderof
— Functionorderof(x::FiniteStrainParameters)
Return the order of a FiniteStrainParameters
.
Examples
julia> orderof(BirchMurnaghan(40, 0.5, 4, 0)) == 3
true
Base.real
— FunctionConstruct a real Parameters
from the real parts of the elements of p.
Base.isreal
— FunctionTest whether all p
's elements are numerically equal to some real number.
Base.float
— FunctionConvert all elements of a Parameters
to floating point data types.