CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] wall stress shear calculation and display

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By awesomeuser

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 9, 2022, 19:37
Default wall stress shear calculation and display
  #1
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
1. How to display/view wallShearStress in (WSS) paraview and WSS has been calculated by OF9 as under
simpleFoam -postProcess -func wallShearStress - I only get min and max in the terminal window.



2. There is way to calculate WSS "in Paraview" - could some experts here to outline a procedure to do WSS calculation and also how to view/display it in Paraview


Greetings of the day and accept my kind regards

Thanks a lot

Last edited by awesomeuser; January 14, 2022 at 12:14.
awesomeuser is offline   Reply With Quote

Old   January 21, 2022, 11:57
Default
  #2
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 7
sourav90 is on a distinguished road
Quote:
Originally Posted by awesomeuser View Post
1. How to display/view wallShearStress in (WSS) paraview and WSS has been calculated by OF9 as under
simpleFoam -postProcess -func wallShearStress - I only get min and max in the terminal window.



2. There is way to calculate WSS "in Paraview" - could some experts here to outline a procedure to do WSS calculation and also how to view/display it in Paraview


Greetings of the day and accept my kind regards

Thanks a lot
Can you do these and paste the output here what you get?
  1. After you run `blockMesh`, do this:
    PHP Code:
    simpleFoam 
    cd 0
    ls -
  2. Then do in the main directory:
    PHP Code:
    simpleFoam -postProcess -func wallShearStress
    cd 0
    ls -
sourav90 is offline   Reply With Quote

Old   January 21, 2022, 20:30
Default
  #3
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
Thank you



for 1st I get following listed directories/folders

p
phi
U


for 2nd I get following folders listed
p
phi
U
uniform/
wallShearStress


For some reason I am not able to paste the screenshot but above are the listed output
awesomeuser is offline   Reply With Quote

Old   January 21, 2022, 20:36
Default
  #4
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
for 1st I get following listed directories/folders

p
phi
U


for 2nd I get following folders listed
p
phi
U
uniform/
wallShearStress


drwxrwxr-x 3 xxx xxx 4096 Jan 21 10:31 ./
drwxrwxr-x 8 xxx xxx 4096 Jan 21 10:31 ../
-rw-rw-r-- 1 xxx xxx 1249 Jan 20 18:45 p
-rw-rw-r-- 1 xxx xxx 92203782 Jan 20 18:46 phi
-rw-rw-r-- 1 xxx xxx 89948849 Jan 20 18:46 U
drwxr-xr-x 2 root root 4096 Jan 21 10:31 uniform/
-rw-r--r-- 1 root root 11430302 Jan 21 10:31 wallShearStress



For some reason I am not able to paste the screenshot but above are the listed output
awesomeuser is offline   Reply With Quote

Old   January 22, 2022, 15:32
Default
  #5
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 7
sourav90 is on a distinguished road
Quote:
Originally Posted by awesomeuser View Post
Thank you



for 1st I get following listed directories/folders

p
phi
U


for 2nd I get following folders listed
p
phi
U
uniform/
wallShearStress


For some reason I am not able to paste the screenshot but above are the listed output
It means that the `postProcess` command is working fine as it should The file named `wallShearStress` is generated, which Paraview can access. Now if you load this in ParaView, don't you see something like the one below:ScreenShotParaview.jpg
sourav90 is offline   Reply With Quote

Old   January 22, 2022, 17:41
Default
  #6
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
Oh thanks.



But as you can see paraview (pictures enclosed) is not showing wallShearstress in variable list.

Image2.jpg

Image1.jpg
awesomeuser is offline   Reply With Quote

Old   January 22, 2022, 17:44
Default
  #7
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 7
sourav90 is on a distinguished road
Quote:
Originally Posted by awesomeuser View Post
Oh thanks.



But as you can see paraview (pictures enclosed) is not showing wallShearstress in variable list.

Attachment 88086

Attachment 88087
That's weird! Which version of ParaView are you using? You have the `wallShearStress` file in other timesteps (e.g. 100), right?

