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

change value of k in the solver dieselFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2009, 08:20
Default change value of k in the solver dieselFoam
  #1
New Member
 
Yejun Gong
Join Date: Mar 2009
Posts: 21
Rep Power: 18
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


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 10:49
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 16:27
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 23:05.