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

free surface around a ship hull

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

Like Tree1Likes
  • 1 Post By jantheron

Reply
 
LinkBack Thread Tools Display Modes
Old   July 10, 2011, 22:49
Unhappy free surface around a ship hull
  #1
New Member
 
Join Date: Jul 2011
Posts: 23
Rep Power: 6
Stephy is on a distinguished road
Hello all,
I am trying to model the elevation/trough of free surface around a ship hull. Being new to OF, I am starting with a simple mesh (inlet, oulet, floor+sides+hull walls, and free surface) in a simple case (icoFoam, using only p and U).

Here are my boundary, p, and U files and then my current problem when I start the simulation.

p:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
wall
{
type buoyantPressure;
}

outflow
{
type freestreamPressure;
}

inflow
{
type freestreamPressure;
}

symmetry
{
type zeroGradient;
}
}
---------

U:
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
wall
{
type fixedValue;
value uniform (0 0 0);
}

outflow
{
type zeroGradient;
}

inflow
{
type fixedValue;
value uniform (0 0 1);
}

symmetry
{
type zeroGradient;
}
}
----------------------------------------

Now, here is what I get when I type "icoFoam" in a terminal:

Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.1

Courant Number mean: 0.000506547 max: 0.315347
DILUPBiCG: Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 3.31525e-08, No Iterations 2


--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 41.8405
Specified mass inflow : 0
Specified mass outflow : 185.25
Adjustable mass outflow : 0


From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
in file cfdTools/general/adjustPhi/adjustPhi.C at line 116.

FOAM exiting
-------
------

"symmetry" corresponding to the free surface.
I tried to run potentialFoam but I get "--> FOAM FATAL IO ERROR:
keyword potentialFlow is undefined in dictionary ..[...]... FOAM Exiting".

Please let me know if you have any suggestion about this issue,

thank you very much,

Stephy
Stephy is offline   Reply With Quote

Old   July 10, 2011, 22:50
Default
  #2
New Member
 
Join Date: Jul 2011
Posts: 23
Rep Power: 6
Stephy is on a distinguished road
my boundary file:

FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
wall
{
type wall;
nFaces 11332;
startFace 229789;
}
outflow
{
type patch;
nFaces 446;
startFace 241121;
}
inflow
{
type patch;
nFaces 452;
startFace 241567;
}
symmetry
{
type patch;
nFaces 6692;
startFace 242019;
}
)

// ************************************************** *********************** //
Stephy is offline   Reply With Quote

Old   July 12, 2011, 23:28
Default
  #3
New Member
 
Join Date: Jul 2011
Posts: 23
Rep Power: 6
Stephy is on a distinguished road
Anybody ? I'm still stuck on it....

thank you :-) !
Stephy is offline   Reply With Quote

Old   July 13, 2011, 04:26
Default
  #4
Senior Member
 
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 8
pablodecastillo is on a distinguished road
there is examples at this forum (wigley hull), and talking about freesurfaces try with interFoam.
pablodecastillo is offline   Reply With Quote

Old   July 13, 2011, 22:44
Default
  #5
New Member
 
Join Date: Jul 2011
Posts: 23
Rep Power: 6
Stephy is on a distinguished road
Pablo,

thank you for your advice, I have already tried the wigley hull tutorial and read the topics dedicated to this on the forum (very complicated, people talk more about turbulence and forces issues, which is not yet my problem), but as I would want to understand what I am doing I try not to copy this case without understanding.
Anyway, I wasn't even able to adapt the wigley hull to my mesh, which is basically the same, but the boundaries, as defined previously, are a bit different (the walls are actual walls).
Do you have any idea of how I could adapt the wigley hull to my mesh and boundaries ? I guess I would have to change not only "p" and "U" but all those files dedicated to turbulence coefficients and others...
Stephy is offline   Reply With Quote

Old   October 10, 2011, 06:00
Default
  #6
New Member
 
Johannes N Theron
Join Date: Feb 2010
Location: Hamburg
Posts: 21
Rep Power: 7
jantheron is on a distinguished road
Quote:
Originally Posted by Stephy View Post
Pablo,

