Hi Justin, Thanks for your interest in FiPy. Try switching the "DiffusionTerm" to "DiffusionTermNoCorrection" and see if that improves things. I think it will.
I can't run the example with version 2.1, I get an error when reading the geo file. However, trunk works fine and converges to the right answer (given first order error) for the unstructured case. I think the major difference between trunk and version-2_1 is that DiffusionTermNoCorrection is now the DiffusionTerm. If you make that switch in your code you should be golden. Cheers. On Tue, Mar 6, 2012 at 3:16 PM, Justin Lazear <[email protected]> wrote: > Hi all, > > I'm new to FiPy and FVA in general, and am excited to use it to solve some > thermal diffusion problems in my work. I figured before I tackled a > full-scale problem, I'd start small. Unfortunately I was not very > successful in this, and ran into an unexpected problem with the solution > diverging. > > The problem I set up is the diffusion equation for a simple 3D cylinder > with square cross section and an aspect ratio of 2:1:1, with BCs of -1 and > 1 on the two opposite long ends. > > This works fine using FiPy's built-in Grid3D (e.g. attached script, > fipytest5.py), and the solution happily approaches the expected steady > state. However, I will need to solve problems with more complicated > geometries, for which I expect to use gmsh. To test gmsh, I created the > same shape in gmsh (fipytest6.geo), let gmsh handle the meshing, and let > FiPy run on this mesh (fipytest6.py), expecting essentially the same > solution. > > However, it's clear that the gmsh solution starts to diverge after 60 or > so steps and continuing much beyond that gives a completely nonsensical > result. Reducing the step size does not help. Increasing the mesh density > makes the problem worse (it diverges after fewer steps). > > I've run the 2D version of this problem with both Grid2D and gmsh meshes > (in analogy with circle.py), and they work fine, so I seem to be screwing > up the transition to 3D. > > Any insight would be greatly appreciated. > > Versions: > In [283]: print sys.version > 2.6.4 (r264:75706, Jun 4 2010, 18:20:31) > [GCC 4.4.4 20100503 (Red Hat 4.4.4-2)] > > In [284]: print fipy.__version__ > 2.1.2 > > [~]$ uname -r > 2.6.34.9-69.fc13.x86_64 > > [~]$ gmsh --version > 2.5.0 > > Thanks, > Justin > > _______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > -- Daniel Wheeler
_______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
