44 int main(
int argc,
char *argv[])
48 "Translate OpenFOAM data to Fluent format" 50 argList::noParallel();
51 timeSelector::addOptions(
false);
65 runTime.setTime(timeDirs[timeI], timeI);
69 if (
mesh.readUpdate())
78 OFstream fluentDataFile
87 <<
"(0 \"FOAM to Fluent data File\")" <<
endl <<
endl;
90 label nFaces =
mesh.nFaces();
94 nFaces +=
mesh.boundary()[patchi].size();
98 <<
"(33 (" <<
mesh.nCells() <<
" " << nFaces <<
" " 101 IOdictionary foamDataToFluentDict
105 "foamDataToFluentDict",
108 IOobject::MUST_READ_IF_MODIFIED,
119 for (
const word& fieldName : objects.sortedNames<
volScalarField>())
125 foamDataToFluentDict.readIfPresent(fieldName, unitNumber)
132 Info<<
" Converting field " << fieldName <<
nl;
139 for (
const word& fieldName : objects.sortedNames<
volVectorField>())
145 foamDataToFluentDict.readIfPresent(fieldName, unitNumber)
152 Info<<
" Converting field " << fieldName <<
nl;
List< instant > instantList
List of instants.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< vector, fvPatchField, volMesh > volVectorField
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
void writeFluentField(const volScalarField &phi, const label fluentFieldIdentifier, Ostream &stream)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Foam::argList args(argc, argv)