55 mkDir(time().rootPath()/time().caseName()/
"fluentInterface");
58 std::ofstream fluentMeshFile
63 / time().caseName() +
".msh"
66 Info<<
"Writing Fluent Mesh" <<
endl;
69 <<
"(0 \"OpenFOAM to Fluent Mesh File\")" <<
nl <<
nl
70 <<
"(0 \"Dimension:\")" <<
nl
71 <<
"(2 3)" <<
nl <<
nl
72 <<
"(0 \"Grid dimensions:\")" <<
nl;
79 fluentMeshFile.setf(
ios::hex, ios::basefield);
90 label nFcs = nFaces();
106 fluentMeshFile.setf(
ios::hex, ios::basefield);
120 <<
p[pointi].x() <<
" "
142 fluentMeshFile <<
" ";
144 fluentMeshFile << l.size() <<
" ";
148 fluentMeshFile << l[lI] + 1 <<
" ";
151 fluentMeshFile << nei[facei] + 1 <<
" ";
152 fluentMeshFile << own[facei] + 1 <<
std::endl;
157 label nWrittenFaces = own.size();
162 const faceUList& patchFaces = boundaryMesh()[patchi];
165 boundaryMesh()[patchi].faceCells();
171 <<
"(13 (" << patchi + 10 <<
" " << nWrittenFaces + 1
172 <<
" " << nWrittenFaces + patchFaces.size() <<
" ";
174 nWrittenFaces += patchFaces.size();
177 if (isA<wallFvPatch>(
boundary()[patchi]))
183 isA<symmetryPlaneFvPatch>(
boundary()[patchi])
184 || isA<symmetryFvPatch>(
boundary()[patchi])
201 fluentMeshFile <<
" ";
203 fluentMeshFile << l.size() <<
" ";
210 fluentMeshFile << l[lI] + 1 <<
" ";
213 fluentMeshFile << patchFaceCells[facei] + 1 <<
" 0" <<
std::endl;
221 <<
"(12 (1 1 " << nCells() <<
" 1 0)" <<
nl
233 int nElemPerLine = 25;
237 if (nElemPerLine == 25)
240 fluentMeshFile <<
"\n ";
243 else if (!(nElemPerLine % 5))
252 if (
cells[celli].model() == tet)
256 else if (
cells[celli].model() ==
hex)
260 else if (
cells[celli].model() == pyr)
264 else if (
cells[celli].model() == prism)
281 Info<<
"Mesh had " << nPolys <<
" polyhedrals." <<
endl;
289 fluentMeshFile <<
"(39 (1 fluid fluid-1)())" <<
std::endl;
290 fluentMeshFile <<
"(39 (2 interior interior-1)())" <<
std::endl;
296 <<
"(39 (" << patchi + 10 <<
" ";
299 if (isA<wallFvPatch>(
boundary()[patchi]))
301 fluentMeshFile <<
"wall ";
305 isA<symmetryPlaneFvPatch>(
boundary()[patchi])
306 || isA<symmetryFvPatch>(
boundary()[patchi])
309 fluentMeshFile <<
"symmetry ";
313 fluentMeshFile <<
"pressure-outlet ";