|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 301
Rep Power: 12 ![]() |
Dear FOAMERS,
I hope you are all doing well. I have a general question about PIMPLE algorithm thta might be a bit silly! Supposing that we have a temporal term like ![]() If I use PIMPLE and there would be nOuterCorrectors>1, ![]() ![]() |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Eren
Join Date: Aug 2018
Posts: 92
Rep Power: 9 ![]() |
Time marches after you reach the maximum number of outerIterations. You can see that in your log (or terminal).
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 301
Rep Power: 12 ![]() |
I dont have an actual case to see it now. About the theory, you mean time marching happens in the last outerIteration. And what about the iterations up to that? What value is used?
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 825
Rep Power: 16 ![]() |
This has been quite an interesting rabbit hole to dive down - the "simplest" questions in OF often are! TLDR: the oldTime() value in a pimple loop is the solution from the last full solver iteration, ie does not change during the pimple loops (which essentially is what Eren was saying above).
Want the proof? Here is my attempt. Using rhoPimpleFoam from OF8 as a solver (I assume you are using a compressible pimple solver, from your discussion of drho/dt), we can see the pimple looping part of the code as: Code:
while (pimple.loop()) { .... update rho, U*, E, p & U, turb } Code:
bool Foam::pimpleControl::loop() { read(); if (!pimpleLoop::loop(*this)) { updateFinal(); return false; } storePrevIterFields(); updateFinal(); return true; } Code:
template<class Type> void Foam::singleRegionSolutionControl::storePrevIterTypeFields() const { typedef GeometricField<Type, fvPatchField, volMesh> fieldType; HashTable<fieldType*> flds(mesh_.objectRegistry::lookupClass<fieldType>()); forAllIter(typename HashTable<fieldType*>, flds, iter) { fieldType& fld = *iter(); const word& fName = fld.name(); size_t prevIterField = fName.find("PrevIter"); if (prevIterField == word::npos && mesh_.relaxField(fName)) { fld.storePrevIter(); } } } ![]() Code:
template<class Type, template<class> class PatchField, class GeoMesh> const Foam::GeometricField<Type, PatchField, GeoMesh>& Foam::GeometricField<Type, PatchField, GeoMesh>::oldTime() const { if (!field0Ptr_) { field0Ptr_ = new GeometricField<Type, PatchField, GeoMesh> ( IOobject ( this->name() + "_0", this->time().timeName(), this->db(), IOobject::NO_READ, IOobject::NO_WRITE, this->registerObject() ), *this ); } else { storeOldTimes(); } return *field0Ptr_; } Code:
template<class Type, template<class> class PatchField, class GeoMesh> void Foam::GeometricField<Type, PatchField, GeoMesh>::storeOldTimes() const { if ( field0Ptr_ && timeIndex_ != this->time().timeIndex() && !( this->name().size() > 2 && this->name()(this->name().size()-2, 2) == "_0" ) ) { storeOldTime(); } // Correct time index timeIndex_ = this->time().timeIndex(); } Time for a coffee ... |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 301
Rep Power: 12 ![]() |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PIMPLE – the value of the final under-relaxation factor | Zbynek | OpenFOAM | 9 | December 22, 2023 05:26 |
PIMPLE algorithm unstability | ram_7 | OpenFOAM Running, Solving & CFD | 4 | February 8, 2018 09:43 |
PIMPLE algorithm -- Energy equation | gdeneyer | OpenFOAM Running, Solving & CFD | 2 | May 2, 2012 08:32 |
Question regarding the F2F particle tracking algorithm implementation. | andrewryan | OpenFOAM | 2 | October 22, 2009 01:55 |
SIMPLER Algorithm question | Erik | Main CFD Forum | 1 | May 23, 2004 03:57 |