|
[Sponsors] |
December 29, 2014, 21:44 |
How to write a field at time when converged?
|
#1 |
Senior Member
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 13 |
I am working on a custom fvOption that is writing a field at normal outputTimes using
Code:
if (mesh_.time().outputTime()) { myField.write(); } |
|
January 9, 2015, 20:56 |
|
#2 | |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17 |
Hi Pete,
If you have residualControls defined in the fvSolution file, simpleFoam should write and stop as soon as all of the criteria are satisfied. Is this different than what you are trying to do with the function object? Cheers! Kyle Quote:
|
||
January 9, 2015, 21:09 |
|
#3 |
Senior Member
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 13 |
Kyle,
This is indeed what I'm trying to do. What I gather is the final time is not an outputTime, so my field is not writing, but all the other OpenFOAM fields write. |
|
January 9, 2015, 21:21 |
|
#4 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17 |
Right.
The issue is likely this: The convergence check is performed within the simple.loop() call at the beginning of the simple loop. If its satisfied, then it writes and stops. If you look at ::loop() Code:
/src/finiteVolume/lnInclude/simpleControls.C |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 13:40 |
Unstabil Simulation with chtMultiRegionFoam | mbay101 | OpenFOAM Running, Solving & CFD | 13 | December 28, 2013 13:12 |
pimpleFoam: turbulence->correct(); is not executed when using residualControl | hfs | OpenFOAM Running, Solving & CFD | 3 | October 29, 2013 08:35 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 15:33 |
AMG versus ICCG | msrinath80 | OpenFOAM Running, Solving & CFD | 2 | November 7, 2006 15:15 |