Hello Yun, I just briefly looked at the code. Seems like you are solving something like an advection diffusion problem. This might not help but just I case ...
If you want a closed boundary you need to apply Robin boundary conditions because by definition the flux contains two components: one related to the diffusion process and one the advection process. For example, http://scicomp.stackexchange.com/a/10576/3691 Dan > On 24 Aug 2016, at 22:56, Yun Tao <yun...@ucdavis.edu> wrote: > > Hi all, > > I'm experiencing a bizarre issue when trying to implement zero-flux external > boundary condition when solving for transient solutions. My understanding is > that it is the default setting in FiPy 3. Indeed, without specifying it, the > solutions (attached) remains at unity throughout the simulation duration. > However, when I manually tried to fix the exterior face gradient to zero with > var.faceGrad.constrain(0, where=m.exteriorFaces), the solution began to blow > up (as shown in the printed statements). Why does this happen? Is there a > hidden conflict in conservation settings I should be careful of? > > Thanks, > Yun > > > -- > Yun Tao > Postdoc > Center for Infectious Disease Dynamics > Pennsylvania State University > State College, PA 16803 > <0flux_bc_fipylistserve.py> > _______________________________________________ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
_______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]