CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   InterDyMFoam for breaking wave simulation (

yannH April 22, 2010 09:25

InterDyMFoam for breaking wave simulation
Hello !

I'm actually trying to run a simulation for a breaking wave in 'deep water'. I've already got some good plunging breakers with interFoam :). But when I try to run interDyMFoam, for a ras model, I've got this message that never appears with interFoam :

This mesh contains patches of type empty but is not 1D or 2D
by virtue of the fact that the number of faces of this
empty patch is not divisible by the number of cells.

From function emptyFvPatchField<Type>::updateCoeffs()
in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148.

FOAM exiting

I've seen that it could be a multiple declaration for vertices of the mesh but it's not my case, see my blockMeshDict :

convertToMeters 1e-1;
(0 0 0)
(1 0 0)
(1 0.4 0)
(0 0.4 0)
(0 0 0.01)
(1 0 0.01)
(1 0.4 0.01)
(0 0.4 0.01)
hex (0 1 2 3 4 5 6 7) (250 100 1) simpleGrading (1 1 1)
cyclic leftAndRight
(0 4 7 3)
(2 6 5 1)
wall lowerWall
(1 5 4 0)
patch atmosphere
(3 7 6 2)
empty frontAndBack
(0 3 2 1)
(4 5 6 7)

Does anyone see what is wrong ?


egp April 23, 2010 05:11

You need to provide more information. Your blockMeshDict looks OK (did you run checkMesh to check it?).

What is in your dynamicMeshDict? Which dynamicFvMesh are you trying to use?

Since you have cyclic on leftAndRight, and empty on frontAndBack, what is driving your flow (I presume the motion of your lowerWall is driving the flow?).

yannH April 23, 2010 06:05

2 Attachment(s)
Hi Eric,

Thanks for your reply, I want to use interDyMFoam because i'm interested in dynamic meshing... As I said, i work on breaking wave in deep water and for spilling breakers I need very tiny mesh for the crest.

my dynamicMeshDict looks like :

dynamicFvMesh dynamicRefineFvMesh;
refineInterval 1;
field alpha1;
lowerRefineLevel 0.001;
upperRefineLevel 0.999;
unrefineLevel 10;
nBufferLayers 1;
maxRefinement 2;
maxCells 200000;
dumpLevel true;

(I've just copied one from damBreak example, so i'm not sure...)

Otherwise about your question my lowerWall doesn't move. I initialize the velocity field with funkySetFields, in order to get an unsteady inital sinusoidale wave, that immediately breaks.

Attachment 3080

Attachment 3081

egp April 23, 2010 06:15

Hmm, dynamicRefineFvMesh for 2D... that's what I figured. Isn't going to work since it only does isotropic refinement (including in the z-direction of your mesh).

If you really need to do the 2D refinement, you'll have to hack the dynamicRefineFvMesh class and create a 2D version. Otherwise, you will have to make your domain truly 3D and periodic in the z-direction, and let the mesh refinement do its work as designed.

yannH April 23, 2010 07:59

ok, I'll try in 3D with cyclic boundaries for front and back... 3D was my first idea when I began, with an epsilon value into velocity field varying with the width to avoid artificial 3D, but computation time scared me. So it's gonna be the occasion to try it...I'll post screenshots if it works !

thanks Eric,


nuovodna June 18, 2010 09:19

any news on 2D dynamicMeshDict ??? I have a problem settings cyclic instead of empty patches: setFields for alpha1 doesn't work and it returns error.

yannH July 13, 2010 10:06

Is it really useful (or interesting in mechanical terms) to use interDyMFoam instead of interFoam ? I'm asking that because I'm a little lost. My domain doesn't move, only the interface.. What is the interest of dynamic meshing or the situation it is needed ?

yannH July 26, 2010 08:50

Hi everyone,

I am testing my example of breaking waves with interFoam or interDyMFoam and with different schemes (for divergence terms of the equation). I have not enough knowledge about efficiency or accuracy about it, so I test with those from dambreak tutorial

div(rho*phi,U) Gauss upwind; // or Gauss limitedLinearV 1;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;

or sloshing case.

div(rho*phi,U) Gauss vanLeerV;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss vanLeer;

Results are different (especially with upwind).. can someone give me advice or tell me what is the best ? thanks



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