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

add a source term in incompressible k-epsilon model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2009, 02:41
Default add a source term in incompressible k-epsilon model
  #1
New Member
 
Qi Ying
Join Date: Mar 2009
Posts: 6
Rep Power: 17
maurice is on a distinguished road
Dear All,

I am going to add a new source term (only non-zero at a few cells and not varying with time) in the kinetic energy equation in the kEpsilon code. I have followed a tutorial from the forum to make a new copy of the kEpsilon code and called it mykEpsilon. I also changed simpleFoam to read a new scalar field, mySource. My question is how to pass this scalar field into mykEpsilon so that I can write:

tmp<fvScalarMatrix> kEqn
(
fvm::ddt(k_)
+ fvm::div(phi_, k_)
- fvm::Sp(fvc::div(phi_), k_)
- fvm::laplacian(DkEff(), k_)
==
G
+ mySource
- fvm::Sp(epsilon_/k_, k_)
);

I read somewhere that this can be done by passing the field into the class through a pointer, but not exactly know now. Any hints?

Thanks,
Qi
maurice 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
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 16 March 4, 2017 09:30
----source term help--please help mech FLUENT 0 May 6, 2006 04:51
How to add a source term in u or v equation? luckyluke Phoenics 3 December 13, 2004 03:52
Incompressible Navier stokes with source term mayur FLUENT 0 August 6, 2004 07:07
bouyancy term in epsilon equation Michael Main CFD Forum 1 June 25, 1999 11:20


All times are GMT -4. The time now is 16:37.