find_J(int icell, int jcell, LDBLE mixf, LDBLE DDt, int stagnant)/* ---------------------------------------------------------------------- */{ /* mole transfer of the individual master_species: * Eqn 1: * J_ij = DDt * (A_ij / lav) * (-D_i*grad(c) + D_i*z_i*c_i * SUM(D_i*z_i*grad(c)) / SUM(D_i*(z_i)^2*c_i)) * regular column, stagnant FALSE: * D_i = temperature-corrected Dw * A_ij = A_icell * A_jcell * A_icell = (L porewater in i_cell / length_icell) / tort_f_icell / * (length_icell / 2) * lav = A_icell + A_jcell * grad(c) is concentration difference in icell and jcell (dx is in lav), for activity corrections see Appelo & Wersin, 2007. ** dec. 28, 2015** included aq_dl in the harmonic mean: J_ij = - b_i * b_j / (b_i + b_j) * (c_j - c_i) in mol/s (see ex 21 in the manual 3). b_i = A1 / (G_i * h_i / 2) * Dw for a pore without EDL. A1 = aq1 / h_i (m^2). with EDL (no aq_il_i in A1, for now): t_aq1 = aq1 + aq_dl_i. A1 = t_aq1 / h_i. f_free_i = aq1 / t_aq1. b_i_cat = A1 / (G_i * h_i / 2) * Dw * {f_free + (1 - f_free) * Bm}. Bm = Boltzmann enrichment in EDL = g_dl. b_i_ani = A1 / (G_i * h_i / 2) * Dw * {f_free + (1 - f_free) / Bm)}. 22/2/18: now calculates diffusion through EDL's of multiple, differently charged surfaces * stagnant TRUE: * same eqn for J_ij, but multiplies with 2 * mixf. (times 2, because mixf = A / (G_i * h_i)) * mixf_ij = mixf / (Dw / init_tort_f) / new_tort_f * new_por / init_por * mixf is defined in MIX; Dw is default multicomponent diffusion coefficient; * init_tort_f equals multi_Dpor^(-multi_Dn); new_pf = new tortuosity factor. * Interlayer diffusion (IL) takes the gradient in the equivalent concentrations on X-. surface area A for IL: stagnant: ct[icell].mixf_il is mixf * por_il / por. por_il = interlayer porosity, from -interlayer_D true 'por_il'. por = free + DL porewater porosity, from -multi_D true 'multi_Dpor'. in regular column, A is calc'd from (free + DL porewater) and cell-length. for IL: A * por_il / por. por_il should be entered for the cell with the maximal cec. IL water is related to X-, thus the cec (eq/L IL water) is the same for all cells if X is defined. IL-water = (free + DL porewater) * por_il / por. for IL: A * aq_il / t_aq. */