Hi Jonathan,
I understand that I will not get much more information about what's wrong.
However, I will learn a little bit more about how to manage variables
using masks, how to get face or cell information, in other words how
to be able to verify by myself if what I am computing is right or wrong.
Thanks a lot for your help, I appreciate that.
Cheers
Marc
Jonathan Guyer <[email protected]> a écrit :
On Jul 12, 2011, at 12:13 PM, Marc Saudreau wrote:
To see how it goes I would like
to print face temperature using masks defined for imposing boundary
conditions
but I don't really understand how I can do that ...
T.getArithmeticFaceValue()
will give the value of all faces and
T.getArithmeticFaceValue()[masklateralsurface.getValue()]
will give the value of the faces around the cylinder. Use other face
masks as desired. Remember to use .getValue().
This, however, will not likely show what you want. FiPy does not
solve on faces, it solves at cell centers. Face values need to be
interpolated and the way to do this at boundary cells is somewhat
ambiguous.
In FiPy 2.1 and before, the face value of exterior faces is equal to
the adjacent cell value, so you will see the same fluctuations as in
the image you sent.
In FiPy trunk/, if you use .constrain() instead of FixedValue, the
face value of exterior faces is reported as the constraint value, so
you will see no variations on the boundary surfaces, but you will
also not get any indication of whether the problem is well solved.
A better diagnostic would be to plot or otherwise analyze the cell
temperature as a function of cell radius. E.g.,
x, y, z = mesh.getCellCenters()
r = sqrt(x**2 + y**2)
pylab.plot(r, T.getValue(), marker='.', linestyle='')