thank you for your advice, I have already tried the wigley hull tutorial and read the topics dedicated to this on the forum (very complicated, people talk more about turbulence and forces issues, which is not yet my problem), but as I would want to understand what I am doing I try not to copy this case without understanding.
Anyway, I wasn't even able to adapt the wigley hull to my mesh, which is basically the same, but the boundaries, as defined previously, are a bit different (the walls are actual walls).
Do you have any idea of how I could adapt the wigley hull to my mesh and boundaries ? I guess I would have to change not only "p" and "U" but all those files dedicated to turbulence coefficients and others...
The first thing you should do is to replace the wigley stl file in constant/trisurface with your stl file. Scale it so that it is about the same size as the wigley hull size. then replace the reference to the wigley stl file in system/snappehexmesh with the name of your file. Make sure that your stl file is ascii and that it starts with "solid body" end ends with "endsolid body".

Edit Allrun and comment out last few lines so that you only run blockmesh and snappyHexMesh. Modify the settings in constant/polymesh/bleckmesh and snappyhexmesh until you are able to generate a nice grid. This will actually take quite some time in my experience as a co-newbie. Only then should you start to play with boundary conditions etc.

Jan
www.kanoefabrik.com
parkh32 likes this.
jantheron is offline   Reply With Quote

Old   April 10, 2012, 06:47
Default
  #7
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
Hi Jan

I am exactly dong what you said in your post.

I have put my own ".stl" file and run "blockMesh", "snappyHexMesh", "LTSInterFoam", and "paraFoam". there is some Foam warning but no error.

In paraView, I have played but nothing changed I mean colour is all through same until time and fames are finished.

can you give me some guides, please?

hs//


Quote:
Originally Posted by jantheron View Post
The first thing you should do is to replace the wigley stl file in constant/trisurface with your stl file. Scale it so that it is about the same size as the wigley hull size. then replace the reference to the wigley stl file in system/snappehexmesh with the name of your file. Make sure that your stl file is ascii and that it starts with "solid body" end ends with "endsolid body".

Edit Allrun and comment out last few lines so that you only run blockmesh and snappyHexMesh. Modify the settings in constant/polymesh/bleckmesh and snappyhexmesh until you are able to generate a nice grid. This will actually take quite some time in my experience as a co-newbie. Only then should you start to play with boundary conditions etc.

Jan
www.kanoefabrik.com
parkh32 is offline   Reply With Quote

Old   April 14, 2012, 06:49
Default
  #8
New Member
 
Johannes N Theron
Join Date: Feb 2010
Location: Hamburg
Posts: 21
Rep Power: 7
jantheron is on a distinguished road
hs

Did you change the name of the stl file to your filename inside snappyHexMeshDict?

Jan

Quote:
Originally Posted by parkh32 View Post
Hi Jan

I am exactly dong what you said in your post.

I have put my own ".stl" file and run "blockMesh", "snappyHexMesh", "LTSInterFoam", and "paraFoam". there is some Foam warning but no error.

In paraView, I have played but nothing changed I mean colour is all through same until time and fames are finished.

can you give me some guides, please?

hs//
jantheron is offline   Reply With Quote

Old   April 15, 2012, 03:54
Default
  #9
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
thank you for your reply.

Yes, I changed to my own file name in snappyHexMeshDict.
When I ran snappyHexMesh I got Foam waring as;

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>
(1)

Morph iteration 0
-----------------
Calculating patchDisplacement as distance to nearest surface point ...
Wanted displacement : average:0.0160589 min:1.71113e-06 max:0.0546716
Calculated surface displacement in = 0.33 s

--> FOAM Warning : Displacement (0.000203702 0.00140685 0.0031613) at mesh point 3484 coord (-21.4617 -2.48765 -0.395662) points through the surrounding patch faces
Smoothing displacement ...
Iteration 0
Iteration 10
Iteration 20
Displacement smoothed in = 3.98 s

(2)

Did not succesfully snap mesh. Giving up.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>


I also have got this warning and error after "paraFoam";

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >
$ paraFoam

created temporary 'Hull70.OpenFOAM'
--> FOAM Warning :
From function polyMesh::readUpdateState polyMesh::readUpdate()
in file meshes/polyMesh/polyMeshIO.C at line 204
Number of patches has changed. This may have unexpected consequences. Proceed with care.

--> FOAM FATAL IO ERROR:
size 5760 is not equal to the given value of 287774

