> This is not the issue. The actual cell values are correct for the
> equation you solved.
> The issue is that the exterior face values use the adjacent  interior
> cell values when
> calculating the gradient instead of values calculated using the
> boundary condition.
> 
> > Is
> > this wanted?
> 
> No, it was an oversight in the basic design. The variable knows
> nothing about the
> boundary conditions and hence always assumes a zero gradient on the exterior
> faces when calculating the gradient. This can cause problems when you
> have explicit
> gradients and divergences as source terms. There are ways to deal with
> this, but it is not ideal.
> 
> Our hope is to associate the boundary conditions with the variable in
> the future.
> This probably won't be a huge effort. Unfortunately, this is not top
> of the agenda
> as we have other more pressing issues. I can explain the work around
> if you need it.
I would be interested. My procedure would be a merely linear geometric approach,
 taking the concentration or temperature value in the cell next to the boundary
subtracting the value at the boundary and dividing by the distance between the
center of the cell and the boundary. Perhaps you have an easier - or more
elegant- way for doing this?


I think FiPy (at least what I  saw from it, so far)is already very valuable, but
in heat transfer or mass transfer problems (as you will certainly know), often
fixed values are used as boundary conditions at some boundaries. In such cases
the (heat or mass)fluxes at the boundaries are the variables looked for, which
are then generally calculated using Fourier's or Fick's law, which in turn means
to calculate the gradient times a diffusion coefficient. Due to this, I had
expected that this issue would have been raised earlier. I would geatly
appreciate if this problem could be solved in a more general way.Would a
procedure giving the fluxes at the boundaries also be implemented then?



In total let me thank you for your prompt and very helpful answers and whish you
 a happy new year!
Burak


Reply via email to