CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   damBreak case 2D->3D using Gmsh (http://www.cfd-online.com/Forums/openfoam/113005-dambreak-case-2d-3d-using-gmsh.html)

liguifan February 9, 2013 16:10

damBreak case 2D->3D using Gmsh
 
Hi all,

I have build up a box with the leftwall, rightwall, lowerwall, frontwall, and backwall using Gmsh,
Then in the damBreak folder, I modify the alpha1.org file by adding frontwall and backwall and change the type of defaultFaces from "empty" to "patch" as follows. Also, I did this to 0/p_rgh , 0/U and system/polymesh/boundary files as well.


Quote:

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;
boundaryField
{
leftwall
{
type zeroGradient;
}

rightwall
{
type zeroGradient;
}

lowerwall
{
type zeroGradient;
}
frontwall
{
type zeroGradient;
}
backwall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}

defaultFaces
{
type patch;
}
}
After all, I use gmshToFoam to convert my .msh file. Then I cp 0/alpha1.org 0/alpha1.
But the error comes when I execute setFields , the errors are:
Quote:

Create time

Create mesh for time = 0

Reading setFieldsDict

Setting field default values
Setting internal values of volScalarField alpha1


--> FOAM FATAL IO ERROR:

Cannot find 'value' entry on patch defaultFaces of field alpha1 in file "/home/liguifan/Desktop/damBreak/0/alpha1"
which is required to set the values of the generic patch field.
(Actual type patch)

Please add the 'value' entry to the write function of the user-defined boundary-condition


file: /home/liguifan/Desktop/damBreak/0/alpha1::boundaryField::defaultFaces from line 54 to line 54.

From function genericFvPatchField<Type>::genericFvPatchField(con st fvPatch&, const Field<Type>&, const dictionary&)
in file genericFvPatchField/genericFvPatchField.C at line 71.

FOAM exiting
Can anyone please give me some suggestion about this?
Thanks
James

wyldckat February 10, 2013 07:22

Greetings James,

Although you added the new patches in the necessary files, you forgot to remove the patch "defaultFaces"! ;)

Best regards,
Bruno

liguifan February 10, 2013 16:31

Quote:

Originally Posted by wyldckat (Post 406953)
Greetings James,

Although you added the new patches in the necessary files, you forgot to remove the patch "defaultFaces"! ;)

Best regards,
Bruno

Good afternoon Bruno,

Thanks for the reply.

I follow your suggestion and the program works! But one very interesting phenomena is that the fluid(water) ultimate leaks out from one of the wall. I want to keep the water in the tank rather than letting it go?

Do you have some suggestion for that?

Best regards,
James

doubtsincfd February 10, 2013 22:06

Hi Guifan,

are the side faces of the tank wall? In that case try with static contact angle boundary condition. See the capillary tutorial for the syntax of the boundary condition


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