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

[Other] engineFoam: unstable velocity field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2015, 10:04
Default engineFoam: unstable velocity field
  #1
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 12
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 04:07. Reason: changing the title, because the main issue has changed
mmeyer is offline   Reply With Quote

Old   April 14, 2015, 02:56
Default Log Files
  #2
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 12
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, 4 views)
File Type: txt log.engineFoam.txt (68.4 KB, 3 views)
File Type: txt log-2.engineFoam.txt (2.1 KB, 0 views)
File Type: txt logSummary.-180.txt (158 Bytes, 2 views)
File Type: txt log.refineMesh.txt (2.1 KB, 1 views)
mmeyer is offline   Reply With Quote

Old   April 14, 2015, 04:02
Default Update
  #3
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 12
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, 05:05
Default How can I define the missing Transformation Tensor?
  #4
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 12
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, 6 views)
File Type: txt log.createPatch.txt (3.6 KB, 1 views)
mmeyer is offline   Reply With Quote

Old   May 8, 2015, 07:51
Default Problem with cyclic boundary on engine sector mesh
  #5
Member
 
Tomislav Sencic
Join Date: Mar 2009
Posts: 42
Rep Power: 17
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, 06:49
Default check your transformation tensor
  #6
New Member
 
Max M.
Join Date: Sep 2014
Posts: 5
Rep Power: 12
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, 05:05
Default
  #7
Member
 
Tomislav Sencic
Join Date: Mar 2009
Posts: 42
Rep Power: 17
tsencic is on a distinguished road
Thank You very much. It's working now.
tsencic is offline   Reply With Quote

Old   August 11, 2017, 00:27
Default
  #8
New Member
 
Qiyan Zhou
Join Date: Sep 2016
Posts: 16
Rep Power: 10
zhouqy1994 is on a distinguished road
Hi mmeyer

I am facing the same problem now...

When using a sector for simulation, the velocity in the center of piston is unstable.

Have you got the solutions or any tips?

I am really confused by that

Thanks in advance


Sent from my iPhone using CFD Online Forum mobile app
zhouqy1994 is offline   Reply With Quote

Old   August 11, 2017, 08:55
Default
  #9
New Member
 
Qiyan Zhou
Join Date: Sep 2016
Posts: 16
Rep Power: 10
zhouqy1994 is on a distinguished road
my simulation runs fine from -180--146,and then the velocity becomes really high and then janafThermo out of range

Any advice is welcome

Thanks in advance


Sent from my iPhone using CFD Online Forum mobile app
zhouqy1994 is offline   Reply With Quote

Reply

Tags
cyclic boundary, enginefoam, kivatofoam


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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 08:56
A Question About Setting Whole Velocity Field Using "Proflie" in FLUENT adsl17754 FLUENT 5 July 31, 2018 05:29
Same pressure gradient but different velocity field TurbJet Main CFD Forum 22 April 28, 2018 04:35
potential flows, helmholtz decomposition and other stuffs pigna Main CFD Forum 1 October 26, 2017 09:34
importing velocity field instead of solving amin.enr OpenFOAM Running, Solving & CFD 0 November 10, 2015 16:55


All times are GMT -4. The time now is 19:48.