
[Sponsors] 
January 7, 2008, 06:33 
Hi all, I would like to simula

#1 
Member
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 9 
Hi all, I would like to simulate the movement of boatslike objects using OpenFoam, is it possible? Of course I think the answer is positive, but i can't find anything on the net. The problem is quite complex because it could be defined as liquidsolidgas case with free surface.
Can someone give me a hint of how to solve it using OpenFOAM? Thank you in advance Francesco B. 

January 7, 2008, 07:34 
Hi Francesco,
I am working

#2 
Senior Member

Hi Francesco,
I am working on ships and floating bodies in waves using OpenFOAM. You need: 1. Free surface (rasInterFoam) 2. Ocean wave model, or simple Stokes wave model for simulating experimental facilities such as a wave basin. 3. Nonreflective outflow BC's 4. Dynamic meshing to capture the relative motion between the object and the free surface. 5. Ability to resolve or model rudders and propulsors. 6. 6DOF solver to computer the trajectory of the object. In theory, it should be straightforward to stitch together mostly existing code. However, there are issues which must be addressed. E.g., I recently put together rasInterDyMFoam (rasInterFoam + icoDyMFoam), and am working through a few minor issues. Good luck, Eric 

January 7, 2008, 11:30 
Hi Eric,
>> You need:
>> 1

#3 
Member
Francesco Boschetto
Join Date: Mar 2009
Location: Italy
Posts: 56
Rep Power: 9 
Hi Eric,
>> You need: >> 1. Free surface (rasInterFoam) Ok >>2. Ocean wave model, or simple Stokes wave model for simulating experimental facilities such as a wave basin. I think I'll use a simple wave model, I'm not worried about this >> 3. Nonreflective outflow BC's How can I impose them? >> 4. Dynamic meshing to capture the relative motion between the object and the free surface. icoDynMFoam does it >> 5. Ability to resolve or model rudders and propulsors. For my earlier applications I don't have them >> 6. 6DOF solver to computer the trajectory of the object. I don't know which solver could be used in this case >> In theory, it should be straightforward to stitch together mostly existing code. >> However, there are issues which must be addressed. E.g., >> I recently put together rasInterDyMFoam (rasInterFoam + icoDyMFoam), and am working through a few minor issues. Can you suggest me how to perform this task? I'm quite new to OpenFoam, Thanks for your help Best Regards Francesco 

January 7, 2008, 12:30 
Hi Eric,
I did also try to

#4 
New Member
JeanLuc Pelerin
Join Date: Mar 2009
Posts: 21
Rep Power: 9 
Hi Eric,
I did also try to mix rasInterFoam and icoDyMFoam. Unfortunately, I was unable to get a convincing result. The first problem I encountered was : how to set the U values on boundaries equal to the rigid body velocity... Would it be possible you post your code? Thanks, Best regards, JeanLuc 

February 8, 2008, 18:54 
Hello all, this is my first po

#5 
New Member
Miguel Quintero
Join Date: Mar 2009
Location: Honolulu, HI, USA
Posts: 4
Rep Power: 9 
Hello all, this is my first post. I am still a beginner to openfoam. I have spent the past few weeks learning the program and using the interfoam solver to generate waves. I have put a box in the middle of my wave tank and I am trying to simulate wave motions of the box, I hope to implement a ship hull one I get the box to work. My question is, how to enable the box to move with the waves and extract the data in numerical form to show how much the box moves with the interaction (6 DOF)? I was also interested in asking, does openfoam adjust how the object will float through the metacentric height and center of gravity? Because I simply put the box in the tank and set fields to where I calculated the water line to be. Sorry for the long question, I am beginning and I am really interested in the program so I look forward to any and all advice.


February 8, 2008, 19:33 
Miguel,
I am also trying to

#6 
New Member
Michael Patterson
Join Date: Mar 2009
Posts: 2
Rep Power: 0 
Miguel,
I am also trying to get a numerical wave tank working, I seem to have got sidetracked trying to build some surface tracking routines that won't compile for me from OpenFOAMdev. Would you be willing to show me the initial/boundary conditions you have used for interfoam? Regards Michael 

February 8, 2008, 20:09 
Michael,
I am still new at

#7 
New Member
Miguel Quintero
Join Date: Mar 2009
Location: Honolulu, HI, USA
Posts: 4
Rep Power: 9 
Michael,
I am still new at all this. The best advice I could give at this point is to look at the forum below and download the the files for wave phase and wave velocity and then follow the directions for implementing them. Use the wavephase for the inlet of gamma and the wavevelocity for inlet of velocity. You must follow the directions from the mentioned forum on the wave tank on where to put the files. http://www.cfdonline.com/OpenFOAM_D...es/1/4248.html 

