The OrnsteinZernike Module
OrnsteinZernike
— ModuleA generic solver package for Ornstein-Zernike equations from liquid state theory
Module Index
OrnsteinZernike.BallonePastoreGalliGazzillo
OrnsteinZernike.BomontBretonnet
OrnsteinZernike.CarbajalTinoko
OrnsteinZernike.CharpentierJackse
OrnsteinZernike.ChoudhuryGhosh
OrnsteinZernike.CustomPotential
OrnsteinZernike.DensityRamp
OrnsteinZernike.DuhHaymet
OrnsteinZernike.Exact
OrnsteinZernike.ExtendedRogersYoung
OrnsteinZernike.FourierIteration
OrnsteinZernike.HardSpheres
OrnsteinZernike.HypernettedChain
OrnsteinZernike.Khanpour
OrnsteinZernike.Lee
OrnsteinZernike.LennardJones
OrnsteinZernike.MartynovSarkisov
OrnsteinZernike.MeanSpherical
OrnsteinZernike.ModifiedHypernettedChain
OrnsteinZernike.ModifiedVerlet
OrnsteinZernike.NgIteration
OrnsteinZernike.OZSolution
OrnsteinZernike.PercusYevick
OrnsteinZernike.PowerLaw
OrnsteinZernike.RogersYoung
OrnsteinZernike.SimpleLiquid
OrnsteinZernike.SoftCoreMeanSpherical
OrnsteinZernike.Verlet
OrnsteinZernike.VompeMartynov
OrnsteinZernike.WCADivision
OrnsteinZernike.ZerahHansen
OrnsteinZernike.compute_compressibility
OrnsteinZernike.compute_excess_energy
OrnsteinZernike.compute_virial_pressure
OrnsteinZernike.solve
Detailed API
OrnsteinZernike.OZSolution
— TypeOZSolution
Holds the solution of an Ornstein Zernike problem.
Fields:
- r: vector of distances
- k: vector of wave numbers
- gr: radial distribution function
- Sk: static structure factor
- ck: direct correlation function in k space
- cr: direct correlation function in real space
if the system was a single-component system, gr
, Sk
, ck
and cr
are vectors. If instead the system was a multicomponent one, they are three dimensional vectors, where the first dimension contains the values along r, and the second and third dimension contain the data for the species.
OrnsteinZernike.SimpleLiquid
— TypeSimpleLiquid{dims, ...} <: System
Holds information about a homogeneous, isotropic system with radially symmetric pair interactions. dims
is the dimensionality.
Construct using
SimpleLiquid(dims, ρ, kBT, potential)
Fields:
- ρ: number density, must be either a
Number
in case of a single component system, or aVector
in case of a mixture. In the latter case, each element contains the number density of the respective component. - kBT: thermal energy
- potential::Potential: the interaction potential.
Examples:
ρ = 0.5; kBT = 1.1; dims = 3
+API · OrnsteinZernike.jl Documentation The OrnsteinZernike Module
OrnsteinZernike
— ModuleA generic solver package for Ornstein-Zernike equations from liquid state theory
sourceModule Index
OrnsteinZernike.BallonePastoreGalliGazzillo
OrnsteinZernike.BomontBretonnet
OrnsteinZernike.CarbajalTinoko
OrnsteinZernike.CharpentierJackse
OrnsteinZernike.ChoudhuryGhosh
OrnsteinZernike.CustomPotential
OrnsteinZernike.DensityRamp
OrnsteinZernike.DuhHaymet
OrnsteinZernike.Exact
OrnsteinZernike.ExtendedRogersYoung
OrnsteinZernike.FourierIteration
OrnsteinZernike.HardSpheres
OrnsteinZernike.HypernettedChain
OrnsteinZernike.Khanpour
OrnsteinZernike.Lee
OrnsteinZernike.LennardJones
OrnsteinZernike.MartynovSarkisov
OrnsteinZernike.MeanSpherical
OrnsteinZernike.ModifiedHypernettedChain
OrnsteinZernike.ModifiedVerlet
OrnsteinZernike.NgIteration
OrnsteinZernike.OZSolution
OrnsteinZernike.PercusYevick
OrnsteinZernike.PowerLaw
OrnsteinZernike.RogersYoung
OrnsteinZernike.SimpleLiquid
OrnsteinZernike.SoftCoreMeanSpherical
OrnsteinZernike.Verlet
OrnsteinZernike.VompeMartynov
OrnsteinZernike.WCADivision
OrnsteinZernike.ZerahHansen
OrnsteinZernike.compute_compressibility
OrnsteinZernike.compute_excess_energy
OrnsteinZernike.compute_virial_pressure
OrnsteinZernike.solve
Detailed API
OrnsteinZernike.OZSolution
— TypeOZSolution
Holds the solution of an Ornstein Zernike problem.
Fields:
- r: vector of distances
- k: vector of wave numbers
- gr: radial distribution function
- Sk: static structure factor
- ck: direct correlation function in k space
- cr: direct correlation function in real space
if the system was a single-component system, gr
, Sk
, ck
and cr
are vectors. If instead the system was a multicomponent one, they are three dimensional vectors, where the first dimension contains the values along r, and the second and third dimension contain the data for the species.
sourceOrnsteinZernike.SimpleLiquid
— TypeSimpleLiquid{dims, ...} <: System
Holds information about a homogeneous, isotropic system with radially symmetric pair interactions. dims
is the dimensionality.
Construct using
SimpleLiquid(dims, ρ, kBT, potential)
Fields:
- ρ: number density, must be either a
Number
in case of a single component system, or a Vector
in case of a mixture. In the latter case, each element contains the number density of the respective component. - kBT: thermal energy
- potential::Potential: the interaction potential.
Examples:
ρ = 0.5; kBT = 1.1; dims = 3
pot = SingleComponentHardSpheres()
system = SimpleLiquid(dims, ρ, kBT, pot)
ρ = [0.5, 0.1]; kBT = 5.2; dims = 3
pot = MultiComponentHardSpheres([1.0, 0.8])
-system = SimpleLiquid(dims, ρ, kBT, pot)
sourceOrnsteinZernike.compute_compressibility
— Methodcompute_compressibility(sol::OZSolution, system::SimpleLiquid)
Computes the isothermal compressibility χ of the system
uses the formula 1/ρkBTχ = 1 - ρ ĉ(k=0) for single component systems and 1/ρkBTχ = 1 - ρ Σᵢⱼ ĉᵢⱼ(k=0) for mixtures. Eq. (3.6.16) in Hansen and McDonald
sourceOrnsteinZernike.compute_excess_energy
— Methodcompute_excess_energy(sol::OZSolution, system::SimpleLiquid)
Computes the excess energy per particle Eₓ, such that E = (dims/2kBT + Eₓ)N.
uses the formula Eₓ = 1/2 ρ ∫dr g(r) u(r) for single component systems and Eₓ = 1/2 ρ Σᵢⱼ xᵢxⱼ ∫dr gᵢⱼ(r) uᵢⱼ(r) for mixtures. Here x is the concentration fraction xᵢ=ρᵢ/sum(ρ).
sourceOrnsteinZernike.compute_virial_pressure
— Methodcompute_virial_pressure(sol::OZSolution, system::SimpleLiquid)
Computes the pressure via the virial route
uses the formula p = kBTρ - 1/6 ρ^2 ∫dr r g(r) u'(r) for single component systems and p = kBT Σᵢρᵢ - 1/6 Σᵢⱼ ρᵢρⱼ ∫dr r gᵢⱼ(r) u'ᵢⱼ(r) for mixtures.
It handles discontinuities in the interaction potential analytically if discontinuities(potential)
is defined. For additional speed/accuracy define a method of evaluate_potential_derivative(potential, r::Number)
that analytically computes du/dr. By default this is done using finite differences.
sourceOrnsteinZernike.solve
— Functionsolve(system::SimpleLiquid, closure::Closure, method::Method)
Solves the system system
using the closure closure
with method method
.
solve(system::SimpleLiquid, closure::Closure)
Solves the system system
using the closure closure
with the default method NgIteration()
.
sourceSettings
This document was generated with Documenter.jl version 1.1.1 on Monday 23 October 2023. Using Julia version 1.9.3.
+system = SimpleLiquid(dims, ρ, kBT, pot)
OrnsteinZernike.compute_compressibility
— Methodcompute_compressibility(sol::OZSolution, system::SimpleLiquid)
Computes the isothermal compressibility χ of the system
uses the formula 1/ρkBTχ = 1 - ρ ĉ(k=0) for single component systems and 1/ρkBTχ = 1 - ρ Σᵢⱼ ĉᵢⱼ(k=0) for mixtures. Eq. (3.6.16) in Hansen and McDonald
OrnsteinZernike.compute_excess_energy
— Methodcompute_excess_energy(sol::OZSolution, system::SimpleLiquid)
Computes the excess energy per particle Eₓ, such that E = (dims/2kBT + Eₓ)N.
uses the formula Eₓ = 1/2 ρ ∫dr g(r) u(r) for single component systems and Eₓ = 1/2 ρ Σᵢⱼ xᵢxⱼ ∫dr gᵢⱼ(r) uᵢⱼ(r) for mixtures. Here x is the concentration fraction xᵢ=ρᵢ/sum(ρ).
OrnsteinZernike.compute_virial_pressure
— Methodcompute_virial_pressure(sol::OZSolution, system::SimpleLiquid)
Computes the pressure via the virial route
uses the formula p = kBTρ - 1/6 ρ^2 ∫dr r g(r) u'(r) for single component systems and p = kBT Σᵢρᵢ - 1/6 Σᵢⱼ ρᵢρⱼ ∫dr r gᵢⱼ(r) u'ᵢⱼ(r) for mixtures.
It handles discontinuities in the interaction potential analytically if discontinuities(potential)
is defined. For additional speed/accuracy define a method of evaluate_potential_derivative(potential, r::Number)
that analytically computes du/dr. By default this is done using finite differences.
OrnsteinZernike.solve
— Functionsolve(system::SimpleLiquid, closure::Closure, method::Method)
Solves the system system
using the closure closure
with method method
.
solve(system::SimpleLiquid, closure::Closure)
Solves the system system
using the closure closure
with the default method NgIteration()
.