Daniel, Jonathan and others,
I re-meshed my problem using a rectilinear grid, used the same script, and
everything works fine now. Now that I've worked through this, I recall
having this issue before. It seems like the gmsh generated grids only work
for homogeneous or nearly homogeneous problem domains. If this is true,
perhaps there should be some sort of a warning issued when importing gmsh
grids?
I also recall there being problems plotting hexahedrons in mayavi. Is this
true, or am I imagining this? If its true, I could send you the bit of
code I'm using to plot up a rectilinear hexahedral grid for inclusion in
FiPy.
Andy
Andrew Reeve
Associate Prof.
Dept. of Earth Sciences
University of Maine
207-581-2353
On Wed, 4 Feb 2009, A.S.Reeve wrote:
Daniel and Jonathan,
I'm having some difficulty getting fipy to converge for a fairly
simple problem when I include a modest amount of heterogeneity. I've
simplified things down to a transient diffusion equation with a source
term across selected cells along the 'top' of the model, and type 1
boundary conditions elsewhere across the top of the model.
I've tried doing this on a couple of different grids generated by
gmsh. One was created by writing a script to great the geometry file
(both points and line segments, merging the files from my script into
gmsh, then defining plane surfaces in gmsh and creating the grid. As
I'd had problem making proper grids before, I thought this might be
the problem and remade a simpler grid just from point data. Each grid
has a separate file associated with it used to define different
regions within the model. Both sets of files are attached.
When I run a model with no heterogeneity, the results look half-way
reasonable, but when I add a modest amount of heterogeneity (based on
the zones), the model blows up and doesn't converge. I was able to get
something to run many months ago (or so I thought), but now am trying
to redo these models to address reviewer comments and things are not
working out...
I'd assume FiPy should be able to handle heterogeneity. Does this have
something to do with using a gmsh grid (should I always use
rectangular grids when using fipy)?
My script and supporting files are attached if you have time to look
at then to see if this is my stupidity or a problem with FiPy. I think
there are a few things in the file that are holdovers from the case I
was initially trying to solve (ie sweeping instead of solving,
importing rbf), but I don't think they are impacting the results.
Heterogeneity is assigned in lines 55 to 57 of the attached script.
I'm using very recent versions of fipy(2982)
Andy
Andrew Reeve
Associate Prof.
Dept. of Earth Sciences
University of Maine
207-581-2353