On Wed, Nov 9, 2011 at 10:10 AM, Daniel Wheeler <daniel.wheel...@gmail.com>wrote:
> On Thu, Nov 3, 2011 at 11:47 AM, Douwe Bruinsma <do...@innersource.com>wrote: > >> I'm impressed by the FiPy package, but don't understand how to implement >> the convection boundary conditions for my problem. >> > > Hi Douwe, Thanks for your interest in FiPy and apologies for the delayed > response. I'll try and give some pointers below. > > >> I can't figure out how to set up the boundary conditions for a steady >> state 2-D flow problem with a source and radial diffusion. I'd like the >> inlet on the left to be at a constant temperature and the outlet on the >> right to be what would normally be a constant pressure boundary condition. >> I want the top to be at a constant temperature and the bottom to have zero >> flux. >> > > Read < > http://www.ctcms.nist.gov/fipy/documentation/FAQ.html#i-can-t-get-the-fixedvalue-or-fixedflux-boundary-condition-objects-to-work-right-what-do-i-do-now> > and get back to the list if you still have issues. Boundary conditions > don't work as transparently as we would like in version 2.1 of FiPy, but > things will improve in the next release. However, it is still manageable in > version 2.1 especially if you employ the methods outlined in the FAQ. > > >> I have included the code below which I was using for testing and >> therefore doesn't include the zero flux BC on the bottom and has several >> other inconsistencies, but shows how I'm setting up the problem. >> > > Try and fix up the outlet boundary according to the FAQ. Also zero flux is > default so no need to apply a BC on the bottom boundary. > > >> As a side note, I am planning to account for the radial geometry by >> multiplying the DiffusionTerm by 1/r and the DiffusionCoeff by r while >> using a rectangular grid. >> > > You are better off using the CylindricalGrid2D class. That should take of > the radial scalings. Also, multiplying terms is a bit shaky and seldom > necessary. See < > http://matforge.org/fipy/browser/branches/version-2_1/fipy/meshes/cylindricalGrid2D.py>. > You'll need to reorient in this case because the radial direction is > horizontal. > > Hope that helps. Get back if you still don't understand after reading the > FAQ. Cheers. > > -- > Daniel Wheeler > -- Daniel Wheeler
_______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy]