mapFields - Changing from turbulentInlet/outlet boundaries to cyclic boundaries
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 |
Why do you need mapFields? If you only change the type of the boundary, there is no matching necessary, right?
|
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 |
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. |
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; } |
Did you try this (from your error message)
Quote:
|
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.
|
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++ -*----------------------------------*\ Thanks a lot, Samuele |
Error in cyclic BC
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 |
All times are GMT -4. The time now is 20:46. |