Internal API
Electrolyte data
LiquidElectrolytes.solvepressure — Functionsolvepressure(electrolyte)Check if pressure is to be solved for using the momentum balance equation, or if the pressure is obtained from the (Navier)-Stokes solver.
LiquidElectrolytes.edgevelocity — Functionedgevelocity(electrolyte, iedge)Obtain the velocity projection onto a simplex edge of index i (normals to Voronoi cell boundaries).
LiquidElectrolytes.value_or_getindex — Functionvalue_or_getindex(v,i)Return number or i-th component of Union{Number, Vector}.
LiquidElectrolytes.chargedensity! — Functionchargedensity!(q, sol,electrolyte)Calculate charge density from solution (on the whole grid), writing the result into q and returning this vector.
LiquidElectrolytes.wnorm — Functionwnorm(u,w,p)Weighted norm with respect to columns
Poisson-Nernst-Planck
LiquidElectrolytes.pnpreaction! — Functionpnpreaction!(f, u, node, electrolyte)Finite volume reaction term
LiquidElectrolytes.pnpflux! — Functionpnpflux(f, u, edge, electrolyte)Finite volume flux. It calls either μex_flux!, cent_flux! or act_flux!.
LiquidElectrolytes.pnpstorage! — Functionpnpstorage!(f, u, node, electrolyte)Finite volume storage term
LiquidElectrolytes.pnpbstorage! — Functionpnpbstorage!(f, u, node, electrolyte)Finite volume boundary storage term
LiquidElectrolytes.dμex — Function dμex(γk, γl, electrolyte)Calculate differences of excess chemical potentials from activity coefficients
Poisson-Boltzmann
LiquidElectrolytes.pbreaction! — Functionl pbreaction!(f, u, node, electrolyte)
Reaction expression for Poisson-Boltzmann
LiquidElectrolytes.pbflux! — Functionpbflux!(f, u, edge, electrolyte)Flux expression for Poisson-Boltzmann
Poisson-Nernst-Planck-Stokes
LiquidElectrolytes.flowsolverElectrochemical calculations
LiquidElectrolytes.splitz — Functionsplitz(range::AbstractRange)If range contains zero, split it into two parts, one with values <=0 and one with values >=0. Otherwise, return the range or its reverse, such that first value always is the one with the smallest absolute value.
splitz(range::Vector)Version of splitz(range::AbstractRange) for vectors.
General tools
LiquidElectrolytes.showstruct — Functionshowstruct(io::IO, this)Print struct with field names and field values.
LiquidElectrolytes.myround — Functionmyround(x; kwargs...)Rounding for use in showstruct.