CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Calculate and display eddy viscosity (

ceyrows May 2, 2008 04:49

Hello everybody, I have bee
Hello everybody,

I have been doing some URANS-calculations using different turbulence models and would now like to display the eddy viscosity. This is not possible directly because the nut-field data has not been written. Using paraview's calculator is also not an adequate option...

Is there a utility for calculating the eddy viscosity field afterwards?

Thanks a lot,


olesen May 2, 2008 05:52

Attached is one that I have ki
Attached is one that I have kicking around for calculating mu_t for k/eps (we only have compressible flow). You should be able to adapt it to nu_t without too much effort. turbvisc.C

ceyrows May 2, 2008 06:10

Hey Mark, thank you very mu
Hey Mark,

thank you very much! Unforunatelly I'm a newby to C++ and so there's still a question:
Is Cmu a constant in your utility or is it calculated (for non-linear turbulence modells like realizable-k-epsilon)?

Thanks anyway,


ariorus May 2, 2008 06:41

The function nuEff calculates
The function nuEff calculates automatically viscous + turbulent viscosity according to the employed turbulence model.

For example in simpleFoam you can compute it via


ntrask February 16, 2009 13:57

Are you updating nut at each t
Are you updating nut at each timestep? Somewhere in your solver you should have a nut = turbulence->nuEff()

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