May 5, 2008, 00:31 
I was wondering if anyone coul

#8 
New Member
Miguel Quintero
Join Date: Mar 2009
Location: Honolulu, HI, USA
Posts: 4
Rep Power: 9 
I was wondering if anyone could give me some insight on how to combine rasInterFoam and icoDyMFoam? Advice, jounral articles, publications...? I have been struggling with this for some time and would love to hear where you found your information. Anything would help me at this point. Thanks in advance.
Miguel Q. 

May 5, 2008, 07:36 
Dear all,
Also I am interes

#9 
Senior Member
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 9 
Dear all,
Also I am interested in solving problems related to ship design and ship motions. So far I succeeded in solving a wave pattern of a boat sailing in calm water using interFoam. This already caused a lot of challenges with respect to boundary conditions, meshing, solver strategies, schemes settings etc. I am very curious if anyone also succeeded in this relatively simple task. I am still working on finalising this model, trying some more variations. Once I am satisfied, I will post some results and experiences here. The next step is indeed using dynamic mesh. Instead of a 6DOF solver I am firstly interested in a 2DOF solver: sinkage (displacement in Z direction) and trim (rotation around Y axis). This will be a next challenge. Not the math but the implementation in proper code. Any experience here already? Once I am able to solve problems in calm water, taking a seaway into account is next. However I am currently focussing on the first two points. With respect to propulsors and appendages: I am also conducting calculations regarding this. However, this involves more detailed investigations instead of full ship/water interactions. I am working on some models were I modelled the propeller using the actuator disk theory in order to investigate propeller/hull interaction. I am confident that such models could be coupled to interFoam models, however it makes models needlessly large in my opinion. In short: I am slowly progressing in solving wave patterns/wave resistance of ships sailing in calm water and I am very curious if anyone has experience in this already. brgds, Mark 

May 16, 2008, 10:25 
Jaswi,
I will be happy to m

#10 
Member
Quinn Tian
Join Date: Mar 2009
Posts: 62
Rep Power: 9 
Jaswi,
I will be happy to make some contribution to our forum. Since this is a 3d bump, the mesh size is too big. I am not sure that we can include such information in the test case. If you don't think that will be a problem, I will be glad to work on a test case. Quinn 

May 16, 2008, 12:00 
Hi Mark,
I am following thi

#11 
Senior Member
Alexandre Pereira
Join Date: Mar 2009
Posts: 155
Rep Power: 9 
Hi Mark,
I am following this topic with interest... Just tell me, how do you plan to solve for the generalized equations of motion of the boat...? From the dynamic pressure from water you get moments and forces in respect to the CG of the boat, but how do you plan to model the rigid body dynamics? ...a full set of six rotational and translational springs and dampers with properly chosen constants might be an idea, but how do you couple it with a dynamic mesh in OpenFOAM...? Also, since a boat has a complex shape, and its metacentric height changes in a non linear way with the angle of roll, and furthermore depends on the other DOF... i guess that some kind of nonlinear second order differential integrator might be required... I am currently trying to solve such a problem in ADINA... but if one wants to be exact in the CFDRBD modelling, well... it is not easy... ... BTW, how the heck did those japs built the Yamato warship, and the Zuikaku and Shokaku carriers without ever dreaming of CFD analysis...? ... just the thought of it makes an engineer feel rather small... :) brgds Alex 

May 21, 2008, 09:34 
Hi ppl
I have started to co

#12 
Senior Member
Alexandre Pereira
Join Date: Mar 2009
Posts: 155
Rep Power: 9 
Hi ppl
I have started to code a 6 DOF differential stiff solver with automatic time stepping and error estimation. I is supposed to solve the a rigid motion problem of a body immersed in a fluid ( compute the generalized displacements of its CG in absolute inertial frame, in response to a set of time varying set of forces/moments applied to its CG ) It will use a single step 4th order Runge Kutta integrator with error estimation to compute the n initial values of displacement, coupled to a 4th order Gear multistep predictorcorrector integrator to continue the integration through the rest time period, reducing iteration workload compared to RungeKutta. My issue is: How can i integrate this solver within the framework of OpenFOAM? How do i couple the calculated displacement with the dynamic mesh change, so as to update the position of my floating object within the boundaries of gamma<1 ( ztranslation, roll, trim, and pitch rotations ? ) Thanks in advance Alex 

