Postprocessing using pythonFlu + Matplotlib +Scipy
Hi all,
I would like to try using pythonFlu + Matplotlib + Scipy/Numpy to do some postprocessing. I'm able to export some data in raw format (x,y,z, field1, field2, ...) on surfaces (patches or plane defined in sampleDict) and read them with a simple python script. I've got some difficulties to use the Numpy meshgrid and Matplotlib contour in my script even in my mesh is block structured. I first try to plot a scalar field on a patch. The mesh obtained from blockMesh is structured (in fact blockstructured). My major problem is automatically obtain the size of the x (Nx) and y (Ny) data on this particular patche to use meshgrid and contour in my script. meshgrid(x, y) For vectors x, y with lengths Nx=len(x) and Ny=len(y), return X, Y where X and Y are (Ny, Nx) shaped arrays with the elements of x and y repeated to fill the matrix Does pythonFlu have some magic tool with it to do those kind of postprocessing ? :D Did you manage to postprocess your openfoam data only with matplotlib+numpy+scipy ? Thanks for shearing your experiences. Cheers ;) Francois 
May I add that I would like to preserve the original mesh structure (near wall refinement, etc ..) over interpolating the data on a new equally spaced grid.

Hi Francois,
Quote:
Am I wrong? May be you could attach the whole example to demonstrate your point? Quote:
Nevertheless, we could start to develop thirdparty OpenFOAM related postprocessing tools based on Python. Integration with pythonFlu better be optional, to make this tools valuable by themselves. Best regards, Alexey 
All times are GMT 4. The time now is 11:41. 