CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Boundary condition "empty" on patch not working?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By yambanshee

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2019, 04:48
Default Boundary condition "empty" on patch not working?
  #1
New Member
 
Oskar T
Join Date: Sep 2019
Posts: 8
Rep Power: 7
OskarT is on a distinguished road
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?
OskarT is offline   Reply With Quote

Old   September 6, 2019, 04:46
Default
  #2
Senior Member
 
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 8
yambanshee is on a distinguished road
Look at your boundary file (constant/polymesh/boundary) and identify your frontAndBack patch. It should be
Code:
type = empty;
and if it's not, change it to that.

If I recall correctly, Salome meshes export all boundaries as type patch, and so that needs to be changed for different boundary types (such as empty, wall, cyclic).
joseancalero16, prinux and advait like this.

Last edited by yambanshee; September 6, 2019 at 07:16.
yambanshee is offline   Reply With Quote

Old   September 6, 2019, 05:22
Default
  #3
New Member
 
Oskar T
Join Date: Sep 2019
Posts: 8
Rep Power: 7
OskarT is on a distinguished road
It was not set to "empty". Setting it to "empty" solved the problem.

Thank you!
OskarT is offline   Reply With Quote

Reply

Tags
boundary, boundary conditions, conditions, empty, openfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Commercial meshers] Fluent msh and cyclic boundary cfdengineering OpenFOAM Meshing & Mesh Conversion 49 November 29, 2024 22:16
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 14:48
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 09:44
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 05:39
Multicomponent fluid Andrea CFX 2 October 11, 2004 06:12


All times are GMT -4. The time now is 15:50.