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/)
-   -   access cell data (https://www.cfd-online.com/Forums/openfoam-post-processing/95078-access-cell-data.html)

SePe December 5, 2011 13:47

access cell data
 
Hello everybody,

I've done a simulation of a flow over a plate and now i want to evaluate the boundary layer thickness.

For that, i wanted to create a macro / programmable filter which checks the x, y, and velocity-value for every cell and computes the boundary layer thicknes for all x-values.
The results should be written to a text file.

Has anyone a hint how to start on this. I'm pretty good with python, but I don't know the right commands to acces the cfd-data in paraview.

Regards,
Sebastian

romant December 6, 2011 03:44

Quote:

Originally Posted by SePe (Post 334740)
Hello everybody,

I've done a simulation of a flow over a plate and now i want to evaluate the boundary layer thickness.

For that, i wanted to create a macro / programmable filter which checks the x, y, and velocity-value for every cell and computes the boundary layer thicknes for all x-values.
The results should be written to a text file.

Has anyone a hint how to start on this. I'm pretty good with python, but I don't know the right commands to acces the cfd-data in paraview.

Regards,
Sebastian

Check out the tool sample it can give you values for cells, over lines, and many different more. this will give you x and y values and the velocities at those values. you can plot the data, use it as your python input or just use it as an matlab input.

SePe December 6, 2011 17:05

Hello roman,

thanks for your advice. Unfortunately, I can't find the tool sample.
I have paraView 3.12 and there is no filter called sample.

Sebastian

romant December 7, 2011 02:12

sample is a tool build into openfoam. search for sampleDict on your computer, it should be located where the sample tool source code is located

Code:

# cd $FOAM_APP/utilities/postProcessing/sampling/sample
# ls

use this dictionary as your start to create what you need.

almost the same code works with functionObjects, where you can also give out those things at different times then the ones written onto HDD. like every second, every iterations and so on. look it up for functionObjects and play around with it. should be somewhere in this forum as well.

SePe December 7, 2011 10:47

NOW I found it :)

Thanks alot!

Sebastian


All times are GMT -4. The time now is 06:51.