On Fri, Sep 10, 2010 at 10:08 AM, Benny Malengier <benny.maleng...@gmail.com> wrote: > Hi, > > I would like to know the reasoning behind the rotation tensor.
See <http://matforge.org/fipy/wiki/AnisotropicDiffusion>. It allows us to include anisotropic diffusion with minimum fuss. > Using a normal > self.eq = TransientTerm() == DiffusionTerm(coeff = self.diffusiont > leads to large unstability (solution blows up, oscillation between cells > appears). This is due to the rotationtensor. The rotationTensor includes correction terms for the non-orthogonality of the mesh. These don't work that well and often tend to be unstable and, hence, making the change below deals with it, but introduces a systematic error. > If I change the current value: > > rotationTensor[:, 0] = self._getNormals(mesh) > > into > > rotationTensor[:, 0] = mesh._getFaceNormals() > > all problems go away and I obtain a physical solution. > > I see now that DiffusionTermNoCorrection has this above change, but no > documentation. Is it possible to point to some references on how to handle > this, or some documentation about the use-case? Maybe. I've gone back and forth on what to make the default. I would say that, optimally, fipy would discretize in the way described in either of these papers. <http://dx.doi.org/doi:10.1016/j.jcp.2009.04.007> <http://dx.doi.org/doi:10.1016/j.jcp.2010.01.035 I think this will certainly be attempted at some point, but I don't know when. This improvement would provide second order accuracy for diffusion and convection terms on most meshes. > I see a pointer here: > http://www.ctcms.nist.gov/fipy/documentation/numerical/discret.html about > this problem, but not about how fipy handles it. > I see there a reference to > http://www.ctcms.nist.gov/fipy/documentation/refs.bib_cited.html#croftphd, > but don't find access to that from my university. Thanks. I'll delete that. -- Daniel Wheeler