CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

engineFoam: unstable velocity field

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 13, 2015, 09:04
Default engineFoam: cyclicPolyPatch error
  #1
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 2
mmeyer is on a distinguished road
Hello Foamers,

I'm trying to simulate combustion in a diesel engine, by copying our Kiva mesh to the combustion/engineFoam/kivaTest tutorial case.

Our mesh does not contain the whole 360° cylinder, but a "piece of cake" with cyclic boundary.

Mesh conversion runs just fine, but engineFoam can only compute crank angles from -180° to at most -178° before the velocity field at the center of the piston is getting very unstable and finally janafThermo gives the Fatal Error.

Maybe just copying a cyclic mesh to the (non-cyclic) Tutorial Case isn't enough. Can anyone help me?

Thanks in advance, Max

Last edited by mmeyer; April 14, 2015 at 03:07. Reason: changing the title, because the main issue has changed
mmeyer is offline   Reply With Quote

Old   April 14, 2015, 01:56
Default Log Files
  #2
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 2
mmeyer is on a distinguished road
I am using Foam-Extend-3.1

These are my logfiles including an attempt to refine the mesh.
Attached Files
File Type: txt log.kivaToFoam.txt (2.2 KB, 2 views)
File Type: txt log.engineFoam.txt (68.4 KB, 2 views)
File Type: txt log-2.engineFoam.txt (2.1 KB, 0 views)
File Type: txt logSummary.-180.txt (158 Bytes, 1 views)
File Type: txt log.refineMesh.txt (2.1 KB, 0 views)
mmeyer is offline   Reply With Quote

Old   April 14, 2015, 03:02
Default Update
  #3
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 2
mmeyer is on a distinguished road
I edited the global controlDict in the following way:

Code:
...
DebugSwitches
  {
    cyclic  1;
    ...
  }
...
Tolerances
  {
    patchFaceMatchTol  1e-3;
    ...
  }
...
Thereby I gained almost 30° of crank angle, but in every step a Serious Error in cyclicPolyPatch occurs:

Code:
cyclicPolyPatch::calcTransforms : Writing half0 faces to file "/home/mmeyer/foam/mmeyer-3.1/run/KIVAgrid/kivaTest/VTK/cyclic_half0_faces"
cyclicPolyPatch::calcTransforms : Writing half1 faces to file "/home/mmeyer/foam/mmeyer-3.1/run/KIVAgrid/kivaTest/VTK/cyclic_half1_faces"
Unknown transform: calculating transform from geometry
--> FOAM Serious Error : 
    From function void cyclicPolyPatch::calcTransforms() const
    in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 246
    Transformation tensor is not constant for the cyclic patch cyclic.  Please reconsider your setup and definition of cyclic boundaries.
cyclicPolyPatch::calcTransforms : Writing transform_half0 faces to file "/home/mmeyer/foam/mmeyer-3.1/run/KIVAgrid/kivaTest/VTK/cyclic_transform_half0_faces"
After a couple of these, Foam aborts because of "Too many errors"
mmeyer is offline   Reply With Quote

Old   April 14, 2015, 04:05
Default How can I define the missing Transformation Tensor?
  #4
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 2
mmeyer is on a distinguished road
My latest approach is to define the unknown transformation tensor by hand, but I don't know if the faceSets are created and named properly by the kivaToFoam tool.
Attached Files
File Type: txt createPatchDict.txt (3.1 KB, 3 views)
File Type: txt log.createPatch.txt (3.6 KB, 1 views)
mmeyer is offline   Reply With Quote

Old   May 8, 2015, 06:51
Default Problem with cyclic boundary on engine sector mesh
  #5
Member
 
Tomislav Sencic
Join Date: Mar 2009
Posts: 42
Rep Power: 8
tsencic is on a distinguished road
I am trying to simulate a diesel engine using a sector of 51 degree mesh.
I use the foam-extend-3.1 version. The mesh is created with blockMesh.

I obtain the error
--> FOAM FATAL ERROR:
face 2 area does not match neighbour 5 by 179.301% -- possible face ordering problem.
patch:front my area:155.763 neighbour area:2854.34 matching tolerance:0.0001
Mesh face:19 vertices:4((15.4535 -7.43725 -13.65) (22.0764 -10.6246 -19.5) (28.2262 -13.5844 0) (19.7584 -9.50906 0))
Neighbour face:22 vertices:4((28.2262 -13.5844 0) (48.6582 -23.4176 0) (48.6582 -23.4176 125.88) (28.2262 -13.5844 125.88))
Other errors also exist, only the largest is reported. Please rerun with cyclic debug flag set for more information.


