Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry 2010-09-17 15:10:59 +01:00
commit ed544c9584
374 changed files with 31311 additions and 4187 deletions

View File

@ -14,6 +14,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
@ -36,6 +37,7 @@ EXE_LIBS = \
-lsolidMixture \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiation \
-lsurfaceFilmModels \

View File

@ -39,11 +39,12 @@ Description
#include "hCombustionThermo.H"
#include "turbulenceModel.H"
#include "basicThermoCloud.H"
#include "CoalCloud.H"
#include "coalCloud.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "timeActivatedExplicitSource.H"
#include "radiationModel.H"
#include "SLGThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,11 +1,11 @@
Info<< "\nConstructing coal cloud" << endl;
thermoCoalCloud coalParcels
coalCloud coalParcels
(
"coalCloud1",
rho,
U,
g,
thermo
slgThermo
);
Info<< "\nConstructing limestone cloud" << endl;
@ -15,5 +15,5 @@ basicThermoCloud limestoneParcels
rho,
U,
g,
thermo
slgThermo
);

View File

@ -8,6 +8,8 @@
hsCombustionThermo& thermo = chemistry.thermo();
SLGThermo slgThermo(mesh, thermo);
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();

View File

@ -14,6 +14,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
@ -35,6 +36,7 @@ EXE_LIBS = \
-lsolidMixture \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiation \
-lODE \

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing reacting cloud" << endl;
icoPoly8ThermoReactingMultiphaseCloud parcels
basicReactingMultiphaseCloud parcels
(
"reactingCloud1",
rho,
U,
g,
thermo
slgThermo
);

View File

@ -8,6 +8,8 @@
hsReactionThermo& thermo = chemistry.thermo();
SLGThermo slgThermo(mesh, thermo);
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();

View File

@ -33,7 +33,6 @@ Description
- reacting multiphase parcel cloud
- porous media
- mass, momentum and energy sources
- polynomial based, incompressible thermodynamics (f(T))
Note: ddtPhiCorr not used here when porous zones are active
- not well defined for porous calculations
@ -43,12 +42,13 @@ Description
#include "fvCFD.H"
#include "hReactionThermo.H"
#include "turbulenceModel.H"
#include "BasicReactingMultiphaseCloud.H"
#include "basicReactingMultiphaseCloud.H"
#include "rhoChemistryModel.H"
#include "chemistrySolver.H"
#include "radiationModel.H"
#include "porousZones.H"
#include "timeActivatedExplicitSource.H"
#include "SLGThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,5 +1,3 @@
DEV_PATH=./../..
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
@ -13,6 +11,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
@ -31,6 +30,7 @@ EXE_LIBS = \
-lsolidMixture \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiation \
-lsurfaceFilmModels \

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing reacting cloud" << endl;
thermoReactingCloud parcels
basicReactingCloud parcels
(
"reactingCloud1",
rho,
U,
g,
thermo
slgThermo
);

View File

@ -8,6 +8,8 @@
hsCombustionThermo& thermo = chemistry.thermo();
SLGThermo slgThermo(mesh, thermo);
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();

View File

@ -33,11 +33,12 @@ Description
#include "fvCFD.H"
#include "hCombustionThermo.H"
#include "turbulenceModel.H"
#include "BasicReactingCloud.H"
#include "basicReactingCloud.H"
#include "surfaceFilmModel.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "radiationModel.H"
#include "SLGThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -13,6 +13,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
@ -34,6 +35,7 @@ EXE_LIBS = \
-lsolidMixture \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiation \
-lODE \

View File

@ -1,9 +1,9 @@
Info<< "\nConstructing reacting cloud" << endl;
thermoReactingCloud parcels
basicReactingCloud parcels
(
"reactingCloud1",
rho,
U,
g,
thermo
slgThermo
);

View File

@ -8,6 +8,8 @@
hsCombustionThermo& thermo = chemistry.thermo();
SLGThermo slgThermo(mesh, thermo);
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();

View File

@ -33,10 +33,11 @@ Description
#include "fvCFD.H"
#include "hCombustionThermo.H"
#include "turbulenceModel.H"
#include "BasicReactingCloud.H"
#include "basicReactingCloud.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "radiationModel.H"
#include "SLGThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -4,11 +4,6 @@ fvVectorMatrix UbEqn(Ub, Ub.dimensions()*dimVol/dimTime);
{
{
volTensorField gradUaT = fvc::grad(Ua)().T();
volTensorField Rca
(
"Rca",
((2.0/3.0)*I)*(sqr(Ct)*k + nuEffa*tr(gradUaT)) - nuEffa*gradUaT
);
if (kineticTheory.on())
{
@ -20,6 +15,13 @@ fvVectorMatrix UbEqn(Ub, Ub.dimensions()*dimVol/dimTime);
nuEffa = sqr(Ct)*nutb + nua;
}
volTensorField Rca
(
"Rca",
((2.0/3.0)*I)*(sqr(Ct)*k + nuEffa*tr(gradUaT)) - nuEffa*gradUaT
);
if (kineticTheory.on())
{
Rca -= ((kineticTheory.lambda()/rhoa)*tr(gradUaT))*tensor(I);

View File

@ -63,11 +63,16 @@ label maxNodei = 0;
SLPtrList<labelList> slCellLabels;
SLList<label> slCellMap;
SLList<label> slCellType;
label maxCelli = 0;
PtrList<SLList<label> > slPatchCells;
PtrList<SLList<label> > slPatchCellFaces;
// Cell types
Map<word> cellTypes;
label currentTypei = -1;
// Dummy yywrap to keep yylex happy at compile time.
// It is called by yylex but is not used as the mechanism to change file.
@ -108,6 +113,8 @@ value {floatNum}
node ^{space}"N"{cspace}
element ^{space}"EN"{cspace}
bface ^{space}"SFE"{cspace}
elementTypeName ^{space}"ET"{cspace}
elementType ^{space}"TYPE"{cspace}
%%
@ -160,6 +167,7 @@ bface ^{space}"SFE"{cspace}
slCellMap.append(celli);
slCellLabels.append(new labelList(labels));
slCellType.append(currentTypei);
}
@ -210,6 +218,37 @@ bface ^{space}"SFE"{cspace}
}
{elementTypeName}{label}{cspace}{identifier}{space}\n {
IStringStream elementStream(YYText());
char tag,c;
label cellTypei;
word cellTypeName;
elementStream
>> tag >> tag // skip 'ET'
>> c >> cellTypei
>> c >> cellTypeName;
Info<< "Read typeName " << cellTypeName
<< " for type " << cellTypei << endl;
cellTypes.insert(cellTypei, cellTypeName);
}
{elementType}{label}{space}\n {
IStringStream elementStream(YYText());
char tag,c;
label cellTypei;
elementStream
>> tag >> tag >> tag >> tag // skip 'TYPE'
>> c >> cellTypei;
currentTypei = cellTypei;
}
/* ------------------------------------------------------------------------- *\
------ Ignore remaining space and \n s. Any other characters are errors.
\* ------------------------------------------------------------------------- */
@ -231,6 +270,29 @@ bface ^{space}"SFE"{cspace}
#include <fstream>
using std::ifstream;
label findFace(const polyMesh& mesh, const face& f)
{
const labelList& pFaces = mesh.pointFaces()[f[0]];
forAll(pFaces, i)
{
label faceI = pFaces[i];
if (mesh.faces()[faceI] == f)
{
return faceI;
}
}
FatalErrorIn("findFace(const polyMesh&, const face&)")
<< "Cannot find a face matching " << f
<< exit(FatalError);
return -1;
}
int main(int argc, char *argv[])
{
argList::noParallel();
@ -253,7 +315,7 @@ int main(int argc, char *argv[])
# include "createTime.H"
const fileName ansysFile = args[1];
fileName ansysFile(args.additionalArgs()[0]);
ifstream ansysStream(ansysFile.c_str());
if (!ansysStream)
@ -377,6 +439,34 @@ int main(int argc, char *argv[])
}
}
const word defaultFacesName = "defaultFaces";
word defaultFacesType = emptyPolyPatch::typeName;
// Create dummy mesh just to find out what are internal/external
// faces
autoPtr<polyMesh> dummyMesh
(
new polyMesh
(
IOobject
(
"dummyMesh",
runTime.constant(),
runTime
),
xferCopy(points),
cellShapes,
faceListList(0),
wordList(0),
wordList(0),
defaultFacesName,
defaultFacesType,
wordList(0)
)
);
// Warning: tet face order has changed between version 1.9.6 and 2.0
//
label faceIndex[7][6] =
@ -423,10 +513,53 @@ int main(int argc, char *argv[])
boundary[patchI] = patchFaces;
patchNames[patchI] = word("patch") + name(patchI + 1);
}
//
// Lookup the face labels for all the boundary faces
//
labelListList boundaryFaceLabels(boundary.size());
forAll(boundary, patchI)
{
const faceList& bFaces = boundary[patchI];
labelList& bFaceLabels = boundaryFaceLabels[patchI];
bFaceLabels.setSize(bFaces.size());
forAll(bFaces, i)
{
bFaceLabels[i] = findFace(dummyMesh(), bFaces[i]);
}
}
// Now split the boundary faces into external and internal faces. All
// faces go into faceZones and external faces go into patches.
List<faceList> patchFaces(slPatchCells.size());
labelList patchNFaces(slPatchCells.size(), 0);
forAll(boundary, patchI)
{
const faceList& bFaces = boundary[patchI];
const labelList& bFaceLabels = boundaryFaceLabels[patchI];
patchFaces[patchI].setSize(bFaces.size());
forAll(bFaces, i)
{
if (!dummyMesh().isInternalFace(bFaceLabels[i]))
{
patchFaces[patchI][patchNFaces[patchI]++] = bFaces[i];
}
}
patchFaces[patchI].setSize(patchNFaces[patchI]);
Info<< "Patch " << patchI << " named " << patchNames[patchI]
<< ": " << boundary[patchI].size() << " faces" << endl;
}
// We no longer need the dummyMesh
dummyMesh.clear();
Info<< "ansysToFoam: " << endl
<< "Ansys file format does not provide information about the type of "
<< "the patch (eg. wall, symmetry plane, cyclic etc)." << endl
@ -434,10 +567,8 @@ int main(int argc, char *argv[])
<< "as type patch. Please reset after mesh conversion as necessary."
<< endl;
wordList patchTypes(boundary.size(), polyPatch::typeName);
word defaultFacesName = "defaultFaces";
word defaultFacesType = emptyPolyPatch::typeName;
wordList patchPhysicalTypes(boundary.size());
wordList patchTypes(patchFaces.size(), polyPatch::typeName);
wordList patchPhysicalTypes(patchFaces.size());
preservePatchTypes
(
@ -461,7 +592,7 @@ int main(int argc, char *argv[])
),
xferMove(points),
cellShapes,
boundary,
patchFaces,
patchNames,
patchTypes,
defaultFacesName,
@ -469,6 +600,90 @@ int main(int argc, char *argv[])
patchPhysicalTypes
);
if (cellTypes.size() > 0 || patchNames.size() > 0)
{
DynamicList<pointZone*> pz;
DynamicList<faceZone*> fz;
DynamicList<cellZone*> cz;
// FaceZones
forAll(boundaryFaceLabels, patchI)
{
if (boundaryFaceLabels[patchI].size())
{
// Re-do the boundaryFaceLabels since the boundary face
// labels will be different on the pShapeMesh.
const faceList& bFaces = boundary[patchI];
labelList& bFaceLabels = boundaryFaceLabels[patchI];
forAll(bFaceLabels, i)
{
bFaceLabels[i] = findFace(pShapeMesh, bFaces[i]);
}
Info<< "Creating faceZone " << patchNames[patchI]
<< " with " << bFaceLabels.size() << " faces" << endl;
fz.append
(
new faceZone
(
patchNames[patchI],
bFaceLabels,
boolList(bFaceLabels.size(), false),
fz.size(),
pShapeMesh.faceZones()
)
);
}
}
// CellZones
labelList types = cellTypes.sortedToc();
forAll(types, j)
{
label cellType = types[j];
// Pick up cells in zone
DynamicList<label> addr;
SLList<label>::iterator cellMapIter = slCellMap.begin();
SLList<label>::iterator typeIter = slCellType.begin();
for
(
;
typeIter != slCellType.end();
++typeIter, ++cellMapIter
)
{
if (typeIter() == cellType)
{
addr.append(cellMap[cellMapIter()]);
}
}
Info<< "Creating cellZone " << cellTypes[cellType]
<< " with " << addr.size() << " cells" << endl;
cz.append
(
new cellZone
(
cellTypes[cellType],
addr,
j,
pShapeMesh.cellZones()
)
);
}
pShapeMesh.addZones(pz, fz, cz);
}
// Set the precision of the points data to 10
IOstream::defaultPrecision(10);

