CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   evaluate effective viscosity from U and p already known (

Cyp January 18, 2012 04:03

evaluate effective viscosity from U and p already known

I would like to evaluate an effective viscosity from pressure and velocity field already computed. I mean that I am looking for a field nuEff that obey to:
\nabla \cdot (U U) + \nabla p = \nabla \cdot (\nu_{eff} \nabla U)

In this equation, U and p result from a previous computation.

Does anybody know a method to do such a thing ?


Bernhard January 19, 2012 04:03

If you work out the brackets in the term on the right hand side, can't you just solve it like any other equation in OpenFOAM? So you use fvc instead of fvm on the terms with p and U and solve for nuEff. I can imagine that this will work, but I'll give you now guarantee.

Cyp January 19, 2012 04:11

Yes, but in that case, I will have :

T1 = fvc::laplacian(U) which is a vector

T2 = fvc::grad(p)/rho + fvc::div(phi,U) which is a vector as well.

How can I deduce the value of nuEff which should be a scalar (or may be a tensor) ??

Bernhard January 19, 2012 06:53

For the right hand side, don't you get something like

fvm::grad(nuEff) & fvc::grad(U) + nuEff * fvc::laplacian(U)

or something like that, which you can solve if you supply boundary conditions?

But you mean this is an overdetermined system or something? Maybe you can work component-wise?

Cyp January 19, 2012 08:31

In fact, what I look for is a method to evaluate an effective viscosity that result from a turbulent calculation (RANS, LES).
In case of RANS simulation, I should recover the value of nut and it will be a test case to validate the approach.

I was thinking that the effective viscosity may satisfy :
\nu_{eff}=(\textbf{U}\textbf{U}+p\textbf{I})\cdot(\nabla U)^{-1}
but I am not sure about that.

I missed the point with your rewritting of the RHS ? if I am right, fvm::grad() has no sense in OF..

Bernhard January 19, 2012 12:22

Why don't you just write nut directly then? Seems like a unnecessary exercise to me...

Cyp January 20, 2012 04:13

Because the RANS approach are just a particular approach of what I need. It makes sense when LES is considered for example.

Bernhard January 20, 2012 04:41

Why? Then you still have an effective viscosity in the way it is implemented in OpenFOAM.

Cyp January 20, 2012 04:44

Yes, but what I look for is the effective viscosity that corresponds to time-average velocity and pressure fields. It is not the case of the nuSgs of the LES..

Bernhard January 20, 2012 04:59

Why don't you use the time-averaged value of nuSgs/nut? I don't think this will make a very big difference compared to what you want to do. I still don't get why you want to do it this complex...

Cyp January 20, 2012 05:22

Because I do not have it and the simulations are too long to be start one more time...

Cyp January 23, 2012 09:42

I keep working on this problem and I identified some issues.

I need to calculate

where I is the identity tensor and x is the position in the x-direction.

How can I access to the value of x ?

All times are GMT -4. The time now is 06:47.