On Apr 7, 2014, at 8:53 AM, Joakim Odqvist <[email protected]> wrote: > This is a real problem we have at the moment, and the "coeff" doesn't (as far > as we can see) update itself. > No, you are right, the specific solver shouldn't have any bearing on this > problem I guess.
I apologize that it's taken me this long to get to this. When I run your script, I get: diffusion coefficient.... PHI value at 4 = 0.596937242845 Solving for dt= 0.00673794699909 PHI value at 4 = 0.596937242845 Solved for dt= 0.00673794699909 PHI value at 4 = 0.539379662528 dt: 0.00673794699909 0.00673794699909 Solving for dt= 0.00680566449223 PHI value at 4 = 0.539379662528 diffusion coefficient.... PHI value at 4 = 0.539379662528 Solved for dt= 0.00680566449223 PHI value at 4 = 0.533992598283 dt: 0.00680566449223 0.0135436114913 Solving for dt= 0.0068740625575 PHI value at 4 = 0.533992598283 diffusion coefficient.... PHI value at 4 = 0.533992598283 Solved for dt= 0.0068740625575 PHI value at 4 = 0.532785404054 dt: 0.0068740625575 0.0204176740488 Solving for dt= 0.00694314803475 PHI value at 4 = 0.532785404054 diffusion coefficient.... PHI value at 4 = 0.532785404054 Solved for dt= 0.00694314803475 PHI value at 4 = 0.532306418791 dt: 0.00694314803475 0.0273608220836 Solving for dt= 0.00701292783259 PHI value at 4 = 0.532306418791 diffusion coefficient.... PHI value at 4 = 0.532306418791 Solved for dt= 0.00701292783259 PHI value at 4 = 0.532150957698 dt: 0.00701292783259 0.0343737499161 so the diffusion coefficient is being recalculated at every time step, during the solve. I guess I don't know what you mean by "at the beginning of the time-step" and "at the end of the time-step". You call eq.solve() one time per loop and the diffusion coefficient is updated at the beginning of that solve. Since the diffusion coefficient is only used by eq.solve(), what purpose would be served by recalculating diffusion coefficient at other times? If it were used, it *would* be recalculated. _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
