mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into molecularDynamics
This commit is contained in:
@ -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
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
ptrListTest.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/ptrListTest
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
|
||||
@ -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."
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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&);
|
||||
|
||||
|
||||
@ -147,7 +147,7 @@ void Foam::inplaceMapKey
|
||||
Container& lst
|
||||
)
|
||||
{
|
||||
Container newLst(lst);
|
||||
Container newLst(lst.size());
|
||||
|
||||
for
|
||||
(
|
||||
|
||||
@ -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]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -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 * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -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);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
@ -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 * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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_;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryT
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryT
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryU
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/boundaryU
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/dsmcRhoN
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/dsmcRhoN
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/fD
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/fD
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/iDof
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/iDof
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/internalE
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/internalE
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/linearKE
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/linearKE
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/momentum
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/momentum
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/q
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/q
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoM
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoM
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoN
Normal file
39
tutorials/discreteMethods/dsmc/freeSpacePeriodic/0/rhoN
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
7
tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allclean
Executable file
7
tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allclean
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
|
||||
7
tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allrun
Executable file
7
tutorials/discreteMethods/dsmc/freeSpacePeriodic/Allrun
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication dsmcInitialise
|
||||
runApplication dsmcFoam
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 ( );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
{
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
42
tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryT
Normal file
42
tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryT
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
42
tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryU
Normal file
42
tutorials/discreteMethods/dsmc/freeSpaceStream/0/boundaryU
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/dsmcRhoN
Normal file
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/dsmcRhoN
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/fD
Normal file
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/fD
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/iDof
Normal file
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/iDof
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/internalE
Normal file
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/internalE
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/linearKE
Normal file
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/linearKE
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/momentum
Normal file
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/momentum
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/q
Normal file
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/q
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoM
Normal file
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoM
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoN
Normal file
39
tutorials/discreteMethods/dsmc/freeSpaceStream/0/rhoN
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
7
tutorials/discreteMethods/dsmc/freeSpaceStream/Allclean
Executable file
7
tutorials/discreteMethods/dsmc/freeSpaceStream/Allclean
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
|
||||
7
tutorials/discreteMethods/dsmc/freeSpaceStream/Allrun
Executable file
7
tutorials/discreteMethods/dsmc/freeSpaceStream/Allrun
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication dsmcInitialise
|
||||
runApplication dsmcFoam
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 ( );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user