CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

problem restarting dynamic mesh cases

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 15, 2018, 10:35
Default problem restarting dynamic mesh cases
  #1
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
Ok so this extremely weird. I am carrying out some VIV cases. Everything runs fine, I get the steady periodic motion of the cylinder after some time but if I close fluent window and restart (after restarting laptop or some xyz reason) the simulation from the most recent case and data files, the periodic solution changes. The following 2 images are 2 cases in which this happened. Can anyone please tell why is this happening? I really cannot not afford to close my laptop over several days and need to simulate over several days every case. Please help
Attached Images
File Type: jpg case1.jpg (69.8 KB, 77 views)
File Type: jpg case2.jpg (79.6 KB, 75 views)
diggee is offline   Reply With Quote

Old   June 15, 2018, 10:46
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
What are the axes in the figures you provided and what is that extra line around 25 on the horizontal axis in the second image?

Are you stopping the simulation at the end of a time step and saving the case and data files (or project in Workbench) before closing Fluent? Are you re-initialising the domain when you restart Fluent mid-simulation?
`e` is offline   Reply With Quote

Old   June 15, 2018, 10:49
Default
  #3
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
> What are the axes in the figures

X axis is time, Y axis is the position of cylidner centroid undergoing VIV

> what is that extra line around 25 on the horizontal axis?

Please ignore that line, it is there cos I tried restarting the case several times and new data gets appended to the existing file.

> Are you stopping the simulation at the end of a time step and saving the case and data files (or project in Workbench) before closing Fluent?

Yes, to every part of that statement.

> Are you re-initialising the domain when you restart Fluent mid-simulation?

No, but why would I do this anyway?
diggee is offline   Reply With Quote

Old   June 15, 2018, 10:59
Default
  #4
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Cool, this is a weird one. For sake of completeness, could you tell us the steps you take to stop the simulation, save the project, and then restart? I know that this seems like trivial info, but it might help us to identify what's going on. Try to be detailed.


Without knowing much of anything else, it almost looks like the domain is being reset to something resembling the initial time step. Are you using any kind of UDF or something?
RaiderDoctor is offline   Reply With Quote

Old   June 15, 2018, 11:05
Default
  #5
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Quote:
Originally Posted by diggee View Post
> Are you re-initialising the domain when you restart Fluent mid-simulation?

No, but why would I do this anyway?
You should not re-initialise mid-simulation since that would probably result in an irregularity (only thinking of possible causes).

Have you converged the mesh and time step and feel confident that your solution is stable? Perhaps restarting Fluent would clear some values from memory such as field gradients, velocities from the dynamic mesh (what is driving the grid motion?) or similar. Regardless of the cause, it appears that your cylinder height is sensitive to whatever artificial perturbation in the system is generated when restarting Fluent. I would have thought that the same periodic motion would have been obtained after restarting; although the amplitudes are similar.

Side note: settings which have been applied after running the dynamic mesh are not saved into the original case / project file. For example, if you change the fluid viscosity after modifying the mesh (with a MDM step) and restart from the Setup cell in Workbench, then that fluid viscosity would be the old value. Perhaps double check that your settings are as intended after restarting Fluent.
`e` is offline   Reply With Quote

Old   June 15, 2018, 11:22
Default
  #6
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
Quote:
Originally Posted by RaiderDoctor View Post
Cool, this is a weird one. For sake of completeness, could you tell us the steps you take to stop the simulation, save the project, and then restart? I know that this seems like trivial info, but it might help us to identify what's going on. Try to be detailed.
Sure. I tell fluent to stop calculating at the the end of the current time step, not current iteration. After that, I save the project. Since it happened once before once, this time I also exported the case and data files just for backup. Then I close fluent, but not workbench. Laptop goes to sleep as I had to go out to meet my supervisor. When I restart, the entire oscillatory motion is now displaced. I tried restarting from the case and data files that I explicitly saved but from them too the entire oscillatory motion is getting displaced.

I am not using a UDF really. I am using Fluent's 6DOF solver that computes by how much the cylinder should be displaced. It is Fluent 19 where you can simply put the the 6DOF parameters in fluent so no need for a UDF.

Looking at the two pictures, I have now realized that after restarting the cylinder's motion becomes oscillatory about the position where it last was before restarting. Any clue why?
diggee is offline   Reply With Quote

Old   June 15, 2018, 11:25
Default
  #7
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
Quote:
Originally Posted by `e` View Post
You should not re-initialise mid-simulation since that would probably result in an irregularity (only thinking of possible causes).

