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

Pressure instabilities with interDyMFoam for the floatingObject case

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By nbadano

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2010, 10:00
Default Pressure instabilities with interDyMFoam for the floatingObject case
  #1
New Member
 
Nicolás Badano
Join Date: Sep 2010
Posts: 16
Rep Power: 17
nbadano is on a distinguished road
Dear OpenFoam community

Hi to all,

I’ve been working for a few weeks trying to model the oscillation of big ships inside a shiplock during the filling/emptying of the chamber with OpenFOAM 1.7.1 using interDyMFoam with sixDoFRigidBodyDisplacement. I’ve come across serious instabilities in the pressure field, which eventually blow the simulations. I’ve observed this oscillation along any of the three coordinate axis, depending on the test conditions. I tried both decreasing the time step and improving the discretization, with no beneficial effects at all.

After some testing, I was able to tie this instabilities to the size of the ship in relation to the chamber studying a modified version of the floatingObject tutorial case. As far as I know, the bigger the object is in relation to the chamber the more unstable is the pressure solution is.

The modifications i made to the floatingObject tutorial case were:
1 Removed the splash of water that produced a big perturbation

2 Added an initial condition for the p_rgh field. This is missing in the tutorial case producing a free fall of the floating object during the first time step (which produces a physical vertical oscillation afterward).
I named this case “small” regarding the size of the “ship” a.k.a. floatingObject. Under this setup, the tutorial case runs fine. Numerical pressure oscillations are present, although they diminish after some time without blowing the simulation. The object remains oscillating physically up and down for some time.

After that I increased slightly the size of the floating object, from 0.30x0.30x0.12 m to 0.50x0.50x0.32 m and increased the mass accordingly to initialize it very close to equilibrium flotation conditions. With the same numerical parameters, the simulation failed catastrophically after few time steps. The oscillation in this case get bigger and bigger and eventually shake the object violently.


Figure 1: Pressure below the ship for small and medium floatingObjects using interDyMFoam

I’ve made tests reducing the convergence tolerances to very low values (tolerance 1e-13, relTol 0). The oscillations increase a bit slower but I couldn’t get this case to converge with this solver.

There's a small video of the pressure oscillation for the Medium floatingObject here: video

Both test cases can be found here: floatingObject_NoPerturbation_Small.tar.gz
floatingObject_NoPerturbation_Medium.tar.gz

Next I came across the code of shipFoam in openfoam-extend version 1.6 (openfoam-extend/trunk/Breeder_1.6/shipHydrodynamicIG/applications/solvers/shipFoam1.6.2) by M. Couwenberg, febr 2009.

As this solver was made for openFoam version 1.6, it solves for total pressure and not for p_rgh. It also introduces a relaxation stage for the p field during the piso loop, which the author suggests helps reduce pressure instabilities. I though both this characteristics were promising.

I graved both this ideas and modified interDyMFoam into inaInterDyMFoam. As shipFoam ,this solves for total pressure and relaxes the p field (with a coefficient of 0.1~0.2). It also generates automatically the initial hydrostatic conditions for the p field from the alpha initial field (ensuring they are compatible before initiating the calculation). The new source code can be found here:

inaInterDyMFoam source code: inaInterDyMFoam.tar.gz

With this new solver I tested the “Medium” floatingObject again (after modifying the BCs and changing fvSchemes and fvSolutions the in other to account for the new methodology). Much to my surprise, all numerical oscillations vanished from the case!

The case can be found here: floatingObject_NoPerturbation_Medium_pTotal.tar.gz

However “Medium” floatingObject was not big enough (in relation to the chamber) to represent the ships I needed, so I’ve generated a “Large” floatingObject. This one is 0.80x0.80x0.32 m in size inside the 1x1x1 m chamber. Unfortunately, even with the same inaInterDyMFoam solver, pressure oscillation appear in this case after 40 timesteps or so, which increase in magnitude until the simulation is blown.

This last case can be found here: floatingObject_NoPerturbation_Large_pTotal.tar.gz

The oscillation of total pressure below the ship for both this case is as follow:


Figure 2: Pressure below the ship for medium and large floatingObjects using inaInterDyMFoam

I've finally tried once more refining the mesh, fidling with time steps, tolerances, correctors and time integration schemes with no success. I've also made some test with compresibleInterDyMFoam, but ultimately I found it just to slow to solve the problem I need (I've also came across numerical pressure oscillations with this solver, but that's another story!)


So, this is my problem! I publish this here in hope somebody has a better idea of how to deal with this instabilities. I know it should be posible to solve this problem but, right now I don't have many promising ideas as to how to move forward!

Thank you very much!

Nicolás Badano

Last edited by nbadano; November 11, 2010 at 12:04.
nbadano is offline   Reply With Quote

Old   November 11, 2010, 11:58
Default
  #2
New Member
 
Join Date: Oct 2010
Posts: 23
Rep Power: 15
afo3 is on a distinguished road
hello, I've tried to do something like your experiment, on movement of boats. (and I started too studing floatingObject tutorial)

