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

[Other] engineFoam new mesh problem

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By ayhan515
  • 1 Post By ayhan515

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2011, 09:36
Arrow engineFoam new mesh problem
  #1
Member
 
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 17
ayhan515 is on a distinguished road
I run tutorial kivaTest case without fail.
I want to increase compression ratio value, like diesel engine, about 20.

I converted existent kiva mesh (otape17) to OpenFoam mesh(polymesh) with kivaToFoam command. It is ok no problem.
Then i converted OpenFoam mesh(polymesh) to a Fluent mesh(*.msh) with foamMeshToFluent command. It is ok no problem.

I deleted polyMesh folder which in constant folder.

This time I converted Fluent mesh(*.msh) to OpenFoam mesh(polymesh) to a by fluent3DMeshToFoam command. It is ok no problem.
I execute engineFoam command. it runs without problem.

Code:
kiva mesh ---->> OpenFoam mesh  ---->>  Fluent Mesh
 (otape17)              (polyMesh)      <<----      (*.msh)  
                                          |
                                          |
                                          v
                                    engineFoam
                                   (works well)
After I changed the Fluent mesh then I convert new Fluent mesh to OpenFoam mesh(polymesh) to a by fluent3DMeshToFoam command. It is ok no problem.

Code:
 New Fluent Mesh   ---->> New OpenFoam mesh     xxxx    engineFoam
    (New.msh)                    (polyMesh)                               (Failed)
When I execute engineFoam command with new mesh. It gave this error message then exit.

Code:
// * * * * * * * * * * * * * * *  * * * * * * * * * * * * * * * //
Create engine time

Create mesh for time = -180

Selecting engineMesh layered


--> FOAM FATAL ERROR: 
cannot find cylinderHead patch

    From function engineMesh::engineMesh(const IOobject& io)
    in file engineMesh/engineMesh/engineMesh.C at line 90.

FOAM exiting
I think problem caused from "cylinderHead patch".

In kivaToFoam command this problem solved by "Transfered xx faces from liner region to cylinder head"


Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Reading kiva grid from file "otape17"
Finished reading KIVA file
Transfered 500 faces from liner region to cylinder head

Default patch type set to empty
Writing polyMesh
Writing cell zoning info to file: "/home/ayhan/OpenFOAM/ayhan-2.0.1/run/tutorials/combustion/engineFoam/kivaTest/constant/region0/cellZoning"
End
I suppose solution in the below file
/opt/openfoam201/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
Code:
// Transfer liner faces that are above the minimum cylinder-head z height
// into the cylinder-head region
if
(
    pFaces[LINER].size()
 && pFaces[LINER][0].size()
 && pFaces[CYLINDERHEAD].size()
 && pFaces[CYLINDERHEAD][0].size()
)
{
    scalar minz = GREAT;

    forAllConstIter(SLList<face>, pFaces[CYLINDERHEAD][0], iter)
    {
        const face& pf = iter();

        forAll(pf, pfi)
        {
            minz = min(minz, points[pf[pfi]].z());
        }
    }

    minz += SMALL;

    SLList<face> newLinerFaces;

    forAllConstIter(SLList<face>, pFaces[LINER][0], iter)
    {
        const face& pf = iter();

        scalar minfz = GREAT;
        forAll(pf, pfi)
        {
            minfz = min(minfz, points[pf[pfi]].z());
        }

        if (minfz > minz)
        {
            pFaces[CYLINDERHEAD][0].append(pf);
        }
        else
        {
            newLinerFaces.append(pf);
        }
    }

    if (pFaces[LINER][0].size() != newLinerFaces.size())
    {
        Info<< "Transfered " << pFaces[LINER][0].size() - newLinerFaces.size()
            << " faces from liner region to cylinder head" << endl;
        pFaces[LINER][0] = newLinerFaces;
    }

    SLList<face> newCylinderHeadFaces;

    forAllConstIter(SLList<face>, pFaces[CYLINDERHEAD][0], iter)
    {
        const face& pf = iter();

        scalar minfz = GREAT;
        forAll(pf, pfi)
        {
            minfz = min(minfz, points[pf[pfi]].z());
        }

        if (minfz < zHeadMin)
        {
            pFaces[LINER][0].append(pf);
        }
        else
        {
            newCylinderHeadFaces.append(pf);
        }
    }

    if (pFaces[CYLINDERHEAD][0].size() != newCylinderHeadFaces.size())
    {
        Info<< "Transfered faces from cylinder-head region to linder" << endl;
        pFaces[CYLINDERHEAD][0] = newCylinderHeadFaces;
    }
}
The question is how can i apply this solving. How can i transfer faces from liner region to cylinder head while i convert new fluent mesh to polyMesh.

