CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Flow through a cylinder gone wrong (https://www.cfd-online.com/Forums/openfoam/214982-flow-through-cylinder-gone-wrong.html)

heitorvitorc February 19, 2019 12:15

Flow through a cylinder gone wrong
 
Hello Foamers,

I am very sorry if this question was already been answered, but I couldnt find any related solution. I'm very new in CFD in general, and I started working on a case for a laminar flow through a cylinder, and I'm using Gmsh to create the .geo file and then creating the mesh afterwards. The mesh seems ok, I can visualize the geometry in paraView and the checkmesh result seems ok. However when I run the simulation I get the same error concerning the boundary condition of the cylinderWalls. The message is written below:

"

Create time

Create mesh for time = 0


PISO: Operating solver in PISO mode

Reading transportProperties

Reading field p



--> FOAM FATAL IO ERROR:
Cannot find patchField entry for cilynderWalls

file: /mnt/c/Users/heitorvitorc/Desktop/OpenFOAM/Projetos/teste_18_02_19/cylinder_case/0/p.boundaryField from line 25 to line 52.

From function void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField(const Foam::DimensionedField<TypeR, GeoMesh>&, const Foam::dictionary&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]
in file /home/ubuntu/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 191.

FOAM exiting

"

At first I thought it was a missed bracked or something related in the p file... But nothing seems to fix this issue.

The p file is below:

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

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 0;
}

top
{
type zeroGradient;
}

bottom
{
type zeroGradient;
}

cylinderWalls
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}

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

"
The U file seems fine, but since I am new to openFOAM, I might be doing something wrong, so the file is also below.

"
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 5 |
| \\ / 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 (0 0 0);


boundaryField
{
inlet
{
type fixedValue;
value uniform (4e-6 0 0);
}

outlet
{
type zeroGradient;

}

top
{
type slip;

}

bottom
{
type slip;

}

cylinderWalls
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBack
{
type empty;
}
}

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

"

I tried to change the boundary type in the boundary file inside the polymesh folder, but nothing seems to happen. The boundary file is below:

"

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

6
(
frontAndBack
{
type empty;
physicalType patch;
nFaces 3610;
startFace 3515;
}
cilynderWalls
{
type wall;
physicalType patch;
nFaces 76;
startFace 7125;
}
bottom
{
type patch;
physicalType patch;
nFaces 38;
startFace 7201;
}
top
{
type patch;
physicalType patch;
nFaces 38;
startFace 7239;
}
inlet
{
type patch;
physicalType patch;
nFaces 19;
startFace 7277;
}
outlet
{
type patch;
physicalType patch;
nFaces 19;
startFace 7296;
}
)

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


"

In order to build a case like this, do I need to do something else? I'm searching everywhere but I simply cant overcome this issue. I'm using the icoFoam solver, but this info doesn't seems to be relevant, since it's not a solving problem.

clapointe February 19, 2019 14:30

Did you read the error? It is looking for a patch named "cilynderWalls" in your boundary conditions. Note the spelling.

Caelan


All times are GMT -4. The time now is 23:43.