I have a model of a ship, and I'm studing the advancing resistence ( and then if I can I will study see keeping).
I'm sorry I can't help you because stopping before.
I did a snappyhexmesh starting from the model in stl format. When compiling piontDisplacement, I declared the buondary of the ship as sixDoFRigidBodyDisplacement, but running the case I had the error

FOAM FATAL IO ERROR:
Unknown patchField type sixDoFRigidBodyDisplacement for patch type wall

what about your mesh?
do you have any idea to solve my problem?

anyway, another user (ralph m) gave me an alternative solution about ship motion.
it's the solver shipFoam, but it was developed for openfoam 1.6.2
we're working to make it running well on openfoam 1.7.1

if it can help you here the link :

http://openfoam-extend.svn.sourcefor...ydrodynamicIG/
afo3 is offline   Reply With Quote

Old   November 11, 2010, 12:13
Default Unknown patchField type sixDoFRigidBodyDisplacement for patch type wall
  #3
New Member
 
Nicolás Badano
Join Date: Sep 2010
Posts: 16
Rep Power: 17
nbadano is on a distinguished road
Dear asfo3,

Thank you for your reply. Make sure you add this lines at the end of controlDict:

Code:
libs
(
    "libOpenFOAM.so"
    "libincompressibleRASModels.so"
    "libfvMotionSolvers.so"
    "libforces.so"
);
libforces.so is the library containig the 6dof code and boundary conditions (sixDoFRigidBodyDisplacement).

Hope this helps!

Nicolas

PD: I've just finished writing my previous post. As you can now read there, i've given shipFoam some thought. If you want, give inaInterDyMFoam a try.
alia likes this.
nbadano is offline   Reply With Quote

Old   November 11, 2010, 17:15
Default
  #4
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 15
Ralph M is on a distinguished road
Hi Nicolas,

I'll have a look at your modified code tomorrow. I'm not an expert, but i recognize the pressure thing which makes it very hard to get a solution. Shipfoam is now running smoothly for a sailing ship (fn=0.3) which is free to trim and sink with a maxCo of 0.25. Maybe you should try shipFoam too?

Ralph
Ralph M is offline   Reply With Quote

Old   November 11, 2010, 17:58
Default
  #5
New Member
 
Join Date: Oct 2010
Posts: 23
Rep Power: 15
afo3 is on a distinguished road
Quote:
Originally Posted by nbadano View Post
Dear asfo3,

Thank you for your reply. Make sure you add this lines at the end of controlDict:

Code:
libs
(
    "libOpenFOAM.so"
    "libincompressibleRASModels.so"
    "libfvMotionSolvers.so"
    "libforces.so"
);
libforces.so is the library containig the 6dof code and boundary conditions (sixDoFRigidBodyDisplacement).

Hope this helps!

Nicolas

PD: I've just finished writing my previous post. As you can now read there, i've given shipFoam some thought. If you want, give inaInterDyMFoam a try.

thank you! the problem was in controlDict!
just a question about your problem: do you have some restricton about the chamber? I think you've done a very good work with the smaller case.
I will look at your inaInterDyMFoam and let you know!
afo3 is offline   Reply With Quote

Old   November 12, 2010, 08:31
Default
  #6
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 15
Ralph M is on a distinguished road
Hi Nicolas,

After compiling (which is performed without problems) and running of Allrun I got an error. Seems that the solver inaInterDyMFoam is not known?

I put the solver at openfoam171/applications/inaInterDyMFoam.

Cheers,

Ralph
Ralph M is offline   Reply With Quote

Old   November 12, 2010, 08:56
Default
  #7
New Member
 
Join Date: Oct 2010
Posts: 23
Rep Power: 15
afo3 is on a distinguished road
Quote:
Originally Posted by Ralph M View Post
Hi Nicolas,

After compiling (which is performed without problems) and running of Allrun I got an error. Seems that the solver inaInterDyMFoam is not known?

I put the solver at openfoam171/applications/inaInterDyMFoam.

Cheers,

Ralph
Ralph,
open the file "files" in make folder, delete all and copy this :

inaInterDyMFoam.C

EXE = $(FOAM_USER_APPBIN)/inaInterDyMFoam


save,then do wmake again.

hope it works! (worked with me)


Michele
afo3 is offline   Reply With Quote

Old   November 12, 2010, 09:05
Default
  #8
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 15
Ralph M is on a distinguished road
Yep, that's the trick! Thanks!
Ralph M is offline   Reply With Quote

Old   November 12, 2010, 10:34
Default
  #9
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 15
Ralph M is on a distinguished road
I've done two calculations with my version of shipFoam and with the inaInterDyMFoam. Same mesh and same BC (except voor the absence of epsilon/nut/etc) but shipFoam was stable while the other one diverged already soon (yes, again the pressure which is messing with the problem).

Nicolas, did you tried to run Shipfoam already?

Cheers,

Ralph
Ralph M is offline   Reply With Quote

Old   November 12, 2010, 12:30
Default
  #10
New Member
 