Thanks in advance.

Last edited by ayhan515; October 13, 2011 at 02:54.
ayhan515 is offline   Reply With Quote

Old   October 18, 2011, 10:03
Arrow
  #2
Member
 
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 17
ayhan515 is on a distinguished road
I used checkMesh command now. The output is below.

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-51f1de99a4bc
Exec   : checkMesh
Date   : Oct 18 2011
Time   : 15:46:26
Host   : ubuntu
PID    : 2780
Case   : /home/ayhan/OpenFOAM/ayhan-2.0.1/run/tutorials/combustion/engineFoam/kivaTest-fluent-11-10-2011
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = -180

Time = -180

Mesh stats
    points:           30742
    faces:            85742
    internal faces:   79522
    cells:            27544
    boundary patches: 3
    point zones:      0
    face zones:       1
    cell zones:       1

Overall number of cells of each type:
    hexahedra:     27544
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
    Patch               Faces    Points   Surface topology                  
    piston              1326     1400     ok (non-closed singly connected)  
    liner               2710     2858     ok (non-closed singly connected)  
    cylinderhead        2184     2260     ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-0.046 -0.0459845 -0.0089896) (0.046 0.0459845 0.20335)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (2.0111e-20 -4.34397e-19 6.81738e-20) OK.
    Max cell openness = 2.54332e-16 OK.
    Max aspect ratio = 68.0635 OK.
    Minumum face area = 4.94833e-07. Maximum face area = 8.23324e-05.  Face area magnitudes OK.
    Min volume = 6.14138e-10. Max volume = 2.72275e-07.  Total volume = 0.00126259.  Cell volumes OK.
    Mesh non-orthogonality Max: 86.981 average: 37.3601
   *Number of severely non-orthogonal faces: 5320.
    Non-orthogonality check OK.
  <<Writing 5320 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 3.89796 OK.

Mesh OK.

End
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-51f1de99a4bc
Exec   : engineFoam
Date   : Oct 18 2011
Time   : 15:47:49
Host   : ubuntu
PID    : 2985
Case   : /home/ayhan/OpenFOAM/ayhan-2.0.1/run/tutorials/combustion/engineFoam/kivaTest-fluent-11-10-2011
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create engine time

Create mesh for time = -180

Selecting engineMesh layered


--> FOAM FATAL ERROR: 
cannot find cylinderHead patch

    From function engineMesh::engineMesh(const IOobject& io)
    in file engineMesh/engineMesh/engineMesh.C at line 90.

FOAM exiting
Quote:
I still get same error when i try to use engineFoam.
While i am writing this above message i noticed these
Quote:
cylinderhead 2184 2260 ok (non-closed singly connected)
and
Quote:
cannot find cylinderHead patch
Then i changed cylinderhead to cylinderHead in boundary file of polyMesh folder.
Then now engineFoam is working. I am really shame on myself.
songwukong and kaveh19 like this.
ayhan515 is offline   Reply With Quote

Old   May 1, 2012, 05:29
Default
  #3
New Member
 
