|
[Sponsors] |
How to get reference to k and epsilon in the epsEqn and kEqn |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 10, 2011, 09:58 |
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 |
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 10:17. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convergence | Luiz Eduardo Bittencourt Sampaio (Sampaio) | OpenFOAM Running, Solving & CFD | 11 | July 20, 2005 06:33 |