May 21, 2008, 09:57 
Hi Alex,
Have a look at thi

#13 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22 
Hi Alex,
Have a look at this video: http://powerlab.fsb.hr/ped/kturbo/Op...ngCylinder.mpg I take it this is something you are after... Have a look at the dev SVN repository and you will find most components ready for you, inculding an ODE solver and a 6DOF ODE class. What remains is a moving deforming mesh VOF solver, force calculation and coupling. I think Eric Paterson is preparing the case I've shown you as a tutorial for the Milan Workshop  this would presumably mean all the files and solvers will be given away. To summarise, main components are:  moving mesh VOF solver  dynamic moving mesh class which  identifies moving surface  calculates forces on the body  contains a 6DOF ODE and solver for those forces  uses automatic mehs motion to deform the mesh We have actually gone further and protected cell layers close to the solid body, used mesh subset to minimise the cost of mesh deformation solver, integrated motion accuracy to second order (mean velocity and rotation) etc, but this is the basic setup. (people who contributed but didn't get a mention, please accept my apologies: this is joint work and I'm not trying to take all the credit). Hope this helps, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

May 21, 2008, 10:16 
Thanks Hrv
I will give a lo

#14 
Senior Member
Alexandre Pereira
Join Date: Mar 2009
Posts: 155
Rep Power: 9 
Thanks Hrv
I will give a look at that. brgds Alex 

May 21, 2008, 13:20 
Hi
That vid is amazing Hrv.

#15 
Senior Member
Alexandre Pereira
Join Date: Mar 2009
Posts: 155
Rep Power: 9 
Hi
That vid is amazing Hrv... awesome... :) Just tell me, how do you model Archimedes impulse...? As a nonlinear spring attached from the cylinder to the global reference frame, or do you really integrate the displacement volume above a prescribed (... say 0.99 ) beta threshold, and integrate the z displacement in the ODE class... ? Doing it in Z, and YPR rotational coordinates is rather highly nonlinear due to coupling effects, and the very nature of a Boat geometry ( nonlinear variation of metacentric height with roll angle... etc ) ... In my best days, i can TRY to write such a piece of code in Fortran 95... no classes, no data abstraction, no polymorphism or virtual methods... duh :( ... ... should have invested in c++ instead of Fortran... Do you believe that a couple of weeks ago i did not knew what a class was... ? ... I realy am a long way of understanding how OpenFOAM works... Nice work ... awesome... :) Alex 

May 21, 2008, 16:02 
Why don't you drop me an Emai

#16 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22 
Why don't you drop me an Email  let's talk about it...
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk 

June 18, 2008, 10:53 
Hi All,
Here some first res

