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/)
-   -   the internalField entry of U file is not valid in pisoFoam (https://www.cfd-online.com/Forums/openfoam-solving/126700-internalfield-entry-u-file-not-valid-pisofoam.html)

shuoxue November 24, 2013 04:32

the internalField entry of U file is not valid in pisoFoam
 
1 Attachment(s)
i was solving a 3-D cylinder flow case with pisoFoam.
the internalField entry of 0/U file was set to uniform (1 0 0).
however, the preview of 0s showed that the internalField entry failed to work. the U value of internalField remained to (0 0 0), see the figure below.
Attachment 26973

boundary
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
    inlet
    {
        type            patch;
        nFaces          1920;
        startFace      1747920;
    }
    outlet
    {
        type            patch;
        nFaces          1920;
        startFace      1746000;
    }
    cylinder
    {
        type            wall;
        nFaces          3840;
        startFace      1742160;
    }
    fb
    {
        type            wall;
        nFaces          36000;
        startFace      1706160;
    }
)

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

0/U
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (1 0 0);

boundaryField
{
    inlet
    {
        type            freestream;
        freestreamValue $internalField;
    }
    outlet
    {
        type            freestream;
        freestreamValue $internalField;
    }
    cylinder
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    fb
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
}

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

is there anything wrong with my code?
thanks in advance.

Tobi November 24, 2013 05:23

Hi,

did you check if your boundaries are correct.
It seems that inlet and outlet are not the patches you wanted to have.

shuoxue November 24, 2013 06:56

Quote:

Originally Posted by Tobi (Post 463254)
Hi,

did you check if your boundaries are correct.
It seems that inlet and outlet are not the patches you wanted to have.

Hi Tobias!

My computational domain is a circular cylinder. Inlet patch is on the left hand, and outlet patch is on the other side. Is there anything wrong about the boundary condition?

The similar geometry was used in a 2-D case with icoFoam. And internalField entry of U file worked.

shuoxue

akidess November 24, 2013 07:05

Do you have another file in 0/ which has the "object U" entry? E.g. a file U.org?

Note that since you are looking at the 0-folder, this has absolutely nothing to do with icoFoam or pisoFoam. The solver haven't touched your files yet.

shuoxue November 24, 2013 21:11

1 Attachment(s)
Quote:

Originally Posted by akidess (Post 463262)
Do you have another file in 0/ which has the "object U" entry? E.g. a file U.org?

Note that since you are looking at the 0-folder, this has absolutely nothing to do with icoFoam or pisoFoam. The solver haven't touched your files yet.

Hi, I might found the primary issue. The fb patch is a wall type BC and its value of U is set to uniform (0 0 0). There is a transition layer between boundary and internalField. The real internalField part is surrounded by the layer, and it will be occurred when clipped.

Attachment 26979

akidess November 25, 2013 04:05

The transition layer is probably only there because you chose to view point-interpolated field values in paraview.


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