Merge branch 'master' into molecularDynamics

This commit is contained in:
graham
2009-06-19 13:11:04 +01:00
144 changed files with 4094 additions and 262 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -1,3 +0,0 @@
ptrListTest.C
EXE = $(FOAM_USER_APPBIN)/ptrListTest

View File

@ -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;
}
// ************************************************************************* //

View File

@ -243,14 +243,7 @@ int main(int argc, char *argv[])
meshDict.lookup("mergePatchPairs") meshDict.lookup("mergePatchPairs")
); );
if (mergePatchPairs.size()) # include "mergePatchPairs.H"
{
FatalErrorIn(args.executable())
<< "mergePatchPairs not currently supported."
<< exit(FatalError);
}
//// #include "mergePatchPairs.H"
} }
else else
{ {

View File

@ -63,6 +63,7 @@ Description
#include "slidingInterface.H" #include "slidingInterface.H"
#include "perfectInterface.H" #include "perfectInterface.H"
#include "IOobjectList.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: // Main program:
int main(int argc, char *argv[]) int main(int argc, char *argv[])
@ -343,7 +316,8 @@ int main(int argc, char *argv[])
cutZoneName, cutZoneName,
masterPatchName, masterPatchName,
slavePatchName, 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 // Read all current fvFields so they will get mapped
Info<< "Reading all current volfields" << endl; Info<< "Reading all current volfields" << endl;
PtrList<volScalarField> volScalarFields; PtrList<volScalarField> volScalarFields;
readFields(mesh, objects, volScalarFields); ReadFields(mesh, objects, volScalarFields);
PtrList<volVectorField> volVectorFields; PtrList<volVectorField> volVectorFields;
readFields(mesh, objects, volVectorFields); ReadFields(mesh, objects, volVectorFields);
PtrList<volSphericalTensorField> volSphericalTensorFields; PtrList<volSphericalTensorField> volSphericalTensorFields;
readFields(mesh, objects, volSphericalTensorFields); ReadFields(mesh, objects, volSphericalTensorFields);
PtrList<volSymmTensorField> volSymmTensorFields; PtrList<volSymmTensorField> volSymmTensorFields;
readFields(mesh, objects, volSymmTensorFields); ReadFields(mesh, objects, volSymmTensorFields);
PtrList<volTensorField> volTensorFields; PtrList<volTensorField> volTensorFields;
readFields(mesh, objects, volTensorFields); ReadFields(mesh, objects, volTensorFields);
//- uncomment if you want to interpolate surface fields (usually bad idea) //- uncomment if you want to interpolate surface fields (usually bad idea)
//Info<< "Reading all current surfaceFields" << endl; //Info<< "Reading all current surfaceFields" << endl;
//PtrList<surfaceScalarField> surfaceScalarFields; //PtrList<surfaceScalarField> surfaceScalarFields;
//readFields(mesh, objects, surfaceScalarFields); //ReadFields(mesh, objects, surfaceScalarFields);
// //
//PtrList<surfaceVectorField> surfaceVectorFields; //PtrList<surfaceVectorField> surfaceVectorFields;
//readFields(mesh, objects, surfaceVectorFields); //ReadFields(mesh, objects, surfaceVectorFields);
// //
//PtrList<surfaceTensorField> surfaceTensorFields; //PtrList<surfaceTensorField> surfaceTensorFields;
//readFields(mesh, objects, surfaceTensorFields); //ReadFields(mesh, objects, surfaceTensorFields);
if (!overwrite) if (!overwrite)
{ {
@ -394,11 +368,22 @@ int main(int argc, char *argv[])
if (overwrite) if (overwrite)
{ {
mesh.setInstance(oldInstance); mesh.setInstance(oldInstance);
stitcher.instance() = oldInstance;
} }
Info << nl << "Writing polyMesh to time " << runTime.timeName() << endl; Info << nl << "Writing polyMesh to time " << runTime.timeName() << endl;
IOstream::defaultPrecision(10); 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()) FatalErrorIn(args.executable())
<< "Failed writing polyMesh." << "Failed writing polyMesh."

View File

@ -41,6 +41,7 @@ Description
#include "pointFields.H" #include "pointFields.H"
#include "cellIOList.H" #include "cellIOList.H"
#include "IOobjectList.H" #include "IOobjectList.H"
#include "IOPtrList.H"
#include "writeMeshObject.H" #include "writeMeshObject.H"
#include "fieldDictionary.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[]) int main(int argc, char *argv[])
{ {
timeSelector::addOptions(); timeSelector::addOptions();
@ -67,6 +76,9 @@ int main(int argc, char *argv[])
writeMeshObject<labelIOList>("neighbour", runTime); writeMeshObject<labelIOList>("neighbour", runTime);
writeMeshObject<faceIOList>("faces", runTime); writeMeshObject<faceIOList>("faces", runTime);
writeMeshObject<pointIOField>("points", 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 // Get list of objects from the database
IOobjectList objects(runTime, runTime.timeName()); IOobjectList objects(runTime, runTime.timeName());

View File

@ -61,8 +61,17 @@ inline bool writeMeshObject(const word& name, Time& runTime)
Info<< " Reading " << io.headerClassName() Info<< " Reading " << io.headerClassName()
<< " : " << name << endl; << " : " << 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); 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; Info<< " Writing " << name << endl;
writeOk = meshObject.regIOobject::write(); writeOk = meshObject.regIOobject::write();
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -73,7 +73,7 @@ void inplaceReorder(const UList<label>& oldToNew, ListType&);
template<class Container> template<class Container>
void inplaceMapValue(const UList<label>& oldToNew, 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> template<class Container>
void inplaceMapKey(const UList<label>& oldToNew, Container&); void inplaceMapKey(const UList<label>& oldToNew, Container&);

View File

@ -147,7 +147,7 @@ void Foam::inplaceMapKey
Container& lst Container& lst
) )
{ {
Container newLst(lst); Container newLst(lst.size());
for for
( (

View File

@ -35,9 +35,11 @@ License
#include "plane.H" #include "plane.H"
#include "polyTopoChanger.H" #include "polyTopoChanger.H"
#include "polyAddPoint.H" #include "polyAddPoint.H"
#include "polyRemovePoint.H"
#include "polyAddFace.H" #include "polyAddFace.H"
#include "polyModifyPoint.H" #include "polyModifyPoint.H"
#include "polyModifyFace.H" #include "polyModifyFace.H"
#include "polyRemoveFace.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -765,6 +767,9 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
projectedSlavePoints 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 faceList& cutFaces = cutPatch.cutFaces();
const labelList& cutFaceMaster = cutPatch.cutFaceMaster(); const labelList& cutFaceMaster = cutPatch.cutFaceMaster();
const labelList& cutFaceSlave = cutPatch.cutFaceSlave(); const labelList& cutFaceSlave = cutPatch.cutFaceSlave();
@ -1109,22 +1114,26 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
{ {
nOrphanedMasters++; nOrphanedMasters++;
// Recover original orientation //// Recover original orientation
ref.setAction //ref.setAction
( //(
polyModifyFace // polyModifyFace
( // (
masterPatch[faceI], // new face // masterPatch[faceI], // new face
masterPatchAddr[faceI], // master face index // masterPatchAddr[faceI], // master face index
-1, // owner // -1, // owner
-1, // neighbour // -1, // neighbour
false, // flux flip // false, // flux flip
-1, // patch ID // -1, // patch ID
false, // remove from zone // false, // remove from zone
masterFaceZoneID_.index(), // zone ID // masterFaceZoneID_.index(), // zone ID
false // zone flip // 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++; nOrphanedSlaves++;
// Recover original orientation //// Recover original orientation
ref.setAction //ref.setAction
( //(
polyModifyFace // polyModifyFace
( // (
slavePatch[faceI], // new face // slavePatch[faceI], // new face
slavePatchAddr[faceI], // slave face index // slavePatchAddr[faceI], // slave face index
-1, // owner // -1, // owner
-1, // neighbour // -1, // neighbour
false, // flux flip // false, // flux flip
-1, // patch ID // -1, // patch ID
false, // remove from zone // false, // remove from zone
slaveFaceZoneID_.index(), // zone ID // slaveFaceZoneID_.index(), // zone ID
false // zone flip // 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; face newFace;
newFace.transfer(newFaceLabels); 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 // Modify the face
ref.setAction if (mesh.isInternalFace(curFaceID))
( {
polyModifyFace ref.setAction
( (
newFace, // modified face polyModifyFace
curFaceID, // label of face being modified (
own[curFaceID], // owner newFace, // modified face
nei[curFaceID], // neighbour curFaceID, // label of face being modified
false, // face flip own[curFaceID], // owner
mesh.boundaryMesh().whichPatch(curFaceID), // patch for face nei[curFaceID], // neighbour
false, // remove from zone false, // face flip
modifiedFaceZone, // zone for face -1, // patch for face
modifiedFaceZoneFlip // face flip in zone 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; // Pout << "Modifying slave stick-out face " << curFaceID << " old face: " << oldFace << " new face: " << newFace << endl;
// Modify the face // Modify the face
ref.setAction if (mesh.isInternalFace(curFaceID))
( {
polyModifyFace ref.setAction
( (
newFace, // modified face polyModifyFace
curFaceID, // label of face being modified (
own[curFaceID], // owner newFace, // modified face
nei[curFaceID], // neighbour curFaceID, // label of face being modified
false, // face flip own[curFaceID], // owner
mesh.boundaryMesh().whichPatch(curFaceID), // patch for face nei[curFaceID], // neighbour
false, // remove from zone false, // face flip
modifiedFaceZone, // zone for face -1, // patch for face
modifiedFaceZoneFlip // face flip in zone 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 // slave patch
nRetiredPoints++; 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 ref.setAction
( (
polyModifyPoint polyRemovePoint
( (
slaveMeshPoints[pointI], // point ID slaveMeshPoints[pointI]
points[slaveMeshPoints[pointI]], // point
false, // remove from zone
mesh.pointZones().whichZone(slaveMeshPoints[pointI]),// zone
false // in a cell
) )
); );

View File

@ -28,6 +28,8 @@ Description
#include "enrichedPatch.H" #include "enrichedPatch.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "OFstream.H"
#include "meshTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * 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 * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //

View File

@ -199,9 +199,9 @@ public:
( (
const primitiveFacePatch& masterPatch, const primitiveFacePatch& masterPatch,
const primitiveFacePatch& slavePatch, const primitiveFacePatch& slavePatch,
const labelList& slavePointPointHits, const labelList& slavePointPointHits,// -1 or common point snapped to
const labelList& slavePointEdgeHits, const labelList& slavePointEdgeHits, // -1 or common edge snapped to
const List<objectHit>& slavePointFaceHits const List<objectHit>& slavePointFaceHits // master face snapped to
); );
@ -276,6 +276,10 @@ public:
//- Check if the patch is fully supported //- Check if the patch is fully supported
bool checkSupport() const; bool checkSupport() const;
//- Debugging: dump graphical representation to obj format file
void writeOBJ(const fileName&) const;
}; };

View File

@ -664,14 +664,15 @@ void Foam::slidingInterface::updateMesh(const mapPolyMesh& m)
masterPatchID_.update(mesh.boundaryMesh()); masterPatchID_.update(mesh.boundaryMesh());
slavePatchID_.update(mesh.boundaryMesh()); slavePatchID_.update(mesh.boundaryMesh());
if (!attached()) //MJ:Disabled updating
{ // if (!attached())
calcAttachedAddressing(); // {
} // calcAttachedAddressing();
else // }
{ // else
renumberAttachedAddressing(m); // {
} // renumberAttachedAddressing(m);
// }
} }

View File

@ -78,6 +78,9 @@ class Cloud
const unallocLabelList& owner_; const unallocLabelList& owner_;
const unallocLabelList& neighbour_; const unallocLabelList& neighbour_;
//- Temporary storage for addressing. Used in findFaces.
mutable DynamicList<label> labels_;
// Private member functions // Private member functions

View File

@ -36,16 +36,17 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class ParticleType> 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
{ {
const polyMesh& mesh = cloud_.polyMesh_; const polyMesh& mesh = cloud_.polyMesh_;
const labelList& faces = mesh.cells()[celli_]; const labelList& faces = mesh.cells()[celli_];
const vector& C = mesh.cellCentres()[celli_]; const vector& C = mesh.cellCentres()[celli_];
DynamicList<label> faceList(10); faceList.clear();
forAll(faces, i) forAll(faces, i)
{ {
label facei = faces[i]; label facei = faces[i];
@ -56,26 +57,23 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces
faceList.append(facei); faceList.append(facei);
} }
} }
faceList.shrink();
return faceList;
} }
template<class ParticleType> template<class ParticleType>
Foam::labelList Foam::Particle<ParticleType>::findFaces void Foam::Particle<ParticleType>::findFaces
( (
const vector& position, const vector& position,
const label celli, const label celli,
const scalar stepFraction const scalar stepFraction,
DynamicList<label>& faceList
) const ) const
{ {
const polyMesh& mesh = cloud_.polyMesh_; const polyMesh& mesh = cloud_.polyMesh_;
const labelList& faces = mesh.cells()[celli]; const labelList& faces = mesh.cells()[celli];
const vector& C = mesh.cellCentres()[celli]; const vector& C = mesh.cellCentres()[celli];
DynamicList<label> faceList(10); faceList.clear();
forAll(faces, i) forAll(faces, i)
{ {
label facei = faces[i]; label facei = faces[i];
@ -86,10 +84,6 @@ Foam::labelList Foam::Particle<ParticleType>::findFaces
faceList.append(facei); faceList.append(facei);
} }
} }
faceList.shrink();
return faceList;
} }
@ -237,7 +231,8 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
{ {
const polyMesh& mesh = cloud_.polyMesh_; const polyMesh& mesh = cloud_.polyMesh_;
labelList faces = findFaces(endPosition); DynamicList<label>& faces = cloud_.labels_;
findFaces(endPosition, faces);
facei_ = -1; facei_ = -1;
scalar trackFraction = 0.0; scalar trackFraction = 0.0;

View File

@ -151,18 +151,20 @@ protected:
const label facei const label facei
) const; ) const;
//- Return the faces between position and cell centre //- Find the faces between position and cell centre
labelList findFaces void findFaces
( (
const vector& position const vector& position,
DynamicList<label>& faceList
) const; ) const;
//- Return the faces between position and cell centre //- Find the faces between position and cell centre
labelList findFaces void findFaces
( (
const vector& position, const vector& position,
const label celli, const label celli,
const scalar stepFraction const scalar stepFraction,
DynamicList<label>& faceList
) const; ) const;

View File

@ -236,7 +236,8 @@ inline scalar Particle<ParticleType>::lambda
template<class ParticleType> template<class ParticleType>
inline bool Particle<ParticleType>::inCell() const inline bool Particle<ParticleType>::inCell() const
{ {
labelList faces = findFaces(position_); DynamicList<label>& faces = cloud_.labels_;
findFaces(position_, faces);
return (!faces.size()); return (!faces.size());
} }
@ -250,7 +251,8 @@ inline bool Particle<ParticleType>::inCell
const scalar stepFraction const scalar stepFraction
) const ) const
{ {
labelList faces = findFaces(position, celli, stepFraction); DynamicList<label>& faces = cloud_.labels_;
findFaces(position, celli, stepFraction, faces);
return (!faces.size()); return (!faces.size());
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,9 +34,6 @@ License
template<class ParcelType> template<class ParcelType>
Foam::scalar Foam::DsmcCloud<ParcelType>::kb = 1.380650277e-23; Foam::scalar Foam::DsmcCloud<ParcelType>::kb = 1.380650277e-23;
template<class ParcelType>
Foam::scalar Foam::DsmcCloud<ParcelType>::Tref = 273;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -172,9 +172,6 @@ public:
//- Boltzmann constant //- Boltzmann constant
static scalar kb; static scalar kb;
//- Reference temperature for all models
static scalar Tref;
// Constructors // Constructors

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -97,6 +97,7 @@ Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::LarsenBorgnakkeVariableHardS
) )
: :
BinaryCollisionModel<CloudType>(dict, cloud, typeName), BinaryCollisionModel<CloudType>(dict, cloud, typeName),
Tref_(readScalar(this->coeffDict().lookup("Tref"))),
relaxationCollisionNumber_ relaxationCollisionNumber_
( (
readScalar(this->coeffDict().lookup("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 // calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
scalar sigmaTPQ = scalar sigmaTPQ =
mathematicalConstant::pi*dPQ*dPQ 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)); /exp(Foam::lgamma(2.5 - omegaPQ));
return sigmaTPQ*cR; return sigmaTPQ*cR;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,6 +50,9 @@ class LarsenBorgnakkeVariableHardSphere
{ {
// Private data // Private data
//- Reference temperature
const scalar Tref_;
//- Relaxation collision number //- Relaxation collision number
const scalar relaxationCollisionNumber_; const scalar relaxationCollisionNumber_;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,8 @@ Foam::VariableHardSphere<CloudType>::VariableHardSphere
CloudType& cloud 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 // calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
scalar sigmaTPQ = scalar sigmaTPQ =
mathematicalConstant::pi*dPQ*dPQ 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)); /exp(Foam::lgamma(2.5 - omegaPQ));
return sigmaTPQ*cR; return sigmaTPQ*cR;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -47,6 +47,12 @@ class VariableHardSphere
: :
public BinaryCollisionModel<CloudType> public BinaryCollisionModel<CloudType>
{ {
// Private data
//- Reference temperature
const scalar Tref_;
public: public:
//- Runtime type information //- Runtime type information

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,7 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax

View File

@ -0,0 +1,7 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication dsmcInitialise
runApplication dsmcFoam

View File

@ -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;
}
}
// ************************************************************************* //

View File

@ -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
(
);
// ************************************************************************* //

View File

@ -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;
}
)
// ************************************************************************* //

View File

@ -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;
}
);
}
);
// ************************************************************************* //

View File

@ -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 ( );
// ************************************************************************* //

View File

@ -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);
// ************************************************************************* //

View File

@ -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;
}
// ************************************************************************* //

View File

@ -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
{
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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);
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View File

@ -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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View 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;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,7 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax

View File

@ -0,0 +1,7 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication dsmcInitialise
runApplication dsmcFoam

View File

@ -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;
}
}
// ************************************************************************* //

View File

@ -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
(
);
// ************************************************************************* //

View File

@ -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;
}
)
// ************************************************************************* //

View File

@ -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;
}
);
}
);
// ************************************************************************* //

View File

@ -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 ( );
// ************************************************************************* //

View File

@ -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