InterDyMFoam Floating Object with SnappyHexMesh not solving
Hello,
I'm a beginner with OpenFOAM, and my goal is to adapt the floatingObject tutorial with a different object. I have replaced the cube by a special geometry : it's a box created with Rhinoceros. There's a hole in there. I want to see what happens when I put the box at the surface of the calm water, and the water enters in the cavity in the box. Will the box float ? Will it sink ? What's the angle of the box with the x axis when the water is in the cavity ? I used SnappyHexMesh, and then InterDyMFoam, inspired by floatingObject and DTCHull. I always get the same error when I try to solve : Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? Can you help me to resolve it ? Here is the complete case : https://www.dropbox.com/s/but0ovitg6...float.zip?dl=0 Thank you very much for your help. |
instead of GAMG use PCG
|
Thank you for the quick answer.
I tried using the PCG solver. I configured it this way : Code:
/*--------------------------------*- C++ -*----------------------------------*\ Unfortunately I obtain the same results, and still get the error : Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? Maybe my configuration is not good, but I haven't found a lot of documentation about PCG solver. Using GAMG preconditioner instead of DIC changed nothing. Do you have another idea about what could make my case work ? Thank you very much |
Hi Albert,
change nOuterCorrectors to someting >1, e.g. like in the floatingObject tutorial to 5. Also set nCorrectors to 1. Best regards, Jan |
Thank you for your answer.
I changed the nOuterCorrectors to 5, and the nCorrectors to 1. However I still get an error, trying with PCG or GAMG : Code:
PIMPLE: iteration 3 The linear and angular velocity seem to be diverging, although I tried with a maxCo number of 1, 0.8 and 0.5. I don't get what is my error, I have all tried with different numbers and always get the same thing... I would be very pleased if you could help me solve this mystery. Thank you again |
Hi Albert,
it is definitely no problem with PCG or GAMG. I have downloaded your case and had a small look at it. Very interesting that your body properties are exactly the same as for the DTC tutorial!?!?! First of all update the properties in the dynamic mesh dict to fit to your problem, i.e. mass, cog and moments of inertia. That is the reason why your motion is diverging. After that you should think about spending some more distance between your floating body and the tank wall and change the inner and outer distance of the mesh morpher apropriately. Good luck & best regards, Jan |
ok, one more hint. I think, for your problem you should use one of the generic motion solvers (e.g. displacementSBRStress), not the SLERP as your body is not completly filled. That means that you have to specify the body properties via boundary condition, how it was in previous versions.
Again, good luck! |
Thank you very much Jan for all these answers. I enlarged the tank wall and changed the solver into DisplacementSBRStress. I changed the initial conditions in pointDisplacement, using angularOscillatingDisplacement for testing (found here : http://www.cfd-online.com/Forums/ope...verfvmesh.html ). Great news, I don't have the sigFpe error anymore !! The solving runs fine.
But I have still a problem : angularOscillatingDisplacement is not the initial condition I want. I want the hull to react on the action of the gravity. I tried using sixDoFRigidBodyDisplacement for the hull, but it wasn't recognized by OpenFOAM. The valid patchfields types are : Valid patchField types are : 30 ( angularOscillatingDisplacement angularOscillatingVelocity calculated codedFixedValue cyclic cyclicACMI cyclicAMI cyclicSlip empty fixedNormalSlip fixedValue nonuniformTransformCyclic oscillatingDisplacement oscillatingVelocity processor processorCyclic slip solidBodyMotionDisplacement surfaceDisplacement surfaceSlipDisplacement symmetry symmetryPlane timeVaryingMappedFixedValue timeVaryingUniformFixedValue uniformFixedValue uniformInterpolatedDisplacement value waveDisplacement wedge zeroGradient ) I have found very little documentation about these types, and I don't know which one would suit my problem. Maybe solidBodyMotionDisplacement ? Can you help me there ? Thank you again |
yep, you need to include libs ("libsixDoFRigidBodyMotion.so"); in the controlDict.
Have a nice weekend! Jan |
I included the libs, it's running but here again the same sigFpe error is coming back immediately...
I don't know what to do at all, I have tried a lot of configurations and I always get this error. Here are the files attached, maybe someone can help me. https://www.dropbox.com/s/x1rqlarsjg...loat3.zip?dl=0 Thank you very much Besr regards |
Check your body properties!!!! Hint: https://en.wikipedia.org/wiki/List_o...nts_of_inertia (Solid cube). Your cube is not completly solid, but should be a better value than what you have specified.
Best regards, Jan |
Ok, I didn't thought that was the source of the problem. I put these values just to try.
In fact , calculing the center of mass and moment of inertia is a bit problematic, because the box is supposed to be split in half by a wall and constituted of two cells filled with air (you can see it on the stl file), but snappyhexmesh only considers the extern surface, and does not fill with air the other cavity (the one that has no hole). Do you know how to make snappyhexmesh recognize the other cavity and fill it with air ? Thank you very much |
There is no need to model the air filled chamber, because the forces would be very small (density of air << density of water). And also if you would model this part the 6DoF solver still needs correct body properties, otherwise your accerlerations will be much too high. But it should be not that complicated to calculate the correct moments of inertia for your body. I think you can assume your walls as homogenous, sum them up, don't forget the Steiner theorem, thats it. Or do a very rough approximation, calculate for a solid cube, and take something like e.g. 10% of that value.
Hope this helps, Jan |
Hi Albert,
I played around a little with your case, and at the moment for me it looks like that also if you have some "realistic" body properties (i.e. mass, cog, inertia moment) your case is very unstable. My feeling at the moment is that there is some kind of bug in the 6-DoF solver. If you do not mind I will upload your case to the bug reporting system? Best regards, Jan |
Hi Jan,
Thank you for your help. No problem if you upload my case. Best regards, Albert |
Hi guys, I realise quite a lot of time has passed since this thread was active, but did anyone come up with some solution to make interDyMFoam more stable?
My cases are very temperamental, crashing at any little change in body properties or position of the body in the domain. Cheers Aidan |
Hi Aidan,
have you tried OpenFOAM-3.0 or newer. In the 3.0 release there was a major improvement of the 6DoF solver. You can now use an fully implicit Newmark integration scheme, which is MUCH more stable than the previous Leapfrog. Best regards, Jan |
Hi Jan,
I'm using OF 2.3 right now, but I may well make the switch some time soon. Thanks for the info! Aidan |
Alternative for a floating structure
Hi all,
I have been working with both SHM and 6DoRigidBodyMotion together and have noticed that a sphere can be modeled successfully, but shapes with a vertical wall, or even a rounded end cylinder will blow the case up- to where alpha is greatly outside of the 0-1 bounds. I have found an alternative that works for me by using topoSet (i.e. in the floatingObject tutorial). I have not worked in detail with the topoSet function, but I believe a more complex structure may be created with some deeper understanding. Simply speculating- I believe there is a discontinuity between the mesh created with snappy and the process for solving 2-phase dynamic mesh, but I could be wrong :rolleyes: |
hello,
Just my two cents. I had the experience that the displacement causes the cells to become very small, so check the cells near the solid in the direction of the movement. I think they become zero volume and the calculation for that cell crashes. I have not found a solution for this problem. hope this helps Wouter |
All times are GMT -4. The time now is 02:17. |