Hi!
I'm new to openFOAM and learning how it works coming from ANSYS and Comsol. I have followed quite a few tutorials on Youtube on how to run simple simulations but I keep getting errors when I set my boundary conditions.
I want to simulate flow around a cylinder (2D but as 3D with symmetry).
I have made the model and meshed it in SOLEME 9.3.
Model and mesh is made 3D (mesh below).
I have assigned groups of the faces for the inlet, cylinder, outlet, walls, front and back planes inside of SOLEME to be used as patch for the boundaries.
Mesh is exported as "<filename>.unv" and converted to openfoam mesh using "ideasToUnv <filename>.unv".
Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : v1906 OPENFOAM=1906
Arch : "LSB;label=32;scalar=64"
Exec : ideasUnvToFoam Cylinder.unv
Date : Sep 05 2019
Time : 09:37:02
Host : WL08718
PID : 464
I/O : uncollated
Case : <file location>
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Processing tag:164
Starting reading units at line 3.
l:1
units:" SI: Meter (newton)"
unitType:2
Unit factors:
Length scale : 1
Force scale : 1
Temperature scale : 1
Temperature offset : 273.15
Processing tag:2420
Skipping tag 2420 on line 9
Skipping section at line 9.
Processing tag:2411
Starting reading points at line 20.
Read 8754 points.
Processing tag:2412
Starting reading cells at line 17531.
First occurrence of element type 11 for cell 1 at line 17532
First occurrence of element type 41 for cell 1344 at line 21561
First occurrence of element type 44 for cell 16256 at line 46625
First occurrence of element type 112 for cell 13876 at line 51385
First occurrence of element type 111 for cell 18636 at line 56145
Read 19801 cells and 14912 boundary faces.
Processing tag:2467
Starting reading patches at line 90989.
For group 1 named Inlet trying to read 184 patch face indices.
For group 2 named Cylinder trying to read 238 patch face indices.
For group 3 named Outlet trying to read 184 patch face indices.
For group 4 named topBottomWall trying to read 732 patch face indices.
For group 5 named frontAndBackPlanes trying to read 13574 patch face indices.
Sorting boundary faces according to group (patch)
0: Inlet is patch
1: Cylinder is patch
2: Outlet is patch
3: topBottomWall is patch
4: frontAndBackPlanes is patch
Constructing mesh with non-default patches of size:
Inlet 184
Cylinder 238
Outlet 184
topBottomWall 732
frontAndBackPlanes 13574
End
|
I set my boundary conditions (U and P) as follow:
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
Inlet
{
type fixedValue;
value uniform (0.2 0 0);
}
Outlet
{
type zeroGradient;
}
topBottomWall
{
type noSlip;
}
frontAndBackPlanes
{
type empty;
}
}
// ************************************************** *********************** //
|
and
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
Inlet
{
type zeroGradient;
}
Outlet
{
type fixedValue;
value uniform 0;
}
topBottomWall
{
type zeroGradient;
}
frontAndBackPlanes
{
type empty;
}
}
// ************************************************** *********************** //
|
When calling "icoFoam" i get this error message:
Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : v1906 OPENFOAM=1906
Arch : "LSB;label=32;scalar=64"
Exec : icoFoam
Date : Sep 05 2019
Time : 09:39:36
Host : WL08718
PID : 465
I/O : uncollated
Case : <file location>
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 0
PISO: Operating solver in PISO mode
Reading transportProperties
Reading field p
--> FOAM FATAL IO ERROR:
patch type 'patch' not constraint type 'empty'
for patch frontAndBackPlanes of field p in file "<file location>/0/p"
file: <file location>/0/p.boundaryField.frontAndBackPlanes
From function Foam::emptyFvPatchField<Type>::emptyFvPatchField(c onst Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::dictionary&) [with Type = double]
in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 79.
FOAM exiting
|
I have tried boundary condition "symmetry" and "symmetryPlane" but OpenFoam then complain on those boundary conditions. However, other boundary conditions such as "noSlip" for U and "zeroGradient" does not result in errors (I know it does not do the same but atleast it runs).
Any ideas on how to solve this?