CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   postProcess Utility: icoFoam -noFunctionObjects Why?How? (https://www.cfd-online.com/Forums/openfoam-post-processing/179649-postprocess-utility-icofoam-nofunctionobjects-why-how.html)

TeresaT November 4, 2016 06:04

postProcess Utility: icoFoam -noFunctionObjects Why?How?
 
Dear Forum Users,

my goal is to get the wallShearStress of my icoFoam (openFoam 4.0) case. For simpleFoam it is documented in the Userguide:

simpleFoam -postProcess -func wallShearStress

So I tried this:

icoFoam -postProcess -func wallShearStress

Outcome:
Quote:

--> FOAM FATAL ERROR:
Wrong number of arguments, expected 0 found 1
Invalid option: -postProcess
Invalid option: -func
Using: icoFoam -postProcess -help
I get this
Quote:

-noFunctionObjects do not execute functionObjects
Okay, my bad, i should not try to execute functionObjects with icoFoam but how else can I get the wallShearStress of an icoFoam case?

Any Ideas?
Kind regards,
Teresa

arsalan.dryi November 5, 2016 03:21

Simply run application

Code:

wallShearStress
Regards,
Arsalan.

TeresaT November 5, 2016 03:34

Hi Arsalan,

this application does not exist in openFoam 4.0.

This is what you get if you try it:
Quote:

$ wallShearStress
wallShearStress has been superceded by the '-postProcess' solver command-line option, e.g.
simpleFoam -postProcess -func wallShearStress
Regards,
Teresa

wyldckat November 13, 2016 12:42

Quick answer: For situations where the solver isn't needed for post-processing, there is the postProcess utility, e.g.:
Code:

postProcess -func wallShearStress
The problem is that icoFoam only handles laminar flow and wallShearStress requires a turbulence model to be used.

The closest would be to switch to pisoFoam, for which you need to update "fv*" files in "system" and add "turbulenceProperties" in the folder "constant".

TeresaT November 13, 2016 13:32

Thank you for you help.

I have one more question regardning you tipp: Should I calculate the hole case again oder just use pisofoam for postprocessing the icofoam case?

Kind regards,
Teresa

wyldckat November 13, 2016 16:07

Quick answer: It should work without having to simulate everything again... although I am a bit concerned about the value you've used for "nu" in the "transportProperties" file.

I say this because the icoFoam solver is mostly a simple/basic solver for demonstrating how things work and it doesn't account for all of the physics... which may lead to people to not properly adjust the "nu" value either and instead use the default values from the tutorial cases.

TeresaT November 14, 2016 03:43

Thanks again!

What physics are you are thinking of? I chose icoFoam because my case has a transient, laminar flow of an incompressible fluid. I usually use normalization so I change the kinematic velocity to reflect the Reynolds-Number.

Greetings,
Teresa

wyldckat November 14, 2016 17:10

Quote:

Originally Posted by TeresaT (Post 625226)
What physics are you are thinking of? I chose icoFoam because my case has a transient, laminar flow of an incompressible fluid. I usually use normalization so I change the kinematic velocity to reflect the Reynolds-Number.

Quick answer: Ah, OK, I'm relieved to read that you've made the decision based on facts, therefore I don't see any problems. Just don't forget to set the model in "turbulenceProperties" to use "laminar", so that it's still in reference to the same base modelling strategy as used with icoFoam.

If you only want to calculate wall shear stress, it should work just fine. Because from what I've looked up on the old code in 2.3.x, wall shear stress is essentially:
Code:

const volSymmTensorField Reff(-nu()*dev(twoSymm(fvc::grad(U_))));

        wallShearStress.boundaryField()[patchI] =
        (
          -mesh.Sf().boundaryField()[patchI]
          /mesh.magSf().boundaryField()[patchI]
        ) & Reff.boundaryField()[patchI];

This to say that there are no divergence operators, in which case things could get a big tricky.

Essentially my concern is that if you needed to calculate other properties that depend on how the flow was modelled, pisoFoam accounts for more details that icoFoam doesn't. If you compare the source code of the two solvers, you'll see what I mean.

mhy622 July 26, 2023 02:41

Quote:

Originally Posted by wyldckat (Post 625342)
Quick answer: Ah, OK, I'm relieved to read that you've made the decision based on facts, therefore I don't see any problems. Just don't forget to set the model in "turbulenceProperties" to use "laminar", so that it's still in reference to the same base modelling strategy as used with icoFoam.

If you only want to calculate wall shear stress, it should work just fine. Because from what I've looked up on the old code in 2.3.x, wall shear stress is essentially:
Code:

const volSymmTensorField Reff(-nu()*dev(twoSymm(fvc::grad(U_))));

        wallShearStress.boundaryField()[patchI] =
        (
          -mesh.Sf().boundaryField()[patchI]
          /mesh.magSf().boundaryField()[patchI]
        ) & Reff.boundaryField()[patchI];

This to say that there are no divergence operators, in which case things could get a big tricky.

Essentially my concern is that if you needed to calculate other properties that depend on how the flow was modelled, pisoFoam accounts for more details that icoFoam doesn't. If you compare the source code of the two solvers, you'll see what I mean.

Hello, I apologize in advance for commenting on an old post but I am also dealing with the same problem. In which file do I need to add the code you added to calculate wss in my icofoam model?


All times are GMT -4. The time now is 20:38.