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 16, 2011, 13:20
Default
  #161
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 Ralph,

I've been trying to install OF 1.6 on my machine but it seems that is is a complicated task with Ubuntu 11.04...

Is there a way to have shipFoam working on OF1.7 at all ?

Regards,

Ben
bouclette is offline   Reply With Quote

Old   August 16, 2011, 15:02
Default
  #162
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
Bonjour Ben,

Theoretically you just have to rewrite shipFoam to shipFoam for OF1.7 by changing the pressure terms from p or pd to p_rgh. I tried that but probably messed up the code too much.

Isn't it possible for you to download OF1.6 and install it by using the command "wmake" for the different solvers? Should work I'd guess!

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   August 16, 2011, 15:18
Default
  #163
Senior Member
 
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17
pablodecastillo is on a distinguished road
Quote:
Theoretically you just have to rewrite shipFoam to shipFoam for OF1.7 by changing the pressure terms from p or pd to p_rgh
, and work with "gh" and "ghf", and modify gravity term in pEqn.H, but remember do not change "p" when evaluate forces in forcesCalc.H.

There is a program under linux to compare files/folders, the name is "Diff Meld", with this one it is not dificult to compare interFoam or interDyfoam with shipFolam and learn how you must do it.

Pablo
pablodecastillo is offline   Reply With Quote

Old   August 16, 2011, 16:18
Default
  #164
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
Thanks Ralph, Pablo,

If I am to go into the files and modify them, I might just give it a try for OF2.0 don't you think?

Regards,

Ben
bouclette is offline   Reply With Quote

Old   August 17, 2011, 02:46
Default
  #165
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
Quote:
Originally Posted by pablodecastillo View Post
, and work with "gh" and "ghf", and modify gravity term in pEqn.H, but remember do not change "p" when evaluate forces in forcesCalc.H.

There is a program under linux to compare files/folders, the name is "Diff Meld", with this one it is not dificult to compare interFoam or interDyfoam with shipFolam and learn how you must do it.

Pablo
I should have consulted this forum before I started working around in shipFoam

Ben; I think that OF1.7 and 2.0 are using the same terms. The reason that the original shipfoam is not working for OF1.7 and up is that for OF1.6 the pressure terms were different. Hopefully the OpenCFD-guys will keep all the terms the same so that we can use our modified solvers for a long long time!

Let me know if you have any questions about shipFoam; I'm willing to assist in rewriting the code. Contact me by PM.

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   August 30, 2011, 11:14
Default
  #166
New Member
 
Luc Bordier
Join Date: Feb 2010
Posts: 11
Rep Power: 16
lbordier is on a distinguished road
Hi shipfoamers,

I give a try using shipfoam with openFOAM 2.0.x.
I got into trouble because of the pimple loop but i finally succeed to make it work with the former piso loop. (surely not a clean way to do it).

The application seems to be running (without any real validation compared to 1.7 so far), but now i wonder if it's possible to use it with combined dynamicFvMesh for boat displacement and dynamic mesh refinement.

How can i specify the options for both features in the dynamicMeshDict ?

Does anyone has an exemple or guideline to have both features in a same simulation ?

Thanks.
lbordier is offline   Reply With Quote

Old   August 30, 2011, 14:53
Default
  #167
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
Hello Luc,

You can see some examples for both dictionaries (placed under "constant") below. I think there might also some tutorials for moving meshes.

An explanation of the shipDict-file can be found in the shipFoam folder (which is compiled with wmake)

Good luck!

dynamicMeshDict example

Code:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object motionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
//solver laplacian;
solver velocityLaplacian;
//diffusivity uniform;
// diffusivity directional (1 200 0);
// diffusivity motionDirectional (1 1000 0);
// diffusivity inverseDistance 1(Heavy);
// diffusivity file motionDiffusivity;
diffusivity quadratic inverseDistance 1(hull_OBJECT);
// diffusivity exponential 2000 inverseDistance 1(hull_OBJECT);
// ************************************************************************* //
shipDict example
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object shipDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
startUpdate 15; //was 5
weightFactor ( 1 2 1 );
springCoeffUpdateInterval 25; //was 25
//writing of additional text file with motion path of CoG
writeCoG yes;
writeInterval 5;
bodies
{
hull_OBJECT
{
aMax 10;
CoG ( 0.137 0.0 -0.1);
bodyRotation (0 0 0); //rotation of motion patch local coordinate system in degrees

//Translation parameters
calcTranslationDOF (0 0 1);
initialVelocity (0 0 0);
constantForce (0 0 0);
mass 35.5;
linearDamping (0 0 0 );
linearSpring (0 0 0);

//Rotation parameters
calcRotationDOF (0 0 0);
initialRotationSpeed (0 0 0);
constantMoment (0 0 0);
momentOfInertia (10 5 10);
linearDamping_rot (0 0 0);
linearSpring_rot (0 0 0);
}
}
//Parameters for Ordinary Differential Equations
ODECoeffs 
{
ODESolver RK;
eps 0.0001;
hEst 0.5;
}
 
