CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   problem restarting dynamic mesh cases (https://www.cfd-online.com/Forums/fluent/203040-problem-restarting-dynamic-mesh-cases.html)

`e` June 17, 2018 01:15

Quote:

Originally Posted by diggee (Post 696218)
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.

The centroid of the cylinder? Suppose the cylinder is located at \textbf{x}_\textrm{cylinder} and the equilibrium position of the spring is at \textbf{x}_\textrm{equilibrium}, then the restoring force is:

\textbf{F} = -k (\textbf{x}_\textrm{cylinder} - \textbf{x}_\textrm{equilibrium})

As you have already determined, the \textbf{x}_\textrm{cylinder} position is consistent after restarting Fluent, but what about \textbf{x}_\textrm{equilibrium}?

diggee June 17, 2018 01:19

Quote:

Originally Posted by RaiderDoctor (Post 696202)
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.

Yea sure why not.
  1. The domain is 40DX20D in dimensions where D is the cylinder diameter. 40D and 20D are measured from the cylinder's center. D = 1m.
  2. Give an inlet velocity of 6m/s.
  3. SST k-w turbulence model with default values.
  4. Standard pressure outlet BC.
  5. As for the spanwise boundaries, far-field pressure BC. Change the mach no to 0.01. Since it is pressure far-field, you will need to change air density to ideal gas formulation. As a result, energy equation will be enabled but you should disable it from being solved in the factors menu.
  6. Finally, switch on dynamic meshing but only the 6DOF model option. In 6DOF, create a model with only 1DOF motion, mass as 4 kg and spring constant k as 280 N/m. Enable the option to write motion history. This is the file that will give you the center co-ordinates.
  7. Create dynamic mesh zones. For the cylinder wall, give it rigid body motion and select the 6dof model. Check 'on' but not passive option. Give center position as the cylinder's initial center co-ordinates. Initial velocity = 0. For all other zones, do the same but check passive too.
  8. Select PISO, and all second order methods. Time step 0.004 s. Inner iterations = 20. Rest everything default values.


Please don't go out of your way to do this but. If you have some time to kill only then do it cos it will take a day easily. That was very kind of you to offer to simulate it yourself.

diggee June 17, 2018 01:20

Quote:

Originally Posted by `e` (Post 696219)

As you have already determined, the \textbf{x}_\textrm{cylinder} position is consistent after restarting Fluent, but what about \textbf{x}_\textrm{equilibrium}?

And how do I check what this is in Fluent?

`e` June 17, 2018 01:24

Quote:

Originally Posted by diggee (Post 696221)
And how do I check what this is in Fluent?

I have not used the Six DOF solver before, and I do not have this version of ANSYS installed to have a quick check. Is there any mention in the Fluent guides? Otherwise have a look around the GUI?

Quote:

Originally Posted by `e` (Post 696217)
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).


diggee June 17, 2018 01:30

Quote:

Originally Posted by `e` (Post 696222)
I have not used the Six DOF solver before, and I do not have this version of ANSYS installed to have a quick check. Is there any mention in the Fluent guides? Otherwise have a look around the GUI?

Yea, will do that. I have restarted a simulation for another case to see if this happens in that too. If it does, then next time I will use the UDF approach. But honestly, I would expect the same thing to happen there too cos the UDF will only have the mass, spring constant and 1dof as parameters, not initial equilibrium position.

`e` June 17, 2018 01:47

Quote:

Originally Posted by diggee (Post 696223)
But honestly, I would expect the same thing to happen there too cos the UDF will only have the mass, spring constant and 1dof as parameters, not initial equilibrium position.

Not quite. Consider the restoring force from earlier:

\textbf{F} = -k (\textbf{x}_\textrm{cylinder} - \textbf{x}_\textrm{equilibrium})

If you only want a single DOF such that the restoring force of the spring acts purely in the y-direction, then the force on the cylinder could be calculated with:

Code:

force = -k*(DT_CG(dt)[1] - x_equilibrium[1]);
where the DT_CG macro is the centre of gravity vector of the dynamic thread zone and x_equilibrium is the vector where the spring is at equilibrium (defined within the UDF). The UDF manual has examples and details for further clarification and reference.

