CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Velocity at each Gridpoint (https://www.cfd-online.com/Forums/openfoam-post-processing/76139-velocity-each-gridpoint.html)

daebel May 15, 2010 12:03

Velocity at each Gridpoint
 
Hi all!

I am post-processing OpenFoam output data with Matlab. What I need are the gridpoints and at each gridpoint the velocity. However, the output files that I get from the person who is doing the OpenFoam simulation are not easy to process. The gridpoints are listed well, no problems there. But the velocity field is splitted into so many different subsets (internalField, Inlet, Oulet,...) that it is an almost impossible task to assign one velocity to one gridpoint.

Is there a way (in OpenFoam) to output velocities for each gridpoint? Some check box or some command, I don't know... ;)
Just so I get the gridpoints in an "nx3" array (n: number of gridpoints, 3: each direction) and the velocity exactly in the same format?

Thank you very much for your help!
Best regards

olesen May 16, 2010 05:42

Quote:

Originally Posted by daebel (Post 258925)
The gridpoints are listed well, no problems there. But the velocity field is splitted into so many different subsets (internalField, Inlet, Oulet,...) that it is an almost impossible task to assign one velocity to one gridpoint.

Since OpenFOAM uses a control-volume method, the internalField represents the velocity for the cell, not the points.

Quote:

Originally Posted by daebel (Post 258925)
Is there a way (in OpenFoam) to output velocities for each gridpoint?

You could use the volPointInterpolation class (http://foam.sourceforge.net/doc/Doxy...rpolation.html) to interpolate the cell-based volume fields into point-based fields. I don't know off-hand if there is a utility to do this, or if you'd have to add it in (to the solver or a standalone utility) by yourself.

daebel May 16, 2010 08:20

Thank you very much, I'll have a look at it!


All times are GMT -4. The time now is 07:58.