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

How to? Extra term in k-e equation. Implicit-Explicit

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 15, 2013, 07:48
Default How to? Extra term in k-e equation. Implicit-Explicit
  #1
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 153
Rep Power: 17
be_inspired is on a distinguished road
Hi all,

I am trying to implement a canopy model into OF.
With respect to the momentum equation, I am seeing several post where the code was similar to the following one:
Quote:
// Solve the Momentum equation
UEqn() == -fvc::grad(p)-fvm::Sp(mag(fvc::Sp(Cd*canopydensity*canopyleaf,U) ),U)
The point is when I need to implement the extra terms in k and epsilon equation.
I have introduced the following ones:
Quote:
// Turbulent kinetic energy equation

volScalarField Fk=0.8*canopydensity_*canopyleaf_*mag(U_)*mag(U_)* mag(U_);
tmp<fvScalarMatrix> kEqn
(
fvm::ddt(k_)
+ fvm::div(phi_, k_)
+ fvm::SuSp(-fvc::div(phi_), k_)
- fvm::laplacian(DkEff(), k_)
==
G
- fvm::Sp(epsilon_/k_, k_) + Fk

// Dissipation equation
volScalarField Fe=(epsilon_/k_)*Cpepsilon1_*Fk;
tmp<fvScalarMatrix> epsEqn
(
fvm::ddt(epsilon_)
+ fvm::div(phi_, epsilon_)
+ fvm::SuSp(-fvc::div(phi_), epsilon_)
- fvm::laplacian(DepsilonEff(), epsilon_)
==
C1_*G*epsilon_/k_
- fvm::Sp(C2_*epsilon_/k_, epsilon_) + Fe
It compiles correctly and I obtain some physical results, but I have just found a master thesis where:

Quote:
// 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_)
+ fvm::Sp(Cd_*alphaL_/k_*(CEps4_*betap_*pow(mag(U_),3)-CEps5_*betad_*k_*mag(U_)), epsilon_); //Source Term)
// 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_)
+ fvm::Sp(Cd_*alphaL_/k_*(betap_*pow(mag(U_),3)-betad_*k_*mag(U_)), k_); //Source term)
The question are:

Is correct my implementation?

what is the advantages to take the extra terms as implicit in the k and epsilon equation with respect to take them as explicit terms? Quick Convergence? Stability?

Thank you very much for your time.
be_inspired is offline   Reply With Quote

Old   March 19, 2013, 10:50
Default
  #2
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 153
Rep Power: 17
be_inspired is on a distinguished road
Ok, It seems according to the other topic that it is related to the stability of the equations...
be_inspired is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
lid-driven cavity in matlab using BiCGStab Don456 Main CFD Forum 1 January 19, 2012 15:00
Source term energy equation for reactive flows DaIN Main CFD Forum 0 October 6, 2011 15:11
Large source term in species equation MACFD FLUENT 4 January 4, 2011 14:16
Extra term in Epsilon equation Valdemir G. Ferreira Main CFD Forum 0 April 30, 2000 08:57
bouyancy term in epsilon equation Michael Main CFD Forum 1 June 25, 1999 10:20


All times are GMT -4. The time now is 03:29.