52 mkDir(time().rootPath()/time().caseName()/
"fluentInterface");
55 ofstream fluentMeshFile
61 time().caseName() +
".msh"
71 <<
"(0 \"Grid dimensions:\")" <<
std::endl;
89 label nFcs = nFaces();
96 << nFcs <<
" 0 0))" << std::endl <<
std::endl;
105 fluentMeshFile.setf(
ios::hex, ios::basefield);
119 << p[pointI].x() <<
" "
135 << own.size() <<
" 2 0)" << std::endl <<
"(" <<
std::endl;
141 fluentMeshFile <<
" ";
143 fluentMeshFile << l.
size() <<
" ";
147 fluentMeshFile << l[lI] + 1 <<
" ";
150 fluentMeshFile << nei[faceI] + 1 <<
" ";
151 fluentMeshFile << own[faceI] + 1 <<
std::endl;
156 label nWrittenFaces = own.size();
164 boundaryMesh()[patchI].faceCells();
170 <<
"(13 (" << patchI + 10 <<
" " << nWrittenFaces + 1
171 <<
" " << nWrittenFaces + patchFaces.
size() <<
" ";
173 nWrittenFaces += patchFaces.size();
176 if (isA<wallFvPatch>(
boundary()[patchI]))
180 else if (isA<symmetryFvPatch>(
boundary()[patchI]))
190 <<
" 0)" << std::endl <<
"(" <<
std::endl;
192 forAll (patchFaces, faceI)
196 fluentMeshFile <<
" ";
198 fluentMeshFile << l.
size() <<
" ";
204 fluentMeshFile << l[lI] + 1 <<
" ";
207 fluentMeshFile << patchFaceCells[faceI] + 1 <<
" 0" <<
std::endl;
225 bool hasWarned =
false;
229 if (cells[cellI].model() == tet)
231 fluentMeshFile <<
" " << 2;
233 else if (cells[cellI].model() == hex)
235 fluentMeshFile <<
" " << 4;
237 else if (cells[cellI].model() == pyr)
239 fluentMeshFile <<
" " << 5;
241 else if (cells[cellI].model() == prism)
243 fluentMeshFile <<
" " << 6;
251 WarningIn(
"void fluentFvMesh::writeFluentMesh() const")
252 <<
"foamMeshToFluent: cell shape for cell "
253 << cellI <<
" only supported by Fluent polyhedral meshes."
255 <<
" Suppressing any further messages for polyhedral"
256 <<
" cells." <<
endl;
258 fluentMeshFile <<
" " << 7;
268 fluentMeshFile <<
"(39 (1 fluid fluid-1)())" <<
std::endl;
269 fluentMeshFile <<
"(39 (2 interior interior-1)())" <<
std::endl;
275 <<
"(39 (" << patchI + 10 <<
" ";
278 if (isA<wallFvPatch>(
boundary()[patchI]))
280 fluentMeshFile <<
"wall ";
282 else if (isA<symmetryFvPatch>(
boundary()[patchI]))
284 fluentMeshFile <<
"symmetry ";
288 fluentMeshFile <<
"pressure-outlet ";