Have you converged the mesh and time step and feel confident that your solution is stable? Perhaps restarting Fluent would clear some values from memory such as field gradients, velocities from the dynamic mesh (what is driving the grid motion?) or similar. Regardless of the cause, it appears that your piston height is sensitive to whatever artificial perturbation in the system is generated when restarting Fluent. I would have thought that the same periodic motion would have been obtained after restarting; although the mean values are within 6 % of each other with the same peak-to-peak heights.

Side note: settings which have been applied after running the dynamic mesh are not saved into the original case / project file. For example, if you change the fluid viscosity after modifying the mesh (with a MDM step) and restart from the Setup cell in Workbench, then that fluid viscosity would be the old value. Perhaps double check that your settings are as intended after restarting Fluent.
Yeah the solution is converged, you can clearly see how the cylinder's motion is steady oscillatory. All the computational aspects are fine, no worries there.

The amplitude after restarting is the same but the entire oscillatory motion is just offset. And I have just realized that after restarting, the cylinder's motion becomes oscillatory about the position where it last was before restarting. Any clue why?
diggee is offline   Reply With Quote

Old   June 15, 2018, 11:38
Default
  #8
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Quote:
Originally Posted by diggee View Post
The amplitude after restarting is the same but the entire oscillatory motion is just offset. And I have just realized that after restarting, the cylinder's motion becomes oscillatory about the position where it last was before restarting. Any clue why?
Alright, so the VIV stands for vortex-induced vibration, what Reynolds number is the flow (and what viscous model is used)? What are the forces acting on the cylinder before and after restart? The MDM call is done at the beginning of each time step and therefore if the forces are incorrect from restarting Fluent (or the flow is re-initialised) then the cylinder would be perturbed.
`e` is offline   Reply With Quote

Old   June 15, 2018, 11:46
Default
  #9
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
Quote:
Originally Posted by `e` View Post
Alright, so the VIV stands for vortex-induced vibration, what Reynolds number is the flow (and what viscous model is used)? What are the forces acting on the cylinder before and after restart? The MDM call is done at the beginning of each time step and therefore if the forces are incorrect from restarting Fluent (or the flow is re-initialised) then the cylinder would be perturbed.
The Reynolds number is in the order of 10^5 and I am using SST k-w model. I have restricted the cylinder to move only in the cross-flow direction so only the lift forces are taken into consideration for calculation of the cylinder's oscillation.

Well I am clearly not re-initialising the flow field so I cannot fathom as to why the cylinder would get perturbed. To me it honestly looks as if Fluent 'forgets' after restarting that the cylinder was already in motion and displaced from its mean position and it starts calculating as if it is a new problem altogether :/
diggee is offline   Reply With Quote

Old   June 15, 2018, 12:03
Default
  #10
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Quote:
Originally Posted by diggee View Post
The Reynolds number is in the order of 10^5 and I am using SST k-w model. I have restricted the cylinder to move only in the cross-flow direction so only the lift forces are taken into consideration for calculation of the cylinder's oscillation.

Well I am clearly not re-initialising the flow field so I cannot fathom as to why the cylinder would get perturbed. To me it honestly looks as if Fluent 'forgets' after restarting that the cylinder was already in motion and displaced from its mean position and it starts calculating as if it is a new problem altogether :/
Well at least you are not using LES for this problem. It is possible that Fluent is incorrectly resetting forces or field variables required for the MDM at/before restarting the software; which would be a bug.

What is causing the oscillations, an oscillatory inlet boundary condition? I would still recommend looking into the forces on the cylinder (shear stresses, pressure distribution) before and after restarting Fluent to determine if they are consistent. Perhaps the inlet boundary or flow field is out of sync with the cylinder. Otherwise if the flow is correct, and the culprit is likely to be the 6DOF model, then you could create the UDFs for the grid motion instead.
`e` is offline   Reply With Quote

Old   June 15, 2018, 12:08
Default
  #11
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
Quote:
Originally Posted by `e` View Post
Well at least you are not using LES for this problem. It is possible that Fluent is incorrectly resetting forces or field variables required for the MDM at/before restarting the software; which would be a bug.

