|
[Sponsors] |
February 10, 2008, 17:40 |
Hi,
In simpleFoam.C, runTim
|
#1 |
New Member
J. T.
Join Date: Mar 2009
Posts: 12
Rep Power: 17 |
Hi,
In simpleFoam.C, runTime.Write() is used to write results, and simpleFoam p.storePrevIter() is called to store the pressure field of the previous iteration. Because the WOpt_ member in the copy constructor of GeometricField is always set to be NO_Write, and it seems that the write function always export the pressure field for the previous iteration (not p itself), pressue is always missing from the export. Can someone tell me how to fix the problem or what part of my understanding is wrong? Thanks. ============================================ // construct as copy template<class> class PatchField, class GeoMesh> Foam::GeometricField<type,>::GeometricField ( const GeometricField<type,>& gf ) : DimensionedField<type,>(gf), timeIndex_(gf.timeIndex()), field0Ptr_(NULL), fieldPrevIterPtr_(NULL), boundaryField_(*this, gf.boundaryField_) { if (debug) { Info<<>::GeometricField : " "constructing as copy" <<>info() << endl; } if (gf.field0Ptr_) { field0Ptr_ = new GeometricField<type,> ( *gf.field0Ptr_ ); } this->writeOpt() = IOobject::NO_WRITE; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SimpleFoam pressure driven flow | gzink | OpenFOAM Running, Solving & CFD | 1 | July 2, 2013 14:23 |
Pressure driven laminar flow simpleFoam pressure higher at the outlet than inlet | gabriel | OpenFOAM Running, Solving & CFD | 16 | September 30, 2009 18:20 |
How to get Pressure field from velocity field | qunwuhe@hotmail.com | Main CFD Forum | 4 | October 14, 2007 07:38 |
Pressure Far Field BC | Zhen | FLUENT | 4 | January 24, 2005 07:53 |
about pressure far field | fan Qunbo | FLUENT | 4 | June 18, 2002 23:24 |