FiPy Gurus,

Is there a simple way to calculate the change in mass stored in a cell over a single time step? I'm trying to do this using a flux assigned to a FaceVariable with the operations (kond and head are CellVaribles):

flux=-head.getFaceGrad()*kond.getHarmonicFaceValue()
flux.getDivergence()

This seems to work at internal cells but I'm having trouble sorting this out at cells with fixedValue boundary condtions assigned to one of their faces. How does one seperate changes in storage in these cells from influx across face with a fixedValue conditions? Does the divergence operator in FiPy lump these two terms (storage and flux across face) together in these cells?

To calculate the mass change in a cell over the time step, I'd assume I need to average the divergences at the start and end of a time step.

Andy


Andrew Reeve
Associate Professor
Dept. of Earth Sciences
University of Maine

Reply via email to