Re: scipy's Delaunay output to fipy mesh2D object

2016-07-20 Thread James Pringle
Dear all -- A warning about using the above code. Since the choice of triangles formed by a Delaunay triangulation can be somewhat arbitrary in the case of a somewhat regular distribution of points, it will choose some triangulations that lead to severe orthogonality errors in fipy, even if

Re: Accuracy of DiffusionTerm for non-uniform mesh

2016-07-20 Thread Raymond Smith
Thanks. And no, I'm not sure about the normalization for grid spacing. I very well could have calculated the error incorrectly. I just reported the root mean square error of the points and didn't weight by volume or anything like that. I can change that, but I'm not sure of the correct approach.

Re: Accuracy of DiffusionTerm for non-uniform mesh

2016-07-20 Thread Daniel Wheeler
On Wed, Jul 20, 2016 at 1:30 PM, Raymond Smith wrote: > Hi, FiPy. > > I was looking over the diffusion term documentation, > http://www.ctcms.nist.gov/fipy/documentation/numerical/discret.html#diffusion-term > and I was wondering, do we lose second order spatial accuracy as soon

Improving non-orthogonality issue in FiPy

2016-07-20 Thread Daniel Wheeler
FiPy has issues with non-orthogonal meshes (i.e. when the vector between the cell center isn't parallel to the face normal). We did make an attempt at fixing this, which resulted in two diffusion terms, https://github.com/usnistgov/fipy/blob/develop/fipy/terms/diffusionTermCorrection.py and

Re: Accuracy of DiffusionTerm for non-uniform mesh

2016-07-20 Thread Daniel Wheeler
Hi Raymond, I was just corresponding with James Pringle off the list about the same issue for a Delaunay triangulated mesh. Here is my explanation to him. I think this is the non-orthogonality issue. I should have realized this much sooner. The only place we seem to reference this issue is in

Accuracy of DiffusionTerm for non-uniform mesh

2016-07-20 Thread Raymond Smith
Hi, FiPy. I was looking over the diffusion term documentation, http://www.ctcms.nist.gov/fipy/documentation/numerical/discret.html#diffusion-term and I was wondering, do we lose second order spatial accuracy as soon as we introduce any non-uniform spacing (anywhere) into our mesh? I think the