Hi Dan, T hank you! I was not aware of t hat at all, thanks for that important information! I just tried searching for ways to implement the Robin BCs in FiPy. This exam pl e from the site
< http://bit.ly/2c8Bnkp > appears to indicate that the var.faceGrad.constrain(0, where=m.exteriorFaces) piece of command I used was in fact made for handl ing only the advection component . I suppose then that my diffusion component is constrained by the usual default Neumann BCs. If I'm correct , then it's even more puzzling why that line in my code causes the solution to blows up . In contrast , the solution looks remarkably well-behaved when provided with just the Neumann BCs. Is there something else I'm not understanding? How would my code be altered to properly implement the Robin BCs? Thanks, Yun On Wed, Aug 24, 2016 at 8:24 PM, Daniel Farrell <boyfarr...@gmail.com> wrote: > 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 ] > > -- Yun Tao Postdoc Center for Infectious Disease Dynamics Pennsylvania State University State College, PA 16803
_______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]