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

Free Surface Ship Flow

Register Blogs Community New Posts Updated Threads Search

Like Tree31Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2011, 05:40
Default
  #121
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
Hi Vincent,

Are you using snappy to do the meshing?

I'm still getting those waves around the hull and in the wake, even with a finer mesh (1.3M cells).

My residuals don't go down at all, they remain flat at around 5e-2. Is that something to be worried about ?

Regards,

Ben
bouclette is offline   Reply With Quote

Old   August 2, 2011, 05:58
Default
  #122
Senior Member
 
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17
pablodecastillo is on a distinguished road
Hi Ben and Vincent,

Can you post your fvsolutions and fvschemes dictionaries?? Sometimes, depends the mesh i got the ugly waves around the hull, but never in all the domain (allways i runned with interFoam).
pablodecastillo is offline   Reply With Quote

Old   August 2, 2011, 06:07
Default
  #123
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
Hi Pablo,

Here are the 2 files plus a pic of the latest I get. This run was with interFoam to see if it makes an difference. Doesn't seem to.

I will try with more refinement at hull surface to see if that makes a difference...

Regards and thanks a lot for your help.

Ben
Attached Images
File Type: jpg Pic4.jpg (55.6 KB, 143 views)
Attached Files
File Type: txt fvSchemes.txt (1.4 KB, 110 views)
File Type: txt forceCoeffs.txt (1.5 KB, 84 views)
bouclette is offline   Reply With Quote

Old   August 2, 2011, 06:17
Default
  #124
Member
 
s.rasoul_varedi
Join Date: Feb 2010
Posts: 82
Rep Power: 15
desert_1250 is an unknown quantity at this point
Send a message via Yahoo to desert_1250
Hi foamers, i hope that you are well,
i try to add dynamic mesh motion to one solver. used this link :
http://www.cfd-online.com/Forums/blo...foam-code.html

but when i compile it with wmake, this error apears :
'correctPhi' was not declared in this scope

i used OF-1.5-dev

tanx
_______
Rasoul
desert_1250 is offline   Reply With Quote

Old   August 2, 2011, 08:04
Default
  #125
New Member
 
Ippokratis
Join Date: Nov 2010
Location: Athens, Greece
Posts: 13
Rep Power: 16
chripp is on a distinguished road
Hello!

bouclette and vince_44 what did you use for meshing? SHM? If so can you upload the dict file so i can test bouclette's case with some other ship?

Thanks!
chripp is offline   Reply With Quote

Old   August 2, 2011, 08:13
Default
  #126
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
Hi there,

Hereś my sHM dict file.

I'm trying now using blockMesh to refine everything and only use snapping of sHM to see if it helps...

Regards,

Ben
Attached Files
File Type: txt snappyHexMeshDict.txt (10.6 KB, 76 views)
bouclette is offline   Reply With Quote

Old   August 2, 2011, 08:38
Default
  #127
New Member
 
Ippokratis
Join Date: Nov 2010
Location: Athens, Greece
Posts: 13
Rep Power: 16
chripp is on a distinguished road
Thanks a lot Ben!

I'll try it later and let you know!

As for the blockMesh changing the mesh density and simpleGrading only affects the mesh quality. I attach the blockmesh and SHM files that worked fine for a full scale tanker i'm running so you can check them out.

Hope that helps!

Best regards
Ippokratis
Attached Files
File Type: zip Mesh.zip (4.4 KB, 79 views)
chripp is offline   Reply With Quote

Old   August 2, 2011, 10:00
Default
  #128
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
Hi All,

So I've made a mesh with the refinement in blockMesh and only snapping in sHM (+ level1 refinement on hull) and it seems that it has gotten rid of those parasitic waves. There are still some little ones near the hull where I guess sHM messed up my nice structured blockMesh but I can't do much about that I think( maybe reduce nCellsBetweenLevels to 1 ?) .

Here's a shot of the run (interFoam) after 6s (so not converged yet) and a shot of a closeup of the mesh.

I've made the blockMesh refinement so that the cells are close to a cube shape at the hull and stretched away from it.

