39 int main(
int argc,
char *argv[])
41 argList::noParallel();
42 timeSelector::addOptions(
false);
52 mkDir(runTime.rootPath()/runTime.caseName()/
"fluentInterface");
56 runTime.setTime(timeDirs[timeI], timeI);
58 Info<<
"Time = " << runTime.timeName() <<
endl;
60 if (
mesh.readUpdate())
66 mkDir(runTime.rootPath()/runTime.caseName()/
"fluentInterface");
69 OFstream fluentDataFile
74 runTime.caseName() + runTime.timeName() +
".dat" 78 <<
"(0 \"FOAM to Fluent data File\")" << endl <<
endl;
89 <<
"(33 (" <<
mesh.nCells() <<
" " << nFaces <<
" " 92 IOdictionary foamDataToFluentDict
96 "foamDataToFluentDict",
99 IOobject::MUST_READ_IF_MODIFIED,
106 IOobjectList objects(
mesh, runTime.timeName());
113 IOobjectList scalarFields(objects.lookupClass(
"volScalarField"));
124 foamDataToFluentDict.readIfPresent(field.name(), unitNumber)
128 Info<<
" Converting field " << field.name() <<
endl;
138 IOobjectList vectorFields(objects.lookupClass(
"volVectorField"));
149 foamDataToFluentDict.readIfPresent(field.name(), unitNumber)
153 Info<<
" Converting field " << field.name() <<
endl;
List< instant > instantList
List of instants.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void writeFluentField(const volScalarField &phi, const label fluentFieldIdentifier, Ostream &stream)
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
Foam::argList args(argc, argv)