// ************************************************************************* //
__________________
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   August 31, 2011, 04:20
Default
  #168
New Member
 
Luc Bordier
Join Date: Feb 2010
Posts: 11
Rep Power: 16
lbordier is on a distinguished road
Hello Ralph,

Thanks for your help.

I guess I'm missing something. I wonder if I can use the dynamicRefineFvMesh within shipFOAM.

So if I undserstand well the refinement settings have to be written in the dynamicMeshDict in a same way than the mesh displacement properties.

My problem is that, if I want to have the mesh displacement fo the boat I have to write in the dynamicMeshDict :

Code:
dynamicFvMesh    dynamicMotionSolverFvMesh;
... followed by the dynamic motion options

But if I want to use dynamic remeshing, I have to write in the dynamicMeshDict :

Code:
dynamicFvMesh    dynamicRefineFvMesh;
... followed by the dynamic refinement options

Writting the two former settings in the same dynamicMeshDict seems not to work, only the dynamic motion seems to be performed.

How can I have the two of them working together (if possible) ?

Thanks.
lbordier is offline   Reply With Quote

Old   August 31, 2011, 04:36
Default
  #169
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
Hello Luc,

I'm sorry, I missed your point in your previous post.... I guess I was a bit tired yesterday. Unfortunately I have no experience with the mesh refinement option!

Regards,

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   August 31, 2011, 04:45
Default
  #170
New Member
 
Luc Bordier
Join Date: Feb 2010
Posts: 11
Rep Power: 16
lbordier is on a distinguished road
Thanks anyway.
I'll ask on a new thread in case someone could have a solution.
lbordier is offline   Reply With Quote

Old   October 20, 2011, 09:58
Default
  #171
Member
 
vincent
Join Date: Apr 2011
Posts: 45
Rep Power: 15
vince_44 is on a distinguished road
Hello

I try to run InterDyMFoam but I have the following error message:

"Restraint verticalSpring: attachmentPt - anchor (0 -12.5 -1) spring length 12.539936204 force (-0 12.5 1) moment (0 0 0)
Restraint axialSpring: angle 0 force (0 0 0) moment (-0 -0 -0)


--> FOAM FATAL ERROR:

Maximum number of sixDoFRigidBodyMotion constraint iterations (50000) exceeded.


From function Foam::sixDoFRigidBodyMotion::applyConstraints(scal ar deltaT)
in file pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C at line 134.

FOAM exiting
"

I attache my pointDisplacement file.

Any idea?

Sheers

Vincent
Attached Files
File Type: txt pointDisplacement.txt (3.8 KB, 32 views)
vince_44 is offline   Reply With Quote

Old   October 21, 2011, 07:01
Default
  #172
Member
 
vincent
Join Date: Apr 2011
Posts: 45
Rep Power: 15
vince_44 is on a distinguished road
Hi all

I change my pointDisplacement file for only have a pitch movement. I haven't the error message but after 2 or 3 iteration, the interDyMFoam crash.

What's wrong?

Vincent
Attached Files
File Type: txt pointDisplacement.txt (3.9 KB, 35 views)
vince_44 is offline   Reply With Quote

Old   November 22, 2011, 05:52
Default
  #173
New Member
 
Ippokratis
Join Date: Nov 2010
Location: Athens, Greece
Posts: 13
Rep Power: 16
chripp is on a distinguished road
Hi everyone!

Does anyone knows what modifications should be done to run the 1.7 cases to OF 2.0.x?

Thanks!
chripp is offline   Reply With Quote

Old   November 22, 2011, 05:57
Default
  #174
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
I think not so much! I'd just copy your case into a new folder and run your OF2.0x solver. The errors will quickly tell you what goes wrong.

Are you working on the Gothenburg cases?
__________________
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 3, 2012, 10:23
Default
  #175
New Member
 
Join Date: Mar 2012
Posts: 1
Rep Power: 0
Joeran is on a distinguished road
Hallo,

where can i get the latest Version of shipFoam? The only one i found was 1.6.2 but there should be a newer Version?

Thanks.
Joeran is offline   Reply With Quote

Old   March 3, 2012, 13:22
Default
  #176
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
Dear Joeran,

I think that it's faster to download the shipFoam 1.6.2 version and to install OF 1.6ext (which is very simple with the usage of aliases see http://openfoamwiki.net/index.php/Installation section 2.3.3) since nothing has changed in the source code.

What is the reason that you're interested in using shipFoam?

Regards,

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   May 31, 2012, 05:01
Default Free surface oscillations interFoam
  #177
