> On Jun 23, 2016, at 10:23 AM, Daniel Wheeler <daniel.wheel...@gmail.com> 
> wrote:
> 
> I'm not sure what the thinking is of your colleagues, but the size of
> the elements has little or no impact on conservation. In finite
> volume, the equations are conservative to at least the precision of
> the linear solver (if not more) independently from the accuracy of the
> solution. Of course there could be an issue with source terms that I'm
> not seeing, but the diffusion and convection terms should be entirely
> conservative.

I think the bigger issue is that a Grid1D will not properly represent a 
spherical divergence, regardless of the volumes of the cells. I thought we had 
a set of SphericalGrid1D classes, but apparently not. It would be the same 
basic idea as CylindricalNonUniformGrid1D, but I think the cell volumes and 
face areas would need to be changed, I believe like this:

    def _calcFaceAreas(self):
        r = self._calcFaceCenters()[0]
        return r**2

    def _calcCellVolumes(self):
        return super(CylindricalNonUniformGrid1D, self)._calcCellVolumes() / 3.



_______________________________________________
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to