diff --git a/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C b/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C index cb068960e8e459dc3c3fc7db1d45e458f649c552..7a4d8ce8b92c7e14a9dfa14eb67a790e7533c3cb 100644 --- a/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C +++ b/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/test/ptrList/Make/files b/applications/test/ptrList/Make/files deleted file mode 100644 index 2a4e0ad01b0034628d241506a8a8919e9b30b214..0000000000000000000000000000000000000000 --- a/applications/test/ptrList/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -ptrListTest.C - -EXE = $(FOAM_USER_APPBIN)/ptrListTest diff --git a/applications/test/ptrList/Make/options b/applications/test/ptrList/Make/options deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/applications/test/ptrList/ptrListTest.C b/applications/test/ptrList/ptrListTest.C deleted file mode 100644 index 7b2f6722bcc637a1c63d4ae42834a8075062f077..0000000000000000000000000000000000000000 --- a/applications/test/ptrList/ptrListTest.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "PtrList.H" -#include "scalar.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Main program: - -int main(int argc, char *argv[]) -{ - PtrList<scalar> list(10); - - forAll(list, i) - { - list.set(i, new scalar(i)); - } - - for - ( - PtrList<scalar>::iterator iter = list.begin(); - iter != list.end(); - ++iter - ) - { - Info<< *iter << endl; - } - - Info<< list << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C index 1bcee69984d1f8b32fed33fc9be7b434e78f2954..1d034714efe91a489d0f6a90b5f8c2d67988ea6c 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C @@ -243,14 +243,7 @@ int main(int argc, char *argv[]) meshDict.lookup("mergePatchPairs") ); - if (mergePatchPairs.size()) - { - FatalErrorIn(args.executable()) - << "mergePatchPairs not currently supported." - << exit(FatalError); - } - - //// #include "mergePatchPairs.H" +# include "mergePatchPairs.H" } else { diff --git a/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.C b/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H similarity index 100% rename from applications/utilities/mesh/generation/blockMesh/mergePatchPairs.C rename to applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index e3536a5ad05862bd0370cf9e000992673797d944..859ddf20a277f137d522f75bc779f6bd98f7623d 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -63,6 +63,7 @@ Description #include "slidingInterface.H" #include "perfectInterface.H" #include "IOobjectList.H" +#include "ReadFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -90,34 +91,6 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name) } -// Read field -template<class GeoField> -void readFields -( - const fvMesh& mesh, - const IOobjectList& objects, - PtrList<GeoField>& fields -) -{ - // Search list of objects for volScalarFields - IOobjectList fieldObjects(objects.lookupClass(GeoField::typeName)); - - // Construct the vol scalar fields - fields.setSize(fieldObjects.size()); - - label fieldi = 0; - for - ( - IOobjectList::iterator iter = fieldObjects.begin(); - iter != fieldObjects.end(); - ++iter - ) - { - fields.set(fieldi++, new GeoField(*iter(), mesh)); - } -} - - // Main program: int main(int argc, char *argv[]) @@ -343,7 +316,8 @@ int main(int argc, char *argv[]) cutZoneName, masterPatchName, slavePatchName, - tom // integral or partial + tom, // integral or partial + true // couple/decouple mode ) ); } @@ -355,30 +329,30 @@ int main(int argc, char *argv[]) // Read all current fvFields so they will get mapped Info<< "Reading all current volfields" << endl; PtrList<volScalarField> volScalarFields; - readFields(mesh, objects, volScalarFields); + ReadFields(mesh, objects, volScalarFields); PtrList<volVectorField> volVectorFields; - readFields(mesh, objects, volVectorFields); + ReadFields(mesh, objects, volVectorFields); PtrList<volSphericalTensorField> volSphericalTensorFields; - readFields(mesh, objects, volSphericalTensorFields); + ReadFields(mesh, objects, volSphericalTensorFields); PtrList<volSymmTensorField> volSymmTensorFields; - readFields(mesh, objects, volSymmTensorFields); + ReadFields(mesh, objects, volSymmTensorFields); PtrList<volTensorField> volTensorFields; - readFields(mesh, objects, volTensorFields); + ReadFields(mesh, objects, volTensorFields); //- uncomment if you want to interpolate surface fields (usually bad idea) //Info<< "Reading all current surfaceFields" << endl; //PtrList<surfaceScalarField> surfaceScalarFields; - //readFields(mesh, objects, surfaceScalarFields); + //ReadFields(mesh, objects, surfaceScalarFields); // //PtrList<surfaceVectorField> surfaceVectorFields; - //readFields(mesh, objects, surfaceVectorFields); + //ReadFields(mesh, objects, surfaceVectorFields); // //PtrList<surfaceTensorField> surfaceTensorFields; - //readFields(mesh, objects, surfaceTensorFields); + //ReadFields(mesh, objects, surfaceTensorFields); if (!overwrite) { @@ -394,11 +368,22 @@ int main(int argc, char *argv[]) if (overwrite) { mesh.setInstance(oldInstance); + stitcher.instance() = oldInstance; } Info << nl << "Writing polyMesh to time " << runTime.timeName() << endl; IOstream::defaultPrecision(10); - if (!mesh.write()) + + // Bypass runTime write (since only writes at outputTime) + if + ( + !runTime.objectRegistry::writeObject + ( + runTime.writeFormat(), + IOstream::currentVersion, + runTime.writeCompression() + ) + ) { FatalErrorIn(args.executable()) << "Failed writing polyMesh." diff --git a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C index c8dd69c4428c67f13d95915f2016c7ad29b6186b..0140ba4e232affb451fc499b1ba2048fa7361ab0 100644 --- a/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C +++ b/applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C @@ -41,6 +41,7 @@ Description #include "pointFields.H" #include "cellIOList.H" #include "IOobjectList.H" +#include "IOPtrList.H" #include "writeMeshObject.H" #include "fieldDictionary.H" @@ -49,6 +50,14 @@ using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +namespace Foam +{ + defineTemplateTypeNameAndDebug(IOPtrList<entry>, 0); +} + + +// Main program: + int main(int argc, char *argv[]) { timeSelector::addOptions(); @@ -67,6 +76,9 @@ int main(int argc, char *argv[]) writeMeshObject<labelIOList>("neighbour", runTime); writeMeshObject<faceIOList>("faces", runTime); writeMeshObject<pointIOField>("points", runTime); + writeMeshObject<IOPtrList<entry> >("cellZones", runTime); + writeMeshObject<IOPtrList<entry> >("faceZones", runTime); + writeMeshObject<IOPtrList<entry> >("pointZones", runTime); // Get list of objects from the database IOobjectList objects(runTime, runTime.timeName()); diff --git a/applications/utilities/miscellaneous/foamFormatConvert/writeMeshObject.H b/applications/utilities/miscellaneous/foamFormatConvert/writeMeshObject.H index 383154223eb76b9c83d32565efa97f86a2fbfd66..10b6d83d90e18e9e2ae8816db78f679b19c0c8f7 100644 --- a/applications/utilities/miscellaneous/foamFormatConvert/writeMeshObject.H +++ b/applications/utilities/miscellaneous/foamFormatConvert/writeMeshObject.H @@ -61,8 +61,17 @@ inline bool writeMeshObject(const word& name, Time& runTime) Info<< " Reading " << io.headerClassName() << " : " << name << endl; + // Switch off type checking (for reading e.g. faceZones as + // generic list of dictionaries). + const word oldTypeName = T::typeName; + const_cast<word&>(T::typeName) = word::null; + T meshObject(io); + const_cast<word&>(T::typeName) = oldTypeName; + // Fake type back to what was in field + const_cast<word&>(meshObject.type()) = io.headerClassName(); + Info<< " Writing " << name << endl; writeOk = meshObject.regIOobject::write(); } diff --git a/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C index 15c1153db5b17dec5191b50311c85937d588e88b..95077df225fbae93d2ac8db5d3584c81dbe68a60 100644 --- a/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C +++ b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C b/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C index c2f797c17e0d027bcdfc6ccd86770f03c6a4ae4d..f8b831001df83cdafbfb6998a79312ed03176049 100644 --- a/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C +++ b/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/containers/Lists/ListOps/ListOps.H b/src/OpenFOAM/containers/Lists/ListOps/ListOps.H index 7de9239d04deed112a68f7ddf745c5d1d933133c..1504fb4d78363167fd2f4e934270702728afc71d 100644 --- a/src/OpenFOAM/containers/Lists/ListOps/ListOps.H +++ b/src/OpenFOAM/containers/Lists/ListOps/ListOps.H @@ -73,7 +73,7 @@ void inplaceReorder(const UList<label>& oldToNew, ListType&); template<class Container> void inplaceMapValue(const UList<label>& oldToNew, Container&); -//- Recreate with mapped keys. Remove elements with negative key. +//- Recreate with mapped keys. Do not map elements with negative key. template<class Container> void inplaceMapKey(const UList<label>& oldToNew, Container&); diff --git a/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C b/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C index f2178ee38df53e583476328496325f068ef8fc34..dd8536eec9b9f1466c518e2069c4a96b489cdc80 100644 --- a/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C +++ b/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C @@ -147,7 +147,7 @@ void Foam::inplaceMapKey Container& lst ) { - Container newLst(lst); + Container newLst(lst.size()); for ( diff --git a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C index 82e77d76740542a500cfe0be5ccfbd7302bde215..18d1170c0073161c32dd6d9023aa0aef7fbc2d45 100644 --- a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C +++ b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C @@ -35,9 +35,11 @@ License #include "plane.H" #include "polyTopoChanger.H" #include "polyAddPoint.H" +#include "polyRemovePoint.H" #include "polyAddFace.H" #include "polyModifyPoint.H" #include "polyModifyFace.H" +#include "polyRemoveFace.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -765,6 +767,9 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const projectedSlavePoints ); + // Demand driven calculate the cut faces. Apart from the + // cutFaces/cutFaceMaster/cutFaceSlave no information from the cutPatch + // is used anymore! const faceList& cutFaces = cutPatch.cutFaces(); const labelList& cutFaceMaster = cutPatch.cutFaceMaster(); const labelList& cutFaceSlave = cutPatch.cutFaceSlave(); @@ -1109,22 +1114,26 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const { nOrphanedMasters++; - // Recover original orientation - ref.setAction - ( - polyModifyFace - ( - masterPatch[faceI], // new face - masterPatchAddr[faceI], // master face index - -1, // owner - -1, // neighbour - false, // flux flip - -1, // patch ID - false, // remove from zone - masterFaceZoneID_.index(), // zone ID - false // zone flip - ) - ); + //// Recover original orientation + //ref.setAction + //( + // polyModifyFace + // ( + // masterPatch[faceI], // new face + // masterPatchAddr[faceI], // master face index + // -1, // owner + // -1, // neighbour + // false, // flux flip + // -1, // patch ID + // false, // remove from zone + // masterFaceZoneID_.index(), // zone ID + // false // zone flip + // ) + //); + + //Pout<< "**MJ:deleting master face " << masterPatchAddr[faceI] + // << " old verts:" << masterPatch[faceI] << endl; + ref.setAction(polyRemoveFace(masterPatchAddr[faceI])); } } @@ -1136,22 +1145,26 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const { nOrphanedSlaves++; - // Recover original orientation - ref.setAction - ( - polyModifyFace - ( - slavePatch[faceI], // new face - slavePatchAddr[faceI], // slave face index - -1, // owner - -1, // neighbour - false, // flux flip - -1, // patch ID - false, // remove from zone - slaveFaceZoneID_.index(), // zone ID - false // zone flip - ) - ); + //// Recover original orientation + //ref.setAction + //( + // polyModifyFace + // ( + // slavePatch[faceI], // new face + // slavePatchAddr[faceI], // slave face index + // -1, // owner + // -1, // neighbour + // false, // flux flip + // -1, // patch ID + // false, // remove from zone + // slaveFaceZoneID_.index(), // zone ID + // false // zone flip + // ) + //); + + //Pout<< "**MJ:deleting slave face " << slavePatchAddr[faceI] + // << " old verts:" << slavePatch[faceI] << endl; + ref.setAction(polyRemoveFace(slavePatchAddr[faceI])); } } @@ -1400,24 +1413,46 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const face newFace; newFace.transfer(newFaceLabels); -// Pout << "Modifying master stick-out face " << curFaceID << " old face: " << oldFace << " new face: " << newFace << endl; + //Pout << "Modifying master stick-out face " << curFaceID + // << " old face: " << oldFace << " new face: " << newFace << endl; // Modify the face - ref.setAction - ( - polyModifyFace + if (mesh.isInternalFace(curFaceID)) + { + ref.setAction ( - newFace, // modified face - curFaceID, // label of face being modified - own[curFaceID], // owner - nei[curFaceID], // neighbour - false, // face flip - mesh.boundaryMesh().whichPatch(curFaceID), // patch for face - false, // remove from zone - modifiedFaceZone, // zone for face - modifiedFaceZoneFlip // face flip in zone - ) - ); + polyModifyFace + ( + newFace, // modified face + curFaceID, // label of face being modified + own[curFaceID], // owner + nei[curFaceID], // neighbour + false, // face flip + -1, // patch for face + false, // remove from zone + modifiedFaceZone, // zone for face + modifiedFaceZoneFlip // face flip in zone + ) + ); + } + else + { + ref.setAction + ( + polyModifyFace + ( + newFace, // modified face + curFaceID, // label of face being modified + own[curFaceID], // owner + -1, // neighbour + false, // face flip + mesh.boundaryMesh().whichPatch(curFaceID), // patch for face + false, // remove from zone + modifiedFaceZone, // zone for face + modifiedFaceZoneFlip // face flip in zone + ) + ); + } } } @@ -1688,21 +1723,42 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const // Pout << "Modifying slave stick-out face " << curFaceID << " old face: " << oldFace << " new face: " << newFace << endl; // Modify the face - ref.setAction - ( - polyModifyFace + if (mesh.isInternalFace(curFaceID)) + { + ref.setAction ( - newFace, // modified face - curFaceID, // label of face being modified - own[curFaceID], // owner - nei[curFaceID], // neighbour - false, // face flip - mesh.boundaryMesh().whichPatch(curFaceID), // patch for face - false, // remove from zone - modifiedFaceZone, // zone for face - modifiedFaceZoneFlip // face flip in zone - ) - ); + polyModifyFace + ( + newFace, // modified face + curFaceID, // label of face being modified + own[curFaceID], // owner + nei[curFaceID], // neighbour + false, // face flip + -1, // patch for face + false, // remove from zone + modifiedFaceZone, // zone for face + modifiedFaceZoneFlip // face flip in zone + ) + ); + } + else + { + ref.setAction + ( + polyModifyFace + ( + newFace, // modified face + curFaceID, // label of face being modified + own[curFaceID], // owner + -1, // neighbour + false, // face flip + mesh.boundaryMesh().whichPatch(curFaceID), // patch for face + false, // remove from zone + modifiedFaceZone, // zone for face + modifiedFaceZoneFlip // face flip in zone + ) + ); + } } } @@ -1735,15 +1791,25 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const // slave patch nRetiredPoints++; + //ref.setAction + //( + // polyModifyPoint + // ( + // slaveMeshPoints[pointI], // point ID + // points[slaveMeshPoints[pointI]], // point + // false, // remove from zone + // mesh.pointZones().whichZone(slaveMeshPoints[pointI]),// zone + // false // in a cell + // ) + //); + //Pout<< "MJ retire slave point " << slaveMeshPoints[pointI] + // << " coord " << points[slaveMeshPoints[pointI]] + // << endl; ref.setAction ( - polyModifyPoint + polyRemovePoint ( - slaveMeshPoints[pointI], // point ID - points[slaveMeshPoints[pointI]], // point - false, // remove from zone - mesh.pointZones().whichZone(slaveMeshPoints[pointI]),// zone - false // in a cell + slaveMeshPoints[pointI] ) ); diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C index 11c401027d3f92e3780991ad3b3c036798543e5b..eb191b3f0f124bfd971fa91d9e6e3bcb5fb6bf4a 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C @@ -28,6 +28,8 @@ Description #include "enrichedPatch.H" #include "demandDrivenData.H" +#include "OFstream.H" +#include "meshTools.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -249,6 +251,33 @@ bool Foam::enrichedPatch::checkSupport() const } +void Foam::enrichedPatch::writeOBJ(const fileName& fName) const +{ + OFstream str(fName); + + const pointField& lp = localPoints(); + + forAll(lp, pointI) + { + meshTools::writeOBJ(str, lp[pointI]); + } + + const faceList& faces = localFaces(); + + forAll(faces, faceI) + { + const face& f = faces[faceI]; + + str << 'f'; + forAll(f, fp) + { + str << ' ' << f[fp]+1; + } + str << nl; + } +} + + // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.H b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.H index 0bf22c513cb7df9510b7ed9bfa3c7d53728f1ba5..f8f7e8f5e9812f399669891852f5204f830e45d8 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.H +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.H @@ -199,9 +199,9 @@ public: ( const primitiveFacePatch& masterPatch, const primitiveFacePatch& slavePatch, - const labelList& slavePointPointHits, - const labelList& slavePointEdgeHits, - const List<objectHit>& slavePointFaceHits + const labelList& slavePointPointHits,// -1 or common point snapped to + const labelList& slavePointEdgeHits, // -1 or common edge snapped to + const List<objectHit>& slavePointFaceHits // master face snapped to ); @@ -276,6 +276,10 @@ public: //- Check if the patch is fully supported bool checkSupport() const; + + + //- Debugging: dump graphical representation to obj format file + void writeOBJ(const fileName&) const; }; diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.C b/src/dynamicMesh/slidingInterface/slidingInterface.C index 0f8dd3603af39d6de31a581a915de396546a7d93..80d68749e84ae89a39ec3d900c418fd34457126a 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterface.C +++ b/src/dynamicMesh/slidingInterface/slidingInterface.C @@ -664,14 +664,15 @@ void Foam::slidingInterface::updateMesh(const mapPolyMesh& m) masterPatchID_.update(mesh.boundaryMesh()); slavePatchID_.update(mesh.boundaryMesh()); - if (!attached()) - { - calcAttachedAddressing(); - } - else - { - renumberAttachedAddressing(m); - } +//MJ:Disabled updating +// if (!attached()) +// { +// calcAttachedAddressing(); +// } +// else +// { +// renumberAttachedAddressing(m); +// } } diff --git a/src/lagrangian/basic/Cloud/Cloud.H b/src/lagrangian/basic/Cloud/Cloud.H index f0ca222d91021d7e69846ed0cb9e05ff92bfa3af..e298affe7d2ce5651ce34015672c8f45688d858e 100644 --- a/src/lagrangian/basic/Cloud/Cloud.H +++ b/src/lagrangian/basic/Cloud/Cloud.H @@ -78,6 +78,9 @@ class Cloud const unallocLabelList& owner_; const unallocLabelList& neighbour_; + //- Temporary storage for addressing. Used in findFaces. + mutable DynamicList<label> labels_; + // Private member functions diff --git a/src/lagrangian/basic/Particle/Particle.C b/src/lagrangian/basic/Particle/Particle.C index ea53ec3ee4d92165ee03861a86dfb96a4b65e4e7..ee85abda689f5a1110a9b7c6b9a7ff90ced46d12 100644 --- a/src/lagrangian/basic/Particle/Particle.C +++ b/src/lagrangian/basic/Particle/Particle.C @@ -36,16 +36,17 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template<class ParticleType> -Foam::labelList Foam::Particle<ParticleType>::findFaces +void Foam::Particle<ParticleType>::findFaces ( - const vector& position + const vector& position, + DynamicList<label>& faceList ) const { const polyMesh& mesh = cloud_.polyMesh_; const labelList& faces = mesh.cells()[celli_]; const vector& C = mesh.cellCentres()[celli_]; - DynamicList<label> faceList(10); + faceList.clear(); forAll(faces, i) { label facei = faces[i]; @@ -56,26 +57,23 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces faceList.append(facei); } } - - faceList.shrink(); - - return faceList; } template<class ParticleType> -Foam::labelList Foam::Particle<ParticleType>::findFaces +void Foam::Particle<ParticleType>::findFaces ( const vector& position, const label celli, - const scalar stepFraction + const scalar stepFraction, + DynamicList<label>& faceList ) const { const polyMesh& mesh = cloud_.polyMesh_; const labelList& faces = mesh.cells()[celli]; const vector& C = mesh.cellCentres()[celli]; - DynamicList<label> faceList(10); + faceList.clear(); forAll(faces, i) { label facei = faces[i]; @@ -86,10 +84,6 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces faceList.append(facei); } } - - faceList.shrink(); - - return faceList; } @@ -237,7 +231,8 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace { const polyMesh& mesh = cloud_.polyMesh_; - labelList faces = findFaces(endPosition); + DynamicList<label>& faces = cloud_.labels_; + findFaces(endPosition, faces); facei_ = -1; scalar trackFraction = 0.0; diff --git a/src/lagrangian/basic/Particle/Particle.H b/src/lagrangian/basic/Particle/Particle.H index 4d1a8b9be839f7e92cd31ce2dc6ca7acf227b81a..f061c06b68b96fedb4963264187faed12d614d5e 100644 --- a/src/lagrangian/basic/Particle/Particle.H +++ b/src/lagrangian/basic/Particle/Particle.H @@ -151,18 +151,20 @@ protected: const label facei ) const; - //- Return the faces between position and cell centre - labelList findFaces + //- Find the faces between position and cell centre + void findFaces ( - const vector& position + const vector& position, + DynamicList<label>& faceList ) const; - //- Return the faces between position and cell centre - labelList findFaces + //- Find the faces between position and cell centre + void findFaces ( const vector& position, const label celli, - const scalar stepFraction + const scalar stepFraction, + DynamicList<label>& faceList ) const; diff --git a/src/lagrangian/basic/Particle/ParticleI.H b/src/lagrangian/basic/Particle/ParticleI.H index ce790d67c11258c29290dbaa14f31d8669a6a6e7..0eb891271730376021b36f0e743f7de08986e84b 100644 --- a/src/lagrangian/basic/Particle/ParticleI.H +++ b/src/lagrangian/basic/Particle/ParticleI.H @@ -236,7 +236,8 @@ inline scalar Particle<ParticleType>::lambda template<class ParticleType> inline bool Particle<ParticleType>::inCell() const { - labelList faces = findFaces(position_); + DynamicList<label>& faces = cloud_.labels_; + findFaces(position_, faces); return (!faces.size()); } @@ -250,7 +251,8 @@ inline bool Particle<ParticleType>::inCell const scalar stepFraction ) const { - labelList faces = findFaces(position, celli, stepFraction); + DynamicList<label>& faces = cloud_.labels_; + findFaces(position, celli, stepFraction, faces); return (!faces.size()); } diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index 30d7671fdbcf8e4b42295f67334c5fa178f534b9..10cec60dd27e5fc331d97c7c49428e6399bad2a9 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,9 +34,6 @@ License template<class ParcelType> Foam::scalar Foam::DsmcCloud<ParcelType>::kb = 1.380650277e-23; -template<class ParcelType> -Foam::scalar Foam::DsmcCloud<ParcelType>::Tref = 273; - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H index 46634e6dd903ece27ed83fec3975bc0156dfe7e1..fc5cf53d683be6ed9ec879578887f59c70d53718 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -172,9 +172,6 @@ public: //- Boltzmann constant static scalar kb; - //- Reference temperature for all models - static scalar Tref; - // Constructors diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H index abc4b1d4c69a89cc828d2134652433a45802c7fe..449650c0a8345d1fc3f14289eb39b4a27eb84521 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/clouds/baseClasses/DsmcBaseCloud/DsmcBaseCloud.C b/src/lagrangian/dsmc/clouds/baseClasses/DsmcBaseCloud/DsmcBaseCloud.C index 1e0c395ca19f24709a1c3c43b4c0c802969dc846..55554eee39c76bb8e301c55e549651318cd09790 100644 --- a/src/lagrangian/dsmc/clouds/baseClasses/DsmcBaseCloud/DsmcBaseCloud.C +++ b/src/lagrangian/dsmc/clouds/baseClasses/DsmcBaseCloud/DsmcBaseCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/clouds/baseClasses/DsmcBaseCloud/DsmcBaseCloud.H b/src/lagrangian/dsmc/clouds/baseClasses/DsmcBaseCloud/DsmcBaseCloud.H index df49f8e148bc2dfaa47924eff697821b59dbb8cf..b409f3612edffc0534a1d8d8d07b090559b81ec4 100644 --- a/src/lagrangian/dsmc/clouds/baseClasses/DsmcBaseCloud/DsmcBaseCloud.H +++ b/src/lagrangian/dsmc/clouds/baseClasses/DsmcBaseCloud/DsmcBaseCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C index d501dbf3d5d87d7a79b7d56512ddad465a838ca5..425e47a70581d9c062d591209e8dc066ddd7b6ca 100644 --- a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H index 027ad2afec41d2a41f7ef11cc25667dbf6cccc25..d5302056816419ee1deca073f94c13024bc52e8c 100644 --- a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H +++ b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C index 0c43cf1534952eba6fd5b5a79bd43b3ab6ef56d7..fae05b0f2ffc2543046d449aef0dd2bcb7352de7 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H index 17b2877b448c37ebcbf63051b153238048e60454..af8e350e7fd8ec756ba9957eb74c4f00b9152157 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelI.H b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelI.H index ff86419186fee680205fe2b70e0d0d2a6c705e61..239571ceaef99cb46f15003212de45ba09cbeb88 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelI.H +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelIO.C b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelIO.C index b8bc688c09640bfd462f754fc87175a46334c9ff..6677591009bd879cf23747f964a81a9e8dcb7911 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelIO.C +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/defineDsmcParcel.C b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/defineDsmcParcel.C index d3b71359da80c68830d37927e499e44441758ae7..d5691241363954d6b766123bd81548356c51d763 100644 --- a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/defineDsmcParcel.C +++ b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/defineDsmcParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/dsmcParcel.C b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/dsmcParcel.C index 8f52fcdabf62a8dbd9e7cba06295a3ea41cbbfba..e09afe9a5dcb14d5fb48f307e84a261f0798dc96 100644 --- a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/dsmcParcel.C +++ b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/dsmcParcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/dsmcParcel.H b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/dsmcParcel.H index 24d9c9ada4f4654f8911c151e78b806d782807eb..f2676c5ed9c7aa5b3abf25fcb3fc6bea09b88fab 100644 --- a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/dsmcParcel.H +++ b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/dsmcParcel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelBinaryCollisionModels.C b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelBinaryCollisionModels.C index de2444687b785586345a50d8eaf922bd63073b10..487cedad29b3d1d7314e1c7a5517b1089a6860bd 100644 --- a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelBinaryCollisionModels.C +++ b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelBinaryCollisionModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelInflowBoundaryModels.C b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelInflowBoundaryModels.C index c3ee121ff02fedac07f42ff28e5169fe4a7b9f33..ef9191104500f41013e774b0f9b2caf7f4103d11 100644 --- a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelInflowBoundaryModels.C +++ b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelInflowBoundaryModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelWallInteractionModels.C b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelWallInteractionModels.C index 874c787d6a75c4be73c84b26c0032938d7f4b802..f15d0bdadd6090c6a39f4403abb97d69015ce91e 100644 --- a/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelWallInteractionModels.C +++ b/src/lagrangian/dsmc/parcels/derived/dsmcParcel/makeDsmcParcelWallInteractionModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C index 0118014f9c62b6ecec5a2d93bef0b9425db04cc9..cdd10231225037881f87a90d62f79bb2fce9e350 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H index 771115c98428b86253f8d4920b9ad577067b7bd5..4b422bdd3176e4ac3320ec6e32a8f9956e3fe699 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/NewBinaryCollisionModel.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/NewBinaryCollisionModel.C index 8878164cdbf1425fcf9838a369ca9b855fcb60d4..12c74f6697e7044396331aec3a95bc9326594ee4 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/NewBinaryCollisionModel.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/NewBinaryCollisionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C index b6deaf1f0064cb65ed6c3e3b7d93cee12587b624..69af3a855b3f2f60a81d80b1441a4028e7ac079b 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,6 +97,7 @@ Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::LarsenBorgnakkeVariableHardS ) : BinaryCollisionModel<CloudType>(dict, cloud, typeName), + Tref_(readScalar(this->coeffDict().lookup("Tref"))), relaxationCollisionNumber_ ( readScalar(this->coeffDict().lookup("relaxationCollisionNumber")) @@ -156,7 +157,7 @@ Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::sigmaTcR // calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79 scalar sigmaTPQ = mathematicalConstant::pi*dPQ*dPQ - *pow(2.0*CloudType::kb*CloudType::Tref/(mR*cR*cR), omegaPQ - 0.5) + *pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5) /exp(Foam::lgamma(2.5 - omegaPQ)); return sigmaTPQ*cR; diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H index c95d70f24c1f4ad0cfa394728258594664c3f89a..0b95c9fb4e0966b64afae0fbaeeaf03db662416a 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,6 +50,9 @@ class LarsenBorgnakkeVariableHardSphere { // Private data + //- Reference temperature + const scalar Tref_; + //- Relaxation collision number const scalar relaxationCollisionNumber_; diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C index de47f1550dc9c66018d5fc3a4e3d60da8f64c0c2..29b389a65ae197b866edb2019069e3667be96c07 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,8 @@ Foam::VariableHardSphere<CloudType>::VariableHardSphere CloudType& cloud ) : - BinaryCollisionModel<CloudType>(dict, cloud, typeName) + BinaryCollisionModel<CloudType>(dict, cloud, typeName), + Tref_(readScalar(this->coeffDict().lookup("Tref"))) {} @@ -90,7 +91,7 @@ Foam::scalar Foam::VariableHardSphere<CloudType>::sigmaTcR // calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79 scalar sigmaTPQ = mathematicalConstant::pi*dPQ*dPQ - *pow(2.0*CloudType::kb*CloudType::Tref/(mR*cR*cR), omegaPQ - 0.5) + *pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5) /exp(Foam::lgamma(2.5 - omegaPQ)); return sigmaTPQ*cR; diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H index a1dbdb9a270c0e7c8dcb3021601fc88355e035c2..ee58d08d6a3295ca42b75714bb3e4e73577c081c 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,6 +47,12 @@ class VariableHardSphere : public BinaryCollisionModel<CloudType> { + // Private data + + //- Reference temperature + const scalar Tref_; + + public: //- Runtime type information diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C index 9d791a1ed3421049f77fd6d4fa6fcc4cf29be9c8..c2040070e9b530719a49a8cef3427939d03e24c5 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.H b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.H index 03c2fe2abb72fe657ef9905162585099c445693d..5ecf6ed33c4bc3dc24786c5c2465aa63d5e789df 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.H +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C index 8e99e3f43f8191a69c57f9855d702d607dcf50d5..bcbc21d4103668c8a71ebd30c7a546703d324a28 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H index 6b01a82f40f1233dadbf1ad27434e0659c540a84..a86f857946e56252cb70693a54db3befb7cf95b5 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C index 3abc5b29368d1af2c13fb65f30775d57ecfc461c..bc1005bdaf58e60923fdfdf7a95f9a79c895b279 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.C index d04db500daa1fa762ada76543d72bb045a606da0..9711ab5a3ced1d7fa8c3f8c485748bb1c3186512 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H index e3f46622e93c87519220169803ba5cdbd6c509ac..747d5595efeb20b619f77a49cf30e83075e9f283 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/NoInflow/NoInflow.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C index c2c12ce5ca7d835941c812b6920a09ddc694355f..e7213561c0d2a2f2dacd103daeee8a74676c7aaf 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H index 2b71beaba006c224e5c41dea13a6a79aa6b68dcc..8978723bacd5a345a79844e8cbe0ed228f8349a2 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.C index 4de5507bf00f07b9df5d646cefb4f889e029d265..1fb5ab3208404f235f264a54035c27263edac463 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.H b/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.H index d2208bd3503d29b6ca40a4805718a9f655882134..c1d6d50e33da8af9054cd01f08b39451afa846ce 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.H +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/SpecularReflection/SpecularReflection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C index 85652f2379327af4db6aa9c9a6e8e3bcff873dfc..97197cd669ec6316ab43c8f1b10d927a68cd0025 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C index 060d5dd76d9c59f1a2c4e896550c0fb1ee88f1df..a0874d9913d1660333c1cfb2fffa599084e3877f 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H index 582bf2b1065ce26ec0113398357fed1a75d92a69..e9c7ffd33f001d555b9567a198554091745f683b 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryT b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryT new file mode 100644 index 0000000000000000000000000000000000000000..9afc247827516321ce0b5e52eb795aacee4423ca --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryT @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object boundaryT; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryU b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryU new file mode 100644 index 0000000000000000000000000000000000000000..b7117eafbc88a45b32ee2caf91af18ae22182dc7 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryU @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object boundaryU; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/dsmcRhoN b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/dsmcRhoN new file mode 100644 index 0000000000000000000000000000000000000000..e9eae893d481e09bfa8bd9c14da29e2a9d783d7d --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/dsmcRhoN @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object dsmcRhoN; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/fD b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/fD new file mode 100644 index 0000000000000000000000000000000000000000..0ec2aa7410f25dbefe5ffe80efad7750657881f5 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/fD @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object fD; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/iDof b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/iDof new file mode 100644 index 0000000000000000000000000000000000000000..626a947a110e1337a002592b4c1e83e80ac63e07 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/iDof @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object iDof; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/internalE b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/internalE new file mode 100644 index 0000000000000000000000000000000000000000..3dc30a0f2ec2d9c335764c66826d4e2863827da2 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/internalE @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object internalE; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/linearKE b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/linearKE new file mode 100644 index 0000000000000000000000000000000000000000..1d8b022dc9afe7adf9d56a39e09cded1901e6bf8 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/linearKE @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object linearKE; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/momentum b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/momentum new file mode 100644 index 0000000000000000000000000000000000000000..e35350692e7c33af9407f229a876a9006366b8cc --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/momentum @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object momentum; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -2 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/q b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/q new file mode 100644 index 0000000000000000000000000000000000000000..aae46273e982bd3c3495abaffc24ea89303b135d --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/q @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object q; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 0 -3 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoM b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoM new file mode 100644 index 0000000000000000000000000000000000000000..8dc0b17f55699f616773087006ecc874b4acbc26 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoM @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object rhoM; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoN b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoN new file mode 100644 index 0000000000000000000000000000000000000000..038fd26de386704949e026bc29e577e24696f74e --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoN @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object rhoN; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + xPeriodic + { + type cyclic; + } + + yPeriodic + { + type cyclic; + } + + zPeriodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allclean b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..1cc972be26a9fa8c309f14c3c0d52659e62d236c --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allrun b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..3c61ac798ec54d2bf1f7f6c8799de3e396ab53c9 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allrun @@ -0,0 +1,7 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication dsmcInitialise +runApplication dsmcFoam diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/constant/dsmcProperties b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/constant/dsmcProperties new file mode 100644 index 0000000000000000000000000000000000000000..395e69cbaa421127d0c60e7dd8bf126b94c60e4e --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/constant/dsmcProperties @@ -0,0 +1,77 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object dsmcProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// General Properties +// ~~~~~~~~~~~~~~~~~~ + +nEquivalentParticles 1e12; + + +// Wall Interaction Model +// ~~~~~~~~~~~~~~~~~~~~~~ + +WallInteractionModel SpecularReflection; + +SpecularReflectionCoeffs {} + +// Binary Collision Model +// ~~~~~~~~~~~~~~~~~~~~~~ + +BinaryCollisionModel LarsenBorgnakkeVariableHardSphere; + +LarsenBorgnakkeVariableHardSphereCoeffs +{ + Tref 273; + relaxationCollisionNumber 5.0; +} + + +// Inflow Boundary Model +// ~~~~~~~~~~~~~~~~~~~~~ +InflowBoundaryModel NoInflow; + +NoInflowCoeffs {} + +// Molecular species +// ~~~~~~~~~~~~~~~~~ + +typeIdList (N2 O2); + +moleculeProperties +{ + N2 + { + mass 46.5e-27; + diameter 4.17e-10; + internalDegreesOfFreedom 2; + viscosityCoefficient 1.656e-5; + omega 0.74; + } + + O2 + { + mass 53.12e-27; + diameter 4.07e-10; + internalDegreesOfFreedom 2; + viscosityCoefficient 1.919e-5; + omega 0.77; + } +} + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/constant/polyMesh/blockMeshDict b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..fc32e203da6c40ae08ff6677eaf6318988a1b364 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/constant/polyMesh/blockMeshDict @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.3 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + + root ""; + case ""; + instance ""; + local ""; + + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.01; + +vertices +( + (-5 -4 -4) + (5 -4 -4) + (5 4 -4) + (-5 4 -4) + (-5 -4 4) + (5 -4 4) + (5 4 4) + (-5 4 4) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (20 16 16) simpleGrading (1 1 1) +); + +patches +( + cyclic + xPeriodic + ( + (1 2 6 5) + (0 4 7 3) + ) + + cyclic + yPeriodic + ( + (2 3 7 6) + (0 1 5 4) + ) + + cyclic + zPeriodic + ( + (4 5 6 7) + (0 3 2 1) + ) +) + +mergePatchPairs +( +); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/constant/polyMesh/boundary b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..1a6e0ae58a917c86ccc62d907ad966c4ff8cecdc --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/constant/polyMesh/boundary @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +3 +( + xPeriodic + { + type cyclic; + nFaces 512; + startFace 14464; + featureCos 0.9; + } + yPeriodic + { + type cyclic; + nFaces 640; + startFace 14976; + featureCos 0.9; + } + zPeriodic + { + type cyclic; + nFaces 640; + startFace 15616; + featureCos 0.9; + } +) + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/controlDict b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..2a3172775adfe838f4cd3fa5c1200a5ac2b23fdd --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/controlDict @@ -0,0 +1,124 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1e-3; + +deltaT 1e-6; + +writeControl runTime; + +writeInterval 1e-4; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 10; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +functions +( + dsmcFields1 + { + type dsmcFields; + enabled on; + functionObjectLibs ( "libutilityFunctionObjects.so" ); + outputControl outputTime; + } + fieldAverage1 + { + type fieldAverage; + functionObjectLibs ( "libfieldFunctionObjects.so" ); + outputControl outputTime; + resetOnOutput off; + fields + ( + rhoN + { + mean on; + prime2Mean off; + base time; + } + rhoM + { + mean on; + prime2Mean off; + base time; + } + dsmcRhoN + { + mean on; + prime2Mean off; + base time; + } + momentum + { + mean on; + prime2Mean off; + base time; + } + linearKE + { + mean on; + prime2Mean off; + base time; + } + internalE + { + mean on; + prime2Mean off; + base time; + } + iDof + { + mean on; + prime2Mean off; + base time; + } + q + { + mean on; + prime2Mean off; + base time; + } + fD + { + mean on; + prime2Mean off; + base time; + } + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/decomposeParDict b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..77c30529ecfb004319a85c5dc2d05bbfe32dff38 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/decomposeParDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n ( 1 2 2 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 1 1 1 ); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights ( 1 1 1 1 ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/dsmcInitialiseDict b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/dsmcInitialiseDict new file mode 100644 index 0000000000000000000000000000000000000000..c8ec236aa69ea5d841b4f00f73246960c6916ea4 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/dsmcInitialiseDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object dsmcInitialiseDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberDensities +{ + N2 0.777e20; + O2 0.223e20; +}; + +temperature 300; + +velocity (1950 0 0); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/fvSchemes b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..42fda7921ca0a70a5b1f415666f49d4d07befb7b --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/fvSchemes @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default none; +} + +gradSchemes +{ + default none; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; +} + +interpolationSchemes +{ + default none; +} + +snGradSchemes +{ + default none; +} + +fluxRequired +{ + default no; +} + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/fvSolution b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..1e39435250fcc6c21b5ca292d31d085533ce9716 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpacePeriodic/system/fvSolution @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryT b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryT new file mode 100644 index 0000000000000000000000000000000000000000..6bc3a516f0d2f1aa48d409cbbf8395422c840b64 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryT @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object boundaryT; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type fixedValue; + value uniform 300; + } + + inlet + { + type fixedValue; + value uniform 300; + } + + sides + { + type fixedValue; + value uniform 300; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryU b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryU new file mode 100644 index 0000000000000000000000000000000000000000..6da36fb365e6c59359906b491672040021b098f2 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryU @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object boundaryU; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + outlet + { + type fixedValue; + value uniform (1325 -352 823); + } + + inlet + { + type fixedValue; + value uniform (1325 -352 823); + } + + sides + { + type fixedValue; + value uniform (1325 -352 823); + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/dsmcRhoN b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/dsmcRhoN new file mode 100644 index 0000000000000000000000000000000000000000..022a5f973f6fbf7720f1aae69f889c7fd3a8b3f3 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/dsmcRhoN @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object dsmcRhoN; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/fD b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/fD new file mode 100644 index 0000000000000000000000000000000000000000..e2da50d9a45e5de9309a2ab4e5aefda91f48ec0e --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/fD @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object fD; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + outlet + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/iDof b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/iDof new file mode 100644 index 0000000000000000000000000000000000000000..00ba74788aca028e4a424fa1f60a183e4fb7922a --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/iDof @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object iDof; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/internalE b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/internalE new file mode 100644 index 0000000000000000000000000000000000000000..4408c91430ae071b500cfdcd489c4c950b74ae2e --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/internalE @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object internalE; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/interpolaterhoN b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/interpolaterhoN new file mode 100644 index 0000000000000000000000000000000000000000..a9fe596c4337a79927b0a77ef635a72b11a79173 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/interpolaterhoN @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class surfaceScalarField; + location "0"; + object interpolaterhoN; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type calculated; + value uniform 0; + } + inlet + { + type calculated; + value uniform 0; + } + sides + { + type calculated; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/linearKE b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/linearKE new file mode 100644 index 0000000000000000000000000000000000000000..691ab915aeee75db15d2e7eb5c8b546aa2983bed --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/linearKE @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object linearKE; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/momentum b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/momentum new file mode 100644 index 0000000000000000000000000000000000000000..a3e4a449ae32749d72ad412447dc2d5c0226fdea --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/momentum @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object momentum; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -2 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + outlet + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/q b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/q new file mode 100644 index 0000000000000000000000000000000000000000..5b4fcc23bf75d0e65697c6f3db845ec42d411051 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/q @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object q; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 0 -3 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoM b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoM new file mode 100644 index 0000000000000000000000000000000000000000..9f2443cdbb2b856fbdece7a849f5e29fb1e3c714 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoM @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object rhoM; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoN b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoN new file mode 100644 index 0000000000000000000000000000000000000000..e99d2742a3098a506fbe4fcda5f7e18c271f629e --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoN @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object rhoN; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + outlet + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + sides + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/Allclean b/tutorials/discreteMethods/dsmc/freeSpaceStream/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..1cc972be26a9fa8c309f14c3c0d52659e62d236c --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/Allrun b/tutorials/discreteMethods/dsmc/freeSpaceStream/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..3c61ac798ec54d2bf1f7f6c8799de3e396ab53c9 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/Allrun @@ -0,0 +1,7 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication dsmcInitialise +runApplication dsmcFoam diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/constant/dsmcProperties b/tutorials/discreteMethods/dsmc/freeSpaceStream/constant/dsmcProperties new file mode 100644 index 0000000000000000000000000000000000000000..d4d67559c117cf4a092f48a2ecd424509a0d0914 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/constant/dsmcProperties @@ -0,0 +1,87 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object dsmcProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// General Properties +// ~~~~~~~~~~~~~~~~~~ + +nEquivalentParticles 1e12; + + +// Wall Interaction Model +// ~~~~~~~~~~~~~~~~~~~~~~ + +WallInteractionModel MaxwellianThermal; + +MaxwellianThermalCoeffs {} + + +// Binary Collision Model +// ~~~~~~~~~~~~~~~~~~~~~~ + +BinaryCollisionModel LarsenBorgnakkeVariableHardSphere; + +LarsenBorgnakkeVariableHardSphereCoeffs +{ + Tref 273; + relaxationCollisionNumber 5.0; +} + + +// Inflow Boundary Model +// ~~~~~~~~~~~~~~~~~~~~~ + +InflowBoundaryModel FreeStream; + +FreeStreamCoeffs +{ + numberDensities + { + N2 0.777e20; + O2 0.223e20; + }; +} + + +// Molecular species +// ~~~~~~~~~~~~~~~~~ + +typeIdList (N2 O2); + +moleculeProperties +{ + N2 + { + mass 46.5e-27; + diameter 4.17e-10; + internalDegreesOfFreedom 2; + viscosityCoefficient 1.656e-5; + omega 0.74; + } + + O2 + { + mass 53.12e-27; + diameter 4.07e-10; + internalDegreesOfFreedom 2; + viscosityCoefficient 1.919e-5; + omega 0.77; + } +} + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/constant/polyMesh/blockMeshDict b/tutorials/discreteMethods/dsmc/freeSpaceStream/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..9343042c3890e0751d912f76edea446f84d70c30 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/constant/polyMesh/blockMeshDict @@ -0,0 +1,73 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.3 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + + root ""; + case ""; + instance ""; + local ""; + + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.01; + +vertices +( + (-5 -4 -4) + (5 -4 -4) + (5 4 -4) + (-5 4 -4) + (-5 -4 4) + (5 -4 4) + (5 4 4) + (-5 4 4) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (20 16 16) simpleGrading (1 1 1) +); + +patches +( + patch + outlet + ( + (1 2 6 5) + ) + + patch + inlet + ( + (0 4 7 3) + ) + + patch + sides + ( + (2 3 7 6) + (0 1 5 4) + (4 5 6 7) + (0 3 2 1) + ) +) + +mergePatchPairs +( +); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/constant/polyMesh/boundary b/tutorials/discreteMethods/dsmc/freeSpaceStream/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..502b052a7ffd8630ceb3b449f005aecee7c05edc --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/constant/polyMesh/boundary @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +3 +( + outlet + { + type patch; + nFaces 256; + startFace 14464; + } + inlet + { + type patch; + nFaces 256; + startFace 14720; + } + sides + { + type patch; + nFaces 1280; + startFace 14976; + } +) + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/system/controlDict b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..f123a030860f2fd7374e5e6f19af066031e68cc5 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/controlDict @@ -0,0 +1,124 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 2e-2; + +deltaT 1e-6; + +writeControl runTime; + +writeInterval 1e-3; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 10; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +functions +( + dsmcFields1 + { + type dsmcFields; + enabled on; + functionObjectLibs ( "libutilityFunctionObjects.so" ); + outputControl outputTime; + } + fieldAverage1 + { + type fieldAverage; + functionObjectLibs ( "libfieldFunctionObjects.so" ); + outputControl outputTime; + resetOnOutput off; + fields + ( + rhoN + { + mean on; + prime2Mean off; + base time; + } + rhoM + { + mean on; + prime2Mean off; + base time; + } + dsmcRhoN + { + mean on; + prime2Mean off; + base time; + } + momentum + { + mean on; + prime2Mean off; + base time; + } + linearKE + { + mean on; + prime2Mean off; + base time; + } + internalE + { + mean on; + prime2Mean off; + base time; + } + iDof + { + mean on; + prime2Mean off; + base time; + } + q + { + mean on; + prime2Mean off; + base time; + } + fD + { + mean on; + prime2Mean off; + base time; + } + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/system/decomposeParDict b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..77c30529ecfb004319a85c5dc2d05bbfe32dff38 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/decomposeParDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n ( 1 2 2 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 1 1 1 ); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights ( 1 1 1 1 ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/system/dsmcInitialiseDict b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/dsmcInitialiseDict new file mode 100644 index 0000000000000000000000000000000000000000..b5cc93423253ea73ac94aaedd58c300082a08d71 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/dsmcInitialiseDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object dsmcInitialiseDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberDensities +{ + N2 0.777e20; + O2 0.223e20; +}; + +temperature 300; + +velocity (1325 -352 823); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/system/fvSchemes b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..42fda7921ca0a70a5b1f415666f49d4d07befb7b --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/fvSchemes @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default none; +} + +gradSchemes +{ + default none; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; +} + +interpolationSchemes +{ + default none; +} + +snGradSchemes +{ + default none; +} + +fluxRequired +{ + default no; +} + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/freeSpaceStream/system/fvSolution b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..1e39435250fcc6c21b5ca292d31d085533ce9716 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/freeSpaceStream/system/fvSolution @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/boundaryT b/tutorials/discreteMethods/dsmc/supersonicCorner/0/boundaryT new file mode 100644 index 0000000000000000000000000000000000000000..7b7fbd9188e6f8cd4052203c687de78be8ece6f1 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/boundaryT @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object boundaryT; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type fixedValue; + value uniform 300; + } + + entrance + { + type symmetryPlane; + } + + walls + { + type fixedValue; + value uniform 1000; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/boundaryU b/tutorials/discreteMethods/dsmc/supersonicCorner/0/boundaryU new file mode 100644 index 0000000000000000000000000000000000000000..1c21f7372c5f4c4b1312995046cd9aa9cf1aa419 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/boundaryU @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object boundaryU; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + flow + { + type fixedValue; + value uniform (1936 0 0); + } + + entrance + { + type symmetryPlane; + } + + walls + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/dsmcRhoN b/tutorials/discreteMethods/dsmc/supersonicCorner/0/dsmcRhoN new file mode 100644 index 0000000000000000000000000000000000000000..21d83f0b9f634e8cd24cb80fb1978327759087bb --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/dsmcRhoN @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object dsmcRhoN; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + entrance + { + type symmetryPlane; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/fD b/tutorials/discreteMethods/dsmc/supersonicCorner/0/fD new file mode 100644 index 0000000000000000000000000000000000000000..ae1df5d0114e5e2e3639632a9f3d220c660c9b76 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/fD @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object fD; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + flow + { + type calculated; + value uniform (0 0 0); + } + + entrance + { + type symmetryPlane; + } + + walls + { + type calculated; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/iDof b/tutorials/discreteMethods/dsmc/supersonicCorner/0/iDof new file mode 100644 index 0000000000000000000000000000000000000000..50c9624edd4051c04e53a804ba33d1b93865c261 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/iDof @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object iDof; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + entrance + { + type symmetryPlane; + } + + walls + { + type zeroGradient; + } + +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/internalE b/tutorials/discreteMethods/dsmc/supersonicCorner/0/internalE new file mode 100644 index 0000000000000000000000000000000000000000..51f1e04d8b3755fbbd6fc067b8420bf7034304ef --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/internalE @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object internalE; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + entrance + { + type symmetryPlane; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/linearKE b/tutorials/discreteMethods/dsmc/supersonicCorner/0/linearKE new file mode 100644 index 0000000000000000000000000000000000000000..765956b135c36edd515b971b9967569b27ddfc14 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/linearKE @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object linearKE; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + entrance + { + type symmetryPlane; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/momentum b/tutorials/discreteMethods/dsmc/supersonicCorner/0/momentum new file mode 100644 index 0000000000000000000000000000000000000000..1899e2e7c665f50bdf5694b385a34b439df38da3 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/momentum @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object momentum; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -2 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + flow + { + type zeroGradient; + } + + entrance + { + type symmetryPlane; + } + + walls + { + type zeroGradient; + } + +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/q b/tutorials/discreteMethods/dsmc/supersonicCorner/0/q new file mode 100644 index 0000000000000000000000000000000000000000..51c1b8cdec3797bdbb05cae3b736935810cc240c --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/q @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object q; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 0 -3 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type calculated; + value uniform 0; + + } + + entrance + { + type symmetryPlane; + } + + walls + { + type calculated; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/rhoM b/tutorials/discreteMethods/dsmc/supersonicCorner/0/rhoM new file mode 100644 index 0000000000000000000000000000000000000000..7f2d427a479cecad93dfb5de554c0a83c1b1d6d5 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/rhoM @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object rhoM; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + entrance + { + type symmetryPlane; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/0/rhoN b/tutorials/discreteMethods/dsmc/supersonicCorner/0/rhoN new file mode 100644 index 0000000000000000000000000000000000000000..98ffe8ca1e723aa85a7f493d783fa1b2b0bb8d1e --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/0/rhoN @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object rhoN; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + entrance + { + type symmetryPlane; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/Allclean b/tutorials/discreteMethods/dsmc/supersonicCorner/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..5622060c8ee23c89d8743d2217de1c3b7381e6b0 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/Allclean @@ -0,0 +1,9 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax +rm -rf processor* +rm -f system/machines \ No newline at end of file diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/Allrun b/tutorials/discreteMethods/dsmc/supersonicCorner/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..402135df749b6f380b1c870897e27c053918afb4 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/Allrun @@ -0,0 +1,11 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication decomposePar +runParallel dsmcInitialise 4 system/machines +hostname > system/machines +runParallel dsmcFoam 4 system/machines +runApplication reconstructPar -noLagrangian + diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/constant/dsmcProperties b/tutorials/discreteMethods/dsmc/supersonicCorner/constant/dsmcProperties new file mode 100644 index 0000000000000000000000000000000000000000..2d950a4814d564bd56c7afc883ae2e1d1f652c75 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/constant/dsmcProperties @@ -0,0 +1,88 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object dsmcProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// General Properties +// ~~~~~~~~~~~~~~~~~~ + +nEquivalentParticles 1.2e12; + + +// Wall Interaction Model +// ~~~~~~~~~~~~~~~~~~~~~~ + +//WallInteractionModel SpecularReflection; +WallInteractionModel MaxwellianThermal; + +SpecularReflectionCoeffs {} + +MaxwellianThermalCoeffs {} + + +// Binary Collision Model +// ~~~~~~~~~~~~~~~~~~~~~~ + +//BinaryCollisionModel VariableHardSphere; +BinaryCollisionModel LarsenBorgnakkeVariableHardSphere; + +VariableHardSphereCoeffs +{ + Tref 273; +} + +LarsenBorgnakkeVariableHardSphereCoeffs +{ + Tref 273; + relaxationCollisionNumber 5.0; +} + + +// Inflow Boundary Model +// ~~~~~~~~~~~~~~~~~~~~~ + +InflowBoundaryModel FreeStream; +//InflowBoundaryModel NoInflow; + +NoInflowCoeffs {} + +FreeStreamCoeffs +{ + numberDensities + { + Ar 1.0e20; + }; +} + + +// Molecular species +// ~~~~~~~~~~~~~~~~~ + +typeIdList (Ar); + +moleculeProperties +{ + Ar + { + mass 66.3e-27; + diameter 4.17e-10; + internalDegreesOfFreedom 0; + viscosityCoefficient 2.117e-5; + omega 0.81; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/constant/polyMesh/blockMeshDict b/tutorials/discreteMethods/dsmc/supersonicCorner/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..6b9aa389277a491baea403d7ee5e16a4a3add664 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/constant/polyMesh/blockMeshDict @@ -0,0 +1,83 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.3 | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + + root ""; + case ""; + instance ""; + local ""; + + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.01; + +vertices +( + (0 0 0) + (5 0 0) + (5 18 0) + (0 18 0) + (0 0 18) + (5 0 18) + (5 18 18) + (0 18 18) + (30 0 0) + (30 18 0) + (30 0 18) + (30 18 18) + +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (10 36 36) simpleGrading (1 1 1) + hex (1 8 9 2 5 10 11 6) (50 36 36) simpleGrading (1 1 1) +); + +patches +( + patch + flow + ( + (8 9 11 10) + (0 4 7 3) + (2 3 7 6) + (2 6 11 9) + (4 5 6 7) + (5 10 11 6) + ) + + symmetryPlane + entrance + ( + (0 1 5 4) + (0 3 2 1) + ) + + wall + walls + ( + (1 8 10 5) + (1 2 9 8) + ) +) + +mergePatchPairs +( +); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/constant/polyMesh/boundary b/tutorials/discreteMethods/dsmc/supersonicCorner/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..87ffe1fea34bf9faaf2139d0208b367378d4cb50 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/constant/polyMesh/boundary @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +3 +( + flow + { + type patch; + nFaces 6912; + startFace 227664; + } + entrance + { + type symmetryPlane; + nFaces 720; + startFace 234576; + } + walls + { + type wall; + nFaces 3600; + startFace 235296; + } +) + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/system/controlDict b/tutorials/discreteMethods/dsmc/supersonicCorner/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..2e92a436f3be2f2352abd09dc95034e42ea55867 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/system/controlDict @@ -0,0 +1,124 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.025; + +deltaT 1e-6; + +writeControl runTime; + +writeInterval 1e-3; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 10; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +functions +( + dsmcFields1 + { + type dsmcFields; + enabled on; + functionObjectLibs ( "libutilityFunctionObjects.so" ); + outputControl outputTime; + } + fieldAverage1 + { + type fieldAverage; + functionObjectLibs ( "libfieldFunctionObjects.so" ); + outputControl outputTime; + resetOnOutput off; + fields + ( + rhoN + { + mean on; + prime2Mean off; + base time; + } + rhoM + { + mean on; + prime2Mean off; + base time; + } + dsmcRhoN + { + mean on; + prime2Mean off; + base time; + } + momentum + { + mean on; + prime2Mean off; + base time; + } + linearKE + { + mean on; + prime2Mean off; + base time; + } + internalE + { + mean on; + prime2Mean off; + base time; + } + iDof + { + mean on; + prime2Mean off; + base time; + } + q + { + mean on; + prime2Mean off; + base time; + } + fD + { + mean on; + prime2Mean off; + base time; + } + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/system/decomposeParDict b/tutorials/discreteMethods/dsmc/supersonicCorner/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..bf8dffb737c91db0646cde4bd56a4fd0629c82b9 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/system/decomposeParDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 1 1 1 ); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights ( 1 1 1 1 ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/system/dsmcInitialiseDict b/tutorials/discreteMethods/dsmc/supersonicCorner/system/dsmcInitialiseDict new file mode 100644 index 0000000000000000000000000000000000000000..54774bfb88a21b624a707ea455139fa86b4d834a --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/system/dsmcInitialiseDict @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object dsmcInitialiseDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberDensities +{ + Ar 1.0e20; +}; + +temperature 300; + +velocity (1936 0 0); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/system/fvSchemes b/tutorials/discreteMethods/dsmc/supersonicCorner/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..42fda7921ca0a70a5b1f415666f49d4d07befb7b --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/system/fvSchemes @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default none; +} + +gradSchemes +{ + default none; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; +} + +interpolationSchemes +{ + default none; +} + +snGradSchemes +{ + default none; +} + +fluxRequired +{ + default no; +} + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/supersonicCorner/system/fvSolution b/tutorials/discreteMethods/dsmc/supersonicCorner/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..1e39435250fcc6c21b5ca292d31d085533ce9716 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/supersonicCorner/system/fvSolution @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/boundaryT b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/boundaryT new file mode 100644 index 0000000000000000000000000000000000000000..7aa7905710a606e8e72678e02d59887826ff8690 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/boundaryT @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object boundaryT; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type fixedValue; + value uniform 300; + } + + obstacle + { + type fixedValue; + value uniform 550; + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // + diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/boundaryU b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/boundaryU new file mode 100644 index 0000000000000000000000000000000000000000..dfa4801d7000be60ae30e5df7eae230669c6c674 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/boundaryU @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object boundaryU; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + flow + { + type fixedValue; + value uniform (1736 0 0); + } + + obstacle + { + type fixedValue; + value uniform (0 0 0); + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/dsmcRhoN b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/dsmcRhoN new file mode 100644 index 0000000000000000000000000000000000000000..aa3f432f46e752d9fa2c5dfb6fa48acae998d595 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/dsmcRhoN @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object dsmcRhoN; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + obstacle + { + type zeroGradient; + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/fD b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/fD new file mode 100644 index 0000000000000000000000000000000000000000..85d8c061d08d0fcb845b785396bc62df0d9ef1eb --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/fD @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object fD; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + flow + { + type zeroGradient; + } + + obstacle + { + type calculated; + value uniform (0 0 0); + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/iDof b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/iDof new file mode 100644 index 0000000000000000000000000000000000000000..542b42e13ad3ccab8803ed830c00a5a20eb98433 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/iDof @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object iDof; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + obstacle + { + type zeroGradient; + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/internalE b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/internalE new file mode 100644 index 0000000000000000000000000000000000000000..496e5afd331f009db8322ad39797d198181ff3d4 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/internalE @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object internalE; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + obstacle + { + type zeroGradient; + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/linearKE b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/linearKE new file mode 100644 index 0000000000000000000000000000000000000000..c52708ab4d2410adf5713f509dba421d66384afc --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/linearKE @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object linearKE; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + obstacle + { + type zeroGradient; + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/momentum b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/momentum new file mode 100644 index 0000000000000000000000000000000000000000..338ace9965dcaa4a102273cafa2d7efa1417978f --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/momentum @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object momentum; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -2 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + flow + { + type zeroGradient; + } + + obstacle + { + type zeroGradient; + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/q b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/q new file mode 100644 index 0000000000000000000000000000000000000000..6e2a7fd4511edcf27b0d919741eebcd79d6798e8 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/q @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object q; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 0 -3 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + obstacle + { + type calculated; + value uniform 0; + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/rhoM b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/rhoM new file mode 100644 index 0000000000000000000000000000000000000000..2ab4a148b1b27cf318081d080f622353c4e1967c --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/rhoM @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object rhoM; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + obstacle + { + type zeroGradient; + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/0/rhoN b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/rhoN new file mode 100644 index 0000000000000000000000000000000000000000..fa576a150c96e545742e6196b0eac499584fbd96 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/0/rhoN @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object rhoN; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 -3 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + flow + { + type zeroGradient; + } + + obstacle + { + type zeroGradient; + } + + periodic + { + type cyclic; + } +} + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/Allclean b/tutorials/discreteMethods/dsmc/wedge15Ma5/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..a81bd945995ae2476d7d49837ef74e909c5053c9 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax +rm -rf processor* +rm -rf forces1 +rm -f system/machines \ No newline at end of file diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/Allrun b/tutorials/discreteMethods/dsmc/wedge15Ma5/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..402135df749b6f380b1c870897e27c053918afb4 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/Allrun @@ -0,0 +1,11 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication decomposePar +runParallel dsmcInitialise 4 system/machines +hostname > system/machines +runParallel dsmcFoam 4 system/machines +runApplication reconstructPar -noLagrangian + diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/constant/dsmcProperties b/tutorials/discreteMethods/dsmc/wedge15Ma5/constant/dsmcProperties new file mode 100644 index 0000000000000000000000000000000000000000..bd07689d19a53dcc80bd34dc6b13499797c5378b --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/constant/dsmcProperties @@ -0,0 +1,89 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object dsmcProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +// General Properties +// ~~~~~~~~~~~~~~~~~~ + +nEquivalentParticles 5e12; + + +// Wall Interaction Model +// ~~~~~~~~~~~~~~~~~~~~~~ + +WallInteractionModel MaxwellianThermal; + +MaxwellianThermalCoeffs {} + + +// Binary Collision Model +// ~~~~~~~~~~~~~~~~~~~~~~ + +BinaryCollisionModel LarsenBorgnakkeVariableHardSphere; + +LarsenBorgnakkeVariableHardSphereCoeffs +{ + Tref 273; + relaxationCollisionNumber 5.0; +} + + +// Inflow Boundary Model +// ~~~~~~~~~~~~~~~~~~~~~ + +InflowBoundaryModel FreeStream; + +NoInflowCoeffs {} + +FreeStreamCoeffs +{ + numberDensities + { + N2 0.777e20; + O2 0.223e20; + }; +} + + +// Molecular species +// ~~~~~~~~~~~~~~~~~ + +typeIdList (N2 O2); + +moleculeProperties +{ + N2 + { + mass 46.5e-27; + diameter 4.17e-10; + internalDegreesOfFreedom 2; + viscosityCoefficient 1.656e-5; + omega 0.74; + } + + O2 + { + mass 53.12e-27; + diameter 4.07e-10; + internalDegreesOfFreedom 2; + viscosityCoefficient 1.919e-5; + omega 0.77; + } +} + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/constant/polyMesh/blockMeshDict b/tutorials/discreteMethods/dsmc/wedge15Ma5/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..858a5357faec9992f7284e4e55ee3a8fd874d742 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/constant/polyMesh/blockMeshDict @@ -0,0 +1,74 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (-0.15242 0 -0.05) + ( 0 0 -0.05) + ( 0.3048 0.081670913853 -0.05) + (-0.15242 0.3 -0.05) + ( 0 0.3 -0.05) + ( 0.3048 0.3 -0.05) + + (-0.15242 0 0.05) + ( 0 0 0.05) + ( 0.3048 0.081670913853 0.05) + (-0.15242 0.3 0.05) + ( 0 0.3 0.05) + ( 0.3048 0.3 0.05) + +); + +blocks +( + hex (0 1 4 3 6 7 10 9 ) (20 40 12) simpleGrading (1 1 1) + hex (1 2 5 4 7 8 11 10) (40 40 12) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + patch flow + ( + (0 6 9 3) + (2 5 11 8) + (0 1 7 6) + (3 9 10 4) + (4 10 11 5) + ) + wall obstacle + ( + (1 2 8 7) + ) + cyclic periodic + ( + (0 3 4 1) + (1 4 5 2) + (6 7 10 9) + (7 8 11 10) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/constant/polyMesh/boundary b/tutorials/discreteMethods/dsmc/wedge15Ma5/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..5c089fb5b2b5fc9bf41e975d323a588a8c50291d --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/constant/polyMesh/boundary @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +3 +( + flow + { + type patch; + nFaces 1920; + startFace 82800; + } + obstacle + { + type wall; + nFaces 480; + startFace 84720; + } + periodic + { + type cyclic; + nFaces 4800; + startFace 85200; + featureCos 0.9; + } +) + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/system/controlDict b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..b069a968567e38b9d2b079d3a33ee3621256362e --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/controlDict @@ -0,0 +1,139 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 0.00125; +// endTime 0.01; + +deltaT 2e-6; + +writeControl runTime; + +writeInterval 1e-4; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 10; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +functions +( + dsmcFields1 + { + type dsmcFields; + enabled on; + functionObjectLibs ( "libutilityFunctionObjects.so" ); + outputControl outputTime; + } + + fieldAverage1 + { + type fieldAverage; + functionObjectLibs ( "libfieldFunctionObjects.so" ); + outputControl outputTime; + resetOnOutput off; + fields + ( + rhoN + { + mean on; + prime2Mean off; + base time; + } + rhoM + { + mean on; + prime2Mean off; + base time; + } + dsmcRhoN + { + mean on; + prime2Mean off; + base time; + } + momentum + { + mean on; + prime2Mean off; + base time; + } + linearKE + { + mean on; + prime2Mean off; + base time; + } + internalE + { + mean on; + prime2Mean off; + base time; + } + iDof + { + mean on; + prime2Mean off; + base time; + } + q + { + mean on; + prime2Mean off; + base time; + } + fD + { + mean on; + prime2Mean off; + base time; + } + ); + } + + forces1 + { + type forces; + enabled on; + functionObjectLibs ( "libforces.so" ); + outputControl outputTime; + patches ( obstacle ); + directForceDensity true; + fDName fDMean; + CofR ( 0 0 0 ); + log on; + } +); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/system/decomposeParDict b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..a533085b04aff6c998b4ad26efe83d5d65920e43 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/decomposeParDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n ( 1 1 4 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 1 1 1 ); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + processorWeights ( 1 1 1 1 ); +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/system/dsmcInitialiseDict b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/dsmcInitialiseDict new file mode 100644 index 0000000000000000000000000000000000000000..118c809b6f1cc8122ed391a2808a4eb984b4d836 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/dsmcInitialiseDict @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object dsmcInitialiseDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberDensities +{ + N2 0.777e20; + O2 0.223e20; +}; + +temperature 300; + +velocity (1736 0 0); + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/system/fvSchemes b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..42fda7921ca0a70a5b1f415666f49d4d07befb7b --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/fvSchemes @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default none; +} + +gradSchemes +{ + default none; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; +} + +interpolationSchemes +{ + default none; +} + +snGradSchemes +{ + default none; +} + +fluxRequired +{ + default no; +} + + +// ************************************************************************* // diff --git a/tutorials/discreteMethods/dsmc/wedge15Ma5/system/fvSolution b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..1e39435250fcc6c21b5ca292d31d085533ce9716 --- /dev/null +++ b/tutorials/discreteMethods/dsmc/wedge15Ma5/system/fvSolution @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ +} + +// ************************************************************************* //