diff --git a/applications/solvers/discreteMethods/dsmc/dsmcFoam/createFields.H b/applications/solvers/discreteMethods/dsmc/dsmcFoam/createFields.H new file mode 100644 index 0000000000000000000000000000000000000000..015afc73b28c9aabd8ad30a5a8cbe5423ac4a6cd --- /dev/null +++ b/applications/solvers/discreteMethods/dsmc/dsmcFoam/createFields.H @@ -0,0 +1,2 @@ +Info<< nl << "Constructing dsmcCloud " << endl; +dsmcCloud dsmc("dsmc", mesh); diff --git a/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C b/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C index a5e0562155e53c2d9dcc92b5169dae7fc4831e82..b5e3b1b222a4f1e97f80df7c5209d121eac7c894 100644 --- a/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C +++ b/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C @@ -37,16 +37,16 @@ Description int main(int argc, char *argv[]) { + #define NO_CONTROL + #include "postProcess.H" + #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" + #include "createFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info<< nl << "Constructing dsmcCloud " << endl; - - dsmcCloud dsmc("dsmc", mesh); - Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/createFields.H b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/createFields.H index d5ea5ef8b697f49bb362e825030dd2c3d31bd7bf..ce72e51d2bd1f7d21099f602337d12aad0addc75 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/createFields.H +++ b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/createFields.H @@ -1,55 +1,17 @@ - Info<< "\nReading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - word polyatomicCloudName("polyatomicCloud"); - - potential polyPot +Info<< "\nReading field U\n" << endl; +volVectorField U +( + IOobject ( + "U", + runTime.timeName(), mesh, - IOdictionary - ( - IOobject - ( - polyatomicCloudName + "Properties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ) - ); - - polyatomicCloud polyatomics(polyatomicCloudName, mesh, polyPot); + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); - word monoatomicCloudName("monoatomicCloud"); - - potential monoPot - ( - mesh, - IOdictionary - ( - IOobject - ( - monoatomicCloudName + "Properties", - mesh.time().constant(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE, - false - ) - ) - ); +potential pot(mesh); - monoatomicCloud monoatomics(monoatomicCloudName, mesh, monoPot); +moleculeCloud molecules(mesh, pot); diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C index 68f6530c95f08e3b4f3624b37d7abfb503f490da..a7998ef30ab2cce3fbc3c17e4266a3550725b5a2 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C +++ b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C @@ -32,34 +32,21 @@ Description #include "fvCFD.H" #include "md.H" +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + int main(int argc, char *argv[]) { + #define NO_CONTROL + #include "postProcess.H" + #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" + #include "createFields.H" + #include "temperatureAndPressureVariables.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info<< "\nReading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - potential pot(mesh); - - moleculeCloud molecules(mesh, pot); - - #include "temperatureAndPressureVariables.H" - label nAveragingSteps = 0; Info<< "\nStarting time loop\n" << endl; @@ -73,7 +60,6 @@ int main(int argc, char *argv[]) molecules.evolve(); #include "meanMomentumEnergyAndNMols.H" - #include "temperatureAndPressure.H" runTime.write();