Wang
Join Date: Sep 2010
Posts: 6
Rep Power: 16
enjoybitter is on a distinguished road
Good Experience!
Thanks for your sharing.
enjoybitter is offline   Reply With Quote

Old   August 9, 2015, 09:19
Default
  #4
Member
 
Join Date: Jul 2015
Posts: 33
Rep Power: 11
kaveh19 is on a distinguished road
Hi ayhan515,
thanks for your shearing.
how we can figure the volume of default geometry out and then know the compression ratio and clearance volume in kivaTest ?
thanks in advance.
kaveh19 is offline   Reply With Quote

Old   August 10, 2015, 06:37
Arrow
  #5
Member
 
Ayhan Eses
Join Date: Mar 2009
Posts: 35
Rep Power: 17
ayhan515 is on a distinguished road
Quote:
Originally Posted by kaveh19 View Post
Hi ayhan515,
thanks for your shearing.
how we can figure the volume of default geometry out and then know the compression ratio and clearance volume in kivaTest ?
thanks in advance.
open a openfoam terminal and use these commands.
Code:
1
cd combustion/engineFoam/kivaTest
2
kivaToFoam
3
engineCompRatio
the output
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.4.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.4.0-f0842aea0e77
Exec   : engineCompRatio
Date   : Aug 10 2015
Time   : 12:29:32
Host   : "ayhan-virtual-machine"
PID    : 3716
Case   : /home/ayhan/OpenFOAM/ayhan-2.4.0/run/tutorials/combustion/engineFoam/kivaTest
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create engine time

Create mesh for time = -180

Selecting engineMesh layered
deckHeight: 0.085639
piston position: 0
Using dynamicCode for functionObject timeStep at line 58 in "/home/ayhan/OpenFOAM/ayhan-2.4.0/run/tutorials/combustion/engineFoam/kivaTest/system/controlDict.functions.timeStep"
Creating new library in "dynamicCode/setDeltaT/platforms/linux64GccDPOpt/lib/libsetDeltaT_7bdeade1ab21a2b1d5fab42a96396cc9eda6b864.so"
Invoking "wmake -s libso /home/ayhan/OpenFOAM/ayhan-2.4.0/run/tutorials/combustion/engineFoam/kivaTest/dynamicCode/setDeltaT"
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file functionObjectTemplate.C
Making dependency list for source file FilterFunctionObjectTemplate.C
'/home/ayhan/OpenFOAM/ayhan-2.4.0/run/tutorials/combustion/engineFoam/kivaTest/dynamicCode/setDeltaT/../platforms/linux64GccDPOpt/lib/libsetDeltaT_7bdeade1ab21a2b1d5fab42a96396cc9eda6b864.so' is up to date.
CA = 0
deltaZ = 0.08423
clearance: 0.001409
Piston speed = 4.2115 m/s

Vmax = 0.000631297, Vmin = 7.15569e-05
Vmax/Vmin = 8.82231

End
kaveh19 likes this.
ayhan515 is offline   Reply With Quote

Old   August 10, 2015, 09:45
Default
  #6
Member
 
Join Date: Jul 2015
Posts: 33
Rep Power: 11
kaveh19 is on a distinguished road
hi ayhan515,
I appreciate u.
yes ,I did ,but unfortunately I don't have any idea.
I have some question . would you mind helping me?
1) I want to run the bore*stroke=76*66 in different compression ratio e.g.,12 and 20. How can i create this C.R ?
2) When i run bore*stroke = 86*86 for KivaTest ,it runs until -5 not 60 . what's the reason?
thanks in advance.
kaveh19 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
Dynamic Mesh Problem. Tom Clark FLUENT 10 June 21, 2021 05:27
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell Arman_N OpenFOAM Meshing & Mesh Conversion 1 May 20, 2019 18:16
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
[ICEM] ICEM Structured Mesh Problem OMJT ANSYS Meshing & Geometry 3 March 22, 2013 11:06
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 22:11


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