CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

change value of k in the solver dieselFoam

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

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

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 +=
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


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


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
Phase Change Application - Error in Solver Patrick CFX 2 June 28, 2016 09:49
segregated solver vrs coupled solver sm FLUENT 0 November 6, 2007 01:24
questions concerning solver and multigrid methodes youradvice Main CFD Forum 1 August 6, 2007 15:27
Coupled and Segregated solver soe FLUENT 2 March 8, 2007 04:37
Symmetry plane error in solver Santiago Orrego. CFX 6 January 31, 2007 07:09

All times are GMT -4. The time now is 06:45.