CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   InterFoam error for two phase flow simulation in channel (https://www.cfd-online.com/Forums/openfoam-solving/132889-interfoam-error-two-phase-flow-simulation-channel.html)

1988 April 7, 2014 15:34

InterFoam error for two phase flow simulation in channel
 
1 Attachment(s)
hello
This is a two phase flow and the solver is interFoam in openFoam software.
As you can see here,I have made this geometry in gambit software and because of meshing problems I had to define some faces between volumes for example face number 1 and 2 and I used "specify continuum types"option in gambit to let the flow to pass.(there is flow in this geometry that it needs to pass these faces).
I checked the mesh and it was right but as soon as I want to see the geometry in paraview with paraFoam command I face this errors:
Quote:

boundary field walls not found in object U at time=0
and it is repeated for alpha-1 and p objects too.
whenever I type interfoam command it gives me this error
Quote:

cannot find patchField entry for walls
I have checked the mesh and also I solve it in fluent with no problem.
I don't know what is wrong!!! if some one can help me I would be so appreciate.
thanks:)

chrisb2244 April 7, 2014 20:56

In your set of case files, you have probably a "0" directory, right?
Within that directory will be a number of files with names like "U", "p", "alpha.phasename" or "alpha1" depending on your OF version.

If you open these files with a text editor, you will read the boundary conditions at the bottom.

The error you're getting is complaining that in your mesh files, you have a patch face (or faces) called "walls", and that "walls" are not specified in your "U", "p" or "alpha1" files.

Probably you're going to want something like

Code:

boundaryField
{
    walls
    {
        type zeroGradient;
    }

    other_patch_faces_here

}

On a side note, if you don't have a "0" directory, these files are going to be held in whatever your first timestep is :)

Edit : Correction - having looked over the question again, it occurs to me that you don't want an actual wall where your "walls" patch is/are, if "walls" is the name you gave to the ones you added and highlighted in the picture (Apologies, I have no experience with Fluent or Gambit).
As such, you probably want some sort of inletOutlet BC - maybe someone else would know more specifically here.

1988 April 8, 2014 04:10

thanks for protect.
unfortunately I have defined these wall boundary conditions in U ,alpha 1 and so on but the error is still staying.
let me show you one of boundary conditions which I defined.
this is alpha1 boundary condition:
Code:

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    inlet-1
    {
        type            fixedValue;
    value        uniform 0.0;
    }
    inlet-2
    {
        type            fixedValue;
    value        uniform 1.0;
    }
    inlet-3
    {
        type            fixedValue;
    value        uniform 1.0;
    }
    outlet
    {
        type            zeroGradient;
    }

    Walls
    {
        type            zeroGradient;
    }


}

// ************************************************************************* //


chrisb2244 April 8, 2014 04:12

Quote:

Originally Posted by 1988 (Post 484586)
thanks for protect.

Code:

    Walls
    {
        type            zeroGradient;
    }


This is good, but your Walls != walls :) OpenFOAM is case sensitive - if you change this to walls instead of Walls you should be fine

1988 April 8, 2014 14:09

thanks a lot.:)
I have done what you say but I have just one error that it is about alpha1.org .
Quote:

ERROR: In /build/buildd/paraview-3.98.0/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6875
vtkOpenFOAMReaderPrivate (0x9855bb0): boundaryField walls not found in object alpha1.org at time = 0
and this is my alpha1 boundary condition:
Code:

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    water-1
    {
        type            fixedValue;
    value        uniform 0.0;
    }
    water-2
    {
        type            fixedValue;
    value        uniform 1.0;
    oil
    {
        type            fixedValue;
    value        uniform 1.0;
    }

    outlet
    {
        type            zeroGradient;
    }

  walls
    {
        type            zeroGradient;
    }

}

// ************************************************************************* //

thank you

chrisb2244 April 8, 2014 21:06

If you're getting the same error for alpha1.org, it's because your alpha1.org file doesn't have a "walls" boundary field. However, it was my understanding that the alpha1.org files provided in tutorial cases are usually used by some sort of 'Allrun' script to copy out an alpha1 file before starting solutions, so I'm surprised that your solver cares about an alpha1.org file.

In particular, the default interFoam does not read an alpha1.org file. So my guess is that this error is only occurring if you try to run foamToVTK or some similar conversion utility?

I think the solution is simply to remove the alpha1.org file from your 0 directory, if you do not need it.

I have a test case I'm using to try and troubleshoot bugs in a solver/library pair I'm writing, and I find it helpful to have a script saying something like

Code:

rm -rf 0*
cp -rf backup0 0
myInterFoam 2>&1 | tee log

Here you can see that my "backup0" directory holds a set of all the field files for time 0, so if you need alpha1.org for a backup, then you might have some luck moving it to a different directory (than 0)?

Best,
Christian


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