What is causing the oscillations, an oscillatory inlet boundary condition? I would still recommend looking into the forces on the cylinder (shear stresses, pressure distribution) before and after restarting Fluent to determine if they are consistent. Perhaps the inlet boundary or flow field is out of sync with the cylinder. Otherwise if the flow is correct, and the culprit is likely to be the 6DOF model, then you could create the UDFs for the grid motion instead.
The vortices shed cause the oscillatory motion. It is a free VIV case not a forced VIV case. The alternate shedding causes the cylinder to oscillate.

I did look into the forces and velocity field, everything seemed fine. BTW, would there be any issue in using LES?
diggee is offline   Reply With Quote

Old   June 15, 2018, 13:26
Default
  #12
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Hey, I think I got it.


I'm not very familiar with the 6DOF solver, but let me see if I understand this thus far. You need to input a certain list of parameters (like direction that the piston will move, and what the preload of the spring is, etc.), right? So, when you began the simulation, the parameters were concerned with that initial point. When you stop and restart the simulation, the parameters are now concerned with the new restart point.



(I could be completely wrong in my assumptions, but this kind of makes sense).



For instance, let's say you want to move the cylinder up 2 mm and down 2 mm. You start from a resting position of 8 mm, which means that the max height is 10 mm and the min height is 6 mm. So this would continue until you stop the simulation at a time step. At the time step, the height will be 6 mm. When you restart, the solver will still use the parameters that you want your piston to move up 2 mm and down 2 mm. So now your max height is 8 mm, and your min height is 4 mm. This looks to be what is happening in your model right now. Unless you constrained it with a Reference Point, but I could be wrong.
RaiderDoctor is offline   Reply With Quote

Old   June 15, 2018, 13:44
Default
  #13
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
Quote:
Originally Posted by RaiderDoctor View Post
Hey, I think I got it.


I'm not very familiar with the 6DOF solver, but let me see if I understand this thus far. You need to input a certain list of parameters (like direction that the piston will move, and what the preload of the spring is, etc.), right? So, when you began the simulation, the parameters were concerned with that initial point. When you stop and restart the simulation, the parameters are now concerned with the new restart point.



(I could be completely wrong in my assumptions, but this kind of makes sense).



For instance, let's say you want to move the cylinder up 2 mm and down 2 mm. You start from a resting position of 8 mm, which means that the max height is 10 mm and the min height is 6 mm. So this would continue until you stop the simulation at a time step. At the time step, the height will be 6 mm. When you restart, the solver will still use the parameters that you want your piston to move up 2 mm and down 2 mm. So now your max height is 8 mm, and your min height is 4 mm. This looks to be what is happening in your model right now. Unless you constrained it with a Reference Point, but I could be wrong.
What you are saying makes sense but for the fact that there is no scope of such a thing happening due to the way I have setup my simulation. The 6DOF solver only takes in the spring constant and mass of cylinder as parameters; both of which have got nothing to do with the current position of the cylinder. They are parameters that are used to calculate the force and displacement of the cylinder, no matter what the initial point is. That is also a reason why even after restarting, the amplitude is the same albeit offset by some amount.

Further, the dynamic mesh stores the co-ordinates of the centroid of cylinder in a file (which I used to make those 2 plots) and keeps updating it after every time step. I double checked to ensure that the co-ordinates are correct before restarting my simulation and that the velocity of the centroid is also the value which it was at the end of the previous time step.

If you look at the figures closely, after restarting the amplitude is not immediately the max value; which it was before restarting. It's like the simulation goes back in time to re-solve but from a different position. I think this is just some bug caused by the multiple options being enabled at the same time.
diggee is offline   Reply With Quote

Old   June 15, 2018, 21:03
Default
  #14
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Quote:
Originally Posted by diggee View Post
I did look into the forces and velocity field, everything seemed fine. BTW, would there be any issue in using LES?
Sounds like there is a problem with the Six DOF solver then. Using LES (or DES, similar) at this Reynolds number would be impractical (too computationally expensive).

Quote:
Originally Posted by diggee View Post
If you look at the figures closely, after restarting the amplitude is not immediately the max value; which it was before restarting. It's like the simulation goes back in time to re-solve but from a different position. I think this is just some bug caused by the multiple options being enabled at the same time.
Have you applied a spring effect on the dynamic cylinder? Perhaps the starting/equilibrium position is incorrectly reset after restarting Fluent? Have you checked these spring properties before and after restarting Fluent?
`e` is offline   Reply With Quote

