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

[OpenFOAM] Visualing Time Avergaed Wall Shear Stress

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By tomf
  • 1 Post By tomf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2019, 02:55
Exclamation Visualing Time Avergaed Wall Shear Stress
  #1
New Member
 
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7
laurenj95 is on a distinguished road
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
laurenj95 is offline   Reply With Quote

Old   May 10, 2019, 03:50
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
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");
    }
I think you should only start the averaging after some initial disturbances have vanished from the solution, this is the time <afterInitialTransient> in seconds.

This will give you a wallShearStressMean in every time folder after time <afterInitialTransient>, which you can load into ParaView.

Regards,
Tom
tomf is offline   Reply With Quote

Old   May 20, 2019, 08:02
Default
  #3
New Member
 
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7
laurenj95 is on a distinguished road
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
laurenj95 is offline   Reply With Quote

Old   May 21, 2019, 03:46
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
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
tomf is offline   Reply With Quote

Old   May 22, 2019, 08:21
Default
  #5
New Member
 
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7
laurenj95 is on a distinguished road
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
laurenj95 is offline   Reply With Quote

Old   May 22, 2019, 09:02
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
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
tomf is offline   Reply With Quote

Old   May 22, 2019, 10:50
Default
  #7
New Member
 
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7
laurenj95 is on a distinguished road
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
laurenj95 is offline   Reply With Quote

Old   June 5, 2019, 06:45
Default unable to get average WSS
  #8
New Member
 
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7
laurenj95 is on a distinguished road
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)
Attached Files
File Type: txt log.txt (8.7 KB, 7 views)
File Type: txt controlDict.txt (2.0 KB, 26 views)
laurenj95 is offline   Reply With Quote

Old   June 5, 2019, 08:30
Default
  #9
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
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;
    }
instead of
Code:
#includeFunc wallShearStress
.

Hope this helps.
Regards,
Tom
Attached Files
File Type: zip pitzDaily.zip (10.6 KB, 28 views)
gabrielfelix likes this.
tomf is offline   Reply With Quote

Old   June 6, 2019, 05:35
Default time averaged WSS over 1 cardiac cycle (~ 1 second)
  #10
New Member
 
Lauren Johnston
Join Date: Mar 2019
Posts: 16
Rep Power: 7
laurenj95 is on a distinguished road
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
laurenj95 is offline   Reply With Quote

Old   June 6, 2019, 05:46
Default
  #11
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
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
tomf is offline   Reply With Quote

Reply

Tags
openfoam, paraview, wall shear stress


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
bash script for pseudo-parallel usage of reconstructPar kwardle OpenFOAM Post-Processing 41 August 23, 2023 02:48
Drift-flux model and wall shear stress laoji FLUENT 0 July 8, 2014 22:42
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 07:56
UDF for wall slipping HFLUENT Fluent UDF and Scheme Programming 0 April 27, 2011 12:03
shear stress scalar definitions? Novak Elliott CFX 0 April 6, 2003 01:45


All times are GMT -4. The time now is 15:53.