The OrnsteinZernike Module
OrnsteinZernike — ModuleA generic solver package for Ornstein-Zernike equations from liquid state theory
Module Index
OrnsteinZernike.AllShortRangeDivisionOrnsteinZernike.BallonePastoreGalliGazzilloOrnsteinZernike.BomontBretonnetOrnsteinZernike.CarbajalTinokoOrnsteinZernike.CharpentierJackseOrnsteinZernike.ChoudhuryGhoshOrnsteinZernike.CustomPotentialOrnsteinZernike.DensityRampOrnsteinZernike.DuhHaymetOrnsteinZernike.EwaldSplittingOrnsteinZernike.ExactOrnsteinZernike.ExtendedRogersYoungOrnsteinZernike.FourierIterationOrnsteinZernike.GaussianCoreOrnsteinZernike.HardSpheresOrnsteinZernike.HypernettedChainOrnsteinZernike.InversePowerLawOrnsteinZernike.KhanpourOrnsteinZernike.LeeOrnsteinZernike.LennardJonesOrnsteinZernike.MartynovSarkisovOrnsteinZernike.ModifiedHypernettedChainOrnsteinZernike.ModifiedVerletOrnsteinZernike.MorseOrnsteinZernike.NgIterationOrnsteinZernike.NoCoulombSplittingOrnsteinZernike.OZSolutionOrnsteinZernike.PercusYevickOrnsteinZernike.RogersYoungOrnsteinZernike.SMSAOrnsteinZernike.SimpleChargedFluidOrnsteinZernike.SimpleChargedMixtureOrnsteinZernike.SimpleFluidOrnsteinZernike.SimpleMixtureOrnsteinZernike.SquareWellOrnsteinZernike.TabulatedPotentialOrnsteinZernike.TemperatureRampOrnsteinZernike.VerletOrnsteinZernike.VompeMartynovOrnsteinZernike.WCADivisionOrnsteinZernike.YukawaOrnsteinZernike.ZerahHansenOrnsteinZernike.compute_compressibilityOrnsteinZernike.compute_excess_energyOrnsteinZernike.compute_virial_pressureOrnsteinZernike.dispersion_tailOrnsteinZernike.solve
Detailed API
OrnsteinZernike.EwaldSplitting — TypeEwaldSplitting(α) <: CoulombSplittingSplits the Coulomb potential into short-range and long-range parts using the Ewald splitting parameter α. Fields:
- α::Float64 : Ewald splitting (inverse length scale)
The short-range part is given by: ushortrange(r) = (zi * zj * ℓB / r) * erfc(α * r) The long-range part is given by: ulongrange(r) = (zi * zj * ℓB / r) * erf(α * r)
OrnsteinZernike.NoCoulombSplitting — TypeNoSplitting <: CoulombSplittingNo splitting of the Coulomb potential; the entire Coulomb potential is treated as long range.
OrnsteinZernike.OZSolution — TypeOZSolutionHolds 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
- gamma_r: indirect correlation function in real space
- gamma_k: indirect correlation function in k space
if the system was a single-component system, gr, Sk, etc, 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.compute_compressibility — Methodcompute_compressibility(sol::OZSolution, system::SimpleFluid)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::SimpleUnchargedSystem)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::SimpleUnchargedSystem)Computes the pressure via the virial route
uses the formula p = kBTρ - 1/(2d) ρ^2 ∫dr r g(r) u'(r) for single component systems and p = kBT Σᵢρᵢ - 1/(2d) Σᵢⱼ ρᵢρⱼ ∫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.dispersion_tail — Methoddispersion_tail(potential::Potential, kBT, r, βu)Return the dispersion long-range contribution associated with potential. The default implementation returns zero, signalling that no tail is provided.
OrnsteinZernike.solve — Functionsolve(system::System, closure::Closure, method::Method)Solves the system system using the closure closure with method method.
solve(system::System, closure::Closure)Solves the system system using the closure closure with the default method NgIteration().