Are you using `paraFoam` command? If yes, then try opening paraView this way, and see if paraView reads the `wallShearStress` automatically. In the main directory, do

PHP Code:
touch "${PWD##*/}".foam
paraview "${PWD##*/}".foam 
sourav90 is offline   Reply With Quote

Old   January 22, 2022, 18:05
Default
  #8
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
yes tried but no luck. I am using 5.6 paraview


I do see in the directory wallShearstress file which is enclosed here
./postProcessing/wallShearStress/0/wallShearStress.dat


I copied *.dat file to *.txt - the upload here was saying *.dat is invalied file - for reason.


But as you see wall* are there in that file.
Attached Files
File Type: txt wallShearstress.txt (206 Bytes, 14 views)
awesomeuser is offline   Reply With Quote

Old   January 22, 2022, 18:11
Default
  #9
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 7
sourav90 is on a distinguished road
Nope, anything in the postProcessing directory is for the human user, `ParaView` won't read anything from that directory, AFAIK. Copy-paste won't work either. Can you please make sure:

Quote:
Originally Posted by sourav90 View Post
You have the `wallShearStress` file in other timesteps (e.g. 100), right?
And your OpenFOAM version? It works fine in OpenFOAM 6 till 9 (from OpenFOAM.org).
sourav90 is offline   Reply With Quote

Old   January 22, 2022, 18:13
Default
  #10
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
in 0/ folder I do find wall* file that is 11.4 MB file so I cannot upload it.
awesomeuser is offline   Reply With Quote

Old   January 22, 2022, 18:15
Default
  #11
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
I am using openfoam 9
awesomeuser is offline   Reply With Quote

Old   January 22, 2022, 18:16
Default
  #12
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 7
sourav90 is on a distinguished road
Quote:
Originally Posted by awesomeuser View Post
in 0/ folder I do find wall* file that is 11.4 MB file so I cannot upload it.
No need to upload here. Can you please paste the content of your `100` directory (using `ls 100` in the main directory)?
sourav90 is offline   Reply With Quote

Old   January 22, 2022, 18:32
Default
  #13
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
there is no 100 folder ..


drwxrwxr-x 8 xxx xxx 4096 Jan 22 17:27 ./
drwxrwxr-x 4 xxx xxx 4096 Jan 20 18:45 ../
drwxrwxr-x 3 xxx xxx 4096 Jan 22 17:09 0/
-rwxrw-r-- 1 xxx xxx 1361 Jan 20 18:45 Allrun*
-rw-rw-r-- 1 xxx xxx 16014066 Jan 20 19:37 bflow45.cgns
-rw-r--r-- 1 root root 0 Jan 22 16:55 case.foam
drwxrwxr-x 3 xxx xxx 4096 Jan 20 18:45 constant/
-rw-rw-r-- 1 xxx xxx 2343 Jan 20 18:45 log.createPatch
-rw-rw-r-- 1 xxx xxx 2099 Jan 20 18:46 log.decomposePar
-rw-rw-r-- 1 xxx xxx 2200 Jan 20 18:46 log.potentialFoam
-rw-rw-r-- 1 xxx xxx 267163 Jan 20 19:26 log.simpleFoam
drwxr-xr-x 3 root root 4096 Jan 21 10:31 postProcessing/
drwxrwxr-x 7 xxx xxx 4096 Jan 20 19:26 processor0/
drwxrwxr-x 7 xxx xxx 4096 Jan 20 19:26 processor1/
-rw-rw-r-- 1 xxx xxx 40 Jan 20 18:45 pv.foam
-rw-rw-r-- 1 xxx xxx 1080 Jan 20 18:45 pvScript.py
drwxrwxr-x 2 xxx xxx 4096 Jan 20 18:45 system/
ls 100
ls: cannot access '100': No such file or directory



awesomeuser is offline   Reply With Quote

