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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,11 +33,12 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "hCombustionThermo.H" #include "hCombustionThermo.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "BasicReactingCloud.H" #include "basicReactingCloud.H"
#include "surfaceFilmModel.H" #include "surfaceFilmModel.H"
#include "psiChemistryModel.H" #include "psiChemistryModel.H"
#include "chemistrySolver.H" #include "chemistrySolver.H"
#include "radiationModel.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/solidMixture/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \
@ -34,6 +35,7 @@ EXE_LIBS = \
-lsolidMixture \ -lsolidMixture \
-lthermophysicalFunctions \ -lthermophysicalFunctions \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lSLGThermo \
-lchemistryModel \ -lchemistryModel \
-lradiation \ -lradiation \
-lODE \ -lODE \

View File

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

View File

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

View File

@ -33,10 +33,11 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "hCombustionThermo.H" #include "hCombustionThermo.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "BasicReactingCloud.H" #include "basicReactingCloud.H"
#include "psiChemistryModel.H" #include "psiChemistryModel.H"
#include "chemistrySolver.H" #include "chemistrySolver.H"
#include "radiationModel.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 gradUaT = fvc::grad(Ua)().T();
volTensorField Rca
(
"Rca",
((2.0/3.0)*I)*(sqr(Ct)*k + nuEffa*tr(gradUaT)) - nuEffa*gradUaT
);
if (kineticTheory.on()) if (kineticTheory.on())
{ {
@ -20,6 +15,13 @@ fvVectorMatrix UbEqn(Ub, Ub.dimensions()*dimVol/dimTime);
nuEffa = sqr(Ct)*nutb + nua; nuEffa = sqr(Ct)*nutb + nua;
} }
volTensorField Rca
(
"Rca",
((2.0/3.0)*I)*(sqr(Ct)*k + nuEffa*tr(gradUaT)) - nuEffa*gradUaT
);
if (kineticTheory.on()) if (kineticTheory.on())
{ {
Rca -= ((kineticTheory.lambda()/rhoa)*tr(gradUaT))*tensor(I); Rca -= ((kineticTheory.lambda()/rhoa)*tr(gradUaT))*tensor(I);

View File

@ -63,11 +63,16 @@ label maxNodei = 0;
SLPtrList<labelList> slCellLabels; SLPtrList<labelList> slCellLabels;
SLList<label> slCellMap; SLList<label> slCellMap;
SLList<label> slCellType;
label maxCelli = 0; label maxCelli = 0;
PtrList<SLList<label> > slPatchCells; PtrList<SLList<label> > slPatchCells;
PtrList<SLList<label> > slPatchCellFaces; PtrList<SLList<label> > slPatchCellFaces;
// Cell types
Map<word> cellTypes;
label currentTypei = -1;
// Dummy yywrap to keep yylex happy at compile time. // Dummy yywrap to keep yylex happy at compile time.
// It is called by yylex but is not used as the mechanism to change file. // 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} node ^{space}"N"{cspace}
element ^{space}"EN"{cspace} element ^{space}"EN"{cspace}
bface ^{space}"SFE"{cspace} bface ^{space}"SFE"{cspace}
elementTypeName ^{space}"ET"{cspace}
elementType ^{space}"TYPE"{cspace}
%% %%
@ -160,6 +167,7 @@ bface ^{space}"SFE"{cspace}
slCellMap.append(celli); slCellMap.append(celli);
slCellLabels.append(new labelList(labels)); 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. ------ Ignore remaining space and \n s. Any other characters are errors.
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
@ -231,6 +270,29 @@ bface ^{space}"SFE"{cspace}
#include <fstream> #include <fstream>
using std::ifstream; 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[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
@ -253,7 +315,7 @@ int main(int argc, char *argv[])
# include "createTime.H" # include "createTime.H"
const fileName ansysFile = args[1]; fileName ansysFile(args.additionalArgs()[0]);
ifstream ansysStream(ansysFile.c_str()); ifstream ansysStream(ansysFile.c_str());
if (!ansysStream) 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 // Warning: tet face order has changed between version 1.9.6 and 2.0
// //
label faceIndex[7][6] = label faceIndex[7][6] =
@ -423,10 +513,53 @@ int main(int argc, char *argv[])
boundary[patchI] = patchFaces; boundary[patchI] = patchFaces;
patchNames[patchI] = word("patch") + name(patchI + 1); 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] Info<< "Patch " << patchI << " named " << patchNames[patchI]
<< ": " << boundary[patchI].size() << " faces" << endl; << ": " << boundary[patchI].size() << " faces" << endl;
} }
// We no longer need the dummyMesh
dummyMesh.clear();
Info<< "ansysToFoam: " << endl Info<< "ansysToFoam: " << endl
<< "Ansys file format does not provide information about the type of " << "Ansys file format does not provide information about the type of "
<< "the patch (eg. wall, symmetry plane, cyclic etc)." << endl << "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." << "as type patch. Please reset after mesh conversion as necessary."
<< endl; << endl;
wordList patchTypes(boundary.size(), polyPatch::typeName); wordList patchTypes(patchFaces.size(), polyPatch::typeName);
word defaultFacesName = "defaultFaces"; wordList patchPhysicalTypes(patchFaces.size());
word defaultFacesType = emptyPolyPatch::typeName;
wordList patchPhysicalTypes(boundary.size());
preservePatchTypes preservePatchTypes
( (
@ -461,7 +592,7 @@ int main(int argc, char *argv[])
), ),
xferMove(points), xferMove(points),
cellShapes, cellShapes,
boundary, patchFaces,
patchNames, patchNames,
patchTypes, patchTypes,
defaultFacesName, defaultFacesName,
@ -469,6 +600,90 @@ int main(int argc, char *argv[])
patchPhysicalTypes 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 // Set the precision of the points data to 10
IOstream::defaultPrecision(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 = \ EXE_INC = \
-InonuniformTransformCyclic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude -I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lnonuniformTransformCyclic \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-ldynamicMesh -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 "pointSet.H"
#include "IOmanip.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 Foam::label Foam::checkTopology
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -51,35 +25,22 @@ Foam::label Foam::checkTopology
mesh.boundaryMesh().checkParallelSync(true); mesh.boundaryMesh().checkParallelSync(true);
// Check names of zones are equal // Check names of zones are equal
if (checkSync(mesh.cellZones().names())) mesh.cellZones().checkDefinition(true);
if (mesh.cellZones().checkParallelSync(true))
{ {
noFailedChecks++; noFailedChecks++;
} }
if (checkSync(mesh.faceZones().names())) mesh.faceZones().checkDefinition(true);
if (mesh.faceZones().checkParallelSync(true))
{ {
noFailedChecks++; noFailedChecks++;
} }
if (checkSync(mesh.pointZones().names())) mesh.pointZones().checkDefinition(true);
if (mesh.pointZones().checkParallelSync(true))
{ {
noFailedChecks++; 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); pointSet points(mesh, "unusedPoints", mesh.nPoints()/100);
if (mesh.checkPoints(true, &points)) if (mesh.checkPoints(true, &points))

View File

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

View File

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

View File

@ -157,7 +157,7 @@ Note
#include "writeFaceSet.H" #include "writeFaceSet.H"
#include "writePointSet.H" #include "writePointSet.H"
#include "writePatchGeom.H" #include "surfaceMeshWriter.H"
#include "writeSurfFields.H" #include "writeSurfFields.H"
@ -963,20 +963,42 @@ int main(int argc, char *argv[])
if (doFaceZones) 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(); const faceZoneMesh& zones = mesh.faceZones();
forAll(zones, zoneI) forAll(zones, zoneI)
{ {
const faceZone& pp = zones[zoneI]; const faceZone& fz = zones[zoneI];
mkDir(fvPath/pp.name()); mkDir(fvPath/fz.name());
fileName patchFileName; fileName patchFileName;
if (vMesh.useSubMesh()) if (vMesh.useSubMesh())
{ {
patchFileName = patchFileName =
fvPath/pp.name()/cellSetName fvPath/fz.name()/cellSetName
+ "_" + "_"
+ timeDesc + timeDesc
+ ".vtk"; + ".vtk";
@ -984,7 +1006,7 @@ int main(int argc, char *argv[])
else else
{ {
patchFileName = patchFileName =
fvPath/pp.name()/pp.name() fvPath/fz.name()/fz.name()
+ "_" + "_"
+ timeDesc + timeDesc
+ ".vtk"; + ".vtk";
@ -992,18 +1014,31 @@ int main(int argc, char *argv[])
Info<< " FaceZone : " << patchFileName << endl; Info<< " FaceZone : " << patchFileName << endl;
std::ofstream ostr(patchFileName.c_str()); indirectPrimitivePatch pp
writeFuns::writeHeader(ostr, binary, pp.name());
ostr<< "DATASET POLYDATA" << std::endl;
writePatchGeom
( (
binary, IndirectList<face>(mesh.faces(), fz),
pp().localFaces(), mesh.points()
pp().localPoints(),
ostr
); );
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 "surfaceMeshWriter.H"
#include "OFstream.H"
#include "floatScalar.H"
#include "writeFuns.H" #include "writeFuns.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
namespace Foam Foam::surfaceMeshWriter::surfaceMeshWriter
{
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
void writePatchGeom
( (
const vtkMesh& vMesh,
const bool binary, const bool binary,
const faceList& faces, const indirectPrimitivePatch& pp,
const pointField& points, const word& name,
std::ofstream& ostr const fileName& fName
) )
:
vMesh_(vMesh),
binary_(binary),
pp_(pp),
fName_(fName),
os_(fName.c_str())
{ {
ostr<< "POINTS " << points.size() << " float" << std::endl; // Write header
writeFuns::writeHeader(os_, binary_, name);
DynamicList<floatScalar> ptField(3*points.size());
writeFuns::insert(points, ptField);
writeFuns::write(ostr, binary, ptField);
os_ << "DATASET POLYDATA" << std::endl;
// Write topology
label nFaceVerts = 0; 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); 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()); vertLabels.append(f.size());
writeFuns::insert(f, vertLabels); 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) void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
{ {
if (!meshPtr_)
{
return;
}
// always remove old actors first // always remove old actors first
forAll(patchTextActorsPtrs_, patchI) forAll(patchTextActorsPtrs_, patchI)

View File

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

View File

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

View File

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

View File

@ -27,6 +27,7 @@ License
#include "entry.H" #include "entry.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "stringListOps.H" #include "stringListOps.H"
#include "Pstream.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * 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 // Correct zone mesh after moving points
template<class ZoneType, class MeshType> template<class ZoneType, class MeshType>
void Foam::ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& p) void Foam::ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& p)

View File

@ -149,6 +149,10 @@ public:
//- Check zone definition. Return true if in error. //- Check zone definition. Return true if in error.
bool checkDefinition(const bool report = false) const; 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 //- Correct zone mesh after moving points
void movePoints(const pointField&); void movePoints(const pointField&);

View File

@ -209,6 +209,13 @@ public:
//- Check zone definition. Return true if in error. //- Check zone definition. Return true if in error.
virtual bool checkDefinition(const bool report = false) const; 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 //- Write dictionary
virtual void writeDict(Ostream&) const; virtual void writeDict(Ostream&) const;

View File

@ -29,6 +29,7 @@ License
#include "polyMesh.H" #include "polyMesh.H"
#include "primitiveMesh.H" #include "primitiveMesh.H"
#include "demandDrivenData.H" #include "demandDrivenData.H"
#include "syncTools.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * 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 void Foam::pointZone::writeDict(Ostream& os) const
{ {
os << nl << name_ << nl << token::BEGIN_BLOCK << nl os << nl << name_ << nl << token::BEGIN_BLOCK << nl

View File

@ -208,6 +208,10 @@ public:
//- Check zone definition. Return true if in error. //- Check zone definition. Return true if in error.
virtual bool checkDefinition(const bool report = false) const; 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 //- Correct patch after moving points
virtual void movePoints(const pointField&) virtual void movePoints(const pointField&)
{} {}

View File

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

View File

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

View File

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

View File

@ -53,7 +53,7 @@ class inverseDistanceDiffusivity
// Private data // Private data
//- Patches selected to base the distance on //- 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. // will be searched for.
wordList patchNames_; wordList patchNames_;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -23,26 +23,26 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "CoalParcel.H" #include "coalParcel.H"
// Kinematic // Kinematic
#include "makeReactingParcelDispersionModels.H" #include "makeParcelDispersionModels.H"
#include "makeReactingParcelDragModels.H" #include "makeParcelDragModels.H"
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant #include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
#include "makeReactingParcelCollisionModels.H" #include "makeParcelCollisionModels.H"
#include "makeReactingParcelPatchInteractionModels.H" #include "makeParcelPatchInteractionModels.H"
#include "makeReactingParcelPostProcessingModels.H" #include "makeParcelPostProcessingModels.H"
// Thermodynamic // Thermodynamic
#include "makeReactingParcelHeatTransferModels.H" #include "makeParcelHeatTransferModels.H"
// Reacting // Reacting
#include "makeReactingMultiphaseParcelCompositionModels.H" // MP variant #include "makeReactingMultiphaseParcelCompositionModels.H" // MP variant
#include "makeReactingParcelPhaseChangeModels.H" #include "makeReactingParcelPhaseChangeModels.H"
#include "makeReactingParcelSurfaceFilmModels.H"
// Reacting multiphase // Reacting multiphase
#include "makeReactingMultiphaseParcelDevolatilisationModels.H" #include "makeReactingMultiphaseParcelDevolatilisationModels.H"
#include "makeReactingMultiphaseParcelSurfaceFilmModels.H"
// Coal specific // Coal specific
#include "makeCoalParcelSurfaceReactionModels.H" #include "makeCoalParcelSurfaceReactionModels.H"
@ -52,24 +52,24 @@ License
namespace Foam namespace Foam
{ {
// Kinematic sub-models // Kinematic sub-models
makeReactingDispersionModels(CoalParcel); makeParcelDispersionModels(coalParcel);
makeReactingDragModels(CoalParcel); makeParcelDragModels(coalParcel);
makeReactingMultiphaseInjectionModels(CoalParcel); makeReactingMultiphaseParcelInjectionModels(coalParcel);
makeReactingCollisionModels(CoalParcel); makeParcelCollisionModels(coalParcel);
makeReactingPatchInteractionModels(CoalParcel); makeParcelPatchInteractionModels(coalParcel);
makeReactingPostProcessingModels(CoalParcel); makeParcelPostProcessingModels(coalParcel);
// Thermo sub-models // Thermo sub-models
makeReactingHeatTransferModels(CoalParcel); makeParcelHeatTransferModels(coalParcel);
// Reacting sub-models // Reacting sub-models
makeReactingMultiphaseCompositionModels(CoalParcel); makeReactingMultiphaseParcelCompositionModels(coalParcel);
makeReactingPhaseChangeModels(CoalParcel); makeReactingParcelPhaseChangeModels(coalParcel);
// Reacting multiphase sub-models // Reacting multiphase sub-models
makeReactingMultiphaseDevolatilisationModels(CoalParcel); makeReactingMultiphaseParcelDevolatilisationModels(coalParcel);
makeReactingMultiphaseSurfaceFilmModels(CoalParcel); makeReactingParcelSurfaceFilmModels(coalParcel);
makeCoalSurfaceReactionModels(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 "ReactingMultiphaseCloud.H"
#include "NoSurfaceReaction.H" #include "NoSurfaceReaction.H"
@ -38,59 +37,33 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeCoalSurfaceReactionModels(ParcelType) \ #define makeCoalParcelSurfaceReactionModels(ParcelType) \
\ \
makeCoalSurfaceReactionModelThermoType \ makeSurfaceReactionModel(ReactingMultiphaseCloud<ParcelType>); \
( \
ParcelType, \
constGasThermoPhysics \
); \
makeCoalSurfaceReactionModelThermoType \
( \
ParcelType, \
gasThermoPhysics \
); \
makeCoalSurfaceReactionModelThermoType \
( \
ParcelType, \
icoPoly8ThermoPhysics \
);
#define makeCoalSurfaceReactionModelThermoType(ParcelType, ThermoType) \
\ \
makeSurfaceReactionModel \ makeSurfaceReactionModelType \
( \
ReactingMultiphaseCloud<ParcelType<ThermoType> > \
); \
\
makeSurfaceReactionModelThermoType \
( \ ( \
NoSurfaceReaction, \ NoSurfaceReaction, \
ReactingMultiphaseCloud, \ ReactingMultiphaseCloud, \
ParcelType, \ ParcelType \
ThermoType \
); \ ); \
makeSurfaceReactionModelThermoType \ makeSurfaceReactionModelType \
( \ ( \
COxidationDiffusionLimitedRate, \ COxidationDiffusionLimitedRate, \
ReactingMultiphaseCloud, \ ReactingMultiphaseCloud, \
ParcelType, \ ParcelType \
ThermoType \
); \ ); \
makeSurfaceReactionModelThermoType \ makeSurfaceReactionModelType \
( \ ( \
COxidationKineticDiffusionLimitedRate, \ COxidationKineticDiffusionLimitedRate, \
ReactingMultiphaseCloud, \ ReactingMultiphaseCloud, \
ParcelType, \ ParcelType \
ThermoType \
); \ ); \
makeSurfaceReactionModelThermoType \ makeSurfaceReactionModelType \
( \ ( \
COxidationMurphyShaddix, \ COxidationMurphyShaddix, \
ReactingMultiphaseCloud, \ ReactingMultiphaseCloud, \
ParcelType, \ ParcelType \
ThermoType \
); );

View File

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

View File

@ -58,10 +58,10 @@ COxidationKineticDiffusionLimitedRate
CsLocalId_ = owner.composition().localId(idSolid, "C"); CsLocalId_ = owner.composition().localId(idSolid, "C");
// Set local copies of thermo properties // Set local copies of thermo properties
WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W(); WO2_ = owner.thermo().carrier().W(O2GlobalId_);
scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W(); const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
WC_ = WCO2 - WO2_; WC_ = WCO2 - WO2_;
HcCO2_ = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].Hc(); HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_);
if (Sb_ < 0) if (Sb_ < 0)
{ {
@ -128,7 +128,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
} }
// Local mass fraction of O2 in the carrier phase // 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 // Diffusion rate coefficient
const scalar D0 = C1_/d*pow(0.5*(T + Tc), 0.75); 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"); CsLocalId_ = owner.composition().localId(idSolid, "C");
// Set local copies of thermo properties // Set local copies of thermo properties
WO2_ = owner.mcCarrierThermo().speciesData()[O2GlobalId_].W(); WO2_ = owner.thermo().carrier().W(O2GlobalId_);
scalar WCO2 = owner.mcCarrierThermo().speciesData()[CO2GlobalId_].W(); const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_);
WC_ = WCO2 - WO2_; WC_ = WCO2 - WO2_;
} }
@ -125,7 +125,7 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
// Cell carrier phase O2 species density [kg/m^3] // Cell carrier phase O2 species density [kg/m^3]
const scalar rhoO2 = const scalar rhoO2 =
rhoc*this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI]; rhoc*this->owner().thermo().carrier().Y(O2GlobalId_)[cellI];
if (rhoO2 < SMALL) if (rhoO2 < SMALL)
{ {
@ -207,10 +207,8 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
const scalar HC = const scalar HC =
this->owner().composition().solids().properties()[CsLocalId_].Hf() this->owner().composition().solids().properties()[CsLocalId_].Hf()
+ this->owner().composition().solids().properties()[CsLocalId_].cp()*T; + this->owner().composition().solids().properties()[CsLocalId_].cp()*T;
const scalar HCO2 = const scalar HCO2 = this->owner().thermo().carrier().H(CO2GlobalId_, T);
this->owner().mcCarrierThermo().speciesData()[CO2GlobalId_].H(T); const scalar HO2 = this->owner().thermo().carrier().H(O2GlobalId_, T);
const scalar HO2 =
this->owner().mcCarrierThermo().speciesData()[O2GlobalId_].H(T);
// Heat of reaction // Heat of reaction
return dOmega*(WC_*HC + WO2_*HO2 - (WC_ + WO2_)*HCO2); return dOmega*(WC_*HC + WO2_*HO2 - (WC_ + WO2_)*HCO2);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -23,26 +23,26 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "BasicReactingMultiphaseParcel.H" #include "basicReactingMultiphaseParcel.H"
// Kinematic // Kinematic
#include "makeReactingParcelDispersionModels.H" #include "makeParcelDispersionModels.H"
#include "makeReactingParcelDragModels.H" #include "makeParcelDragModels.H"
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant #include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
#include "makeReactingParcelCollisionModels.H" #include "makeParcelCollisionModels.H"
#include "makeReactingParcelPatchInteractionModels.H" #include "makeParcelPatchInteractionModels.H"
#include "makeReactingParcelPostProcessingModels.H" #include "makeParcelPostProcessingModels.H"
// Thermodynamic // Thermodynamic
#include "makeReactingParcelHeatTransferModels.H" #include "makeParcelHeatTransferModels.H"
// Reacting // Reacting
#include "makeReactingMultiphaseParcelCompositionModels.H" // MP variant #include "makeReactingMultiphaseParcelCompositionModels.H" // MP Variant
#include "makeReactingParcelPhaseChangeModels.H" #include "makeReactingParcelPhaseChangeModels.H"
#include "makeReactingParcelSurfaceFilmModels.H"
// Reacting multiphase // Reacting multiphase
#include "makeReactingMultiphaseParcelDevolatilisationModels.H" #include "makeReactingMultiphaseParcelDevolatilisationModels.H"
#include "makeReactingMultiphaseParcelSurfaceFilmModels.H"
#include "makeReactingMultiphaseParcelSurfaceReactionModels.H" #include "makeReactingMultiphaseParcelSurfaceReactionModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -50,32 +50,35 @@ License
namespace Foam namespace Foam
{ {
// Kinematic sub-models // Kinematic sub-models
makeReactingDispersionModels(BasicReactingMultiphaseParcel); makeParcelDispersionModels(basicReactingMultiphaseParcel);
makeReactingDragModels(BasicReactingMultiphaseParcel); makeParcelDragModels(basicReactingMultiphaseParcel);
makeReactingMultiphaseInjectionModels(BasicReactingMultiphaseParcel); makeReactingMultiphaseParcelInjectionModels(basicReactingMultiphaseParcel);
makeReactingCollisionModels(BasicReactingMultiphaseParcel); makeParcelCollisionModels(basicReactingMultiphaseParcel);
makeReactingPatchInteractionModels(BasicReactingMultiphaseParcel); makeParcelPatchInteractionModels(basicReactingMultiphaseParcel);
makeReactingPostProcessingModels(BasicReactingMultiphaseParcel); makeParcelPostProcessingModels(basicReactingMultiphaseParcel);
// Thermo sub-models // Thermo sub-models
makeReactingHeatTransferModels(BasicReactingMultiphaseParcel); makeParcelHeatTransferModels(basicReactingMultiphaseParcel);
// Reacting sub-models // Reacting sub-models
makeReactingMultiphaseCompositionModels(BasicReactingMultiphaseParcel); makeReactingMultiphaseParcelCompositionModels
makeReactingPhaseChangeModels(BasicReactingMultiphaseParcel); (
basicReactingMultiphaseParcel
);
makeReactingParcelPhaseChangeModels(basicReactingMultiphaseParcel);
// Reacting multiphase sub-models // 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 * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ThermoType> Foam::basicReactingParcel::basicReactingParcel
Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
( (
ReactingCloud<BasicReactingParcel<ThermoType> >& owner, ReactingCloud<basicReactingParcel >& owner,
const vector& position, const vector& position,
const label cellI const label cellI
) )
: :
ReactingParcel<BasicReactingParcel<ThermoType> >(owner, position, cellI) ReactingParcel<basicReactingParcel >(owner, position, cellI)
{} {}
template<class ThermoType> Foam::basicReactingParcel::basicReactingParcel
Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
( (
ReactingCloud<BasicReactingParcel<ThermoType> >& owner, ReactingCloud<basicReactingParcel >& owner,
const vector& position, const vector& position,
const label cellI, const label cellI,
const label typeId, const label typeId,
@ -53,11 +51,10 @@ Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
const vector& angularMomentum0, const vector& angularMomentum0,
const vector& torque0, const vector& torque0,
const scalarField& Y0, const scalarField& Y0,
const typename ReactingParcel<BasicReactingParcel<ThermoType> >:: const ReactingParcel<basicReactingParcel>::constantProperties& constProps
constantProperties& constProps
) )
: :
ReactingParcel<BasicReactingParcel<ThermoType> > ReactingParcel<basicReactingParcel >
( (
owner, owner,
position, position,
@ -75,32 +72,29 @@ Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
{} {}
template<class ThermoType> Foam::basicReactingParcel::basicReactingParcel
Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
( (
const Cloud<BasicReactingParcel<ThermoType> >& cloud, const Cloud<basicReactingParcel >& cloud,
Istream& is, Istream& is,
bool readFields bool readFields
) )
: :
ReactingParcel<BasicReactingParcel<ThermoType> >(cloud, is, readFields) ReactingParcel<basicReactingParcel>(cloud, is, readFields)
{} {}
template<class ThermoType> Foam::basicReactingParcel::basicReactingParcel
Foam::BasicReactingParcel<ThermoType>::BasicReactingParcel
( (
const BasicReactingParcel<ThermoType>& p const basicReactingParcel& p
) )
: :
ReactingParcel<BasicReactingParcel>(p) ReactingParcel<basicReactingParcel>(p)
{} {}
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
template<class ThermoType> Foam::basicReactingParcel::~basicReactingParcel()
Foam::BasicReactingParcel<ThermoType>::~BasicReactingParcel()
{} {}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 createKinematicParcelTypes_H
#define createKinematicParcelTypes_H
#include "KinematicParcel.H"
#include "KinematicCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define createKinematicParcelTypes(ParcelType) \
\
defineTemplateTypeNameAndDebug(ParcelType, 0); \
defineTemplateTypeNameAndDebug(Particle<ParcelType>, 0); \
defineTemplateTypeNameAndDebug(Cloud<ParcelType>, 0); \
\
defineParcelTypeNameAndDebug(KinematicParcel<ParcelType>, 0); \
defineTemplateTypeNameAndDebug(KinematicParcel<ParcelType>, 0); \
defineParcelTypeNameAndDebug(KinematicCloud<ParcelType>, 0);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

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