CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Cavity with freesurface (moonpool) in 2D (

JohnTornblom March 30, 2012 07:53

Cavity with freesurface (moonpool) in 2D
3 Attachment(s)

I am trying to model a moonpool (the hole in the hull of a drillship) in 2D. I got the case running but encounter problems with my mesh. In order to capture y+ correctly the height of the cells close to the wall, the top patches of block 1,3 and 4, are small.

My problem is that the pressure is acting strange at the moonpool bottom between block2 and block5. Does anyone has a clue of why this is happening, is there something wrong in my blockMeshdict? contains: blockMeshDict, checkMesh.log, fvSchemes and fvSolution

Attachment 12233

Attachment 12234

Attachment 12236


winden April 2, 2012 07:55

1 Attachment(s)
Hi John.

Why do you need the matchPatchPairs? The slave and master patches are the same so it makes no difference as far as I can see. Maybe that has messed up the face ordering or something. Don't know if it helps but try this blockMeshDict file and see if it makes a difference, the mesh according to checkMesh is identical.

If not, maybe you could post the whole case so there is a chance to see what's going on.

Also: I'm guessing you are you using interFoam. If so, why the big difference in p_rgh in the two phases?


JohnTornblom April 2, 2012 16:29

1 Attachment(s)
Hi Björn and thank you for your reply.

Before my first post I added the matchPatchPairs just to try to see if that would help but it didn't. Also, I just tried the case with the blockMeshdict suggested by you but it same error occurred.

Regarding the boundarylayers, at the inlet the pressure is set to zeroGradient and the velocity is set to a fixedValue of 2.2 m/s. at the outlet the velocity is zeroGradient and the pressure is set to a value of rho*g*h (1000*9,81*6.1). I have tried the pressure set to fixedValue 0 at the outlet but the domain was drained and the run ended up with a floatingpoint error. The atmospehere patch (the patch at the top of the moonpool) is set to totalPressure with a value of 0.

I have attached the whole case and am grateful for any help i can get.


winden April 3, 2012 10:16

Hi again.

I got a divergence at T~4.9s on this case as well.

I think changing the boundary condition on U on the "atmosphere" to

type pressureInletOutletVelocity;
value uniform (0 0 0);

might be a more accurate representation of what you are trying to model.

This however, did not get rid of the discontinuity. A quick fix is to put the maximum allowed Courant number down. I put it to 0.2 instead of 0.5 and the case ran fine until 15s when I stopped it. If you are satisfied with the decrease of timestep as a fix that's it. Probably it is needed anyway because the geometry with the sharp edges is quite difficult to keep stable otherwise. The discontinuity occurs in the very small cells in the boundary layer mesh extending under the pool where you would need a small timestep to resolve the flow. A large timestep is likely to lead to computational errors and divergence.

Also, I think you should add more cells in the pool itself to more accurately capture the free surface.

Hope this helps.


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