At least for now, why don't we keep this on the list. A couple of thoughts. First, I have actually already implemented a Newman-like model in Python. I didn't use Fipy, but I did use the finite volume method. It's missing a few features compared to dualfoil, but has several extra things. If you are interested in using it, please be in touch off the list. I plan to publish it, but I haven't quite gotten around to that yet. Hopefully quite soon.
To your questions/comments about the PDE, you raise a couple of critical differences. First, your source term, j, is a function of phi (which you didn't actually state but is true) and second, the specified flux boundary condition at the positive current collector changes the well-posed-ness entirely. In this case, the integral of the source term has to match the outlet flux into the current collector. That allows for a steady state. Then, the fact that j depends on phi is what actually "pins" the solution rather than allowing any vertical shift. Best, Ray On Thu, May 26, 2016 at 2:25 PM, Gopalakrishnan, Krishnakumar < [email protected]> wrote: > Hi Ray, > > > > Many thanks for your quick reply. I am Krishna, Ian’s colleague here at > Imperial. Hope you remember me from our earlier conversations about access > to Martin’s 10.626 materials. > > > > Ian & I are currently working on implementing the basic pseudo-2D porous > electrode Newman model using FiPy. > > > > The issue is that all of the PDE Boundary conditions are cast as Neumann. > However, when we try to apply your recommendation in FiPy (i.e. omit the > BC definitions/revert to default), it still does not converge. > > > > · The PDE that we are currently solving is the solid-potential in > the positive electrode. Sorry, there was an typo in the last email. What we > have is: > > o at the positive/separator boundary, there is no potential flux. (a > no-flux BC) > > o at the positive current collector, we have a fixed flux ( ) BC > > > > · Meaning of the source term components: > > o specific interfacial surface area > > o faraday’s constant > > o = Li-molar flux density ( ) > > > > · The integral of the source term is , where =Solid Phase Porosity, = > particle radius and = the thickness of the positive electrode, > respectively. > > o This above integral is clearly non-zero for a non-zero applied > current. > > o However, the Newman model potential equation is considered to be > well-posed and solution plots are found in papers. All other PDEs of the > model also have pure Neumann BCs. Hence, we don’t understand the > inconsistency that arises from having no steady-state solution. > > > > Any help will be much appreciated. > > > > > > Best Regards > > > > Krishna & Ian > > > > > > > > > > *From:* Campbell, Ian > *Sent:* 26 May 2016 18:07 > *To:* Gopalakrishnan, Krishnakumar <[email protected]> > *Subject:* Fwd: Re: Pure Neumann Boundary Conditions; Elliptic PDE > > > > ---------- Forwarded message ---------- > From: Raymond Smith <[email protected]> > Date: 26 May 2016 3:49 p.m. > Subject: Re: Pure Neumann Boundary Conditions; Elliptic PDE > To: [email protected] > Cc: > > Hi, Ian. > > Some thoughts. Are you able to give us any more detail about your PDE? For > example, the form/meaning of the things in the source term on the right > hand side? Presumably the flux is defined by > > \sigma \nabla \phi > > If so, then not specifying any boundary conditions would lead to no-flux > conditions because FiPy defaults to assuming zero-gradients for field > variables on the boundary. However, you could do it explicitly with > something like > > phi.faceGrad.constrain([0.], mesh.exteriorFaces) > > However, the form of the source is important here because if the integral > of the source is non-zero, then there is no steady solution. If the > integral _is_ zero and the source is not a function of \phi, then the > system admits an infinite family of solutions, all shifted by a constant. > There's some discussion of this issue in the 1D diffusion example: > > http://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.mesh1D.html#module-examples.diffusion.mesh1D > > Search for "Fully implicit solutions are not without their pitfalls" > > Best, > > Ray > > > > On Thu, May 26, 2016 at 6:30 AM, Campbell, Ian < > [email protected]> wrote: > > Dear All, > > > > Thanks for the great work on FiPy so far. > > > > We have a 2nd order elliptic PDE* defined in the domain (0, 1). At each > boundary, we have a no-flux boundary condition. > > > > We have tried to represent this in FiPy, but specifying such conditions > results only in incorrect results with large error. We have searched this > page (below) in depth but can’t see which function call is appropriate, if > any. > > > > http://www.ctcms.nist.gov/fipy/fipy/generated/fipy.boundaryConditions.html > > > > Do you have a recommendation for how we may implement two no-flux boundary > conditions on our PDE? > > > > Best regards, > > > > - Ian > > > > * $$\nabla.(\sigma_{eff} \nabla \bar{\phi}_s) = a_s F \bar{j}$$ > > > > Ian Campbell | PhD Candidate > > Electrochemical Science & Engineering Group > > Room 506, City & Guilds Building, Imperial College London, SW7 2AZ, United > Kingdom > > Phone: +44 (0)7449 815 520 | E-mail: [email protected] > > > > > _______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > >
_______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
