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='')




Reply via email to