|
[Sponsors] |
[OpenFOAM] Visualing Time Avergaed Wall Shear Stress |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 9, 2019, 03:55 |
Visualing Time Avergaed Wall Shear Stress
|
#1 |
New Member
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7 |
Hi,
I have run a simulation of a 3D case in openfoam (version foam extend 3.2) using the simpleFoam solver with 5 cardiac cycles as my inlet velocity boundary condition. I am looking to visualise the time averaged wall shear stress in paraview. I am able to visualise the wall shear stress (by using the post process function “wallShearStress” in OF then opening the model in paraview) but can someone indicate how I can view the time averaged wall shear stress? Thanks, Lauren |
|
May 10, 2019, 04:50 |
|
#2 |
Senior Member
|
Hi Lauren,
You should calculate the wallShearStress at every time step and than use the averaging functionObject: Code:
wallShearStress { type wallShearStress; libs ("libfieldFunctionObjects.so"); executeControl timeStep; writeControl writeTime; } fieldAverage { type fieldAverage; writeControl writeTime; timeStart <afterInitialTransient>; fields ( wallShearStress { mean on; prime2Mean off; base time; } ); libs ("libfieldFunctionObjects.so"); } This will give you a wallShearStressMean in every time folder after time <afterInitialTransient>, which you can load into ParaView. Regards, Tom |
|
May 20, 2019, 09:02 |
|
#3 |
New Member
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7 |
Hi Tom,
Thank you for your reply. I have tried the method as you said and my solution has converged (1x10-6 criteria) but after reconstructing the model (I ran the simulation in parallel) there is no WSS data in any of the time folders. Therefore in Paraview I get "wallShearStress(?)" for all time steps. Regards, Lauren |
|
May 21, 2019, 04:46 |
|
#4 |
Senior Member
|
Hi Lauren,
I just re-read your original post and found that you run foam-extend 3.2. It looks like that version does not have the wallShearStress functionobject. I used the set-up I posted in most cases on OpenFOAM 1712 or newer from ESI/OpenCFD, or otherwise version 5, 6 or dev from the OpenFOAM foundation. If you would like to stick to this version, my suggestion would be to modify the wallShearStress utility to use the averaged velocity and turbulence fields to get the wall shear of the mean fields. However I would suggest using one of the more recent versions from the foundation or OpenCFD for this application. Regards, Tom |
|
May 22, 2019, 09:21 |
|
#5 |
New Member
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7 |
Hi Tom,
I have just downloaded OF version 6 - Is there a swak4foam compatible with this OF version? I do not see one here: https://openfoamwiki.net/index.php/Contrib/swak4Foam I have ran two cases in foam extend 3.2 and want to repeat these in openfoam version 6: (1) U inlet boundary condition is parabolic using groovy BC (2) U inlet boundary condition is a time varying waveform using timeVaryingUniformFixedValue Regards, Lauren |
|
May 22, 2019, 10:02 |
|
#6 |
Senior Member
|
Hi Lauren,
(1) My suggestion would be to look at this section on that link. The information on the wiki is not updated that much anymore, in particular not about the versions that are supported. The twitter feed of swak4foam usually is your best source of information for staying up to date. You probably already followed this for foam-extend 3.2 (2) timeVaryingUniformFixedValue may have been renamed in version 6, as they have been doing work in this area recently. Please have a look in the various options to match something similar. Regards, Tom |
|
May 22, 2019, 11:50 |
|
#7 |
New Member
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7 |
Hi Tom,
I was able to download swak4foam version 0.4.2 which is compatible with OF version 6. I used the download from here: https://github.com/Unofficial-Extend...a09rcqH3vUh6bA In replace of timeVaryingUniformFixedValue I am testing groovy BC with timelines as per here: https://openfoamwiki.net/index.php/C...s_in_the_patch Thank you for your help. Regards, Lauren |
|
June 5, 2019, 07:45 |
unable to get average WSS
|
#8 |
New Member
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7 |
Hi,
I have tried the code outlined above by Tom but nothing happened regarding WSS. I have since tried the attached code in my controlDict file but I am getting the following error: [3] --> FOAM FATAL ERROR: [3] request for volVectorField wallShearStressMean from objectRegistry region0 failed available objects of type volVectorField are 3 ( wallShearStress U UMean ) Any help would be much appreciated, Lauren (Note: I am using openfoam version 6) |
|
June 5, 2019, 09:30 |
|
#9 |
Senior Member
|
Hi Lauren,
Please note that I mentioned to change the executeControl to timeStep in my original post. I am not sure if you did that in the file: $FOAM_ETC/caseDicts/postProcessing/fields/wallShearStress since that is where #includeFunc would take the information from. However even if it is not modified, the functions section in your controlDict works for the slightly modified pitzDaily tutorial if I run it on (an earlier version of) OpenFOAM 6 using the attached case. Still I would suggest to use: Code:
wallShearStress { type wallShearStress; libs ("libfieldFunctionObjects.so"); executeControl timeStep; writeControl writeTime; } Code:
#includeFunc wallShearStress Hope this helps. Regards, Tom |
|
June 6, 2019, 06:35 |
time averaged WSS over 1 cardiac cycle (~ 1 second)
|
#10 |
New Member
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7 |
Hi Tom,
Thank you very much for your help - I now have the WSS and WSS mean working. However I would like to obtain the time averaged WSS over a certain period of time (i.e 1 cardiac cycle) rather than the mean WSS at each time step which is what I currently have. (similar aim as this post but using openfoam & paraview Time Averaged Shear Stress) any ideas? Lauren |
|
June 6, 2019, 06:46 |
|
#11 |
Senior Member
|
Hi Lauren,
There are options for selecting averaging windows or periodic restarts and such. In the .H file there is a more descriptive usage message, or you could look at the online documentation. I am not sure what option would work best, I guess you can try and see if the results make sense. Regards, Tom |
|
Tags |
openfoam, paraview, wall shear stress |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
bash script for pseudo-parallel usage of reconstructPar | kwardle | OpenFOAM Post-Processing | 42 | May 8, 2024 00:17 |
Drift-flux model and wall shear stress | laoji | FLUENT | 0 | July 8, 2014 23:42 |
plot over time | fferroni | OpenFOAM Post-Processing | 7 | June 8, 2012 08:56 |
UDF for wall slipping | HFLUENT | Fluent UDF and Scheme Programming | 0 | April 27, 2011 13:03 |
shear stress scalar definitions? | Novak Elliott | CFX | 0 | April 6, 2003 02:45 |