#17 
Senior Member
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 9 
Hi All,
Here some first results/experiences of a boat modeled free sailing, using interFoam. The domain consists of the SB half of a boat. Water domain is calm water, no waves, so actually steady state. Domain is tet mesh with a finer distribution near water surface and boatÅ› hull. Number of elements appr 280K. The boat is sailing appr at its hull speed, appr Froude number = 0.4. The wave profile is more or less visualized below by plotting all elements with gamma>0.5: The hull is colored by pressure results. I experienced a lot of problems with stability. This is probably partly caused by the fact that the model is tetmeshed, though checkmesh gives nil errors/warnings. At this moment I do not have the tools to (at least partly) mesh the domain with hexagon so I had no opportunity to investigate this further. Furthermore the solver and schemes settings are important. The files are given below. files.zip Especially the relaxationFactors appeared crucial, besides using upwind on div scheme. I still have one corner with a too high velocity, see picture below. Note that boat speed is 5 m/s, while one cell in the corner gets upto 11 m/s. Such velocity spikes always occurred just above the water surface on the boundaries and often in corners. However with the presented settings solution was stable. One issue I do not feel comfortable about is the fact that the solution in fact is still not converged. The number of iterations needed is not decreasing anymore. Below the last solution step from the solver log is presented: " MULES: Solving for gamma Liquid phase volume fraction = 0.890947 Min(gamma) = 9.21406e19 Max(gamma) = 1 MULES: Solving for gamma Liquid phase volume fraction = 0.890947 Min(gamma) = 1.46065e19 Max(gamma) = 1 MULES: Solving for gamma Liquid phase volume fraction = 0.890947 Min(gamma) = 3.5428e19 Max(gamma) = 1 MULES: Solving for gamma Liquid phase volume fraction = 0.890947 Min(gamma) = 1.9693e18 Max(gamma) = 1 smoothSolver: Solving for Ux, Initial residual = 7.38197e05, Final residual = 2.63128e07, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.000170614, Final residual = 8.25023e07, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 0.000814927, Final residual = 2.51264e07, No Iterations 3 GAMG: Solving for pd, Initial residual = 0.0166, Final residual = 7.92732e07, No Iterations 8 GAMG: Solving for pd, Initial residual = 0.00488644, Final residual = 7.28804e07, No Iterations 7 GAMG: Solving for pd, Initial residual = 0.00161011, Final residual = 9.83858e07, No Iterations 5 time step continuity errors : sum local = 4.67858e10, global = 2.57875e11, cumulative = 6.93357e07 ExecutionTime = 53492.3 s ClockTime = 53522 s " Can anyone comment on this? How should I make the solution converge to nil iterations? Maybe the mesh is still too coarse? The next steps will be:  investigate pressure integration results over the hull and compare with wave resistance.  make iterations around changing of boat position in the water due to trim and sinkage. For this, integration of boat hull over water volume (gamma > 0.5) is necessary and next, hull needs to be moved/rotated according these results (moving/deformed mesh?)  investigate application of moving mesh to follow wave pattern. It would be great to capture the interface by moving a certain mesh layer at gamma = 0.5 (e.g.). Hrv / Alex, do I understand right: are tools already available to perform the latter 2 steps? Topics in this forum thread are amongst others about 6 dof solvers taking dynamics into account in which I am very interested. However, I have not seen any attempt yet with a simple (but real) boat geometry modelled with a commercial mesher (tet) sailing in calm water (steady state). I am very curious about other peoples experiences in these relatively simple tasks before moving to the next steps. Awaiting any comments, Brgds, Mark 

June 18, 2008, 12:07 
Mark,
I would recommend tha

#18 
Senior Member

Mark,
I would recommend that you take a look at my wigley hull case: http://idisk.mac.com/egpatersonPublic/wigley.tar.gz It is similar to what you are doing and runs OK with the standard rasInterFoam solver. Eric 

June 18, 2008, 14:22 
Hi Mark,
Impressive your re

#19 
Senior Member
Alexandre Pereira
Join Date: Mar 2009
Posts: 155
Rep Power: 9 
Hi Mark,
Impressive your results, :) Acoording to Hrv, OpenFOAM includes a 6 DOF solver class, it can be used to integrate the rigid body motion in CP fixed inertial frame from calculated Forces/moments obtained from pressures over the hull, but i guess that updating the buoyacy forces due to relative motion of the waterplane won't be an easy task... what geometric description do you have of the hull surface? one approach might be to integrate the displacement volume above beta=.99 so as to try to relocate the metacenter and feed the free body force system to teh equations to be solved in the ODE solver... Just an idea here... didn't think much about the issue yet... and there are issues of stiffness in the differential equation system in the ODE solver : I antecipate they will be highly nonlinear, what is the ratio of orders of magnitude of the boat's self motion velocity ( periods of roll and trim ) compared to the speed of free surface flow...? That must also be taken care of... i guess... Nice work though... :) brgds Alex 

June 18, 2008, 20:49 
Hi again Mark
I have run yr

#20 
Senior Member
Alexandre Pereira
Join Date: Mar 2009
Posts: 155
Rep Power: 9 
Hi again Mark
I have run yr model. do you have any idea where i may learn a suitable wave model to impose on the inlet, and a non reflective BC to impose on the outlet ? I think that a rather interesting phenomenon to be simulated with rigid body motion update, might be the resonance of wave period with vertical hull motion period, considering that the hull length is short compared to wave length... ...should be interesting to say the least... :) Ever heard of what happened to a battleship, from KuK ( Koenigliche und Kaiserliche ) marine in WW1...? BTW why didn't you use a single inlet patch with funkySetFields to account for water level at inlet...? Does one really need two inlet patches...? Just one more thing, which mesher did you use...? brgds Alex 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
simulate the movement of boats  Francesco B.  Main CFD Forum  0  January 7, 2008 05:00 
Do small boats slow big boats?  Richard Scott  Main CFD Forum  13  August 3, 2004 03:51 
Performance Boats and CFD  BoatDesigner  Main CFD Forum  0  April 16, 2004 15:24 
movement  stk  Phoenics  0  March 19, 2004 11:53 
Sun Movement  Leon Mills  Phoenics  2  July 24, 2003 03:50 