Mesh is around 650k cells. CheckMesh reports a max skew of 3.38 (higher than what I had using sHM refinement) and max non orthogonality 59.4 and average 3.25. I can post the full mesh report if anybody is interested.

Thanks very much for all the help.

Regards,

Ben
Attached Images
File Type: jpg Pic5.jpg (42.9 KB, 227 views)
File Type: jpg Pic6.jpg (90.8 KB, 212 views)
bouclette is offline   Reply With Quote

Old   August 2, 2011, 10:21
Default
  #129
New Member
 
Ippokratis
Join Date: Nov 2010
Location: Athens, Greece
Posts: 13
Rep Power: 16
chripp is on a distinguished road
Hi Ben!!

That is soo nice! Well done!

I'm interested in the mesh report!

I tried to run the case you posted before and in the shm i got a missing groovybc files error. What's wrong? How do i install it?

Also can you post the complete final case folder you did? I would really appreciate it!

Thanks!
chripp is offline   Reply With Quote

Old   August 2, 2011, 10:31
Default
  #130
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
Hi Ippokratis,

I'm running the case until the forces stabilize and if its still fine by then, I will post the files but without the stl because it is way too big.

I still haven't tried with extra layers on the hull so maybe that will be another issue later...

I will also try with LTSInterFoam to see if there is any difference.

Regards,

Ben
bouclette is offline   Reply With Quote

Old   August 3, 2011, 09:32
Default
  #131
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
Hi All,

I've refined the mesh to about 1.1M cells to see if it was still working and, after some tweaking, it now runs stable without those parasitic waves anymore. Meshing is definitely the most critical part.

I tried to add surface layers to the hull in order to get a better friction drag value but the mesh ended up being too crap to make the solver to work. It blew up after about 1000 iterations both with LTSInterFoam and interFoam.

I'm attaching the files of the case although they are pretty much the same as the ones in the tutorials and also a pic of the run at 7s (interFoam).

Anybody has a trick on adding clean surface layers to hulls? They fail to extrude mostly around the bow but also randomly along the hull... Any magic settings in sHM?

Next step is to have free sink and trim (2DoF). which tutorials should I study for that?

Regards,

Ben
Attached Images
File Type: jpg anim.0028.jpg (42.8 KB, 176 views)
Attached Files
File Type: txt controlDict.txt (1.5 KB, 124 views)
File Type: txt fvSchemes.txt (1.4 KB, 135 views)
File Type: txt fvSolution.txt (2.2 KB, 133 views)
File Type: txt snappyHexMeshDict.txt (10.6 KB, 96 views)
bouclette is offline   Reply With Quote

Old   August 3, 2011, 09:34
Default
  #132
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
I'm also posting some shots of the mesh.

For sure it can be optimized better than this...

B.
Attached Images
File Type: jpg Pic9.jpg (98.5 KB, 191 views)
File Type: jpg Pic10.jpg (92.5 KB, 157 views)
File Type: jpg Pic11.jpg (89.5 KB, 151 views)
bouclette is offline   Reply With Quote

Old   August 3, 2011, 10:10
Default
  #133
New Member
 
Ippokratis
Join Date: Nov 2010
Location: Athens, Greece
Posts: 13
Rep Power: 16
chripp is on a distinguished road
Hi there again!

I see you're doing some good work there!

Can you post the blockMeshdict as well?? I want to check what you did with the grading cause i'm having troubles with it.

Thanks!
chripp is offline   Reply With Quote

Old   August 3, 2011, 15:23
Default
  #134
Senior Member
 
Dave
Join Date: Jul 2010
Posts: 100
Rep Power: 16
daveatstyacht is on a distinguished road
Ben,
Good work getting it to run. My experience with sHM (in 1.7.1 mind you) is that it can't seem to produce a good boundary layer mesh for a hull particularly as you have found near the bow. Relative size=true seems to be a little more robust but obviously it is becomes very difficuly then to size (particularly because it is sensitive to the local mesh size from what I can tell). For tutorials for getting familiar with the 6dof solver the pitching wing tutorial under pimpleDyMFoam is not a bad place to start. Alternatively, in interDyMFoam there are som sloshing tank tutorials but I think the pitching wing one is a little more clear what every thing is doing. My experience with interDyMFoam has never been particularly satisfying since it tends be more difficult to make a stable run on a fine mesh.
daveatstyacht is offline   Reply With Quote

