CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Unable to correctly restart a simulation that has stopped.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2023, 14:48
Default Unable to correctly restart a simulation that has stopped.
  #1
New Member
 
Join Date: Jun 2023
Posts: 3
Rep Power: 3
feuille is on a distinguished road
Hello everyone!

My 2D simulation is a cylinder forced to move vertically, it is attached with springs and has a flow coming horizontally. I am using overPimpleDyMFoam.

When the simulation stops, I am unable to correctly restart it. The simulation restarts but doesn't calculate the right thing.
As an example, I ran 2 simulations with exactly the same conditions, and I stopped one at 1.92 sec, the other was not stopped. You can see on the attached pictures (0sec, 1.92sec, 2.5sec, 4.5sec) that the cylinders are not following the same movements.

I would like to be able to restart the simulation from where it stopped because they take a lot of time to run.

I already solved a problem, the file 'points' used to restart the simulation was the initial one. I just have to copy the last saved 'points' file to the folder 'constant' so the cylinder is at the good position for the restart.

I wonder if my problem comes from the forces or the displacement of the cylinder that is not updated for the restart?


I would really appreciate if someone could help me. Let me know if you need any information more to be able to help me.

Thank You!
Attached Images
File Type: png time 0.PNG (56.6 KB, 14 views)
File Type: png time 1.92.PNG (84.3 KB, 11 views)
File Type: png time 2.5.PNG (103.7 KB, 12 views)
File Type: png time 4.5.PNG (119.8 KB, 10 views)
feuille is offline   Reply With Quote

Old   June 14, 2023, 08:24
Default
  #2
Member
 
Vinzenz Götz
Join Date: Mar 2021
Location: Munich, Germany
Posts: 31
Rep Power: 5
Vinzmann is on a distinguished road
Could you give a bit more detail?

Have you tried setting the "startTime" in controlDict to "latestTime" and then just running the solver?
Vinzmann is offline   Reply With Quote

Old   June 14, 2023, 11:24
Default
  #3
New Member
 
Join Date: Jun 2023
Posts: 3
Rep Power: 3
feuille is on a distinguished road
Hi Vinzmann,

I tried to put 'startForm latestTime'. The simulation restarts but I can clearly see on paraview that the movement of the cylinder changes. The U field changes also. I have the feeling that something is missing to restart the simulation correctly and the code is calculating a new state which is not continuous with the previous one.

5 files from the simulation are attached to this message (3 from the folder 'system' and 2 from the folder 'constant'). I can put other files if you need.

Thank you very much for your help!
Attached Files
File Type: txt controlDict.txt (2.2 KB, 2 views)
File Type: txt fvSchemes.txt (1.3 KB, 1 views)
File Type: txt fvSolution.txt (2.3 KB, 1 views)
File Type: txt dynamicMeshDict.txt (4.3 KB, 2 views)
File Type: txt turbulenceProperties.txt (812 Bytes, 1 views)
feuille is offline   Reply With Quote

Old   June 15, 2023, 03:35
Default
  #4
Member
 
Vinzenz Götz
Join Date: Mar 2021
Location: Munich, Germany
Posts: 31
Rep Power: 5
Vinzmann is on a distinguished road
Hello Feuille,

you said in your first post that you copied the points folder over into constant, what happened before you did that? Did it throw an error?

Did you do something else except stop the simulation and then start it again?

How do you start the simulation?
Do you use a script like:
Code:
#!/bin/sh
cd "${0%/*}" || exit                                # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions        # Tutorial run functions
#------------------------------------------------------------------------------

runParallel $(getApplication) -parallel
or do you start directly from the command line like so:
Code:
overPimpleDyMFoam
If it throws errors, could you post those?

Best regards,
Vinz
Vinzmann is offline   Reply With Quote

Old   June 15, 2023, 17:17
Default
  #5
New Member
 
Join Date: Jun 2023
Posts: 3
Rep Power: 3
feuille is on a distinguished road
Hello Vinzmann,

Before doing anything, when I restarted the simulation where it stopped, the cylinder was back at the initial position (center of the block). However, there were no error or warning in terminal. I was able to see there is a problem with the deltaT that went from 5e-5 to 3e-9. (deltaT is adjustable so the courant nb is under 1)


To start and restart a simulation, when I use 3 cores for example, I use:
Code:
renumberMesh -overwrite | mpirun -np 3 renumberMesh -overwrite -parallel
overPimpleDyMFoam | mpirun -np 3 overPimpleDyMFoam -parallel
or simply:
Code:
overPimpleDyMFoam

After I copied points over into constant, when the simulation restarts, the cylinder seems to be at the right position, the position where simulation stopped.
I noticed that the pointDisplacement file refers to the restarted postion for the zero point. For example, before simulation stopped, at 1.92sec, points of the cylinder are displaced like (0 -0.0382993 0). After the simulation restarts, at 1.94sec, these points are displaced like (0 -0.000827018 0). (I read that in the files pointDisplacement for each time step)
I hope this is clear to understand .

It makes me think that it can affect the refAttachementPt and the anchor of the springs that are set to the center of the block.


Thank you for your help Vinzmann!
feuille is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Restart a dynamic refined simulation from a different time-step Andrea_85 OpenFOAM 6 November 29, 2018 09:28
a transient cfx simulation suddenly stopped writing .out and then .bak while running mona.li CFX 1 March 5, 2018 05:15
How to restart a simulation in MPI mode hamedhamed AVL FIRE 4 April 26, 2013 14:27
Simulation Time in restart runs Elina CFX 3 January 21, 2009 04:57
Restart of FSI simulation V. Kumar CFX 3 July 20, 2006 14:23


All times are GMT -4. The time now is 21:14.