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

How to get reference to k and epsilon in the epsEqn and kEqn

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2011, 10:58
Default How to get reference to k and epsilon in the epsEqn and kEqn
  #1
New Member
 
Xuan Cai
Join Date: Mar 2011
Location: Karlsruhe, Germany
Posts: 9
Rep Power: 15
cfd_explorer is on a distinguished road
Now I am using the standard k-epsilon turbulence model using openFoam

And the k-epsilon equations are implemented in the file src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C, and the codes exactly representing the k equation and epsilon equation are as follows:

================================================== ========
// Turbulent kinetic energy equation
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_)
);

// Dissipation equation
tmp<fvScalarMatrix> epsEqn
(
fvm::ddt(epsilon_)
+ fvm::div(phi_, epsilon_)
- fvm::Sp(fvc::div(phi_), epsilon_)
- fvm::laplacian(DepsilonEff(), epsilon_)
==
C1_*G*epsilon_/k_
- fvm::Sp(C2_*epsilon_/k_, epsilon_)
);
================================================== ========
Now I want to use the values of "k" and "espilon" in the k-epsilon equations in other functions or files to compute the source terms and then add them to the k and epsilon equation.

Previously, I found in the use of porousMedia class which adds the source term to the Momentum equation, when we have:
================================================== =========
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
================================================== ==========
Then the use and reference to the velocity and source term in the above momentum equation are achieved by using "UEqn.source( )" and "UEqn.psi( )" in the code,
So I wonder whether can I use kEqn.source( ) or kEqn.psi( ) or kEqn.otherfunction( ) to get the values of k and epsilon?

Could anyone give some suggestions or hints?

Thanks



Last edited by cfd_explorer; March 10, 2011 at 11:17.
cfd_explorer is offline   Reply With Quote

Reply


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
Convergence Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Running, Solving & CFD 11 July 20, 2005 07:33


All times are GMT -4. The time now is 22:36.