Boundary Conditions

The boundary conditions need to set through echemfem.EchemSolver.set_boundary_markers(), which sets a dictionary containing boundary condition names and their corresponding boundary id.

In the equations below, we have:

  • \(c_k\), the concentration of species \(k\)

  • \(\Phi_2\), ionic potential

  • \(\Phi_1\), electronic potential

  • \(\mathbf N_k\), the flux of species \(k\)

  • \(c_{k,\mathrm{bulk}}\), the bulk concentration of species \(k\)

  • \(\mathbf n\), the unit outward normal vector

  • \(\mathbf u\), the velocity

Here are the different options for boundary_markers keys:

  • "inlet": Inlet boundary condition defined as

\[\mathbf N_k \cdot \mathbf n = c_{k,\mathrm{bulk}} \mathbf u \cdot \mathbf n.\]
  • "outlet": Outlet boundary condition defined as

\[\mathbf N_k \cdot \mathbf n = c_k \mathbf u \cdot \mathbf n.\]
  • "bulk dirichlet": Dirichlet boundary condition for concentrations using the value "bulk" provided in Concentration Parameters such that

\[c_k = c_{k,\mathrm{bulk}}.\]
  • "bulk": Robin boundary condition for concentrations, where \(K_{k,MT}\) is the value "mass transfer coefficient" if provided in Concentration Parameters for species \(k\). Also homogeneous Dirichlet boundary condition of the ionic potential, as follows

\[\begin{split}\begin{align} \mathbf N_k \cdot \mathbf n &= K_{k,MT} (c_k - c_{k,\mathrm{bulk}}), \\ \Phi_2 &= 0. \end{align}\end{split}\]
  • "neumann": Neumann boundary condition defined through the method echemfem.EchemSolver.neumann().

  • "gas": Dirichlet boundary condition for concentrations using the value "gas" if provided in Concentration Parameters for species \(k\).

  • "applied": Dirichlet boundary condition for ionic potential, if this is a non-porous case, and for the electronic potential, if this is a porous case. It uses the value "U_app" given in Physical Parameters.

  • "liquid applied": Dirichlet boundary condition for ionic potential using the value "U_app" given in Physical Parameters. This is the same as "applied" in the non-porous case.

  • "robin": Robin boundary condition for the ionic potential when using the Poisson equation, typically used for GMPNP. We pass \(U - U^\mathrm{PZC}\) together as "U_app" in Physical Parameters, as well as "gap capacitance" for \(C_\mathrm{gap}\).

\[\epsilon_0\epsilon_\mathrm{r} \nabla \Phi_2 \cdot \mathbf{n}= C_\mathrm{gap}\left(U - U^\mathrm{PZC} - \Phi_2\right).\]
  • "poisson neumann": Neumann boundary condition for the ionic potential when using the Poisson equation, where \(\sigma\) is the value "surface charge density" in Physical Parameters.

\[\epsilon_0\epsilon_\mathrm{r} \nabla \Phi_2 \cdot \mathbf{n}= \sigma\]
  • Charge-transfer reactions: a custom str can be passed to name the electrodes used in surface charge-transfer reactions defined using Electrochemical Parameters.