Old   August 3, 2011, 15:39
Default
  #135
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
Hi Dave,

Thanks for the response. Indeed sHM seems to be a real pain to get it to make clean surface layers... I've been trying to do this for a simple wing and couldn't get it to mesh properly although it was doing a great job for a rectangular section. the refineWallLayer doesn't seem to do a much better job although I haven't tried it for a hull...

As for the dynamic stuff, my goal would be to run dynamic on a coarse mesh in order to get the sailing trim / sink of the yacht and then do a fixed run with the hull trimmed correctly.

I've been doing the wingMotion tutorial as well as the floating body one. Not everything is clear and there isn't much documentation about it but hopefully I'll figure out what to do.

I'm not very clear with the pointDisplacement file, especially with the orientation matrix, the fixedAxis and fixedLine things. Could you enlighten me on that? I want free Ry and Tz with all the rest fixed.

I have taken pointDisplacement file directly from the wing motion tutorial and modified it to suit but not quite sure on my actions... And the motions constraints are not set at all yet...

Btw, attached is the blockMesh file.

Regards,

Ben
Attached Files
File Type: txt blockMeshDict.txt (3.4 KB, 78 views)
File Type: txt pointDisplacement.txt (2.6 KB, 81 views)
bouclette is offline   Reply With Quote

Old   August 3, 2011, 16:41
Default
  #136
Senior Member
 
Dave
Join Date: Jul 2010
Posts: 100
Rep Power: 16
daveatstyacht is on a distinguished road
Ben,
Although it has been a while since I touched interDyMFoam. I seem to recall that fixedLine constraint is allowing translation movement only along that axis (in your case heave). The refpoint defines the point of the object that is actually constrained to move along that axis (since other points must move in other axes if rotation is to occur). Presumably you would want to match this to your LCG unless you were trying to match the attachment point of a tow tank. The fixedAxis constraint only allows rotation about that axis (presumably you will want (0 1 0) for trim). There are other constraint types that allow multiple directions of motion (I think Plane was the one for motion in a plane, but I can't remember the other options off hand).

As an aside, if you are attempting to replicate the running trim of a sail boat, don't forget the trim moment of the sail which require you to either modify things to apply a moment equivalent to the driving force acting at the center of effort or to estimate your resistance before hand and modify your LCG to replicate the moment (how tow tanks often approximate it).
daveatstyacht is offline   Reply With Quote

Old   August 4, 2011, 02:37
Default
  #137
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
UPDATE: I found the reason for that error message: I was missing a library in the controlDict file... Seems to be running ok so far.

Hi Dave,

Thanks for your post, it made things clearer. I will apply a sails trimming moment at a torque since it seems to be possible in the pointDisplacement file.

I am running into a problem now: it seems that the patchFields used by interDyMFoañ are not the same as for other dynamic solvers. Here is the error msg I am getting:
Code:
--> FOAM FATAL IO ERROR: 
Unknown patchField type sixDoFRigidBodyDisplacement for patch type wall

Valid patchField types are :

23
(
angularOscillatingDisplacement
angularOscillatingVelocity
calculated
cyclic
cyclicSlip
empty
fixedNormalSlip
fixedValue
mixed
nonuniformTransformCyclic
oscillatingDisplacement
oscillatingVelocity
processor
processorCyclic
slip
surfaceDisplacement
surfaceSlipDisplacement
symmetryPlane
timeVaryingUniformFixedValue
uniformFixedValue
value
wedge
zeroGradient
)
So it looks like both fixedAxis and fixedLine are not an option in that solver... Any idea why?

Here's my pointDisplacement file.

Regards,

Ben
Attached Files
File Type: txt pointDisplacement.txt (2.7 KB, 38 views)

Last edited by bouclette; August 4, 2011 at 11:21.
bouclette is offline   Reply With Quote

Old   August 4, 2011, 16:00
Default
  #138
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
Ok,

I managed to make my case run but, after 1s, it seems that only sink is "working". It is sinking a lot at the beginning then bounces back up and looks like it will eventually stabilize somewhere although I haven't carried on solving because it is going very slowly.

Looking at the angular motions, they are all very small (between 1e-6 and 1e-13) but always the trim axis (y) has much lower value than the 2 others. I think that trim isn't solved at all in fact.

I have tried inverting the fixedAxis fields to see if that made some changes but it wouldn't run, telling me that it has reached the maxIterations value (set to 500 but even set to 5000 doesn't work)... Bellow a typical print of motions:
Linear velocity: (3.89761584351e-13 -3.50710150586e-14 -0.319708649006)
Angular velocity: (-6.33825536553e-06 1.42023324474e-12 -1.26833537355e-06)