Nicolás Badano
Join Date: Sep 2010
Posts: 16
Rep Power: 17
nbadano is on a distinguished road
Thanks Ralph! The only thing different between both solvers is the way the ship movement ODEs are resolved. I'll try shipFoam right now and see if it solves my problem!

Regards!

Nicolas
nbadano is offline   Reply With Quote

Old   November 12, 2010, 13:54
Default
  #11
New Member
 
Nicolás Badano
Join Date: Sep 2010
Posts: 16
Rep Power: 17
nbadano is on a distinguished road
"Large" floatingObject seems to be running very well with shipFoam!! I still have to try it in my base problem, but I feel optimistic about that! I think the calculation of the ship's movement (custom made in shipFoam) makes all the difference. I'll let what results of my next few tests. Thank you very much Michelle and Ralph for your help!

shipFoam rules!

Best regards,

Nicolas
nbadano is offline   Reply With Quote

Old   November 12, 2010, 13:57
Default
  #12
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 15
Ralph M is on a distinguished road
We expect some colourful pictures in the next few days Nicolas!
Ralph M is offline   Reply With Quote

Old   March 4, 2011, 14:55
Default
  #13
New Member
 
Mark Beal
Join Date: Feb 2011
Posts: 24
Rep Power: 15
msbealo is on a distinguished road
Ralph,

I haven't got around to compiling shipFoam yet (as I only found it yesterday) but I have a problem with interDymFoam which shipFoam may or may not solve.

Firstly a made a case by combining floatingObject, WingMotion and damBreak to model a ship in a tow tank. As a simplification I initially used a 2 meter diameter sphere to act as my boat. This worked fine. I had it bobbing up and down in zero flow and causing bow waves at a Fn of about 0.5. However, when I replaced this sphere with a yacht hull things when pear shaped.

I am no longer able to run interDyMFoam in parallel (intel core i7), however I can run is as a single process. I did manage to run is with 2 processors but the solution became unstable after a little time. I see from other forum posts that this has been a problem, but I don't know if things have changed since these posts or what the solution is. I tried changing etc/controlDict comms to blocking as suggested but nothing changed.

Will shipFoam solve these issues? If so, how? Or will I still have to run shipFoam on a single processor.

Kind Regards,

Mark
msbealo is offline   Reply With Quote

Old   March 7, 2011, 17:48
Default
  #14
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 15
Ralph M is on a distinguished road
Hi Mark,

Sorry for my late reply, I've been busy with carnaval festivities for a couple of days. To answer your question: I really don't have a clue! If you can post the error message things might get more clear?
If not there is a theory which you might use: trial-and-error. Sometimes it works (and sometimes not)

Cheers,

Ralph
__________________
CFD for marine applications? Go to http://www.marinecfd.com/ and join the OF Ship Hydromechanics Group: http://www.cfd-online.com/Forums/gro...mechanics.html
Ralph M is offline   Reply With Quote

Old   March 8, 2011, 09:19
Default
  #15
New Member
 
Jordi Muela
Join Date: Mar 2011
Posts: 27
Rep Power: 16
jordi.muela is on a distinguished road
Hi everyone,

i'm new in OF and i have a question. I downloaded inaInterDyMFoam and compared the source-code with InterDyMFoam and i see the difference how it solves the pressure. I also have downloaded shipFoam and i have tried to understand how it works, and also have understood the difference solving the pressure.

Now the question: in shipFoam, i can see the physics how the solver solves the bodymotion, but i don't find info about how the patch 'sixDoFRigidBodyDisplacement' solves it. Where I can find the info? Can somebody make me a simple explanation of the differences?

My objective is do simulations of a buoy for obtain de added mass and damping coefficients in function of the oscillation frequency and i want to know which 'solver' is better for my purpose.

Thanks!
jordi.muela is offline   Reply With Quote

Old   October 15, 2021, 07:35
Default Floatingobject rigidbody
  #16
New Member
 
Join Date: Oct 2021
Posts: 1
Rep Power: 0
Pheu is on a distinguished road
[QUOTE=msbealo;297963]Ralph,

Hello Ralph, I am really new on OF I just got a version 2006 on those tutorial there is one for a floatingObject (interFoam/RAS) that works with a simple box. I try to change this for a STL file. I already try to change only setting relative to shape but when I get to run the solver (Interfoam as in the tutorial) it doesn't work.

I would like to have some advice

Thanks in Advance

Zeus

Last edited by Pheu; November 7, 2021 at 11:14. Reason: made some progress
Pheu is offline   Reply With Quote

Reply

Tags
6dof, instability, interdymfoam, pressure, shipfoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Pressure BC for combustion chamber Giuki FLUENT 1 July 19, 2011 12:35
Wild pressure fluctuations with InterDyMFoam wavytracy OpenFOAM Running, Solving & CFD 1 April 29, 2011 10:56
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 13:24
meaning of pressure Junseok Kim Main CFD Forum 6 September 4, 2004 07:09
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 16:00


All times are GMT -4. The time now is 23:45.