0

Is there a possibility to extract the area of a face between two cells in fipy?

I know that each mesh has got the property cellVolume and in the specific case I investigate, this allows me to deduce the relevant surface areas. Furthermore, I can obtain faceCenters and faceNormals. But wouldn't it be natural to include a property faceArea for a faceVariable?

lmr
  • 174
  • 2
  • 10

1 Answers1

1

FiPy does have a face area property, but it's a member of the mesh class.

>>> import fipy
>>> fipy.Grid2D(nx=2, ny=2)._faceAreas
array([ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.])

It's an underscore property which makes it hard to find.

wd15
  • 1,068
  • 5
  • 8
  • To me, this is very surprising. In my case, it is a nice double check since I can also obtain the relevant face areas from cellVolumes. However, I can think of many cases where it would be useful to have easy access to faceAreas. I couldn't find any information on this underscore property on the fipy homepage... – lmr Mar 08 '18 at 14:56
  • 1
    Underscored names are, by Python convention, considered internal implementation details. We've been wrong before about what properties and methods users might need know about. Please [file an issue](https://github.com/usnistgov/fipy/issues/new) if you'd like us to make this part of the public API. – jeguyer Mar 09 '18 at 18:32