Old   June 16, 2018, 12:34
Default
  #15
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
Quote:
Originally Posted by `e` View Post
Have you applied a spring effect on the dynamic cylinder? Perhaps the starting/equilibrium position is incorrectly reset after restarting Fluent? Have you checked these spring properties before and after restarting Fluent?
Yes, there is a spring effect on the dynamic cylinder. Spring properties don't change after restarting the simulation. I have only given the spring constant as parameter and like I said, the position of the centroid is saved in Fluent before restarting.
diggee is offline   Reply With Quote

Old   June 16, 2018, 15:56
Default
  #16
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Sorry, I had written something up about this, but never pressed send. So what you said in response to my previous post kind of makes sense. Think of it this way:


When you start the simulation, you start your piston at a stress-free state. Then you begin to run your calculations, and it oscillates as you expect it to, due to the parameters you set. When you interrupt the solution, you have an end value that is based off of an initial starting point. This is why you always observe the initial starting point as being unchanging in the steps prior to your interruption.

When you restart the simulation, however, I think what is happening is that it's taking the last end point as the new stress free state. This would help explain why it is now oscillating around the new fixed point, rather than your initial starting point. The way to check this would be to look at your coordinates after you restart and see if they match what you had before.
RaiderDoctor is offline   Reply With Quote

Old   June 16, 2018, 16:05
Default
  #17
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
Quote:
Originally Posted by RaiderDoctor View Post
When you restart the simulation, however, I think what is happening is that it's taking the last end point as the new stress free state. This would help explain why it is now oscillating around the new fixed point, rather than your initial starting point. The way to check this would be to look at your coordinates after you restart and see if they match what you had before.
Yea I think this is what is happening but there is no logical reason for it to happen. The stress on the cylinder is determined by the fluid forces which are not zero when I restart. Nowhere do I mention after restarting that the new position is the stress free state. And why would it even be, fluid forces are acting on it then :/

I did check the coordinates, they are the same value that they were before stopping, so nothing wrong there.
diggee is offline   Reply With Quote

Old   June 16, 2018, 16:12
Default
  #18
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Okay, awesome. That doesn't really solve the problem, but at least we are getting closer.

Would you be comfortable posting your initial setup so that we can try to run it ourselves? It sounds like you know this simulaiton inside and out and are knowledgable about ANSYS, so I'd like to get up to speed with you.
RaiderDoctor is offline   Reply With Quote

Old   June 17, 2018, 01:59
Default
  #19
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Quote:
Originally Posted by diggee View Post
Yes, there is a spring effect on the dynamic cylinder. Spring properties don't change after restarting the simulation. I have only given the spring constant as parameter and like I said, the position of the centroid is saved in Fluent before restarting.
I was mainly referring to the equilibrium position of the spring, where the restoring force is zero. Assuming that the equation used is Hooke's law, then the restoring force is:

\textbf{F} = -k\textbf{x}

where k is the spring constant and \textbf{x} the displacement from the equilibrium position. The cylinder oscillations shown in the original post indicate that \textbf{x} = \textbf{0}~\textrm{m} on restart, as you have suggested. Can you check \textbf{x} in the GUI or elsewhere? Ultimately, if this displacement cannot be retrieved or corrected on restart, then you may need to create a UDF for the cylinder motion (which seems straightforward, you have linked to posts on this forum elsewhere with the code).
`e` is offline   Reply With Quote

Old   June 17, 2018, 02:04
Default
  #20
Member
 
Join Date: Sep 2016
Posts: 43
Rep Power: 10
diggee is on a distinguished road
Quote:
Originally Posted by `e` View Post
Can you check \textbf{x} in the GUI or elsewhere?
Yes, like I said the center position is stored by Fluent's 6DOF solver and the co-ordinates before restarting are what they were when I stopped the simulation. That is also how I am plotting the figures attached in the original post. Also, the change of position in those figures is not sudden, so you can be assured that the on restarting the simulation does continue from the position where the cylinder was just before stopping.
diggee is offline   Reply With Quote

Reply

Tags
dynamic mesh, restart problem, viv


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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
Local mesh refinement definition in a DEFORMING dynamic mesh zone using Dynamic Mesh Emanuele88 FLUENT 0 February 9, 2016 12:39
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
Dynamic mesh simulation (pimpleDyMFoam) problem sidlof OpenFOAM Running, Solving & CFD 6 April 12, 2013 12:24
CFD-3D flow problem using Dynamic mesh method. Sar_mech FLUENT 1 November 27, 2008 22:17


All times are GMT -4. The time now is 07:46.