Electrolyte data
LiquidElectrolytes.charge
— Functioncharge(c,electrolyte)
Calculate charge from vector of concentrations
LiquidElectrolytes.vrel
— Functionvrel(ic,electrolyte)
Calculate relative (wrt. solvent) molar volume of i-th species $v_{i,rel}=κ_i+\frac{v_i}{v_0}$.
LiquidElectrolytes.rlog
— Functionrlog(u, electrolyte)
Calls rlog(u;eps=electrolyte.epsreg)
rlog(u; eps=1.0e-20)
Regularized logarithm. Smooth linear continuation for x<eps
. This means we can calculate a "logarithm" of a small negative number.
LiquidElectrolytes.rexp
— Functionrexp(x;trunc=500.0)
Regularized exponential. Linear continuation for x>trunc
, returns 1/rexp(-x) for x<-trunc
.
LiquidElectrolytes.wnorm
— Functionwnorm(u,w,p)
Weighted norm with respect to columns
Poisson-Boltzmann
LiquidElectrolytes.pbspacecharge
— Functionpbspacecharge(φ, p, electorlyte)
Space charge expression for Poisson-Boltzmann
LiquidElectrolytes.pbreaction
— Functionpbreaction(f, u, node, electrolyte)
Reaction expression for Poisson-Boltzmann
LiquidElectrolytes.pbflux
— Functionpbflux(f, u, edge, electrolyte)
Flux expression for Poisson-Boltzmann
Poisson-Nernst-Planck
LiquidElectrolytes.pnpstorage
— Functionpnpstorage(f, u, node, electrolyte)
Finite volume storage term
LiquidElectrolytes.pnpreaction
— Functionpnpreaction(f, u, node, electrolyte)
Finite volume reaction term
LiquidElectrolytes.pnpflux
— FunctionLiquidElectrolytes.default_bcondition
— Functiondefault_bcondition(f,u,bnode,electrolyte)
Default boundary condition amounts to nothing
LiquidElectrolytes.sflux
— Functionsflux(ic,dϕ,ck,cl,γk,γl,bar_ck,bar_cl,electrolyte)
Sedan flux, see Gaudeul/Fuhrmann 2022
Appearantly first described by Yu, Zhiping and Dutton, Robert, SEDAN III, www-tcad.stanford.edu/tcad/programs/sedan3.html
see also the 198? Fortran code available via https://web.archive.org/web/20210518233152/http://www-tcad.stanford.edu/tcad/programs/oldftpable.html
Verification calculation is in the paper.
LiquidElectrolytes.aflux
— Functionaflux(ic,dϕ,ck,cl,γk,γl,bar_ck,bar_cl,electrolyte)
Flux expression based on activities, see Fuhrmann, CPC 2015
LiquidElectrolytes.cflux
— Functioncflux(ic,dϕ,ck,cl,γk,γl,bar_ck,bar_cl,electrolyte)
Flux expression based on central differences, see Gaudeul/Fuhrmann 2022
LiquidElectrolytes.dμex
— Function dμex(γk, γl, electrolyte)
Calculate differences of excess chemical potentials from activity coefficients
Electrochemical 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.