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

change value of k in the solver dieselFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 21, 2009, 07:20
Default change value of k in the solver dieselFoam
  #1
New Member
 
Yejun Gong
Join Date: Mar 2009
Posts: 20
Rep Power: 9
yejungong is on a distinguished road
Hi,

I want to change the value of k and epsilon in the solver, dieselFoam. But k and epsilon is initialized in turbulenceModel, and I only know how to read them. I tried to define a pointer pointing to k, and then change the value of k. The following is my code,
----------------------
const tmp<volScalarField>& k=turbulence->k();
k +=
dieselSpray.turbulenceDepletionSource()*runTime.deltaT()/rho;
-----------------------
turbulenceDepletionSource() is defined in dieselSpray class as the source term for the k-equation, similar to momentum source term

But it didn't work. The error message is attached in the bottom. I tried to update it cell by cell, but failed either.

Any suggestions will be highly appreciated.
thanks a lot

Yejun



The following the error message,

------------------------
dieselFoam.C: In function 'int main(int, char**)':
dieselFoam.C:89: error: passing 'const Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >' as 'this' argument of 'void Foam::tmp<T>:perator=(const Foam::tmp<T>&) [with T = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]' discards qualifiers
----------------------------
yejungong is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
segregated solver vrs coupled solver sm FLUENT 0 November 6, 2007 02:24
questions concerning solver and multigrid methodes youradvice Main CFD Forum 1 August 6, 2007 15:27
Phase Change Application - Error in Solver Patrick CFX 1 June 14, 2007 09:08
Coupled and Segregated solver soe FLUENT 2 March 8, 2007 05:37
Symmetry plane error in solver Santiago Orrego. CFX 6 January 31, 2007 08:09


All times are GMT -4. The time now is 09:38.