I will try to fiddle around more to see if I can get something out of it (add damping) but if you guys have some suggestions on what to improve, it would be greatly appreciated!

Attached are the relevant files.

Ben
Attached Files
File Type: txt pointDisplacement.txt (2.7 KB, 46 views)
File Type: txt controlDict.txt (1.5 KB, 38 views)
File Type: txt fvSchemes.txt (1.4 KB, 32 views)
File Type: txt fvSolution.txt (3.5 KB, 25 views)
bouclette is offline   Reply With Quote

Old   August 5, 2011, 09:43
Default
  #139
Senior Member
 
Dave
Join Date: Jul 2010
Posts: 100
Rep Power: 16
daveatstyacht is on a distinguished road
Ben,
Looking at your pointDisplacement file you appear to have 2 fixedAxis. When I did free to heave and trim it was with one fixed axis with the axis as (0,1,0). The fixedAxis specifies the axis about which you want freedom of rotation. Likewise the fixedLine specifies the axis you want translational freedom. By sepecifying 2 fixedAxis I believe you have effectively contrained all of the rotational degrees of freedom. You will probably want to add dampening, particularly for trim if you are not concerned with sea keeping since I always found trim to be particularly sensitive.
As an aside, looking at your fvSolution, you may want to slightly underrelax U but if it runs stably as is then no point slowing your convergence down.
Regards,
Dave
daveatstyacht is offline   Reply With Quote

Old   August 5, 2011, 12:30
Default
  #140
Member
 
Ben Vernieres
Join Date: Jul 2011
Location: Valencia, Spain
Posts: 42
Rep Power: 15
bouclette is on a distinguished road
Send a message via Skype™ to bouclette
Hi Dave,

I have corrected this after posting last night. I was thinking these constraints would lock the motion and not free it...

I have also added a lot of damping because case would crash due to extreme sink rate.

I still can get it to have a decent sink / trim speed so it is still crashing, but after a bit longer now.

Am I getting someting wrong with the units? The mass should be he half hull displacement in kg right? I've put some quite random numbers for the inertia but that is probably not too much of an issue as long as they are not 0 ?

I will reduce a bit the relaxation factors, maybe it'll help.

Did you manage to obtain some reasonable convergence speed with this or was it very slow? Maybe my plan of running a coarse mesh in interDyMFoam and then a finer one at corrected trim / sink with LTSInterFoam or interFoam is flawed?

Regards,
Attached Files
File Type: txt pointDisplacement.txt (3.1 KB, 58 views)
bouclette is offline   Reply With Quote

Reply


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
Free-Surface Ship Flow - Boundary Conditions James Date CFX 1 February 19, 2013 06:42
ship free-surface analysis Andrea Mercuri Siemens 0 September 28, 2004 12:01
Free Surface Flow for Ship sam FLUENT 6 October 24, 2003 06:29
viscous free surface flow past a ship hull lololo Main CFD Forum 0 June 13, 2002 00:02
meshing for surface ship flow boris FLUENT 0 April 24, 2002 21:27


All times are GMT -4. The time now is 21:14.