Electrolyte data
LiquidElectrolytes.solvepressure
— Functionsolvepressure(electrolyte)
Check if pressure is to be solved for using the pressure Laplace equation derived from the Navier-Stokes equation in mechanical equilibrium 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.chargedensity!
— Functionchargedensity!(q, sol,electrolyte)
Calculate charge density from solution (on the whole grid), putting the resulti into q
and returning this vector.
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.wnorm
— Functionwnorm(u,w,p)
Weighted norm with respect to columns
Poisson-Boltzmann
LiquidElectrolytes.pbspacecharge
— Functionpbspacecharge(φ, p, electrolyte)
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.set_model!
— Methodset_model!(electrolyte, model)
Force the electrolyte data to be consistent to given model. The following models are supported:
:default
,:DGL
: Dreyer/Guhlke/Landstorfer model (varying solvation, molar volumes, molar mass, solve for pressure):BAO
: Borukhov/Andelman/Orland ($κ_i=0$, $M_i=M_0$,solvepressure=false
):DGM
: Dreyer/Guhlke/Müller ($κ_i=0$, $v_i=v_0$):ρconst
: Constant density ($M_i=M_0v_i/v_0$) (for consistent coupling with stokes)
LiquidElectrolytes.pnpreaction
— Functionpnpreaction(f, u, node, electrolyte)
Finite volume reaction term
LiquidElectrolytes.pnpflux
— FunctionLiquidElectrolytes.pnpstorage
— Functionpnpstorage(f, u, node, electrolyte)
Finite volume storage term
LiquidElectrolytes.pnpbstorage
— Functionpnpbstorage(f, u, node, electrolyte)
Finite volume boundary storage term
LiquidElectrolytes.sflux
— Functionsflux(ic,dϕ,ck,cl,γk,γl,bar_ck,bar_cl,electrolyte; evelo=0.0)
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; evelo=0)
Flux expression based on activities, see Fuhrmann, CPC 2015 ??? Do we need to divide the velocity by the inverse activity coefficient ?
LiquidElectrolytes.cflux
— Functioncflux(ic,dϕ,ck,cl,γk,γl,bar_ck,bar_cl,electrolyte; evelo = 0)
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
Poisson-Nernst-Planck-Stokes
LiquidElectrolytes.flowsolver
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.