On Fri, Nov 21, 2014 at 4:42 PM, Kyle Briton Lawlor <[email protected]> wrote: > > Hi, Jonathan and FiPy. > > Thanks! This really helped. I can now implement some various Neumann BCs. Very cool. > > var will need to be a FaceVariable, but yes, you should be able to do this > > Do I need to declare a CellVariable and a FaceVariable?
I'm confused by the code above, "phiBoun" is created but never used. In general FaceVarialbes are used for coefficients and CellVariables are used for solution variables. I think "phi.faceValue" is all you need. > Or do I need to use a FaceVariable instead of CellVariable? You definitely need a CellVariable if you want to solve anything. "phi.faceValue" is a FaceVariable. I don't think you need anything beyond that. > > I am confused with why I need to do this... > > You mean create a FaceVarialbe? I don't think you do need to, you've created one, but it's not used so your code would run equally well without it. There is no black magic in FiPy. > Is this interpretation correct? > #ROBIN BC > phi.faceGrad.constrain([phi.faceValue*mesh._faceNormals],where=outerFaces) > phi.faceGrad.constrain([1*mesh._faceNormals],where=innerFaces I don't believe that you need to feed a list into the value for the boundary condition. Does it work? If it doesn't work, I just answered a question with a similar issue and implemented an implicit version of a Robin boundary condition just using source terms. It might be an easier approach if you can't get the constraints to work correctly. http://nbviewer.ipython.org/gist/wd15/f04b22c6ec80b1eda8e3 > > Does using a FaceVariable mean the value of phi.faceValue would change? Yes. It should be automatically updated as phi changes. > I just want to say, thanks for all the help so far! I’ve been learning a lot, so I really appreciate it! > Look forward to hearing more. No problem at all. I'm just sorry that I answer questions so slowly and can't spend enough time making FiPy better. Cheers, Daniel -- Daniel Wheeler
_______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
