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

mapFields - Changing from turbulentInlet/outlet boundaries to cyclic boundaries

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 6, 2012, 10:15
Default mapFields - Changing from turbulentInlet/outlet boundaries to cyclic boundaries
  #1
New Member
 
Tian Coulsting
Join Date: Jun 2012
Posts: 19
Rep Power: 14
TianC is on a distinguished road
Hi all,

I am currently working on a 2D cavity flow using OpenFOAM to simulate.

What I am trying to do is use the turbulentInlet patch type at the inlet to inject some turbulence into the flow. Then, once the turbulence is introduced, switch my inlet/outlet to cyclic boundaries so that the conditions at the outlet feed back in at the inlet.

However, the following error message comes up when I am running the mapFields utility:

--> FOAM FATAL ERROR:
Incompatible meshes: different patch types for patch 4, fromMesh = patch, toMesh = cyclic

From function meshToMesh::meshToMesh(const fvMesh& meshFrom, const fvMesh& meshTo)
in file meshToMeshInterpolation/meshToMesh/meshToMesh.C at line 166.

FOAM exiting

This is using mapFields -consistent

I have also tried using just mapFields and doing different things in the mapFieldsDict file.

Has anyone got any suggestions for this problem?

Tian
TianC is offline   Reply With Quote

Old   August 6, 2012, 12:13
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Why do you need mapFields? If you only change the type of the boundary, there is no matching necessary, right?
Bernhard is offline   Reply With Quote

Old   August 6, 2012, 12:25
Default
  #3
New Member
 
Tian Coulsting
Join Date: Jun 2012
Posts: 19
Rep Power: 14
TianC is on a distinguished road
Hi Bernhard,

I tried just changing the patch types (within 0/U,p,phi,k.k_0,etc...) from:

for my inlet - turbulentInlet
for my outlet - inletOutlet

to:

inlet - cyclic
outlet - cyclic

However, when coming to decompose and run the simulation in parallel the following error message was given:

--> FOAM Warning :
From function entry::getKeyword(keyType&, Istream&)
in file db/dictionary/entry/entryIO.C at line 77
Reading /gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity2D/cavityRes2a/0/k_0
found on line 1792053 the label 9728
expected either } or EOF
--> FOAM Warning :
From function entry::getKeyword(keyType&, Istream&)
in file db/dictionary/entry/entryIO.C at line 77
Reading /gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity2D/cavityRes2a/0/k_0
found on line 1792054 the punctuation token '('
expected either } or EOF
--> FOAM Warning :
From function entry::getKeyword(keyType&, Istream&)
in file db/dictionary/entry/entryIO.C at line 77
Reading /gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity2D/cavityRes2a/0/k_0
found on line 1792055 the doubleScalar 0.000724197
expected either } or EOF
--> FOAM Warning :
From function entry::getKeyword(keyType&, Istream&)
in file db/dictionary/entry/entryIO.C at line 77
Reading /gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity2D/cavityRes2a/0/pMean
found on line 1844793 the label 9728
expected either } or EOF
--> FOAM Warning :
From function entry::getKeyword(keyType&, Istream&)
in file db/dictionary/entry/entryIO.C at line 77
Reading /gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity2D/cavityRes2a/0/pMean
found on line 1844794 the punctuation token '('
expected either } or EOF
--> FOAM Warning :
From function entry::getKeyword(keyType&, Istream&)
in file db/dictionary/entry/entryIO.C at line 77
Reading /gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity2D/cavityRes2a/0/pMean
found on line 1844795 the doubleScalar 0.0723994
expected either } or EOF


--> FOAM FATAL IO ERROR:
Cannot find patchField entry for cyclic outlet
Is your field uptodate with split cyclics?
Run foamUpgradeCyclics to convert mesh and fields to split cyclics.

file: /gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity2D/cavityRes2a/0/pMean::boundaryField from line 1792030 to line 1844792.

From function GeometricField<Type, PatchField, GeoMesh>::
GeometricBoundaryField::GeometricBoundaryField
(
const BoundaryMesh&,
const DimensionedField<Type, GeoMesh>&,
const dictionary&
)
in file /home/matt/build/gnu/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 271.

FOAM exiting

Cheers

Tian
TianC is offline   Reply With Quote

Old   August 6, 2012, 12:31
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Two remarks:

1. The warnings are probably about a syntax error in your file (semicolon or something like that?)