This is my blockMeshDict file:
/*--------------------------------------------------------------------------*
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.0 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root ;
case ;
instance ;
local ;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.001;
vertices

(
(0.973163 -0.468352 -17.8) //0
(22.0764 -10.6246 -19.5) //1
(22.0764 10.6246 -19.5) //2
(0.973163 0.468352 -17.8) //3
(0.973163 -0.468352 0) //4
(28.2262 -13.5844 0) //5
(48.6582 -23.4176 0) //6
(48.6582 23.4176 0) //7
(28.2262 13.5844 0) //8
(0.973163 0.468352 0) //9
(0.973163 -0.468352 125.88) //10
(28.2262 -13.5844 125.88) //11
(48.6582 -23.4176 125.88) //12
(48.6582 23.4176 125.88) //13
(28.2262 13.5844 125.88) //14
(0.973163 0.468352 125.88) //15
(15.4535 -7.43725 -13.65) //16
(15.4535 7.43725 -13.65) //17
(19.7584 -9.50906 0) //18
(19.7584 9.50906 0) //19
(19.7584 -9.50906 125.88) //20
(19.7584 9.50906 125.88) //21
(0.973163 -0.468352 -8.9) //22
(0.973163 0.468352 -8.9) //23
);

blocks
(
hex (0 1 2 3 22 16 17 23) (10 25 6) simpleGrading (1 1 1)
hex (22 16 17 23 4 18 19 9) (10 25 14) simpleGrading (1 1 1)
hex (16 1 2 17 18 5 8 19) (6 25 14) simpleGrading (1 1 1)
hex (4 18 19 9 10 20 21 15) (10 25 26) simpleGrading (1 1 1)
hex (18 5 8 19 20 11 14 21) (6 25 26) simpleGrading (1 1 1)
hex (5 6 7 8 11 12 13 14) (16 25 26) simpleGrading (1 1 1)
);

edges
(
arc 0 3 (1.08 0 -17.8)
arc 1 2 (24.5 0 -19.5)
arc 4 9 (1.08 0 0)
arc 5 8 (31.325 0 0)
arc 6 7 (54 0 0)
arc 10 15 (1.08 0 125.88)
arc 11 14 (31.325 0 125.88)
arc 12 13 (54 0 125.88)
arc 22 23 (1.08 0 -8.9)
arc 16 17 (17.15 0 -13.65)
arc 18 19 (21.9275 0 0)
arc 20 21 (21.9275 0 125.88)
spline 0 1( (4.50539 -2.1683 -19) (9.01077 -4.33659 -20) (16.2194 -7.80586 -21) )
spline 3 2( (4.50539 2.1683 -19) (9.01077 4.33659 -20) (16.2194 7.80586 -21) )
spline 1 5( (28.2262 -13.5844 -11) )
spline 2 8( (28.2262 13.5844 -11) )
);

patches
(
wall
piston
(
( 0 1 2 3)
( 1 2 8 5)
(5 6 7 8)
)
wall
liner
(
( 6 12 13 7)
)
wall
cylinderHead
(
( 10 20 21 15)
( 20 11 14 21)
( 11 12 13 14)
)
symmetryPlane
symmetryFaces
(
( 0 22 23 3)
( 22 4 9 23)
( 4 10 15 9)
)
cyclic
front
(
( 0 1 16 22)
( 22 16 18 4)
( 16 1 5 18 )
( 4 18 20 10)
( 18 5 11 20)
( 5 6 12 11)
)

cyclic
back
(
( 3 23 17 2)
( 23 9 19 17)
( 17 19 8 2)
( 9 15 21 19)
( 19 21 14 8)
( 8 14 13 7)
)
);

mergePatchPairs ();
// ************************************************** *********************** //

I also tried to have one cyclic boundary, frontAndBack, then I get:

--> FOAM Serious Error :
From function void cyclicPolyPatch::calcTransforms() const
in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 246
Transformation tensor is not constant for the cyclic patch frontAndBack. Please reconsider your setup and definition of cyclic boundaries.

I remember that I used this kind of mesh on earlier OF versions, like OF-1.4 and 1.5. It should be a simple thing, this is not a complex geometry and is similar for many engine applications, but I see many have problems with cyclics :-(
How could I solve the problem?
tsencic is offline   Reply With Quote

Old   May 11, 2015, 05:49
Default check your transformation tensor
  #6
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 2
mmeyer is on a distinguished road
Quote:
--> FOAM FATAL ERROR:
face 2 area does not match neighbour 5 by 179.301% -- possible face ordering problem.
So, you use rotational cyclic boundaries, too (?). The error above could be related to the transformation tensor. In order to simulate a 51° sector of the cylinder, I had to define a 309° transformation tensor in ./constant/polyMesh/boundary:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     3.1                                |
|   \\  /    A nd           | Web:         http://www.extend-project.de       |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
    piston
    {
        type            wall;
        nFaces          2140;
        startFace       165197;
    }
    liner
    {
        type            wall;
        nFaces          460;
        startFace       167337;
    }
    cylinderHead
    {
        type            wall;
        nFaces          1700;
        startFace       167797;
    }
    cyclic
    {
        type            cyclic;
        nFaces          5686;
        startFace       169497;
        featureCos      0.9;
        transform       rotational;
        rotationAxis    (0 0 1);
        rotationCentre  (0 0 0);
        rotationAngle   308.571;
    }
)

// ************************************************************************* //
mmeyer is offline   Reply With Quote

Old   May 22, 2015, 04:05
Default
  #7
Member
 
Tomislav Sencic
Join Date: Mar 2009
Posts: 42
Rep Power: 8
tsencic is on a distinguished road
Thank You very much. It's working now.
tsencic is offline   Reply With Quote

Reply

Tags
cyclic boundary, enginefoam, kivatofoam

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 51 June 28, 2015 16:36
A Question About Setting Whole Velocity Field Using "Proflie" in FLUENT adsl17754 FLUENT 4 July 10, 2014 07:42
Initial Velocity Field - 2D Turbulence in a Periodic Box AHutchison OpenFOAM Running, Solving & CFD 0 May 28, 2013 00:18
accessing another velocity field in bc daviderzen OpenFOAM 0 April 20, 2011 06:24
transient temperature field with constant velocity Törnquist CFX 0 September 16, 2003 04:22


All times are GMT -4. The time now is 01:10.