CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Spatial average of viscosity

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   May 23, 2019, 07:19
Default Spatial average of viscosity
Nat K
Join Date: Oct 2017
Posts: 65
Rep Power: 5
nskelly is on a distinguished road

I have ran some shear thinning simulations of a backward facing step in OpenFOAM and would like to calculate the spatial average of viscosity across the domain.

Is this possible to do in paraview? I know of the postSpanwiseAverage toolbox but this seems to just average the velocity.

The other alternative is to use Matlab, but I am a bit unsure how to do it in there also as it would read in cell data but the points are not uniform due to the meshing.

Any help would be great.
nskelly is offline   Reply With Quote

Old   June 13, 2019, 07:09
Senior Member
Agustํn Villa
Join Date: Apr 2013
Location: Fuenlabrada
Posts: 257
Rep Power: 11
agustinvo is on a distinguished road

did you created you mesh with blockMesh? If you know python, try to use fluidfoam, and you can load the cells in the order they where created (with blockMesh is more or less evident in function or the order of your blocks), and perform the average after some matrix manipulation.
agustinvo is offline   Reply With Quote

Old   June 19, 2019, 07:31
Senior Member
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 4
yambanshee is on a distinguished road
In parafoam, you can use the filter 'integrate variables' with the option 'divide cell data by volume' turned on. This will open a spreadsheat view up, and by selecting the attribute 'cell values' in the drop down menu, you can get all your properties spatially averaged.

If you would like to do it in a software like matlab, i would recommend using the filter meshQuality and setting Hex/quad/etc... to volume, and then saving that filter as a csv. This will give you all your fields per cell, along with that cell's volume.

In 1d, a simlar process can be used with the filter 'arcLength', which I use to create circumferentially averaged data with varying heights.

yambanshee is offline   Reply With Quote


backward facing step, shear thinning, spatial average, viscosity

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 113 June 25, 2019 01:58
What is linear eddy viscosity toboto Main CFD Forum 2 January 12, 2018 19:30
0 concentration specie impacting viscosity value ChrisA OpenFOAM Running, Solving & CFD 1 March 16, 2013 20:58
solidification viscosity governed through an additional variable l.te CFX 8 September 13, 2012 20:19
Problem of Turbulent Viscosity Ratio Limited David Yang FLUENT 3 June 3, 2002 07:13

All times are GMT -4. The time now is 11:27.