44int 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;
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;
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
void writeFluentField(const volScalarField &phi, const label fluentFieldIdentifier, Ostream &stream)
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< instant > instantList
List of instants.
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.