Note: remember that indexing in C starts from zero instead of one, so DT_CG(dt)[1] corresponds to the second spatial coordinate (y for Cartesian).

diggee June 17, 2018 01:51

Quote:

Originally Posted by `e` (Post 696224)
Not quite. Consider the restoring force from earlier:

\textbf{F} = -k (\textbf{x}_\textrm{cylinder} - \textbf{x}_\textrm{equilibrium})

If you only want a single DOF such that the restoring force of the spring acts purely in the y-direction, then the force on the cylinder could be calculated with:

Code:

force = -k*(DT_CG(dt)[1] - x_equilibrium[1]);
where the DT_CG macro is the centre of gravity vector of the dynamic thread zone and x_equilibrium is the vector where the spring is at equilibrium (defined within the UDF). The UDF manual has examples and details for further clarification and reference.

Note: remember that indexing in C starts from zero instead of one, so DT_CG(dt)[1] corresponds to the second spatial coordinate (y for Cartesian).

Oh yea I can definitely do that. Thanks a lot, even if I don't get a reason as to why this is happening, what you suggested should work. I will update this thread once I do use a UDF for future purpose.

diggee June 17, 2018 03:36

1 Attachment(s)
Quote:

Originally Posted by diggee (Post 696223)
Yea, will do that. I have restarted a simulation for another case to see if this happens in that too. If it does, then next time I will use the UDF approach. But honestly, I would expect the same thing to happen there too cos the UDF will only have the mass, spring constant and 1dof as parameters, not initial equilibrium position.

Just check for a different case, same thing happens there too. You can see in the image attached that the cylinder starts oscillating about the yellow dashed line (instead of the green line) which was the y co-ordinate of the cylinder center when I stopped the simulation. It also starts solving as if it has just begun to oscillate; notice the increasing amplitude. This is so weird. I just hope using a UDF solves this cos I have to do 3D simulations next and I really cannot afford this then.

`e` June 17, 2018 03:53

Quote:

Originally Posted by diggee (Post 696230)
This is so weird.

Well, this result is consistent with what we consider the problem to be: that the equilibrium position of the spring is being reset on restarting Fluent. I would expect (or at least hope) that using the UDF would solve this issue, and would also give you greater control and transparency on what you are actually solving.

Yes, a 3-D simulation would be much more computationally expensive. Remember to optimise your mesh and you could also start with an initial condition based on your 2-D result to help reduce the time it takes for the flow/oscillations to fully develop.

diggee June 17, 2018 04:02

Quote:

Originally Posted by `e` (Post 696231)
Well, this result is consistent with what we consider the problem to be: that the equilibrium position of the spring is being reset on restarting Fluent. I would expect (or at least hope) that using the UDF would solve this issue, and would also give you greater control and transparency on what you are actually solving.

Yes, a 3-D simulation would be much more computationally expensive. Remember to optimise your mesh and you could also start with an initial condition based on your 2-D result to help reduce the time it takes for the flow/oscillations to fully develop.

I think I will just check the UDF approach with a 2D case before going on to 3D, better safe than sorry. Thanks for your input man, really appreciate it!

diggee June 19, 2018 06:50

Quote:

Originally Posted by `e` (Post 696224)
Not quite. Consider the restoring force from earlier:

\textbf{F} = -k (\textbf{x}_\textrm{cylinder} - \textbf{x}_\textrm{equilibrium})

If you only want a single DOF such that the restoring force of the spring acts purely in the y-direction, then the force on the cylinder could be calculated with:

Code:

force = -k*(DT_CG(dt)[1] - x_equilibrium[1]);
where the DT_CG macro is the centre of gravity vector of the dynamic thread zone and x_equilibrium is the vector where the spring is at equilibrium (defined within the UDF).

Hey, so I did this and it works perfectly fine now even after restarting. Thanks a ton for your suggestion, really really appreciate it. Cheers!

n.mai March 4, 2021 00:37

Quote:

Originally Posted by diggee (Post 696451)
Hey, so I did this and it works perfectly fine now even after restarting. Thanks a ton for your suggestion, really really appreciate it. Cheers!

Hi. Do you succeed doing VIV simulation at cross-flow direction?


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