CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

wallShearStress - MultiphaseEuler - turbulence model

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By AtoHM
  • 1 Post By Severus
  • 1 Post By Severus

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2024, 21:29
Default wallShearStress - MultiphaseEuler - turbulence model
  #1
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Hi,

I am using OpenFOAM v11 for a multiphase study (Euler-Euler - LES(NicenoKeqn)) and I am having trouble post-processing the wallShearStress information, even though I know that this version allows the use of the function.

I try

Code:
foamPostProcess -func "wallShearStress(phase=water)"
foamPostProcess -func "wallShearStress(U.water)"
foamPostProcess -field U.water -func wallShearStress
foamPostProcess -solver multiphaseEuler -func wallShearStress
All the above functions return me:

Code:
Unable to find turbulence model in the database
What am I doing wrong?
gu1 is offline   Reply With Quote

Old   October 14, 2024, 08:56
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
It does not work in postProcess for multiphaseEuler, I tried it as well. Add it as a function object inside the functions { } section in controlDict and write it out during runtime. E.g. add it to controlDict and run again for 1 more time step.
gu1 likes this.
AtoHM is offline   Reply With Quote

Old   October 14, 2024, 15:07
Default
  #3
Member
 
Shravan
Join Date: Mar 2017
Posts: 78
Rep Power: 9
Severus is on a distinguished road
Hello,
Have you checked this page: https://doc.cfd.direct/openfoam/user...processing-cli
Check the last few lines - they describe the error you got. Maybe this can help you resolve the issue.

I have not tried this specific functionObject, but in the past for multiphaseEulerFoam, the phaseForces function object gave me a similar error. And then I was looking at the code and then I came to know that it would not work with the foamPostProcess utility but rather, we have to add it in the controlDict and compute it during the simulation. Similar to what AtoHM has mentioned.

However, I would like to point out that in the phaseForces.H file, they have explicitly mentioned this.
https://cpp.openfoam.org/v12/phaseForces_8H_source.html

HTML Code:
Note that it works only in run-time processing mode and in combination with the multiphaseEuler solver module.
But I dont see them mention anything like this for the wallShearStress functionObject. So, check out the first link and see if that helps.

Thanks
gu1 likes this.
Severus is offline   Reply With Quote

Old   October 15, 2024, 13:45
Default
  #4
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Perfect,

I will add the function to the controlDict and run it for a single timeStep. I believe there will be no loss in the results obtained.

Thanks a lot.
gu1 is offline   Reply With Quote

Old   October 17, 2024, 16:48
Default
  #5
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Hi,


I tried, but unfortunately, it keeps notifying that the turbulence model is not valid. I will try other turbulence models, even though it is very uncomfortable.
gu1 is offline   Reply With Quote

Old   October 17, 2024, 17:10
Default
  #6
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Hi,


I figured out what was going on. The wallShearStress.H file says that determining the PHASE is not a requirement. That's not true, you have to determine the phase, only then will it work.
gu1 is offline   Reply With Quote

Old   October 17, 2024, 20:47
Default
  #7
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Hi,

I was thinking, to get a 'good' result, I have to get the average value, the value at the last instant of time, it doesn't give me much information about the history of the wall shear stress. In that case there's not much I can do, or is there?
gu1 is offline   Reply With Quote

Old   October 18, 2024, 09:35
Default
  #8
Member
 
Shravan
Join Date: Mar 2017
Posts: 78
Rep Power: 9
Severus is on a distinguished road
Hello,
It depends on what you want. If you want the time-averaged wall shear stress, you should average it over time and not just use the last time step. Or you should calculate it only at the last time step but by using UMean instead of U.

Check out these forums regarding this:
Visualing Time Avergaed Wall Shear Stress
wallGradU or wallShearStress on Time-Averaged Velocity Field

If you have a statistically steady flow, then time-averaging would make sense. For e.g. like a fully developed channel flow or in cases where you expect a quasi-steady behavior of the flow after running the simulation for a long time.

Thanks
gu1 likes this.
Severus is offline   Reply With Quote

Old   October 18, 2024, 10:59
Default
  #9
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Exactly,

It doesn't make sense to do it in the last timeStep. In fact, even if I have, for example, 10 folders in my directory related to the case I'm studying, it wouldn't give a good average result (at least that's what I believe).
gu1 is offline   Reply With Quote

Old   October 18, 2024, 14:27
Default
  #10
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by Severus View Post
Hello,
It depends on what you want. If you want the time-averaged wall shear stress, you should average it over time and not just use the last time step. Or you should calculate it only at the last time step but by using UMean instead of U.

Check out these forums regarding this:
Visualing Time Avergaed Wall Shear Stress
wallGradU or wallShearStress on Time-Averaged Velocity Field

If you have a statistically steady flow, then time-averaging would make sense. For e.g. like a fully developed channel flow or in cases where you expect a quasi-steady behavior of the flow after running the simulation for a long time.

Thanks

Hello,

It worked by converting UMean.phase to U.phase and calculating the wallShearStress in the last timeStep, however, there was a slight difference in the result compared to doing it the conventional way, using filedAverange. I don't understand why.
gu1 is offline   Reply With Quote

Old   October 20, 2024, 12:51
Default
  #11
Member
 
Shravan
Join Date: Mar 2017
Posts: 78
Rep Power: 9
Severus is on a distinguished road
Hello,
I think when you simply change UMean to U at the final time step and then compute the wallShearStress, you don't account for change in nut field over time. This may affect your result if you use wall functions. If you resolve the wall fully, then it shouldn't matter and in that case you should get the same result. So, when you don't resolve the wall, using the fieldAverage value of wallShearStress should be more accurate.

Thanks
Severus is offline   Reply With Quote

Old   October 20, 2024, 17:15
Default
  #12
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by Severus View Post
Hello,
I think when you simply change UMean to U at the final time step and then compute the wallShearStress, you don't account for change in nut field over time. This may affect your result if you use wall functions. If you resolve the wall fully, then it shouldn't matter and in that case you should get the same result. So, when you don't resolve the wall, using the fieldAverage value of wallShearStress should be more accurate.

Thanks
It makes sense.
I managed to write the function for the version I'm using, however, nothing happens (wallShearStress function - OpenFOAM 9 - Error). I did it with the intention of getting around this problem, especially because I need the RMS values ​​and I can't get them the way it was mentioned, by changing the file names.

If you can help me...
Thank you.
gu1 is offline   Reply With Quote

Reply

Tags
openfoam11, postprocess, wallshearstress


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
[GUIDE] Switching turbulence model to SpalartAllmaras gabrielfelix OpenFOAM Running, Solving & CFD 1 March 24, 2022 21:19
Error in Two phase (condensation) modeling adilsyyed CFX 15 June 24, 2015 20:42
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 15:32
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
Wrong calculation of nut in the kOmegaSST turbulence model FelixL OpenFOAM Bugs 27 March 27, 2012 10:02


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