Hi,

I'm trying to model a system of a reaction occurring over a 2D particle
with no diffusion in the particle and a reaction rate that depends both on
the concentrations and the electrostatic potential in the particle --
essentially a non-linear Allen-Cahn model. In this particular case, I'm
trying to describe ions intercalating into a phase separating, low in-plane
diffusivity solid. The basic governing equation looks like

TransientTerm(var=c) == f(c, Laplacian(c), phi)

where f(c, Laplacian(c), phi) is some non-linear function of c
(concentration), its second spatial derivatives, and the electrostatic
potential in the solid, phi. The function, f, leads to phase separation in
the particle.

I'm attempting to model the case of a constant overall current (dis)charge.
Because there is phase separation, and the reaction rate depends on the
concentration in the surface I'm modeling, there is inhomogeneity in the
reaction rate over the 2D surface. However, I'd like the total rate
integrated over the surface to be constant, achieved by varying phi
(assumed to be constant over the surface).

As of now, I'm doing this with a relatively naive approach of using
scipy.optimize.fsolve at each time step to find the value of the potential,
phi, which leads to the surface integral of dc/dt over the surface being
the desired value. This seems to work reasonably well, but the solvers are
implicit and that seems more like an explicit way to maintain the
constraint. I was wondering if there's a smoother way to incorporate this
sort of integral constraint. I worry that it would actually make the system
a DAE, and I'm not sure (a) if FiPy's integrators are designed to handle
that and (b) how to interact with them if they are.

Thanks,
Ray
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to