Senior Member
 
Join Date: Apr 2010
Posts: 151
Rep Power: 16
flowris is on a distinguished road
I am simulating a hydrofoil near the free surface, using interFOAM in 1.6-ext. The surface deformation looks good from a distance, but if you take a closer look, you can see that there are oscillations with wave lengths of about six cells.

I tried following fvSchemes, but none gave improvement. Now I do not know what to try anymore.

Any tips?

Code:
gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    div(rho*phi,U)   Gauss linear;
    div(phi,alpha)   Gauss vanLeer;
    div(phirb,alpha) Gauss interfaceCompression;
    div(phi,k)       Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,R)       Gauss upwind;
    div(R)           Gauss linear;
    div(phi,nuTilda) Gauss upwind;

    div((nuEff*dev(grad(U).T()))) Gauss linear;
}
Code:
gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    div(rho*phi,U)   Gauss linear;
    div(phi,alpha)   Gauss upwind;
    div(phirb,alpha) Gauss upwind;
    div(phi,k)       Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,R)       Gauss upwind;
    div(R)           Gauss linear;
    div(phi,nuTilda) Gauss upwind;

    div((nuEff*dev(grad(U).T()))) Gauss linear;
}
Code:
gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    div(rho*phi,U)   Gauss upwind;
    div(phi,alpha)   Gauss upwind;
    div(phirb,alpha) Gauss upwind;
    div(phi,k)       Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,R)       Gauss upwind;
    div(R)           Gauss linear;
    div(phi,nuTilda) Gauss upwind;

    div((nuEff*dev(grad(U).T()))) Gauss linear;
}
Code:
gradSchemes
{
    default        faceLimited leastSquares 0.5;
}

divSchemes
{
    div(rho*phi,U)   Gauss upwind;
    div(phi,alpha)   Gauss upwind;
    div(phirb,alpha) Gauss upwind;
    div(phi,k)       Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,R)       Gauss upwind;
    div(R)           Gauss linear;
    div(phi,nuTilda) Gauss upwind;
    div((nuEff*dev(grad(U).T()))) Gauss linear;
}
Attached Images
File Type: jpg Screenshot.jpg (10.6 KB, 96 views)
File Type: jpg Screenshot-1.jpg (30.3 KB, 88 views)
flowris is offline   Reply With Quote

Old   May 31, 2012, 05:12
Default
  #178
Senior Member
 
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16
Ralph M is on a distinguished road
Try a different mesh with less cells in the stream direction (at least at the free surface) or more cells in transverse direction (or a combination of both ). In the way you'll change the cells shape which could result in a more stable free surface.

Good luck!
__________________
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   May 31, 2012, 05:55
Default
  #179
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Flowris

What does your fvSolution file look like? With respect to schemes, I have been happy using MUSCL for div(rho*phi,U) and div(phi.aplha).

Best regards,

Niels
ngj is offline   Reply With Quote

Old   May 31, 2012, 07:30
Default
  #180
Senior Member
 
Join Date: Apr 2010
Posts: 151
Rep Power: 16
flowris is on a distinguished road
Ralph, Niels, thanks for the tips. I am currently trying them.

My fvSolution:
Code:
solvers
{
    pcorr PCG
    {
        preconditioner   DIC;
        tolerance        1e-10;
        relTol           0;
        minIter          0;
        maxIter          2000;

    };
    pd PCG
    {
        preconditioner   DIC;
        tolerance        1e-7;
        relTol           0.05;
        minIter          0;
        maxIter          2000;
    };
    pdFinal PCG
    {
        preconditioner   DIC;
        tolerance        1e-7;
        relTol           0;
        minIter          0;
        maxIter          2000;
    };
    U PBiCG
    {
        preconditioner   DILU;
        tolerance        1e-06;
        relTol           0;
        minIter          0;
        maxIter          2000;
    };
    k PBiCG
    {
        preconditioner   DILU;
        tolerance        1e-08;
        relTol           0;
        minIter          0;
        maxIter          2000;
    };
    epsilon PBiCG
    {
        preconditioner   DILU;
        tolerance        1e-08;
        relTol           0;
        minIter          0;
        maxIter          2000;
    };
    R PBiCG
    {
        preconditioner   DILU;
        tolerance        1e-08;
        relTol           0;
        minIter          0;
        maxIter          2000;
    };
    nuTilda PBiCG
    {
        preconditioner   DILU;
        tolerance        1e-08;
        relTol           0;
        minIter          0;
        maxIter          2000;
    };
}

PISO
{
    momentumPredictor yes;
    nCorrectors     3;
    nNonOrthogonalCorrectors 2;
    nAlphaCorr      1;
    nAlphaSubCycles 4;
    cAlpha          2;
}
flowris 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 03:56.