On Wed, Dec 18, 2013 at 1:37 PM, Jane Hung <jyh...@mit.edu> wrote: > OK, I can write the equations with grad instead of faceGrad, but it doesn't > seem like the equations can be solved with what I've tried. I tried to use > eq.solve, which gives a TypeError,
This could be a FiPy issue if it works with "sweep" and not with "solve". I got the same error. I'll look into that, but you should just use "sweep" anyway. They do the same thing, just that "sweep" returns the residual. > and to use sweep, which does not converge > in the while loop. I've linked the 2 versions of my code: > sweep version http://pastebin.com/5aH5DDKz I tried this and the residuals decrease quite a bit. Would you expect the residuals to approach zero at every time step? This seldom happens with non-linear equations. The absolute magnitude of the residuals isn't really important, but how much they decrease and whether the error also decreases. > solve version http://pastebin.com/sBQj7knw I created a notebook with some pointers about how to reformulate the equations so they are mostly implicit. I believe this is possible with your equations. http://nbviewer.ipython.org/gist/wd15/8043375 -- Daniel Wheeler _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]