2. Changing only the 0/ directory is not enough, you should also have a close look at the constant/polyMesh/boundary file. There the cyclic boundaries are defined. You can probably copy this from a the cyclic mesh that you already have.
Bernhard is offline   Reply With Quote

Old   August 6, 2012, 12:36
Default
  #5
New Member
 
Tian Coulsting
Join Date: Jun 2012
Posts: 19
Rep Power: 14
TianC is on a distinguished road
1. It seems that in the 0/ files after the simulation with the turbulentInlet that the patch types are scattered among the values given for example in U. Is this something that is normal to happen? The only things I changed were patch type and removed the properties (if there were any) of the previous patch type.

2. I have also changed the patches within constant/polyMesh/boundary so that the inlet/outlet are as follows:

inlet
{
type cyclic;
nFaces 9728;
startFace 5406640;
matchTolerance 0.0001;
neighbourPatch outlet;
}
outlet
{
type cyclic;
nFaces 9728;
startFace 5416368;
matchTolerance 0.0001;
neighbourPatch inlet;
}
TianC is offline   Reply With Quote

Old   August 6, 2012, 12:40
Default
  #6
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Did you try this (from your error message)
Quote:
Run foamUpgradeCyclics to convert mesh and fields to split cyclics.
Bernhard is offline   Reply With Quote

Old   August 6, 2012, 12:44
Default
  #7
New Member
 
Tian Coulsting
Join Date: Jun 2012
Posts: 19
Rep Power: 14
TianC is on a distinguished road
Yeah I did try that and it gave similar errors as to the one above (expecting } or EOF on various different lines). I suspect that this is a false lead because this is (to my understanding) for changing the syntax from pre version 2 of OpenFOAM to version 2 syntax. I believe it will already be in this syntax since the simulation is run in version 2.
TianC is offline   Reply With Quote

Old   August 9, 2012, 07:26
Default
  #8
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19
samiam1000 is on a distinguished road
Dear Friends,

I am trying to map fileds on two meshes which are the same, with a different patch.

I divided a patch into two patches and I wrote this mapFieldsDict:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      mapFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

patchMap        
(
wall_back wall-part_3-solid
wall-part_3-solid wall-part_3-solid
door door
inlet_hc1_right inlet_hc1_right
inlet_hc2_right inlet_hc2_right
intake_1 intake_1
intake_2 intake_2
symmetry symmetry
door_trick door_trick
pezzo_di_sopra pezzo_di_sopra
pezzo_di_sotto pezzo_di_sotto
air_ext_1 air_ext_1
air_ext_2 air_ext_2
);

cuttingPatches  
(
    
);


// ************************************************************************* //
This does not work. Any idea?

Thanks a lot,

Samuele
samiam1000 is offline   Reply With Quote

Old   January 16, 2013, 06:15
Default Error in cyclic BC
  #9
Member
 
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 13
diwakaranant is on a distinguished road
Hi All

I am trying to run an axisymmetric simulation for annular flow using rhoCentralFoam.
Considering axisymmetry, I have made a hexa mesh which is 1 cell thick in circumferential direction.
I have defined front and back faces as cyclic.

But when I am running rhoCentralFoam, following error is coming

--> FOAM FATAL IO ERROR:
Cannot find patchField entry for cyclic front
Is your field uptodate with split cyclics?
Run foamUpgradeCyclics to convert mesh and fields to split cyclics.


I ran foamUpgradeCyclics, after which following message came

Detected 0 old cyclics.

No changes made to boundary file.

Time: 0
Loading field p
No changes made to field p

Loading field T
No changes made to field T

Loading field U
No changes made to field U

Please help

Thanks
Anant
diwakaranant is offline   Reply With Quote

Reply


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
Parallel refineMesh with Cyclic Boundaries mchurchf OpenFOAM 8 December 22, 2018 12:11
Problem with cyclic boundaries in Openfoam 1.5 fs82 OpenFOAM 36 January 7, 2015 01:31
Problems with cyclic boundaries in faMeshDefinition and surfactantFoam safre OpenFOAM 3 December 12, 2011 08:56
[OpenFOAM] ParaView Postprocessing problems with cyclic boundaries christian ParaView 10 June 26, 2009 06:49
Cyclic Boundaries -> Match Option -> Arbitrary Derek Siemens 1 August 4, 2004 23:06


All times are GMT -4. The time now is 12:31.