|
[Sponsors] |
Obtaining wallShearStress as lineplot with OpenFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 8, 2022, 12:26 |
Obtaining wallShearStress as lineplot with OpenFoam
|
#1 |
New Member
Tim
Join Date: Jun 2022
Posts: 2
Rep Power: 0 |
Hi all,
I am performing a series of simulations in CFD and in order to pinpoint the location of separation on my body I would like to plot the skin friction coefficient (and thus the wall shear stress) as a lineplot (x-axis: x/c location, y-axis: Cf) such that it is clear where the crossover point is (i.e. the wall shear stress changes sign). I want to circumvent Paraview entirely since quite some configurations have to be run which means that manual post-processing is time intensive. Essentially, I would like to generate a file (preferably .txt or .raw or similar format) with the x,y,z coordinates and the wall shear stress (preferably as a vector) such that it can be post-processed in python. I've already tried to sample the wallShearStress on the surface after using postProcess -func wallShearStress -latestTime. This does return a file in the format I want, however, since it samples the volume values (which are zero for the wallshearstress) it returns a vector which is zero in all directions. Does anybody know a way to obtain the desired result? Scouring the internet turned out to be fruitless unfortunately. Many thanks in advance! Last edited by Tim_solver; August 9, 2022 at 04:28. Reason: Incorrect statement |
|
August 15, 2022, 05:00 |
Solution
|
#2 |
New Member
Tim
Join Date: Jun 2022
Posts: 2
Rep Power: 0 |
Hi all,
For whoever might be interested later on, I've found a solution. First one need to calculate wallShearStress with the appropriate post process function. Then after reconstructing (if multiple cores are used) one can use the foamToVTK function to write the coordinates and the wallshearstress vector at each coordinate. Depending on the imported geometry one might need to order the data such that a lineplot can be made (suggestion: just find the nearest point). If you don't like to bother ordering the data, you can also make a scatter plot as a quick and dirty fix. |
|
Tags |
lineplot, openfoam, post-processing, python, wallshearstress |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | September 21, 2016 12:50 |
why does 'sample' do this? wallShearStress question | CHARLES | OpenFOAM Post-Processing | 0 | August 7, 2013 20:30 |
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 07:25 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |