CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   kEqn in kEpsilon.C (https://www.cfd-online.com/Forums/openfoam-programming-development/90786-keqn-kepsilon-c.html)

 fisch July 20, 2011 12:35

kEqn in kEpsilon.C

Hello,

i try to understand the equations for the k-epsilon turb model.
the equation for k is:
tmp<fvScalarMatrix> kEqn
(
fvm::ddt(k_)
+ fvm::div(phi_, k_)
- fvm::Sp(fvc::div(phi_), k_)
- fvm::laplacian(DkEff(), k_)
==
G
- fvm::Sp(epsilon_/k_, k_)
);

i understand all terms except the second and the third...
As far as i get it these terms should represent div(k*phi)
But how can
+ fvm::div(phi_, k_) - fvm::Sp(fvc::div(phi_), k_) == div(k*phi) ???

rupert

 Bernhard July 21, 2011 05:09

Be aware, that the term in the original equation is equal to

which is equal to

These are the two terms you see in the kEqn. For a converged solution, the second term vanishes (continuity), but it is numerically favorable to keep it while solving the equation.

By the way:
http://www.cfd-online.com/Forums/ope...silon-eqn.html

 fisch July 22, 2011 01:21

Thanks Bernhard,
the mentioned origin term (U * grad(k)) was wrong in some of my books ( it was just div(k * U).
I had right now a look into the "Turbulent Flows" book of Pope and you're right with the origin of the term... So the question is answered.

Thanks again.
rupert

 Bernhard July 22, 2011 02:53

No, it was nog wrong in the other books, the second term is just zero, since the div(U) = 0

 fisch July 22, 2011 04:30

thats right.

thanks

 fisch July 22, 2011 09:24

I had a look on this k-epsilon calculation and wanted to figure out what happens if wall functions are active.
Maybe you know answers to the three following questions, too!?

If i use kqR and epsilon wall functions in my calculations he "updates" this G and forces the values for epsilon on the wall region. He's not touching k, right?

And as far as i get it this "modified" G is used in the k equation at the wall region, too, right?

Is there any documentation about OpenFOAM which formulas were used from the theory (like original equations for kEqn, the wall functions, and so on)???

thanks a lot
rupert

 All times are GMT -4. The time now is 21:32.