|
[Sponsors] |
pimpleDyMFoam: When restarting a case, large spike in forces |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 31, 2014, 10:02 |
pimpleDyMFoam: When restarting a case, large spike in forces
|
#1 |
Senior Member
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 14 |
I am running a case in pimpleDyMFoam, which seems to work well enough, but when I attempt to restart from latestTime, I am getting a large positive, then negative spike in the forces/moments right at the start of the new run. I am using an unsteady dynamicMeshDict, which has a table of 400 omega values. This is regenerated when restarting the solver, so it extends to endTime. My only guess it that the spikes could be caused by a change in the dynamicMeshDict, but that seems unlikely because of the resolution. To be more specific, I'm going from 400 omega values per 0.3 seconds to 400 omega values per 0.4 seconds. Any other ideas on what might be causing this issue?
|
|
February 15, 2014, 11:13 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Pete,
It might be due to a bug in the OpenFOAM version you are using. There have been several bugs fixed related to simulation restarts, for example since OpenFOAM 2.1.0 was released, therefore knowing which OpenFOAM version you are using would make it a bit easier to assess if it's something that has already been fixed. Best regards, Bruno
__________________
|
|
February 27, 2014, 08:15 |
|
#3 |
New Member
Jason Lassaline
Join Date: Mar 2012
Posts: 3
Rep Power: 14 |
I had the same problem using v 2.2.x from the git repo. I found that the problem is that 'meshPhi' is not being written at each time step, and thus not read by the appropriate fvMesh constructor.
The pimpleDyMFoam solver does the following before advancing the PIMPLE loop: fvc::makeAbsolute(phi, U); // This depends on meshPhi mesh.update(); // This creates the meshPhi field if it doesn't exist, then updates it. fvc::makeRelative(phi, U) // This depends on meshPhi If meshPhi is not saved during the last time step, pimpleDyMFoam starts up with a zero-valued meshPhi, causing an immediate difference in the calculations of mesh displacement, U, and p. This probably affects other *DyMFoam solvers. I'm not certain what the best fix is, other than to force fvMesh::movePoints() to write meshPhi every time it updates the phiPtr_ variable. In my code, I adjusted the fvMesh::movePoints() function as follows: - Change 'IOobject::NO_WRITE' to 'IOobject::AUTO_WRITE' - Added a phi.write() just before the function returns. <-- This isn't good as it creates a new time directory at each time step! Update: I just took a look at the source of pimpleDyMFoam.C v2.3.x in git. Looks like it has been modified to fix this problem, though I have not tested it... Last edited by jvl001; February 28, 2014 at 10:24. Reason: Found a new problem. |
|
March 1, 2014, 07:03 |
|
#4 |
New Member
Jason Lassaline
Join Date: Mar 2012
Posts: 3
Rep Power: 14 |
After recompiling v2.3.x I discovered the restart problem still remains. However I did determine how to get meshPhi to be written, if needed. You'll need to modify fvMesh.C so that:
- 'phiPtr_' is registered as an IO object (currently it is not) - add logic to change phiPtr_ to IOobject::AUTO_WRITE with the current time step if it is modified by fvMesh::movePoints - add logic to write phiPtr_ if it exists in fvMesh::writeObject The attached patch should work with v2.2.x (tested) or v2.3.x (not tested). Apply this patch from the '$WM_PROJECT_DIR': cd $WM_PROJECT_DIR patch -p0 < fvMesh.patch wmake src/finiteVolume |
|
March 1, 2014, 07:43 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Jason,
I thought this was a bug that was fixed long ago by now. Thanks for sharing the solution you've found! Please report this on the official bug tracker, so that the OpenFOAM team can fix this as well: http://www.openfoam.org/mantisbt/ - and please provide them with a test case and details on the issue, so that they can confirm how to reproduce the error. Best regards, Bruno
__________________
|
|
|
|
LinkBacks (?)
LinkBack to this Thread: https://www.cfd-online.com/Forums/openfoam-solving/129234-pimpledymfoam-when-restarting-case-large-spike-forces.html
|
||||
Posted By | For | Type | Date | |
Untitled document | This thread | Refback | October 25, 2014 05:26 |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Large test case for running OpenFoam in parallel | fhy | OpenFOAM Running, Solving & CFD | 23 | April 6, 2019 10:55 |
Is Playstation 3 cluster suitable for CFD work | hsieh | OpenFOAM | 9 | August 16, 2015 15:53 |
Forces for a sloshing case | ogloth | OpenFOAM Running, Solving & CFD | 8 | October 22, 2007 23:15 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |
Post-processing of a large transient case | Flav | Siemens | 2 | September 28, 2004 07:19 |