|
[Sponsors] |
July 21, 2009, 08:20 |
change value of k in the solver dieselFoam
|
#1 |
New Member
Yejun Gong
Join Date: Mar 2009
Posts: 21
Rep Power: 18 |
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 ---------------------------- |
|
|
|
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 |