View File

@ -1,9 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso nonuniformTransformCyclic
wmake
# ----------------------------------------------------------------- end-of-file

View File

@ -1,11 +1,9 @@
EXE_INC = \
-InonuniformTransformCyclic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \
-lnonuniformTransformCyclic \
-lfiniteVolume \
-lmeshTools \
-ldynamicMesh

View File

@ -1,8 +0,0 @@
fvPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C
pointPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C
polyPatches/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C
pointPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C
fvsPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C
fvPatchFields/constraint/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.C
LIB = $(FOAM_LIBBIN)/libnonuniformTransformCyclic

View File

@ -1,5 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude
LIB_LIBS = \
-lfiniteVolume

View File

@ -7,32 +7,6 @@
#include "pointSet.H"
#include "IOmanip.H"
bool Foam::checkSync(const wordList& names)
{
List<wordList> allNames(Pstream::nProcs());
allNames[Pstream::myProcNo()] = names;
Pstream::gatherList(allNames);
Pstream::scatterList(allNames);
bool hasError = false;
for (label procI = 1; procI < allNames.size(); procI++)
{
if (allNames[procI] != allNames[0])
{
hasError = true;
Info<< " ***Inconsistent zones across processors, "
"processor 0 has zones:" << allNames[0]
<< ", processor " << procI << " has zones:"
<< allNames[procI]
<< endl;
}
}
return hasError;
}
Foam::label Foam::checkTopology
(
const polyMesh& mesh,
@ -51,35 +25,22 @@ Foam::label Foam::checkTopology
mesh.boundaryMesh().checkParallelSync(true);
// Check names of zones are equal
if (checkSync(mesh.cellZones().names()))
mesh.cellZones().checkDefinition(true);
if (mesh.cellZones().checkParallelSync(true))
{
noFailedChecks++;
}
if (checkSync(mesh.faceZones().names()))
mesh.faceZones().checkDefinition(true);
if (mesh.faceZones().checkParallelSync(true))
{
noFailedChecks++;
}
if (checkSync(mesh.pointZones().names()))
mesh.pointZones().checkDefinition(true);
if (mesh.pointZones().checkParallelSync(true))
{
noFailedChecks++;
}
// Check contents of faceZones consistent
{
forAll(mesh.faceZones(), zoneI)
{
if (mesh.faceZones()[zoneI].checkParallelSync(false))
{
Info<< " ***FaceZone " << mesh.faceZones()[zoneI].name()
<< " is not correctly synchronised"
<< " across coupled boundaries."
<< " (coupled faces are either not both "
<< " present in set or have same flipmap)" << endl;
noFailedChecks++;
}
}
}
{
pointSet points(mesh, "unusedPoints", mesh.nPoints()/100);
if (mesh.checkPoints(true, &points))

View File

@ -5,7 +5,5 @@ namespace Foam
{
class polyMesh;
bool checkSync(const wordList& names);
label checkTopology(const polyMesh&, const bool, const bool);
}

View File

@ -1,9 +1,10 @@
surfaceMeshWriter.C
foamToVTK.C
internalWriter.C
lagrangianWriter.C
patchWriter.C
writeFuns.C
writePatchGeom.C
writeFaceSet.C
writePointSet.C
writeSurfFields.C

View File

@ -157,7 +157,7 @@ Note
#include "writeFaceSet.H"
#include "writePointSet.H"
#include "writePatchGeom.H"
#include "surfaceMeshWriter.H"
#include "writeSurfFields.H"
@ -963,20 +963,42 @@ int main(int argc, char *argv[])
if (doFaceZones)
{
PtrList<surfaceScalarField> ssf;
readFields
(
vMesh,
vMesh.baseMesh(),
objects,
selectedFields,
ssf
);
print(" surfScalarFields :", Info, ssf);
PtrList<surfaceVectorField> svf;
readFields
(
vMesh,
vMesh.baseMesh(),
objects,
selectedFields,
svf
);
print(" surfVectorFields :", Info, svf);
const faceZoneMesh& zones = mesh.faceZones();
forAll(zones, zoneI)
{
const faceZone& pp = zones[zoneI];
const faceZone& fz = zones[zoneI];
mkDir(fvPath/pp.name());
mkDir(fvPath/fz.name());
fileName patchFileName;
if (vMesh.useSubMesh())
{
patchFileName =
fvPath/pp.name()/cellSetName
fvPath/fz.name()/cellSetName
+ "_"
+ timeDesc
+ ".vtk";
@ -984,7 +1006,7 @@ int main(int argc, char *argv[])
else
{
patchFileName =
fvPath/pp.name()/pp.name()
fvPath/fz.name()/fz.name()
+ "_"
+ timeDesc
+ ".vtk";
@ -992,18 +1014,31 @@ int main(int argc, char *argv[])
Info<< " FaceZone : " << patchFileName << endl;
std::ofstream ostr(patchFileName.c_str());
writeFuns::writeHeader(ostr, binary, pp.name());
ostr<< "DATASET POLYDATA" << std::endl;
writePatchGeom
indirectPrimitivePatch pp
(
binary,
pp().localFaces(),
pp().localPoints(),
ostr
IndirectList<face>(mesh.faces(), fz),
mesh.points()
);
surfaceMeshWriter writer
(
vMesh,
binary,
pp,
fz.name(),
patchFileName
);
// Number of fields
writeFuns::writeCellDataHeader
(
writer.os(),
pp.size(),
ssf.size()+svf.size()
);
writer.write(ssf);
writer.write(svf);
}
}

View File

@ -23,60 +23,63 @@ License
\*---------------------------------------------------------------------------*/
#include "writePatchGeom.H"
#include "OFstream.H"
#include "floatScalar.H"
#include "surfaceMeshWriter.H"
#include "writeFuns.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
void writePatchGeom
Foam::surfaceMeshWriter::surfaceMeshWriter
(
const vtkMesh& vMesh,
const bool binary,
const faceList& faces,
const pointField& points,
std::ofstream& ostr
const indirectPrimitivePatch& pp,
const word& name,
const fileName& fName
)
:
vMesh_(vMesh),
binary_(binary),
pp_(pp),
fName_(fName),
os_(fName.c_str())
{
ostr<< "POINTS " << points.size() << " float" << std::endl;
DynamicList<floatScalar> ptField(3*points.size());
writeFuns::insert(points, ptField);
writeFuns::write(ostr, binary, ptField);
// Write header
writeFuns::writeHeader(os_, binary_, name);
os_ << "DATASET POLYDATA" << std::endl;
// Write topology
label nFaceVerts = 0;
forAll(faces, faceI)
forAll(pp, faceI)
{
nFaceVerts += faces[faceI].size() + 1;
nFaceVerts += pp[faceI].size() + 1;
}
ostr<< "POLYGONS " << faces.size() << ' ' << nFaceVerts << std::endl;
os_ << "POINTS " << pp.nPoints() << " float" << std::endl;
DynamicList<floatScalar> ptField(3*pp.nPoints());
writeFuns::insert(pp.localPoints(), ptField);
writeFuns::write(os_, binary, ptField);
os_ << "POLYGONS " << pp.size() << ' ' << nFaceVerts << std::endl;
DynamicList<label> vertLabels(nFaceVerts);
forAll(faces, faceI)
forAll(pp, faceI)
{
const face& f = faces[faceI];
const face& f = pp.localFaces()[faceI];
vertLabels.append(f.size());
writeFuns::insert(f, vertLabels);
}
writeFuns::write(ostr, binary, vertLabels);
writeFuns::write(os_, binary_, vertLabels);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,141 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 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 3 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, see <http://www.gnu.org/licenses/>.
Class
Foam::surfaceMeshWriter
Description
Write faces with fields
SourceFiles
surfaceMeshWriter.C
surfaceMeshWriterTemplates.C
\*---------------------------------------------------------------------------*/
#ifndef surfaceMeshWriter_H
#define surfaceMeshWriter_H
#include "pointMesh.H"
#include "OFstream.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "vtkMesh.H"
#include "indirectPrimitivePatch.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class volPointInterpolation;
/*---------------------------------------------------------------------------*\
Class surfaceMeshWriter Declaration
\*---------------------------------------------------------------------------*/
class surfaceMeshWriter
{
const vtkMesh& vMesh_;
const bool binary_;
const indirectPrimitivePatch& pp_;
const fileName fName_;
std::ofstream os_;
// label nPoints_;
//
// label nFaces_;
public:
// Constructors
//- Construct from components
surfaceMeshWriter
(
const vtkMesh&,
const bool binary,
const indirectPrimitivePatch& pp,
const word& name,
const fileName&
);
// Member Functions
std::ofstream& os()
{
return os_;
}
// label nPoints() const
// {
// return nPoints_;
// }
//
// label nFaces() const
// {
// return nFaces_;
// }
//
// //- Write cellIDs
// void writePatchIDs();
//- Extract face data
template<class Type>
tmp<Field<Type> > getFaceField
(
const GeometricField<Type, fvsPatchField, surfaceMesh>&
) const;
//- Write surfaceFields
template<class Type>
void write
(
const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >&
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "surfaceMeshWriterTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,84 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 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 3 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, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "surfaceMeshWriter.H"
#include "writeFuns.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type>
Foam::tmp<Field<Type> > Foam::surfaceMeshWriter::getFaceField
(
const GeometricField<Type, fvsPatchField, surfaceMesh>& sfld
) const
{
const polyBoundaryMesh& patches = sfld.mesh().boundaryMesh();
tmp<Field<Type> > tfld(new Field<Type>(pp_.size()));
Field<Type>& fld = tfld();
forAll(pp_.addressing(), i)
{
label faceI = pp_.addressing()[i];
label patchI = patches.whichPatch(faceI);
if (patchI == -1)
{
fld[i] = sfld[faceI];
}
else
{
label localFaceI = faceI - patches[patchI].start();
fld[i] = sfld.boundaryField()[patchI][localFaceI];
}
}
return tfld;
}
template<class Type>
void Foam::surfaceMeshWriter::write
(
const PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& sflds
)
{
forAll(sflds, fieldI)
{
const GeometricField<Type, fvsPatchField, surfaceMesh>& fld =
sflds[fieldI];
os_ << fld.name() << ' ' << pTraits<Type>::nComponents << ' '
<< pp_.size() << " float" << std::endl;
DynamicList<floatScalar> fField(pTraits<Type>::nComponents*pp_.size());
writeFuns::insert(getFaceField(fld)(), fField);
writeFuns::write(os_, binary_, fField);
}
}
// ************************************************************************* //

View File

@ -620,6 +620,11 @@ double* Foam::vtkPV3Foam::findTimes(int& nTimeSteps)
void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
{
if (!meshPtr_)
{
return;
}
// always remove old actors first
forAll(patchTextActorsPtrs_, patchI)

View File

@ -341,13 +341,14 @@ $(basicPolyPatches)/coupled/coupledPolyPatch.C
$(basicPolyPatches)/generic/genericPolyPatch.C
constraintPolyPatches = $(polyPatches)/constraint
$(constraintPolyPatches)/empty/emptyPolyPatch.C
$(constraintPolyPatches)/symmetry/symmetryPolyPatch.C
$(constraintPolyPatches)/wedge/wedgePolyPatch.C
$(constraintPolyPatches)/cyclic/cyclicPolyPatch.C
$(constraintPolyPatches)/cyclicSlip/cyclicSlipPolyPatch.C
$(constraintPolyPatches)/empty/emptyPolyPatch.C
$(constraintPolyPatches)/nonuniformTransformCyclic/nonuniformTransformCyclicPolyPatch.C
$(constraintPolyPatches)/processorCyclic/processorCyclicPolyPatch.C
$(constraintPolyPatches)/processor/processorPolyPatch.C
$(constraintPolyPatches)/symmetry/symmetryPolyPatch.C
$(constraintPolyPatches)/wedge/wedgePolyPatch.C
derivedPolyPatches = $(polyPatches)/derived
$(derivedPolyPatches)/wall/wallPolyPatch.C
@ -453,13 +454,14 @@ $(basicPointPatches)/coupled/coupledPointPatch.C
$(basicPointPatches)/generic/genericPointPatch.C
constraintPointPatches = $(pointPatches)/constraint
$(constraintPointPatches)/empty/emptyPointPatch.C
$(constraintPointPatches)/symmetry/symmetryPointPatch.C
$(constraintPointPatches)/wedge/wedgePointPatch.C
$(constraintPointPatches)/cyclic/cyclicPointPatch.C
$(constraintPointPatches)/cyclicSlip/cyclicSlipPointPatch.C
$(constraintPointPatches)/empty/emptyPointPatch.C
$(constraintPointPatches)/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatch.C
$(constraintPointPatches)/processor/processorPointPatch.C
$(constraintPointPatches)/processorCyclic/processorCyclicPointPatch.C
$(constraintPointPatches)/symmetry/symmetryPointPatch.C
$(constraintPointPatches)/wedge/wedgePointPatch.C
derivedPointPatches = $(pointPatches)/derived
$(derivedPointPatches)/coupled/coupledFacePointPatch.C
@ -520,13 +522,14 @@ $(basicPointPatchFields)/zeroGradient/zeroGradientPointPatchFields.C
$(basicPointPatchFields)/mixed/mixedPointPatchFields.C
constraintPointPatchFields = $(pointPatchFields)/constraint
$(constraintPointPatchFields)/empty/emptyPointPatchFields.C
$(constraintPointPatchFields)/symmetry/symmetryPointPatchFields.C
$(constraintPointPatchFields)/wedge/wedgePointPatchFields.C
$(constraintPointPatchFields)/cyclic/cyclicPointPatchFields.C
$(constraintPointPatchFields)/cyclicSlip/cyclicSlipPointPatchFields.C
$(constraintPointPatchFields)/empty/emptyPointPatchFields.C
$(constraintPointPatchFields)/nonuniformTransformCyclic/nonuniformTransformCyclicPointPatchFields.C
$(constraintPointPatchFields)/processor/processorPointPatchFields.C
$(constraintPointPatchFields)/processorCyclic/processorCyclicPointPatchFields.C
$(constraintPointPatchFields)/symmetry/symmetryPointPatchFields.C
$(constraintPointPatchFields)/wedge/wedgePointPatchFields.C
derivedPointPatchFields = $(pointPatchFields)/derived
$(derivedPointPatchFields)/slip/slipPointPatchFields.C

View File

@ -804,7 +804,11 @@ Foam::Time& Foam::Time::operator++()
case wcCpuTime:
{
label outputIndex = label(elapsedCpuTime()/writeInterval_);
label outputIndex = label
(
returnReduce(elapsedCpuTime(), maxOp<double>())
/ writeInterval_
);
if (outputIndex > outputTimeIndex_)
{
outputTime_ = true;
@ -819,7 +823,11 @@ Foam::Time& Foam::Time::operator++()
case wcClockTime:
{
label outputIndex = label(elapsedClockTime()/writeInterval_);
label outputIndex = label
(
returnReduce(label(elapsedClockTime()), maxOp<label>())
/ writeInterval_
);
if (outputIndex > outputTimeIndex_)
{
outputTime_ = true;

View File

@ -38,8 +38,7 @@ Description
dictionaries since, unlike the IOdictionary class, it does not use an
objectRegistry itself to work.
ToDo
A merge() member function with a non-const dictionary parameter.
To add - a merge() member function with a non-const dictionary parameter?
This would avoid unnecessary cloning in the add(entry*, bool) method.
SourceFiles

View File

@ -156,6 +156,29 @@ public:
);
}
//- Construct and return a clone, resetting the face list
// and boundary mesh
virtual autoPtr<polyPatch> clone
(
const polyBoundaryMesh& bm,
const label index,
const unallocLabelList& mapAddressing,
const label newStart
) const
{
return autoPtr<polyPatch>
(
new nonuniformTransformCyclicPolyPatch
(
*this,
bm,
index,
mapAddressing,
newStart
)
);
}
// Destructor

View File

@ -27,6 +27,7 @@ License
#include "entry.H"
#include "demandDrivenData.H"
#include "stringListOps.H"
#include "Pstream.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -372,6 +373,84 @@ bool Foam::ZoneMesh<ZoneType, MeshType>::checkDefinition
}
template<class ZoneType, class MeshType>
bool Foam::ZoneMesh<ZoneType, MeshType>::checkParallelSync
(
const bool report
) const
{
if (!Pstream::parRun())
{
return false;
}
const PtrList<ZoneType>& zones = *this;
bool hasError = false;
// Collect all names
List<wordList> allNames(Pstream::nProcs());
allNames[Pstream::myProcNo()] = this->names();
Pstream::gatherList(allNames);
Pstream::scatterList(allNames);
List<wordList> allTypes(Pstream::nProcs());
allTypes[Pstream::myProcNo()] = this->types();
Pstream::gatherList(allTypes);
Pstream::scatterList(allTypes);
// Have every processor check but only master print error.
for (label procI = 1; procI < allNames.size(); procI++)
{
if
(
(allNames[procI] != allNames[0])
|| (allTypes[procI] != allTypes[0])
)
{
hasError = true;
if (debug || (report && Pstream::master()))
{
Info<< " ***Inconsistent zones across processors, "
"processor 0 has zone names:" << allNames[0]
<< " zone types:" << allTypes[0]
<< " processor " << procI << " has zone names:"
<< allNames[procI]
<< " zone types:" << allTypes[procI]
<< endl;
}
}
}
// Check contents
if (!hasError)
{
forAll(zones, zoneI)
{
if (zones[zoneI].checkParallelSync(false))
{
hasError = true;
if (debug || (report && Pstream::master()))
{
Info<< " ***Zone " << zones[zoneI].name()
<< " of type " << zones[zoneI].type()
<< " is not correctly synchronised"
<< " across coupled boundaries."
<< " (coupled faces are either not both "
<< " present in set or have same flipmap)" << endl;
}
}
}
}
return hasError;
}
// Correct zone mesh after moving points
template<class ZoneType, class MeshType>
void Foam::ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& p)

View File

@ -149,6 +149,10 @@ public:
//- Check zone definition. Return true if in error.
bool checkDefinition(const bool report = false) const;
//- Check whether all procs have all zones and in same order. Return
// true if in error.
bool checkParallelSync(const bool report = false) const;
//- Correct zone mesh after moving points
void movePoints(const pointField&);

View File

@ -209,6 +209,13 @@ public:
//- Check zone definition. Return true if in error.
virtual bool checkDefinition(const bool report = false) const;
//- Check whether zone is synchronised across coupled boundaries. Return
// true if in error.
virtual bool checkParallelSync(const bool report = false) const
{
return false;
}
//- Write dictionary
virtual void writeDict(Ostream&) const;

View File

@ -29,6 +29,7 @@ License
#include "polyMesh.H"
#include "primitiveMesh.H"
#include "demandDrivenData.H"
#include "syncTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -134,6 +135,49 @@ bool Foam::pointZone::checkDefinition(const bool report) const
}
bool Foam::pointZone::checkParallelSync(const bool report) const
{
const polyMesh& mesh = zoneMesh().mesh();
labelList maxZone(mesh.nPoints(), -1);
labelList minZone(mesh.nPoints(), labelMax);
forAll(*this, i)
{
label pointI = operator[](i);
maxZone[pointI] = index();
minZone[pointI] = index();
}
syncTools::syncPointList(mesh, maxZone, maxEqOp<label>(), -1);
syncTools::syncPointList(mesh, minZone, minEqOp<label>(), labelMax);
bool error = false;
forAll(maxZone, pointI)
{
// Check point in zone on both sides
if (maxZone[pointI] != minZone[pointI])
{
if (report && !error)
{
Info<< " ***Problem with pointZone " << index()
<< " named " << name()
<< ". Point " << pointI
<< " at " << mesh.points()[pointI]
<< " is in zone "
<< (minZone[pointI] == labelMax ? -1 : minZone[pointI])
<< " on some processors and in zone "
<< maxZone[pointI]
<< " on some other processors."
<< endl;
}
error = true;
}
}
return error;
}
void Foam::pointZone::writeDict(Ostream& os) const
{
os << nl << name_ << nl << token::BEGIN_BLOCK << nl

View File

@ -208,6 +208,10 @@ public:
//- Check zone definition. Return true if in error.
virtual bool checkDefinition(const bool report = false) const;
//- Check whether zone is synchronised across coupled boundaries. Return
// true if in error.
virtual bool checkParallelSync(const bool report = false) const;
//- Correct patch after moving points
virtual void movePoints(const pointField&)
{}

View File

@ -16,13 +16,14 @@ $(basicFvPatches)/coupled/coupledFvPatch.C
$(basicFvPatches)/generic/genericFvPatch.C
constraintFvPatches = $(fvPatches)/constraint
$(constraintFvPatches)/empty/emptyFvPatch.C
$(constraintFvPatches)/symmetry/symmetryFvPatch.C
$(constraintFvPatches)/wedge/wedgeFvPatch.C
$(constraintFvPatches)/cyclic/cyclicFvPatch.C
$(constraintFvPatches)/cyclicSlip/cyclicSlipFvPatch.C
$(constraintFvPatches)/empty/emptyFvPatch.C
$(constraintFvPatches)/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatch.C
$(constraintFvPatches)/processor/processorFvPatch.C
$(constraintFvPatches)/processorCyclic/processorCyclicFvPatch.C
$(constraintFvPatches)/symmetry/symmetryFvPatch.C
$(constraintFvPatches)/wedge/wedgeFvPatch.C
derivedFvPatches = $(fvPatches)/derived
$(derivedFvPatches)/wall/wallFvPatch.C
@ -100,6 +101,7 @@ $(constraintFvPatchFields)/cyclic/cyclicFvPatchFields.C
$(constraintFvPatchFields)/cyclicSlip/cyclicSlipFvPatchFields.C
$(constraintFvPatchFields)/empty/emptyFvPatchFields.C
$(constraintFvPatchFields)/jumpCyclic/jumpCyclicFvPatchFields.C
$(constraintFvPatchFields)/nonuniformTransformCyclic/nonuniformTransformCyclicFvPatchFields.C
$(constraintFvPatchFields)/processor/processorFvPatchFields.C
$(constraintFvPatchFields)/processor/processorFvPatchScalarField.C
$(constraintFvPatchFields)/processorCyclic/processorCyclicFvPatchFields.C
@ -174,12 +176,12 @@ constraintFvsPatchFields = $(fvsPatchFields)/constraint
$(constraintFvsPatchFields)/cyclic/cyclicFvsPatchFields.C
$(constraintFvsPatchFields)/cyclicSlip/cyclicSlipFvsPatchFields.C
$(constraintFvsPatchFields)/empty/emptyFvsPatchFields.C
$(constraintFvsPatchFields)/nonuniformTransformCyclic/nonuniformTransformCyclicFvsPatchFields.C
$(constraintFvsPatchFields)/processor/processorFvsPatchFields.C
$(constraintFvsPatchFields)/processorCyclic/processorCyclicFvsPatchFields.C
$(constraintFvsPatchFields)/symmetry/symmetryFvsPatchFields.C
$(constraintFvsPatchFields)/wedge/wedgeFvsPatchFields.C
fields/volFields/volFields.C
fields/surfaceFields/surfaceFields.C

View File

@ -57,18 +57,18 @@ cyclicFvPatchField<Type>::cyclicFvPatchField
coupledFvPatchField<Type>(ptf, p, iF, mapper),
cyclicPatch_(refCast<const cyclicFvPatch>(p))
{
if (!isType<cyclicFvPatch>(this->patch()))
if (!isA<cyclicFvPatch>(this->patch()))
{
FatalErrorIn
(
"cyclicFvPatchField<Type>::cyclicFvPatchField\n"
"(\n"
" const cyclicFvPatchField<Type>& ptf,\n"
" const fvPatch& p,\n"
" const DimensionedField<Type, volMesh>& iF,\n"
" const fvPatchFieldMapper& mapper\n"
")\n"
) << "\n patch type '" << p.type()
"cyclicFvPatchField<Type>::cyclicFvPatchField"
"("
"const cyclicFvPatchField<Type>& ,"
"const fvPatch&, "
"const DimensionedField<Type, volMesh>&, "
"const fvPatchFieldMapper&"
")"
) << " patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()
@ -89,18 +89,18 @@ cyclicFvPatchField<Type>::cyclicFvPatchField
coupledFvPatchField<Type>(p, iF, dict),
cyclicPatch_(refCast<const cyclicFvPatch>(p))
{
if (!isType<cyclicFvPatch>(p))
if (!isA<cyclicFvPatch>(p))
{
FatalIOErrorIn
(
"cyclicFvPatchField<Type>::cyclicFvPatchField\n"
"(\n"
" const fvPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
"cyclicFvPatchField<Type>::cyclicFvPatchField"
"("
"const fvPatch&, "
"const Field<Type>&, "
"const dictionary&"
")",
dict
) << "\n patch type '" << p.type()
) << " patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()

View File

@ -56,7 +56,7 @@ cyclicFvsPatchField<Type>::cyclicFvsPatchField
coupledFvsPatchField<Type>(ptf, p, iF, mapper),
cyclicPatch_(refCast<const cyclicFvPatch>(p))
{
if (!isType<cyclicFvPatch>(this->patch()))
if (!isA<cyclicFvPatch>(this->patch()))
{
FatalErrorIn
(
@ -87,7 +87,7 @@ cyclicFvsPatchField<Type>::cyclicFvsPatchField
coupledFvsPatchField<Type>(p, iF, dict),
cyclicPatch_(refCast<const cyclicFvPatch>(p))
{
if (!isType<cyclicFvPatch>(p))
if (!isA<cyclicFvPatch>(p))
{
FatalIOErrorIn
(

View File

@ -53,7 +53,7 @@ class inverseDistanceDiffusivity
// Private data
//- Patches selected to base the distance on
// These can contain regular expressions and the actuallt patch names
// These can contain regular expressions and the actual patch names
// will be searched for.
wordList patchNames_;

View File

@ -1,5 +1,6 @@
/* Coal parcel and sub-models */
CoalParcel/defineCoalParcel.C
CoalParcel/makeCoalParcelSubmodels.C
coalParcel/coalParcel.C
coalParcel/defineCoalParcel.C
coalParcel/makeCoalParcelSubmodels.C
LIB = $(FOAM_LIBBIN)/libcoalCombustion

View File

@ -11,6 +11,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
@ -32,6 +33,7 @@ LIB_LIBS = \
-lsolids \
-lsolidMixture \
-lreactionThermophysicalModels \
-lSLGThermo \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lsurfaceFilmModels

View File

@ -25,29 +25,21 @@ Class
CoalCloud
Description
Coal cloud templated on the type of carrier phase thermodynamics
Coal cloud
\*---------------------------------------------------------------------------*/
#ifndef CoalCloud_H
#define CoalCloud_H
#ifndef coalCloud_H
#define coalCloud_H
#include "ReactingMultiphaseCloud.H"
#include "CoalParcel.H"
#include "thermoPhysicsTypes.H"
#include "coalParcel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef ReactingMultiphaseCloud<CoalParcel<constGasThermoPhysics> >
constThermoCoalCloud;
typedef ReactingMultiphaseCloud<CoalParcel<gasThermoPhysics> >
thermoCoalCloud;
typedef ReactingMultiphaseCloud<CoalParcel<icoPoly8ThermoPhysics> >
icoPoly8ThermoCoalCloud;
typedef ReactingMultiphaseCloud<coalParcel> coalCloud;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,26 +23,24 @@ License
\*---------------------------------------------------------------------------*/
#include "CoalParcel.H"
#include "coalParcel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::CoalParcel<ThermoType>::CoalParcel
Foam::coalParcel::coalParcel
(
ReactingMultiphaseCloud<CoalParcel<ThermoType> >& owner,
ReactingMultiphaseCloud<coalParcel>& owner,
const vector& position,
const label cellI
)
:
ReactingMultiphaseParcel<CoalParcel<ThermoType> >(owner, position, cellI)
ReactingMultiphaseParcel<coalParcel>(owner, position, cellI)
{}
template<class ThermoType>
Foam::CoalParcel<ThermoType>::CoalParcel
Foam::coalParcel::coalParcel
(
ReactingMultiphaseCloud<CoalParcel<ThermoType> >& owner,
ReactingMultiphaseCloud<coalParcel>& owner,
const vector& position,
const label cellI,
const label typeId,
@ -56,12 +54,10 @@ Foam::CoalParcel<ThermoType>::CoalParcel
const scalarField& YGas0,
const scalarField& YLiquid0,
const scalarField& YSolid0,
const typename
ReactingMultiphaseParcel<CoalParcel<ThermoType> >::
constantProperties& constProps
const ReactingMultiphaseParcel<coalParcel>::constantProperties& constProps
)
:
ReactingMultiphaseParcel<CoalParcel<ThermoType> >
ReactingMultiphaseParcel<coalParcel>
(
owner,
position,
@ -82,22 +78,27 @@ Foam::CoalParcel<ThermoType>::CoalParcel
{}
template<class ThermoType>
Foam::CoalParcel<ThermoType>::CoalParcel
Foam::coalParcel::coalParcel
(
const Cloud<CoalParcel<ThermoType> >& cloud,
const Cloud<coalParcel>& cloud,
Istream& is,
bool readFields
)
:
ReactingMultiphaseParcel<CoalParcel<ThermoType> >(cloud, is, readFields)
ReactingMultiphaseParcel<coalParcel>(cloud, is, readFields)
{}
Foam::coalParcel::coalParcel(const coalParcel& p)
:
ReactingMultiphaseParcel<coalParcel>(p)
{
}
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::CoalParcel<ThermoType>::~CoalParcel()
Foam::coalParcel::~coalParcel()
{}

View File

@ -22,19 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
CoalParcel
coalParcel
Description
Coal parcel class
SourceFiles
CoalParcel.C
CoalParcelIO.C
\*---------------------------------------------------------------------------*/
#ifndef CoalParcel_H
#define CoalParcel_H
#ifndef coalParcel_H
#define coalParcel_H
#include "ReactingMultiphaseParcel.H"
@ -43,42 +42,34 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
template<class ThermoType>
class CoalParcel;
/*---------------------------------------------------------------------------*\
Class CoalParcel Declaration
Class coalParcel Declaration
\*---------------------------------------------------------------------------*/
template<class ThermoType>
class CoalParcel
class coalParcel
:
public ReactingMultiphaseParcel<CoalParcel<ThermoType> >
public ReactingMultiphaseParcel<coalParcel>
{
public:
//- The type of thermodynamics this parcel was instantiated for
typedef ThermoType thermoType;
// Run-time type information
TypeName("CoalParcel");
TypeName("coalParcel");
// Constructors
//- Construct from owner, position, and cloud owner
// Other properties initialised as null
CoalParcel
coalParcel
(
ReactingMultiphaseCloud<CoalParcel>& owner,
ReactingMultiphaseCloud<coalParcel>& owner,
const vector& position,
const label cellI
);
//- Construct from components
CoalParcel
coalParcel
(
ReactingMultiphaseCloud<CoalParcel>& owner,
ReactingMultiphaseCloud<coalParcel>& owner,
const vector& position,
const label cellI,
const label typeId,
@ -92,28 +83,30 @@ public:
const scalarField& YGas0,
const scalarField& YLiquid0,
const scalarField& YSolid0,
const typename
ReactingMultiphaseParcel<CoalParcel>::
constantProperties& constProps
const ReactingMultiphaseParcel<coalParcel>::constantProperties&
constProps
);
//- Construct from Istream
CoalParcel
coalParcel
(
const Cloud<CoalParcel>& c,
const Cloud<coalParcel>& c,
Istream& is,
bool readFields = true
);
//- Construct as a copy
coalParcel(const coalParcel& p);
//- Construct and return a clone
autoPtr<CoalParcel> clone() const
autoPtr<coalParcel> clone() const
{
return autoPtr<CoalParcel>(new CoalParcel(*this));
return autoPtr<coalParcel>(new coalParcel(*this));
}
//- Destructor
virtual ~CoalParcel();
virtual ~coalParcel();
};
@ -123,12 +116,6 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "CoalParcel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -23,14 +23,14 @@ License
\*---------------------------------------------------------------------------*/
#include "createCoalParcelTypes.H"
#include "CoalParcel.H"
#include "createReactingMultiphaseParcelTypes.H"
#include "coalParcel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
createCoalParcelType(CoalParcel);
createReactingMultiphaseParcelTypes(coalParcel);
};

View File

@ -23,26 +23,26 @@ License
\*---------------------------------------------------------------------------*/
#include "CoalParcel.H"
#include "coalParcel.H"
// Kinematic
#include "makeReactingParcelDispersionModels.H"
#include "makeReactingParcelDragModels.H"
#include "makeParcelDispersionModels.H"
#include "makeParcelDragModels.H"
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
#include "makeReactingParcelCollisionModels.H"
#include "makeReactingParcelPatchInteractionModels.H"
#include "makeReactingParcelPostProcessingModels.H"
#include "makeParcelCollisionModels.H"
#include "makeParcelPatchInteractionModels.H"
#include "makeParcelPostProcessingModels.H"
// Thermodynamic
#include "makeReactingParcelHeatTransferModels.H"
#include "makeParcelHeatTransferModels.H"
// Reacting
#include "makeReactingMultiphaseParcelCompositionModels.H" // MP variant
#include "makeReactingParcelPhaseChangeModels.H"
#include "makeReactingParcelSurfaceFilmModels.H"
// Reacting multiphase
#include "makeReactingMultiphaseParcelDevolatilisationModels.H"
#include "makeReactingMultiphaseParcelSurfaceFilmModels.H"
// Coal specific
#include "makeCoalParcelSurfaceReactionModels.H"
@ -52,24 +52,24 @@ License
namespace Foam
{
// Kinematic sub-models
makeReactingDispersionModels(CoalParcel);
makeReactingDragModels(CoalParcel);
makeReactingMultiphaseInjectionModels(CoalParcel);
makeReactingCollisionModels(CoalParcel);
makeReactingPatchInteractionModels(CoalParcel);
makeReactingPostProcessingModels(CoalParcel);
makeParcelDispersionModels(coalParcel);
makeParcelDragModels(coalParcel);
makeReactingMultiphaseParcelInjectionModels(coalParcel);
makeParcelCollisionModels(coalParcel);
makeParcelPatchInteractionModels(coalParcel);
makeParcelPostProcessingModels(coalParcel);
// Thermo sub-models
makeReactingHeatTransferModels(CoalParcel);
makeParcelHeatTransferModels(coalParcel);
// Reacting sub-models
makeReactingMultiphaseCompositionModels(CoalParcel);
makeReactingPhaseChangeModels(CoalParcel);
makeReactingMultiphaseParcelCompositionModels(coalParcel);
makeReactingParcelPhaseChangeModels(coalParcel);
// Reacting multiphase sub-models
makeReactingMultiphaseDevolatilisationModels(CoalParcel);
makeReactingMultiphaseSurfaceFilmModels(CoalParcel);
makeCoalSurfaceReactionModels(CoalParcel);
makeReactingMultiphaseParcelDevolatilisationModels(coalParcel);
makeReactingParcelSurfaceFilmModels(coalParcel);
makeCoalParcelSurfaceReactionModels(coalParcel);
};

View File

@ -1,98 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 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 3 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, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#ifndef createCoalParcelTypes_H
#define createCoalParcelTypes_H
#include "thermoPhysicsTypes.H"
#include "CoalCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define createCoalParcelType(ParcelType) \
\
createCoalParcelThermoType \
( \
ParcelType, \
constGasThermoPhysics \
); \
createCoalParcelThermoType \
( \
ParcelType, \
gasThermoPhysics \
); \
createCoalParcelThermoType \
( \
ParcelType, \
icoPoly8ThermoPhysics \
);
#define createCoalParcelThermoType(ParcelType, ThermoType) \
\
typedef ParcelType<ThermoType> ParcelType##ThermoType; \
\
defineTemplateTypeNameAndDebug(ParcelType##ThermoType, 0); \
defineTemplateTypeNameAndDebug(Particle<ParcelType##ThermoType>, 0); \
defineTemplateTypeNameAndDebug(Cloud<ParcelType##ThermoType>, 0); \
\
defineParcelTypeNameAndDebug(KinematicParcel<ParcelType##ThermoType>, 0); \
defineTemplateTypeNameAndDebug \
( \
KinematicParcel<ParcelType##ThermoType>, \
0 \
); \
defineParcelTypeNameAndDebug(ThermoParcel<ParcelType##ThermoType>, 0); \
defineTemplateTypeNameAndDebug(ThermoParcel<ParcelType##ThermoType>, 0); \
defineParcelTypeNameAndDebug(ReactingParcel<ParcelType##ThermoType>, 0); \
defineTemplateTypeNameAndDebug(ReactingParcel<ParcelType##ThermoType>, 0);\
defineParcelTypeNameAndDebug \
( \
ReactingMultiphaseParcel<ParcelType##ThermoType>, \
0 \
); \
defineTemplateTypeNameAndDebug \
( \
ReactingMultiphaseParcel<ParcelType##ThermoType>, \
0 \
); \
defineParcelTypeNameAndDebug(CoalParcel<ParcelType##ThermoType>, 0); \
defineTemplateTypeNameAndDebug(CoalParcel<ParcelType##ThermoType>, 0); \
\
defineParcelTypeNameAndDebug(KinematicCloud<ParcelType##ThermoType>, 0); \
defineParcelTypeNameAndDebug(ThermoCloud<ParcelType##ThermoType>, 0); \
defineParcelTypeNameAndDebug(ReactingCloud<ParcelType##ThermoType>, 0); \
defineParcelTypeNameAndDebug \
( \
ReactingMultiphaseCloud<ParcelType##ThermoType>, \
0 \
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -28,7 +28,6 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "thermoPhysicsTypes.H"
#include "ReactingMultiphaseCloud.H"
#include "NoSurfaceReaction.H"
@ -38,59 +37,33 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeCoalSurfaceReactionModels(ParcelType) \
#define makeCoalParcelSurfaceReactionModels(ParcelType) \
\
makeCoalSurfaceReactionModelThermoType \
( \
ParcelType, \
constGasThermoPhysics \
); \
makeCoalSurfaceReactionModelThermoType \
( \
ParcelType, \
gasThermoPhysics \
); \
makeCoalSurfaceReactionModelThermoType \
( \
ParcelType, \
icoPoly8ThermoPhysics \
);
#define makeCoalSurfaceReactionModelThermoType(ParcelType, ThermoType) \
makeSurfaceReactionModel(ReactingMultiphaseCloud<ParcelType>); \
\
makeSurfaceReactionModel \
( \
ReactingMultiphaseCloud<ParcelType<ThermoType> > \
); \
\
makeSurfaceReactionModelThermoType \
makeSurfaceReactionModelType \
( \
NoSurfaceReaction, \
ReactingMultiphaseCloud, \
ParcelType, \
ThermoType \
ParcelType \
); \
makeSurfaceReactionModelThermoType \
makeSurfaceReactionModelType \
( \
COxidationDiffusionLimitedRate, \
ReactingMultiphaseCloud, \
ParcelType, \
ThermoType \
ParcelType \
); \
makeSurfaceReactionModelThermoType \
makeSurfaceReactionModelType \
( \
COxidationKineticDiffusionLimitedRate, \
ReactingMultiphaseCloud, \
ParcelType, \
ThermoType \
ParcelType \
); \
makeSurfaceReactionModelThermoType \
makeSurfaceReactionModelType \
( \
COxidationMurphyShaddix, \
ReactingMultiphaseCloud, \
ParcelType, \
ThermoType \
ParcelType \
);

View File

@ -50,10 +50,10 @@ Foam::COxidationDiffusionLimitedRate<CloudType>::COxidationDiffusionLimitedRate
CsLocalId_ = owner.composition().localId(idSolid, "C");
// Set local copies of thermo properties
WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W();
scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W();
WO2_ = owner.thermo().carrier().W(O2GlobalId_);
const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
WC_ = WCO2 - WO2_;
HcCO2_ = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].Hc();
HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_);
if (Sb_ < 0)
{
@ -120,7 +120,7 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate
}
// Local mass fraction of O2 in the carrier phase
const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
const scalar YO2 = this->owner().thermo().carrier().Y(O2GlobalId_)[cellI];
// Change in C mass [kg]
scalar dmC =

View File

@ -58,10 +58,10 @@ COxidationKineticDiffusionLimitedRate
CsLocalId_ = owner.composition().localId(idSolid, "C");
// Set local copies of thermo properties
WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W();
scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W();
WO2_ = owner.thermo().carrier().W(O2GlobalId_);
const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
WC_ = WCO2 - WO2_;
HcCO2_ = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].Hc();
HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_);
if (Sb_ < 0)
{
@ -128,7 +128,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
}
// Local mass fraction of O2 in the carrier phase
const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
const scalar YO2 = this->owner().thermo().carrier().Y(O2GlobalId_)[cellI];
// Diffusion rate coefficient
const scalar D0 = C1_/d*pow(0.5*(T + Tc), 0.75);

View File

@ -69,8 +69,8 @@ Foam::COxidationMurphyShaddix<CloudType>::COxidationMurphyShaddix
CsLocalId_ = owner.composition().localId(idSolid, "C");
// Set local copies of thermo properties
WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W();
scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W();
WO2_ = owner.thermo().carrier().W(O2GlobalId_);
const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
WC_ = WCO2 - WO2_;
}
@ -125,7 +125,7 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
// Cell carrier phase O2 species density [kg/m^3]
const scalar rhoO2 =
rhoc*this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI];
rhoc*this->owner().thermo().carrier().Y(O2GlobalId_)[cellI];
if (rhoO2 < SMALL)
{
@ -207,10 +207,8 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
const scalar HC =
this->owner().composition().solids().properties()[CsLocalId_].Hf()
+ this->owner().composition().solids().properties()[CsLocalId_].cp()*T;
const scalar HCO2 =
this->owner().mcCarrierThermo().speciesData()[CO2GlobalId_].H(T);
const scalar HO2 =
this->owner().mcCarrierThermo().speciesData()[O2GlobalId_].H(T);
const scalar HCO2 = this->owner().thermo().carrier().H(CO2GlobalId_, T);
const scalar HO2 = this->owner().thermo().carrier().H(O2GlobalId_, T);
// Heat of reaction
return dOmega*(WC_*HC + WO2_*HO2 - (WC_ + WO2_)*HCO2);

View File

@ -579,7 +579,7 @@ void Foam::parcel::updateParcelProperties
{
// can not go above boiling temperature
scalar Terr = 1.0e-3;
label n=0;
label n = 0;
scalar dT = 1.0;
scalar pOld = pAtSurface;
while (dT > Terr)

View File

@ -13,7 +13,8 @@ spray::iterator pMax = p2;
scalar dMin = pMin().d();
scalar dMax = pMax().d();
if (dMin > dMax) {
if (dMin > dMax)
{
dMin = pMax().d();
dMax = pMin().d();
pMin = p2;
@ -31,13 +32,14 @@ scalar nMin = pMin().N(rhoMin);
scalar mdMin = mMin/nMin;
scalar nu0 = 0.25*constant::mathematical::pi*sumD*sumD*magVRel*dt/vols_[cell1];
scalar nu0 = 0.25*constant::mathematical::pi*sqr(sumD)*magVRel*dt/vols_[cell1];
scalar nu = nMin*nu0;
scalar collProb = exp(-nu);
scalar xx = rndGen_.scalar01();
// collision occur
if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) {
if ((xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL))
{
// collision occurs
scalar gamma = dMax/max(dMin, 1.0e-12);
scalar f = gamma*gamma*gamma + 2.7*gamma - 2.4*gamma*gamma;
@ -63,8 +65,8 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) {
scalar prob = rndGen_.scalar01();
// Coalescence
if ( prob < coalesceProb && coalescence_) {
if (prob < coalesceProb && coalescence_)
{
// How 'many' of the droplets coalesce
// This is the kiva way ... which actually works best
@ -73,14 +75,17 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) {
label n=2;
// xx > collProb=zz
while ((zz < xx) && (n<1000)) {
while ((zz < xx) && (n<1000))
{
zz += vnu;
vnu *= nu/n;
n++;
}
//Info<< "vnu = " << vnu << ", n = " << n << endl;
scalar nProb = n - 1;
// All droplets coalesce
if (nProb*nMax > nMin) {
if (nProb*nMax > nMin)
{
nProb = nMin/nMax;
}
@ -93,7 +98,7 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) {
pMax().T() = (averageTemp*mTot - newMinMass*pMin().T())/newMaxMass;
rhoMax = spray_.fuels().rho(pc, pMax().T(), pMax().X());
scalar d3 = pow(dMax, 3) + nProb*pow(dMin,3);
scalar d3 = pow3(dMax) + nProb*pow3(dMin);
pMax().d() = cbrt(d3);
pMax().U() = (momMax + (1.0-newMinMass/mMin)*momMin)/newMaxMass;
@ -110,14 +115,15 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) {
{
pMax().X()[i] = Ynew[i]/(spray_.fuels().properties()[i].W()*Wlinv);
}
}
// Grazing collision (no coalescence)
else {
else
{
// Grazing collision (no coalescence)
scalar gf = sqrt(prob) - sqrt(coalesceProb);
scalar denom = 1.0 - sqrt(coalesceProb);
if (denom < 1.0e-5) {
if (denom < 1.0e-5)
{
denom = 1.0;
}
gf /= denom;
@ -139,16 +145,16 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) {
vector v1p = (mr + m2*gf*vRel)/(m1+m2);
vector v2p = (mr - m1*gf*vRel)/(m1+m2);
if (n1 < n2) {
if (n1 < n2)
{
p1().U() = v1p;
p2().U() = (n1*v2p + (n2-n1)*v2)/n2;
}
else {
else
{
p1().U() = (n2*v1p + (n1-n2)*v1)/n1;
p2().U() = v2p;
}
} // if - coalescence or not
} // if - collision
}
}

View File

@ -33,13 +33,15 @@ $(THERMOPARCEL)/makeBasicThermoParcelSubmodels.C
/* reacting parcel sub-models */
REACTINGPARCEL=$(DERIVEDPARCELS)/BasicReactingParcel
REACTINGPARCEL=$(DERIVEDPARCELS)/basicReactingParcel
$(REACTINGPARCEL)/basicReactingParcel.C
$(REACTINGPARCEL)/defineBasicReactingParcel.C
$(REACTINGPARCEL)/makeBasicReactingParcelSubmodels.C
/* reacting multiphase parcel sub-models */
REACTINGMPPARCEL=$(DERIVEDPARCELS)/BasicReactingMultiphaseParcel
REACTINGMPPARCEL=$(DERIVEDPARCELS)/basicReactingMultiphaseParcel
$(REACTINGMPPARCEL)/basicReactingMultiphaseParcel.C
$(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelSubmodels.C
@ -49,9 +51,6 @@ RADIATION=submodels/addOns/radiation
$(RADIATION)/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C
$(RADIATION)/scatter/cloudScatter/cloudScatter.C
SURFACEFILM=submodels/addOns/surfaceFilmModel
$(SURFACEFILM)/injection/cloudInjection/cloudInjection.C
submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionData.C
KINEMATICINJECTION=submodels/Kinematic/InjectionModel

View File

@ -10,6 +10,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
@ -19,7 +20,6 @@ EXE_INC = \
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
LIB_LIBS = \
-lsurfaceFilmModels \
-lfiniteVolume \
-lmeshTools \
-llagrangian \
@ -31,8 +31,10 @@ LIB_LIBS = \
-lspecie \
-lbasicThermophysicalModels \
-lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \
-lradiation \
-lODE \
-lcompressibleRASModels \
-lcompressibleLESModels
-lcompressibleLESModels \
-lsurfaceFilmModels

View File

@ -67,9 +67,9 @@ void Foam::ReactingCloud<ParcelType>::preEvolve()
template<class ParcelType>
void Foam::ReactingCloud<ParcelType>::evolveCloud()
{
const volScalarField& T = this->carrierThermo().T();
const volScalarField cp = this->carrierThermo().Cp();
const volScalarField& p = this->carrierThermo().p();
const volScalarField& T = this->thermo().thermo().T();
const volScalarField cp = this->thermo().thermo().Cp();
const volScalarField& p = this->thermo().thermo().p();
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
(
@ -149,17 +149,13 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
basicThermo& thermo,
const SLGThermo& thermo,
bool readFields
)
:
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
reactingCloud(),
constProps_(this->particleProperties()),
mcCarrierThermo_
(
dynamic_cast<multiComponentMixture<thermoType>&>(thermo)
),
compositionModel_
(
CompositionModel<ReactingCloud<ParcelType> >::New
@ -176,12 +172,13 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
*this
)
),
rhoTrans_(mcCarrierThermo_.species().size()),
rhoTrans_(thermo.carrier().species().size()),
dMassPhaseChange_(0.0)
{
// Set storage for mass source fields and initialise to zero
forAll(rhoTrans_, i)
{
const word& specieName = thermo.carrier().species()[i];
rhoTrans_.set
(
i,
@ -189,7 +186,7 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
(
IOobject
(
this->name() + "rhoTrans_" + mcCarrierThermo_.species()[i],
this->name() + "rhoTrans_" + specieName,
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,

View File

@ -42,7 +42,6 @@ SourceFiles
#include "ThermoCloud.H"
#include "reactingCloud.H"
#include "multiComponentMixture.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -67,11 +66,6 @@ class ReactingCloud
public ThermoCloud<ParcelType>,
public reactingCloud
{
public:
//- Type of thermodynamics the cloud was instantiated for
typedef typename ParcelType::thermoType thermoType;
private:
@ -91,9 +85,6 @@ protected:
//- Parcel constant properties
typename ParcelType::constantProperties constProps_;
//- Multi-component carrier phase thermo
multiComponentMixture<thermoType>& mcCarrierThermo_;
// References to the cloud sub-models
@ -154,7 +145,7 @@ public:
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
basicThermo& thermo,
const SLGThermo& thermo,
bool readFields = true
);
@ -175,13 +166,6 @@ public:
inline const typename ParcelType::constantProperties&
constProps() const;
//- Return const access to multi-component carrier phase thermo
inline const multiComponentMixture<thermoType>&
mcCarrierThermo() const;
//- Return access to multi-component carrier phase thermo
inline multiComponentMixture<thermoType>& mcCarrierThermo();
// Sub-models

View File

@ -33,22 +33,6 @@ Foam::ReactingCloud<ParcelType>::constProps() const
}
template<class ParcelType>
inline const Foam::multiComponentMixture<typename ParcelType::thermoType>&
Foam::ReactingCloud<ParcelType>::mcCarrierThermo() const
{
return mcCarrierThermo_;
}
template<class ParcelType>
inline Foam::multiComponentMixture<typename ParcelType::thermoType>&
Foam::ReactingCloud<ParcelType>::mcCarrierThermo()
{
return mcCarrierThermo_;
}
template<class ParcelType>
inline const Foam::CompositionModel<Foam::ReactingCloud<ParcelType> >&
Foam::ReactingCloud<ParcelType>::composition() const

View File

@ -40,9 +40,9 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::preEvolve()
template<class ParcelType>
void Foam::ReactingMultiphaseCloud<ParcelType>::evolveCloud()
{
const volScalarField& T = this->carrierThermo().T();
const volScalarField cp = this->carrierThermo().Cp();
const volScalarField& p = this->carrierThermo().p();
const volScalarField& T = this->thermo().thermo().T();
const volScalarField cp = this->thermo().thermo().Cp();
const volScalarField& p = this->thermo().thermo().p();
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
(
@ -122,7 +122,7 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
basicThermo& thermo,
const SLGThermo& thermo,
bool readFields
)
:

View File

@ -136,7 +136,7 @@ public:
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
basicThermo& thermo,
const SLGThermo& thermo,
bool readFields = true
);

View File

@ -41,8 +41,8 @@ void Foam::ThermoCloud<ParcelType>::preEvolve()
template<class ParcelType>
void Foam::ThermoCloud<ParcelType>::evolveCloud()
{
const volScalarField& T = carrierThermo_.T();
const volScalarField cp = carrierThermo_.Cp();
const volScalarField& T = thermo_.thermo().T();
const volScalarField cp = thermo_.thermo().Cp();
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
(
@ -115,7 +115,7 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
basicThermo& thermo,
const SLGThermo& thermo,
bool readFields
)
:
@ -124,13 +124,13 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
cloudName,
rho,
U,
thermo.mu(),
thermo.thermo().mu(),
g,
false
),
thermoCloud(),
constProps_(this->particleProperties()),
carrierThermo_(thermo),
thermo_(thermo),
heatTransferModel_
(
HeatTransferModel<ThermoCloud<ParcelType> >::New

View File

@ -41,7 +41,7 @@ SourceFiles
#include "KinematicCloud.H"
#include "thermoCloud.H"
#include "basicThermo.H"
#include "SLGThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -82,8 +82,8 @@ protected:
// References to the carrier gas fields
//- Thermodynamics package (basic)
basicThermo& carrierThermo_;
//- SLG thermodynamics package
const SLGThermo& thermo_;
// References to the cloud sub-models
@ -136,7 +136,7 @@ public:
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
basicThermo& thermo,
const SLGThermo& thermo,
bool readFields = true
);
@ -158,10 +158,7 @@ public:
constProps() const;
//- Return const access to thermo package
inline const basicThermo& carrierThermo() const;
//- Return access to thermo package
inline basicThermo& carrierThermo();
inline const SLGThermo& thermo() const;
// Sub-models

View File

@ -38,18 +38,9 @@ Foam::ThermoCloud<ParcelType>::constProps() const
template<class ParcelType>
inline const Foam::basicThermo&
Foam::ThermoCloud<ParcelType>::carrierThermo() const
inline const Foam::SLGThermo& Foam::ThermoCloud<ParcelType>::thermo() const
{
return carrierThermo_;
}
template<class ParcelType>
inline Foam::basicThermo&
Foam::ThermoCloud<ParcelType>::carrierThermo()
{
return carrierThermo_;
return thermo_;
}

View File

@ -1,76 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 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 3 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, see <http://www.gnu.org/licenses/>.
Class
Foam::BasicReactingMultiphaseCloud
Description
Reacting multiphase cloud templated on the type of carrier phase
thermodynamics
\*---------------------------------------------------------------------------*/
#ifndef BasicReactingMultiphaseCloud_H
#define BasicReactingMultiphaseCloud_H
#include "ReactingMultiphaseCloud.H"
#include "BasicReactingMultiphaseParcel.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef ReactingMultiphaseCloud
<
BasicReactingMultiphaseParcel
<
constGasThermoPhysics
>
>
constThermoReactingMultiphaseCloud;
typedef ReactingMultiphaseCloud
<
BasicReactingMultiphaseParcel
<
gasThermoPhysics
>
>
thermoReactingMultiphaseCloud;
typedef ReactingMultiphaseCloud
<
BasicReactingMultiphaseParcel
<
icoPoly8ThermoPhysics
>
>
icoPoly8ThermoReactingMultiphaseCloud;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -21,39 +21,29 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
InClass
Foam::writePatchGeom
Class
Foam::basicReactingCloud
Description
Write patch geometry to stream
Cloud class to introduce reacting parcels
SourceFiles
writePatchGeom.C
BasicReactingCloud.C
\*---------------------------------------------------------------------------*/
#ifndef writePatchGeom_H
#define writePatchGeom_H
#ifndef basicReactingCloud_H
#define basicReactingCloud_H
#include "faceList.H"
#include "pointField.H"
#include "ReactingCloud.H"
#include "basicReactingParcel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Write patch geometry
void writePatchGeom
(
const bool binary,
const faceList& faces,
const pointField& points,
std::ofstream&
);
} // End namespace Foam
typedef ReactingCloud<basicReactingParcel> basicReactingCloud;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,35 +22,28 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::BasicReactingCloud
Foam::basicReactingMultiphaseCloud
Description
Reacting cloud templated on the type of carrier phase thermodynamics
SourceFiles
BasicReactingCloud.C
Cloud class to introduce multi-phase reacting parcels
\*---------------------------------------------------------------------------*/
#ifndef BasicReactingCloud_H
#define BasicReactingCloud_H
#ifndef basicReactingMultiphaseCloud_H
#define basicReactingMultiphaseCloud_H
#include "ReactingCloud.H"
#include "BasicReactingParcel.H"
#include "thermoPhysicsTypes.H"
#include "ReactingMultiphaseCloud.H"
#include "basicReactingMultiphaseParcel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef ReactingCloud<BasicReactingParcel<constGasThermoPhysics> >
constThermoReactingCloud;
typedef ReactingCloud<BasicReactingParcel<gasThermoPhysics> >
thermoReactingCloud;
typedef ReactingCloud<BasicReactingParcel<icoPoly8ThermoPhysics> >
icoPoly8ThermoReactingCloud;
typedef ReactingMultiphaseCloud
<
basicReactingMultiphaseParcel
>
basicReactingMultiphaseCloud;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -170,8 +170,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection
forAll(td.cloud().rhoTrans(), i)
{
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
cpEff +=
Y*td.cloud().mcCarrierThermo().speciesData()[i].Cp(this->Tc_);
cpEff += Y*td.cloud().thermo().carrier().Cp(i, this->Tc_);
}
}
const scalar cpc = td.cpInterp().psi()[cellI];
@ -247,7 +246,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
scalar NCpW = 0.0;
// Surface concentrations of emitted species
scalarField Cs(td.cloud().mcCarrierThermo().species().size(), 0.0);
scalarField Cs(td.cloud().composition().carrier().species().size(), 0.0);
// Calc mass and enthalpy transfer due to phase change
calcPhaseChange
@ -313,7 +312,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
scalarField
dMassSRCarrier
(
td.cloud().mcCarrierThermo().species().size(),
td.cloud().composition().carrier().species().size(),
0.0
);
@ -547,8 +546,8 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcDevolatilisation
const scalar beta = sqr(cbrt(15.0) + cbrt(15.0));
const label id =
td.cloud().composition().localToGlobalCarrierId(GAS, i);
const scalar Cp = td.cloud().mcCarrierThermo().speciesData()[id].Cp(Ts);
const scalar W = td.cloud().mcCarrierThermo().speciesData()[id].W();
const scalar Cp = td.cloud().thermo().carrier().Cp(id, Ts);
const scalar W = td.cloud().thermo().carrier().W(id);
const scalar Ni = dMassDV[i]/(this->areaS(d)*dt*W);
// Dab calc'd using API vapour mass diffusivity function

View File

@ -89,8 +89,7 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
forAll(td.cloud().rhoTrans(), i)
{
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
cpEff +=
Y*td.cloud().mcCarrierThermo().speciesData()[i].Cp(this->Tc_);
cpEff += Y*td.cloud().composition().carrier().Cp(i, this->Tc_);
}
}
const scalar cpc = td.cpInterp().psi()[cellI];
@ -121,13 +120,13 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
}
// Far field carrier molar fractions
scalarField Xinf(td.cloud().mcCarrierThermo().speciesData().size());
scalarField Xinf(td.cloud().thermo().carrier().species().size());
forAll(Xinf, i)
{
Xinf[i] =
td.cloud().mcCarrierThermo().Y(i)[cellI]
/td.cloud().mcCarrierThermo().speciesData()[i].W();
td.cloud().thermo().carrier().Y(i)[cellI]
/td.cloud().thermo().carrier().W(i);
}
Xinf /= sum(Xinf);
@ -149,7 +148,7 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
const scalar Csi = Cs[i] + Xsff*Xinf[i]*CsTot;
Xs[i] = (2.0*Csi + Xinf[i]*CsTot)/3.0;
Ys[i] = Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].W();
Ys[i] = Xs[i]*td.cloud().thermo().carrier().W(i);
}
Xs /= sum(Xs);
Ys /= sum(Ys);
@ -164,16 +163,13 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues
forAll(Ys, i)
{
const scalar sqrtW =
sqrt(td.cloud().mcCarrierThermo().speciesData()[i].W());
const scalar cbrtW =
cbrt(td.cloud().mcCarrierThermo().speciesData()[i].W());
const scalar sqrtW = sqrt(td.cloud().thermo().carrier().W(i));
const scalar cbrtW = cbrt(td.cloud().thermo().carrier().W(i));
rhos += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].W();
mus += Ys[i]*sqrtW*td.cloud().mcCarrierThermo().speciesData()[i].mu(T);
kappa +=
Ys[i]*cbrtW*td.cloud().mcCarrierThermo().speciesData()[i].kappa(T);
cps += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].Cp(T);
rhos += Xs[i]*td.cloud().thermo().carrier().W(i);
mus += Ys[i]*sqrtW*td.cloud().thermo().carrier().mu(i, T);
kappa += Ys[i]*cbrtW*td.cloud().thermo().carrier().kappa(i, T);
cps += Xs[i]*td.cloud().thermo().carrier().Cp(i, T);
sumYiSqrtW += Ys[i]*sqrtW;
sumYiCbrtW += Ys[i]*cbrtW;
@ -267,7 +263,7 @@ void Foam::ReactingParcel<ParcelType>::calc
scalar NCpW = 0.0;
// Surface concentrations of emitted species
scalarField Cs(td.cloud().mcCarrierThermo().species().size(), 0.0);
scalarField Cs(td.cloud().composition().carrier().species().size(), 0.0);
// Calc mass and enthalpy transfer due to phase change
calcPhaseChange
@ -416,10 +412,10 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
scalarField& Cs
)
{
typedef PhaseChangeModel
<
typename ReactingParcel<ParcelType>::trackData::cloudType
> phaseChangeModelType;
typedef typename ReactingParcel<ParcelType>::trackData::cloudType cloudType;
typedef PhaseChangeModel<cloudType> phaseChangeModelType;
const CompositionModel<cloudType>& composition = td.cloud().composition();
if
(
@ -458,9 +454,8 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
forAll(YComponents, i)
{
const label idc =
td.cloud().composition().localToGlobalCarrierId(idPhase, i);
const label idl = td.cloud().composition().globalIds(idPhase)[i];
const label idc = composition.localToGlobalCarrierId(idPhase, i);
const label idl = composition.globalIds(idPhase)[i];
// Calculate enthalpy transfer
if
@ -469,28 +464,25 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
== phaseChangeModelType::etLatentHeat
)
{
scalar hlp =
td.cloud().composition().liquids().properties()[idl].hl(pc_, T);
scalar hlp = composition.liquids().properties()[idl].hl(pc_, T);
Sh -= dMassPC[i]*hlp/dt;
}
else
{
// Note: enthalpies of both phases must use the same reference
scalar hc = td.cloud().mcCarrierThermo().speciesData()[idc].H(T);
scalar hp =
td.cloud().composition().liquids().properties()[idl].h(pc_, T);
scalar hc = composition.carrier().H(idc, T);
scalar hp = composition.liquids().properties()[idl].h(pc_, T);
Sh -= dMassPC[i]*(hc - hp)/dt;
}
// Update particle surface thermo properties
const scalar Dab =
td.cloud().composition().liquids().properties()[idl].D(pc_, Ts, Wc);
composition.liquids().properties()[idl].D(pc_, Ts, Wc);
const scalar Cp =
td.cloud().mcCarrierThermo().speciesData()[idc].Cp(Ts);
const scalar W = td.cloud().mcCarrierThermo().speciesData()[idc].W();
const scalar Cp = composition.carrier().Cp(idc, Ts);
const scalar W = composition.carrier().W(idc);
const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W);
// Molar flux of species coming from the particle (kmol/m^2/s)

View File

@ -32,7 +32,7 @@ License
#include "makeParcelCollisionModels.H"
#include "makeParcelPatchInteractionModels.H"
#include "makeParcelPostProcessingModels.H"
#include "makeKinematicParcelSurfaceFilmModels.H"
#include "makeParcelSurfaceFilmModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -45,7 +45,7 @@ namespace Foam
makeParcelCollisionModels(basicKinematicParcel);
makeParcelPatchInteractionModels(basicKinematicParcel);
makeParcelPostProcessingModels(basicKinematicParcel);
makeKinematicParcelSurfaceFilmModels(basicKinematicParcel);
makeParcelSurfaceFilmModels(basicKinematicParcel);
};

View File

@ -23,19 +23,18 @@ License
\*---------------------------------------------------------------------------*/
#include "BasicReactingMultiphaseParcel.H"
#include "basicReactingMultiphaseParcel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
(
ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> >& owner,
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner,
const vector& position,
const label cellI
)
:
ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> >
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
(
owner,
position,
@ -44,10 +43,9 @@ Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel
{}
template<class ThermoType>
Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
(
ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> >& owner,
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner,
const vector& position,
const label cellI,
const label typeId,
@ -61,12 +59,11 @@ Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel
const scalarField& YLiquid0,
const scalarField& YSolid0,
const scalarField& Y0,
const typename
ReactingMultiphaseParcel<BasicReactingMultiphaseParcel>::
const ReactingMultiphaseParcel<basicReactingMultiphaseParcel>::
constantProperties& constProps
)
:
ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> >
ReactingMultiphaseParcel<basicReactingMultiphaseParcel >
(
owner,
position,
@ -87,15 +84,14 @@ Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel
{}
template<class ThermoType>
Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
(
const Cloud<BasicReactingMultiphaseParcel<ThermoType> >& cloud,
const Cloud<basicReactingMultiphaseParcel>& cloud,
Istream& is,
bool readFields
)
:
ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> >
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
(
cloud,
is,
@ -104,21 +100,18 @@ Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel
{}
template<class ThermoType>
Foam::BasicReactingMultiphaseParcel<ThermoType>::BasicReactingMultiphaseParcel
Foam::basicReactingMultiphaseParcel::basicReactingMultiphaseParcel
(
const BasicReactingMultiphaseParcel<ThermoType>& p
const basicReactingMultiphaseParcel& p
)
:
ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> >(p)
ReactingMultiphaseParcel<basicReactingMultiphaseParcel>(p)
{}
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::BasicReactingMultiphaseParcel<ThermoType>::
~BasicReactingMultiphaseParcel()
Foam::basicReactingMultiphaseParcel::~basicReactingMultiphaseParcel()
{}

View File

@ -28,13 +28,13 @@ Description
SourceFiles
BasicReactingMultiphaseParcel.C
BasicReactingMultiphaseParcelIO.C
basicReactingMultiphaseParcel.C
basicReactingMultiphaseParcelIO.C
\*---------------------------------------------------------------------------*/
#ifndef BasicReactingMultiphaseParcel_H
#define BasicReactingMultiphaseParcel_H
#ifndef basicReactingMultiphaseParcel_H
#define basicReactingMultiphaseParcel_H
#include "ReactingMultiphaseParcel.H"
@ -44,43 +44,35 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
template<class ThermoType>
class BasicReactingMultiphaseParcel;
/*---------------------------------------------------------------------------*\
Class BasicReactingMultiphaseParcel Declaration
Class basicReactingMultiphaseParcel Declaration
\*---------------------------------------------------------------------------*/
template<class ThermoType>
class BasicReactingMultiphaseParcel
class basicReactingMultiphaseParcel
:
public ReactingMultiphaseParcel<BasicReactingMultiphaseParcel<ThermoType> >
public ReactingMultiphaseParcel<basicReactingMultiphaseParcel>
{
public:
//- The type of thermodynamics this parcel was instantiated for
typedef ThermoType thermoType;
//- Run-time type information
TypeName("BasicReactingMultiphaseParcel");
TypeName("basicReactingMultiphaseParcel");
// Constructors
//- Construct from owner, position, and cloud owner
// Other properties initialised as null
BasicReactingMultiphaseParcel
basicReactingMultiphaseParcel
(
ReactingMultiphaseCloud<BasicReactingMultiphaseParcel>& owner,
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner,
const vector& position,
const label cellI
);
//- Construct from components
BasicReactingMultiphaseParcel
basicReactingMultiphaseParcel
(
ReactingMultiphaseCloud<BasicReactingMultiphaseParcel>& owner,
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>& owner,
const vector& position,
const label cellI,
const label typeId,
@ -94,35 +86,34 @@ public:
const scalarField& YLiquid0,
const scalarField& YSolid0,
const scalarField& Y0,
const typename
ReactingMultiphaseParcel<BasicReactingMultiphaseParcel>::
const ReactingMultiphaseParcel<basicReactingMultiphaseParcel>::
constantProperties& constProps
);
//- Construct from Istream
BasicReactingMultiphaseParcel
basicReactingMultiphaseParcel
(
const Cloud<BasicReactingMultiphaseParcel>& c,
const Cloud<basicReactingMultiphaseParcel>& c,
Istream& is,
bool readFields = true
);
//- Construct as a copy
BasicReactingMultiphaseParcel(const BasicReactingMultiphaseParcel& p);
basicReactingMultiphaseParcel(const basicReactingMultiphaseParcel& p);
//- Construct and return a clone
autoPtr<BasicReactingMultiphaseParcel> clone() const
autoPtr<basicReactingMultiphaseParcel> clone() const
{
return
autoPtr<BasicReactingMultiphaseParcel>
autoPtr<basicReactingMultiphaseParcel>
(
new BasicReactingMultiphaseParcel(*this)
new basicReactingMultiphaseParcel(*this)
);
}
//- Destructor
virtual ~BasicReactingMultiphaseParcel();
virtual ~basicReactingMultiphaseParcel();
};
@ -132,12 +123,6 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "BasicReactingMultiphaseParcel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -24,13 +24,13 @@ License
\*---------------------------------------------------------------------------*/
#include "createReactingMultiphaseParcelTypes.H"
#include "BasicReactingMultiphaseParcel.H"
#include "basicReactingMultiphaseParcel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
createReactingMultiphaseParcelType(BasicReactingMultiphaseParcel);
createReactingMultiphaseParcelTypes(basicReactingMultiphaseParcel);
};

View File

@ -23,26 +23,26 @@ License
\*---------------------------------------------------------------------------*/
#include "BasicReactingMultiphaseParcel.H"
#include "basicReactingMultiphaseParcel.H"
// Kinematic
#include "makeReactingParcelDispersionModels.H"
#include "makeReactingParcelDragModels.H"
#include "makeParcelDispersionModels.H"
#include "makeParcelDragModels.H"
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
#include "makeReactingParcelCollisionModels.H"
#include "makeReactingParcelPatchInteractionModels.H"
#include "makeReactingParcelPostProcessingModels.H"
#include "makeParcelCollisionModels.H"
#include "makeParcelPatchInteractionModels.H"
#include "makeParcelPostProcessingModels.H"
// Thermodynamic
#include "makeReactingParcelHeatTransferModels.H"
#include "makeParcelHeatTransferModels.H"
// Reacting
#include "makeReactingMultiphaseParcelCompositionModels.H" // MP variant
#include "makeReactingMultiphaseParcelCompositionModels.H" // MP Variant
#include "makeReactingParcelPhaseChangeModels.H"
#include "makeReactingParcelSurfaceFilmModels.H"
// Reacting multiphase
#include "makeReactingMultiphaseParcelDevolatilisationModels.H"
#include "makeReactingMultiphaseParcelSurfaceFilmModels.H"
#include "makeReactingMultiphaseParcelSurfaceReactionModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -50,32 +50,35 @@ License
namespace Foam
{
// Kinematic sub-models
makeReactingDispersionModels(BasicReactingMultiphaseParcel);
makeReactingDragModels(BasicReactingMultiphaseParcel);
makeReactingMultiphaseInjectionModels(BasicReactingMultiphaseParcel);
makeReactingCollisionModels(BasicReactingMultiphaseParcel);
makeReactingPatchInteractionModels(BasicReactingMultiphaseParcel);
makeReactingPostProcessingModels(BasicReactingMultiphaseParcel);
makeParcelDispersionModels(basicReactingMultiphaseParcel);
makeParcelDragModels(basicReactingMultiphaseParcel);
makeReactingMultiphaseParcelInjectionModels(basicReactingMultiphaseParcel);
makeParcelCollisionModels(basicReactingMultiphaseParcel);
makeParcelPatchInteractionModels(basicReactingMultiphaseParcel);
makeParcelPostProcessingModels(basicReactingMultiphaseParcel);
// Thermo sub-models
makeReactingHeatTransferModels(BasicReactingMultiphaseParcel);
makeParcelHeatTransferModels(basicReactingMultiphaseParcel);
// Reacting sub-models
makeReactingMultiphaseCompositionModels(BasicReactingMultiphaseParcel);
makeReactingPhaseChangeModels(BasicReactingMultiphaseParcel);
makeReactingMultiphaseParcelCompositionModels
(
basicReactingMultiphaseParcel
);
makeReactingParcelPhaseChangeModels(basicReactingMultiphaseParcel);
// Reacting multiphase sub-models
makeReactingMultiphaseDevolatilisationModels
makeReactingMultiphaseParcelDevolatilisationModels
(
BasicReactingMultiphaseParcel
basicReactingMultiphaseParcel
);
makeReactingMultiphaseSurfaceFilmModels
makeReactingParcelSurfaceFilmModels
(
BasicReactingMultiphaseParcel
basicReactingMultiphaseParcel
);
makeReactingMultiphaseSurfaceReactionModels
makeReactingMultiphaseParcelSurfaceReactionModels
(
BasicReactingMultiphaseParcel
basicReactingMultiphaseParcel
);
};

View File

@ -23,26 +23,24 @@ License
\*---------------------------------------------------------------------------*/
#include "BasicReactingParcel.H"
#include "basicReactingParcel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
Foam::basicReactingParcel::basicReactingParcel
(
ReactingCloud<BasicReactingParcel<ThermoType> >& owner,
ReactingCloud<basicReactingParcel >& owner,
const vector& position,
const label cellI
)
:
ReactingParcel<BasicReactingParcel<ThermoType> >(owner, position, cellI)
ReactingParcel<basicReactingParcel >(owner, position, cellI)
{}
template<class ThermoType>
Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
Foam::basicReactingParcel::basicReactingParcel
(
ReactingCloud<BasicReactingParcel<ThermoType> >& owner,
ReactingCloud<basicReactingParcel >& owner,
const vector& position,
const label cellI,
const label typeId,
@ -53,11 +51,10 @@ Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
const vector& angularMomentum0,
const vector& torque0,
const scalarField& Y0,
const typename ReactingParcel<BasicReactingParcel<ThermoType> >::
constantProperties& constProps
const ReactingParcel<basicReactingParcel>::constantProperties& constProps
)
:
ReactingParcel<BasicReactingParcel<ThermoType> >
ReactingParcel<basicReactingParcel >
(
owner,
position,
@ -75,32 +72,29 @@ Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
{}
template<class ThermoType>
Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
Foam::basicReactingParcel::basicReactingParcel
(
const Cloud<BasicReactingParcel<ThermoType> >& cloud,
const Cloud<basicReactingParcel >& cloud,
Istream& is,
bool readFields
)
:
ReactingParcel<BasicReactingParcel<ThermoType> >(cloud, is, readFields)
ReactingParcel<basicReactingParcel>(cloud, is, readFields)
{}
template<class ThermoType>
Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
Foam::basicReactingParcel::basicReactingParcel
(
const BasicReactingParcel<ThermoType>& p
const basicReactingParcel& p
)
:
ReactingParcel<BasicReactingParcel>(p)
ReactingParcel<basicReactingParcel>(p)
{}
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::BasicReactingParcel<ThermoType>::~BasicReactingParcel()
Foam::basicReactingParcel::~basicReactingParcel()
{}

View File

@ -22,19 +22,18 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::BasicReactingParcel
Foam::basicReactingParcel
Description
SourceFiles
BasicReactingParcel.C
BasicReactingParcelIO.C
basicReactingParcel.C
\*---------------------------------------------------------------------------*/
#ifndef BasicReactingParcel_H
#define BasicReactingParcel_H
#ifndef basicReactingParcel_H
#define basicReactingParcel_H
#include "ReactingParcel.H"
@ -43,43 +42,35 @@ SourceFiles
namespace Foam
{
// Forward declaration of classes
template<class ThermoType>
class BasicReactingParcel;
/*---------------------------------------------------------------------------*\
Class BasicReactingParcel Declaration
Class basicReactingParcel Declaration
\*---------------------------------------------------------------------------*/
template<class ThermoType>
class BasicReactingParcel
class basicReactingParcel
:
public ReactingParcel<BasicReactingParcel<ThermoType> >
public ReactingParcel<basicReactingParcel>
{
public:
//- The type of thermodynamics this parcel was instantiated for
typedef ThermoType thermoType;
//- Run-time type information
TypeName("BasicReactingParcel");
TypeName("basicReactingParcel");
// Constructors
//- Construct from owner, position, and cloud owner
// Other properties initialised as null
BasicReactingParcel
basicReactingParcel
(
ReactingCloud<BasicReactingParcel>& owner,
ReactingCloud<basicReactingParcel>& owner,
const vector& position,
const label cellI
);
//- Construct from components
BasicReactingParcel
basicReactingParcel
(
ReactingCloud<BasicReactingParcel>& owner,
ReactingCloud<basicReactingParcel>& owner,
const vector& position,
const label cellI,
const label typeId,
@ -90,49 +81,50 @@ public:
const vector& angularMomentum0,
const vector& torque0,
const scalarField& Y0,
const typename ReactingParcel<BasicReactingParcel>::
constantProperties& constProps
const ReactingParcel<basicReactingParcel>::constantProperties&
constProps
);
//- Construct from Istream
BasicReactingParcel
basicReactingParcel
(
const Cloud<BasicReactingParcel>& c,
const Cloud<basicReactingParcel>& c,
Istream& is,
bool readFields = true
);
//- Construct as a copy
BasicReactingParcel(const BasicReactingParcel& p);
basicReactingParcel(const basicReactingParcel& p);
//- Construct and return a clone
autoPtr<BasicReactingParcel> clone() const
autoPtr<basicReactingParcel> clone() const
{
return
autoPtr<BasicReactingParcel>
autoPtr<basicReactingParcel>
(
new BasicReactingParcel(*this)
new basicReactingParcel(*this)
);
}
//- Destructor
virtual ~BasicReactingParcel();
virtual ~basicReactingParcel();
};
template<>
inline bool contiguous<basicReactingParcel>()
{
return false;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "BasicReactingParcel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -23,14 +23,14 @@ License
\*---------------------------------------------------------------------------*/
#include "basicReactingParcel.H"
#include "createReactingParcelTypes.H"
#include "BasicReactingParcel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
createReactingParcelType(BasicReactingParcel);
createReactingParcelTypes(basicReactingParcel);
};

View File

@ -23,18 +23,18 @@ License
\*---------------------------------------------------------------------------*/
#include "BasicReactingParcel.H"
#include "basicReactingParcel.H"
// Kinematic
#include "makeReactingParcelDispersionModels.H"
#include "makeReactingParcelDragModels.H"
#include "makeReactingParcelInjectionModels.H"
#include "makeReactingParcelCollisionModels.H"
#include "makeReactingParcelPatchInteractionModels.H"
#include "makeReactingParcelPostProcessingModels.H"
#include "makeParcelDispersionModels.H"
#include "makeParcelDragModels.H"
#include "makeReactingParcelInjectionModels.H" // Reacting variant
#include "makeParcelCollisionModels.H"
#include "makeParcelPatchInteractionModels.H"
#include "makeParcelPostProcessingModels.H"
// Thermodynamic
#include "makeReactingParcelHeatTransferModels.H"
#include "makeParcelHeatTransferModels.H"
// Reacting
#include "makeReactingParcelCompositionModels.H"
@ -46,20 +46,20 @@ License
namespace Foam
{
// Kinematic sub-models
makeReactingDispersionModels(BasicReactingParcel);
makeReactingDragModels(BasicReactingParcel);
makeReactingInjectionModels(BasicReactingParcel);
makeReactingCollisionModels(BasicReactingParcel);
makeReactingPatchInteractionModels(BasicReactingParcel);
makeReactingPostProcessingModels(BasicReactingParcel);
makeParcelDispersionModels(basicReactingParcel);
makeParcelDragModels(basicReactingParcel);
makeReactingParcelInjectionModels(basicReactingParcel);
makeParcelCollisionModels(basicReactingParcel);
makeParcelPatchInteractionModels(basicReactingParcel);
makeParcelPostProcessingModels(basicReactingParcel);
// Thermo sub-models
makeReactingHeatTransferModels(BasicReactingParcel);
makeParcelHeatTransferModels(basicReactingParcel);
// Reacting sub-models
makeReactingCompositionModels(BasicReactingParcel);
makeReactingPhaseChangeModels(BasicReactingParcel);
makeReactingSurfaceFilmModels(BasicReactingParcel);
makeReactingParcelCompositionModels(basicReactingParcel);
makeReactingParcelPhaseChangeModels(basicReactingParcel);
makeReactingParcelSurfaceFilmModels(basicReactingParcel);
};

Some files were not shown because too many files have changed in this diff Show More