Hi foamers,
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: [B]cannot find cylinderHead patch[/B] 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 [B]Transfered 500 faces from liner region to cylinder head[/B] 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.