Old   January 22, 2022, 18:39
Default
  #14
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 7
sourav90 is on a distinguished road
If there's no time directory other than 0, it means you won't see anything except the start of the simulation! Did you use the `./Allrun` or `simpleFoam` command for running your simulation?
sourav90 is offline   Reply With Quote

Old   January 22, 2022, 19:01
Default
  #15
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
I have 3 set of results 100 200 236 available



I initiated simplefoam run from freecad and OP9 runs in GUI with convergence plot displayed. after the convergence I launch into paraview from FreeCAD Gui


And in paraview I see 100 200 and 236 time available
awesomeuser is offline   Reply With Quote

Old   January 22, 2022, 19:11
Default
  #16
Member
 
Sourav Mandal
Join Date: Jul 2019
Posts: 55
Rep Power: 7
sourav90 is on a distinguished road
Quote:
Originally Posted by awesomeuser View Post
I have 3 set of results 100 200 236 available



I initiated simplefoam run from freecad and OP9 runs in GUI with convergence plot displayed. after the convergence I launch into paraview from FreeCAD Gui


And in paraview I see 100 200 and 236 time available
Means simulation runs till 236 time step. I can only advise you to try this two options:
  • In case you have used multiple processors, then try `reconstructPar` command before doing the `... postProces ...`.
  • Maybe try launching paraview and running openFoam from the terminal.

I do not run OpenFOAM from another software like FreeCAD, if that's causing the issue then I don't have any other ideas, sorry
sourav90 is offline   Reply With Quote

Old   January 22, 2022, 19:54
Default
  #17
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
Let me clarify - those 100, 200 and 236 are available only when I paraview it right after the convergence. But close paraview and independently launch paraview defaults to 0 because that is what is stored.



I need to get my converged solution (that makes 100, 200 and 236) by rerunning the openfoam then I launch into paraview then I can see those. So what i did was save a state in while in this paraview session and close paraview. After this I can load that *.pv and *.foam file and then I see those state and show up U and p otherwise I have to go back to running OF again like I explained above.


Looks like OF run is not saving automatically all the states but they are available for paraview because it was right after the run.



Then when do simpleFoam for wallShear* it only finds 0/ nothing else.



Could you send me actual commands to run OF from command line on terminal?
awesomeuser is offline   Reply With Quote

Old   January 22, 2022, 21:01
Default
  #18
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
You know I just ran ./Allrun* on command line and then it goes through meshing, then actual iterative set.



But I still do not see /100 /200 /223 folder.
awesomeuser is offline   Reply With Quote

Old   January 22, 2022, 23:39
Default
  #19
New Member
 
sam j
Join Date: Jan 2022
Posts: 13
Rep Power: 4
awesomeuser is on a distinguished road
Finally I got it. after the convergence is obtained - one has to run



reconstructPar -latestTime - you did pointed this out.



then run simpleFoam -postProcess -func wallShearStress


the variable wallShearStress is now available in Paraview.



Many thanks
sourav90 likes this.
awesomeuser is offline   Reply With Quote

Old   July 20, 2022, 19:46
Default
  #20
New Member
 
MN Kadir
Join Date: Jul 2022
Posts: 1
Rep Power: 0
mnkadir is on a distinguished road
Hi Sourav,


I am new OpenFOAM user. Trying to calculate the Skin Drag coefficient by using this formula
Where is the local wall shear stress, is the fluid density and is the free-stream velocity.


That's why I need to get the Wall shear stress from the output of my OpenFOAM where I use simpleFoam solver.


To get the output I used "simpleFoam -postProcess -func wallShearStress".
Which create a new file under every time steps files. Like this file in the attachment.





Now my Questions are:

- Which value should I consider as , as there are 3 value at every cell.

- Among this 3 values which one represent what?



Thanks!
Attached Files
File Type: txt wallShearStress.txt (7.7 KB, 8 views)
mnkadir is offline   Reply With Quote

Reply

Tags
wall stress shear


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
[OpenFOAM] Heat transfer coefficient - calculation + display in ParaView atlan ParaView 2 July 6, 2017 15:44


All times are GMT -4. The time now is 12:13.