file: /home/administrator/OpenFOAM/administrator-2.1.0/run/tutorials/multiphase/LTSInterFoam/Hull70/100/nut from line 18 to line 5803.

From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/Field.C at line 236.

FOAM exiting
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

would you like to have look the log, please? I can send the log to your email.

thanks.

hs//
parkh32 is offline   Reply With Quote

Old   April 16, 2012, 01:56
Default shm
  #10
New Member
 
Johannes N Theron
Join Date: Feb 2010
Location: Hamburg
Posts: 21
Rep Power: 7
jantheron is on a distinguished road
hs

There can be many reasons for not being able to snap. Start by making sure your refinement regions are set correctly (surround your geometry with a refined region), and that your refinement levels are high enough; if too coarse, it won't be able to snap.

Jan
Quote:
Originally Posted by parkh32 View Post
thank you for your reply.

Yes, I changed to my own file name in snappyHexMeshDict.
When I ran snappyHexMesh I got Foam waring as;

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>
(1)

Morph iteration 0
-----------------
Calculating patchDisplacement as distance to nearest surface point ...
Wanted displacement : average:0.0160589 min:1.71113e-06 max:0.0546716
Calculated surface displacement in = 0.33 s

--> FOAM Warning : Displacement (0.000203702 0.00140685 0.0031613) at mesh point 3484 coord (-21.4617 -2.48765 -0.395662) points through the surrounding patch faces
Smoothing displacement ...
Iteration 0
Iteration 10
Iteration 20
Displacement smoothed in = 3.98 s

(2)

Did not succesfully snap mesh. Giving up.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>


I also have got this warning and error after "paraFoam";

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >
$ paraFoam

created temporary 'Hull70.OpenFOAM'
--> FOAM Warning :
From function polyMesh::readUpdateState polyMesh::readUpdate()
in file meshes/polyMesh/polyMeshIO.C at line 204
Number of patches has changed. This may have unexpected consequences. Proceed with care.

--> FOAM FATAL IO ERROR:
size 5760 is not equal to the given value of 287774

file: /home/administrator/OpenFOAM/administrator-2.1.0/run/tutorials/multiphase/LTSInterFoam/Hull70/100/nut from line 18 to line 5803.

From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/Field.C at line 236.

FOAM exiting
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

would you like to have look the log, please? I can send the log to your email.

thanks.

hs//
jantheron is offline   Reply With Quote

Old   April 16, 2012, 20:02
Default
  #11
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
hi Jan

thank you for your comments.

hs//
parkh32 is offline   Reply With Quote

Old   April 19, 2012, 07:37
Default
  #12
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 10
colinB is on a distinguished road
Hi hs//

to your second problem

Quote:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >> >
$ paraFoam

created temporary 'Hull70.OpenFOAM'
--> FOAM Warning :
From function polyMesh::readUpdateState polyMesh::readUpdate()
in file meshes/polyMesh/polyMeshIO.C at line 204
Number of patches has changed. This may have unexpected consequences. Proceed with care.

--> FOAM FATAL IO ERROR:
size 5760 is not equal to the given value of 287774

file: /home/administrator/OpenFOAM/administrator-2.1.0/run/tutorials/multiphase/LTSInterFoam/Hull70/100/nut from line 18 to line 5803.

From function Field<Type>::Field(const word& keyword, const dictionary&, const label)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/Field.C at line 236.

FOAM exiting
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I might have the solution which was posted here some while ago:

Number of cells in mesh don't match with size of cellLevel

regards

Colin
colinB is offline   Reply With Quote

Old   April 24, 2012, 01:12
Default
  #13
New Member
 
hs
Join Date: Mar 2012
Posts: 22
Rep Power: 5
parkh32 is on a distinguished road
thanks Collin

hs
parkh32 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF Defining VOF Free Surface at Outlet Alex Fluent UDF and Scheme Programming 13 August 8, 2012 16:50
Free surface problem: hull mesh questions albertofast OpenFOAM 2 December 15, 2010 20:50
free surface display novice CD-adapco 5 August 4, 2004 01:07
viscous free surface flow past a ship hull lololo Main CFD Forum 0 June 12, 2002 23:02
Modeling Free Surface Flows Elliot Schwartz Main CFD Forum 5 August 25, 1998 21:03


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