mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -38,7 +38,6 @@ Description
|
|||||||
#include "CoalCloud.H"
|
#include "CoalCloud.H"
|
||||||
#include "psiChemistryModel.H"
|
#include "psiChemistryModel.H"
|
||||||
#include "chemistrySolver.H"
|
#include "chemistrySolver.H"
|
||||||
#include "thermoPhysicsTypes.H"
|
|
||||||
#include "timeActivatedExplicitCellSource.H"
|
#include "timeActivatedExplicitCellSource.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
Info<< "\nConstructing coal cloud" << endl;
|
Info<< "\nConstructing coal cloud" << endl;
|
||||||
CoalCloud<gasThermoPhysics> coalParcels
|
thermoCoalCloud coalParcels
|
||||||
(
|
(
|
||||||
"coalCloud1",
|
"coalCloud1",
|
||||||
rho,
|
rho,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
Info<< "\nConstructing reacting cloud" << endl;
|
Info<< "\nConstructing reacting cloud" << endl;
|
||||||
BasicReactingCloud<icoPoly8ThermoPhysics> parcels
|
icoPoly8ThermoReactingCloud parcels
|
||||||
(
|
(
|
||||||
"reactingCloud1",
|
"reactingCloud1",
|
||||||
rho,
|
rho,
|
||||||
|
|||||||
@ -46,7 +46,6 @@ Description
|
|||||||
#include "BasicReactingCloud.H"
|
#include "BasicReactingCloud.H"
|
||||||
#include "rhoChemistryModel.H"
|
#include "rhoChemistryModel.H"
|
||||||
#include "chemistrySolver.H"
|
#include "chemistrySolver.H"
|
||||||
#include "thermoPhysicsTypes.H"
|
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
#include "porousZones.H"
|
#include "porousZones.H"
|
||||||
#include "timeActivatedExplicitMulticomponentPointSource.H"
|
#include "timeActivatedExplicitMulticomponentPointSource.H"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
Info<< "\nConstructing reacting cloud" << endl;
|
Info<< "\nConstructing reacting cloud" << endl;
|
||||||
BasicReactingCloud<gasThermoPhysics> parcels
|
thermoReactingCloud parcels
|
||||||
(
|
(
|
||||||
"reactingCloud1",
|
"reactingCloud1",
|
||||||
rho,
|
rho,
|
||||||
|
|||||||
@ -37,7 +37,6 @@ Description
|
|||||||
#include "BasicReactingCloud.H"
|
#include "BasicReactingCloud.H"
|
||||||
#include "psiChemistryModel.H"
|
#include "psiChemistryModel.H"
|
||||||
#include "chemistrySolver.H"
|
#include "chemistrySolver.H"
|
||||||
#include "thermoPhysicsTypes.H"
|
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -280,11 +280,14 @@ addLayersControls
|
|||||||
nBufferCellsNoExtrude 0;
|
nBufferCellsNoExtrude 0;
|
||||||
|
|
||||||
|
|
||||||
// Overall max number of layer addition iterations
|
// Overall max number of layer addition iterations. The mesher will exit
|
||||||
|
// if it reaches this number of iterations; possibly with an illegal
|
||||||
|
// mesh.
|
||||||
nLayerIter 50;
|
nLayerIter 50;
|
||||||
|
|
||||||
// Max number of iterations after which relaxed meshQuality controls
|
// Max number of iterations after which relaxed meshQuality controls
|
||||||
// get used.
|
// get used. Up to nRelaxIter it uses the settings in meshQualityControls,
|
||||||
|
// after nRelaxIter it uses the values in meshQualityControls::relaxed.
|
||||||
nRelaxedIter 20;
|
nRelaxedIter 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -125,6 +125,7 @@ label findPatchID(const polyMesh& mesh, const word& name)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addRegionOption.H"
|
||||||
argList::validArgs.append("faceZone");
|
argList::validArgs.append("faceZone");
|
||||||
argList::validArgs.append("patch");
|
argList::validArgs.append("patch");
|
||||||
argList::validOptions.insert("additionalPatches", "(patch2 .. patchN)");
|
argList::validOptions.insert("additionalPatches", "(patch2 .. patchN)");
|
||||||
@ -134,7 +135,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
# include "createMesh.H"
|
# include "createNamedMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|||||||
@ -516,11 +516,13 @@ void syncPoints
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::validOptions.insert("overwrite", "");
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
|
# include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
const bool overwrite = args.optionFound("overwrite");
|
const bool overwrite = args.optionFound("overwrite");
|
||||||
|
|
||||||
@ -532,6 +534,11 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
"createPatchDict",
|
"createPatchDict",
|
||||||
runTime.system(),
|
runTime.system(),
|
||||||
|
(
|
||||||
|
regionName != polyMesh::defaultRegion
|
||||||
|
? regionName
|
||||||
|
: word::null
|
||||||
|
),
|
||||||
runTime,
|
runTime,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE,
|
IOobject::NO_WRITE,
|
||||||
@ -551,7 +558,6 @@ int main(int argc, char *argv[])
|
|||||||
coupledPolyPatch::matchTol = tol;
|
coupledPolyPatch::matchTol = tol;
|
||||||
|
|
||||||
|
|
||||||
# include "createPolyMesh.H"
|
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|||||||
@ -222,13 +222,14 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addRegionOption.H"
|
||||||
argList::validOptions.insert("split", "");
|
argList::validOptions.insert("split", "");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::validOptions.insert("overwrite", "");
|
||||||
argList::validOptions.insert("detectOnly", "");
|
argList::validOptions.insert("detectOnly", "");
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
# include "createMesh.H"
|
# include "createNamedMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
bool split = args.optionFound("split");
|
bool split = args.optionFound("split");
|
||||||
|
|||||||
@ -60,6 +60,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
argList::validOptions.insert("noFlipMap", "");
|
argList::validOptions.insert("noFlipMap", "");
|
||||||
|
|
||||||
|
# include "addRegionOption.H"
|
||||||
# include "addTimeOptions.H"
|
# include "addTimeOptions.H"
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -77,7 +78,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
runTime.setTime(Times[startTime], startTime);
|
||||||
|
|
||||||
# include "createPolyMesh.H"
|
# include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
// Search for list of objects for the time of the mesh
|
// Search for list of objects for the time of the mesh
|
||||||
IOobjectList objects
|
IOobjectList objects
|
||||||
|
|||||||
@ -22,6 +22,12 @@ numberOfSubdomains 4;
|
|||||||
//- Keep owner and neighbour on same processor for faces in zones:
|
//- Keep owner and neighbour on same processor for faces in zones:
|
||||||
// preserveFaceZones (heater solid1 solid3);
|
// preserveFaceZones (heater solid1 solid3);
|
||||||
|
|
||||||
|
|
||||||
|
//- Keep owner and neighbour on same processor for faces in patches:
|
||||||
|
// (makes sense only for cyclic patches)
|
||||||
|
//preservePatches (cyclic_left_right);
|
||||||
|
|
||||||
|
|
||||||
method scotch;
|
method scotch;
|
||||||
// method hierarchical;
|
// method hierarchical;
|
||||||
// method simple;
|
// method simple;
|
||||||
|
|||||||
@ -45,6 +45,35 @@ void domainDecomposition::distributeCells()
|
|||||||
|
|
||||||
labelHashSet sameProcFaces;
|
labelHashSet sameProcFaces;
|
||||||
|
|
||||||
|
if (decompositionDict_.found("preservePatches"))
|
||||||
|
{
|
||||||
|
wordList pNames(decompositionDict_.lookup("preservePatches"));
|
||||||
|
|
||||||
|
Info<< "Keeping owner of faces in patches " << pNames
|
||||||
|
<< " on same processor. This only makes sense for cyclics." << endl;
|
||||||
|
|
||||||
|
const polyBoundaryMesh& patches = boundaryMesh();
|
||||||
|
|
||||||
|
forAll(pNames, i)
|
||||||
|
{
|
||||||
|
label patchI = patches.findPatchID(pNames[i]);
|
||||||
|
|
||||||
|
if (patchI == -1)
|
||||||
|
{
|
||||||
|
FatalErrorIn("domainDecomposition::distributeCells()")
|
||||||
|
<< "Unknown preservePatch " << pNames[i]
|
||||||
|
<< endl << "Valid patches are " << patches.names()
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
const polyPatch& pp = patches[patchI];
|
||||||
|
|
||||||
|
forAll(pp, i)
|
||||||
|
{
|
||||||
|
sameProcFaces.insert(pp.start() + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (decompositionDict_.found("preserveFaceZones"))
|
if (decompositionDict_.found("preserveFaceZones"))
|
||||||
{
|
{
|
||||||
wordList zNames(decompositionDict_.lookup("preserveFaceZones"));
|
wordList zNames(decompositionDict_.lookup("preserveFaceZones"));
|
||||||
|
|||||||
@ -115,7 +115,14 @@ void Foam::Time::setControls()
|
|||||||
{
|
{
|
||||||
if (timeDirs.size())
|
if (timeDirs.size())
|
||||||
{
|
{
|
||||||
startTime_ = timeDirs[0].value();
|
if (timeDirs[0].name() == constant() && timeDirs.size() >= 2)
|
||||||
|
{
|
||||||
|
startTime_ = timeDirs[1].value();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startTime_ = timeDirs[0].value();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (startFrom == "latestTime")
|
else if (startFrom == "latestTime")
|
||||||
|
|||||||
@ -110,6 +110,7 @@ Foam::scalar Foam::dimensionSet::operator[](const dimensionType type) const
|
|||||||
return exponents_[type];
|
return exponents_[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::scalar& Foam::dimensionSet::operator[](const dimensionType type)
|
Foam::scalar& Foam::dimensionSet::operator[](const dimensionType type)
|
||||||
{
|
{
|
||||||
return exponents_[type];
|
return exponents_[type];
|
||||||
@ -130,6 +131,7 @@ bool Foam::dimensionSet::operator==(const dimensionSet& ds) const
|
|||||||
return equall;
|
return equall;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::dimensionSet::operator!=(const dimensionSet& ds) const
|
bool Foam::dimensionSet::operator!=(const dimensionSet& ds) const
|
||||||
{
|
{
|
||||||
return !(operator==(ds));
|
return !(operator==(ds));
|
||||||
@ -163,6 +165,7 @@ bool Foam::dimensionSet::operator+=(const dimensionSet& ds) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::dimensionSet::operator-=(const dimensionSet& ds) const
|
bool Foam::dimensionSet::operator-=(const dimensionSet& ds) const
|
||||||
{
|
{
|
||||||
if (dimensionSet::debug && *this != ds)
|
if (dimensionSet::debug && *this != ds)
|
||||||
@ -176,6 +179,7 @@ bool Foam::dimensionSet::operator-=(const dimensionSet& ds) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::dimensionSet::operator*=(const dimensionSet& ds)
|
bool Foam::dimensionSet::operator*=(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
reset((*this)*ds);
|
reset((*this)*ds);
|
||||||
@ -183,6 +187,7 @@ bool Foam::dimensionSet::operator*=(const dimensionSet& ds)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::dimensionSet::operator/=(const dimensionSet& ds)
|
bool Foam::dimensionSet::operator/=(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
reset((*this)/ds);
|
reset((*this)/ds);
|
||||||
@ -206,6 +211,7 @@ Foam::dimensionSet Foam::max(const dimensionSet& ds1, const dimensionSet& ds2)
|
|||||||
return ds1;
|
return ds1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::min(const dimensionSet& ds1, const dimensionSet& ds2)
|
Foam::dimensionSet Foam::min(const dimensionSet& ds1, const dimensionSet& ds2)
|
||||||
{
|
{
|
||||||
if (dimensionSet::debug && ds1 != ds2)
|
if (dimensionSet::debug && ds1 != ds2)
|
||||||
@ -256,6 +262,7 @@ Foam::dimensionSet Foam::pow(const dimensionSet& ds, const scalar p)
|
|||||||
return dimPow;
|
return dimPow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::pow
|
Foam::dimensionSet Foam::pow
|
||||||
(
|
(
|
||||||
const dimensionSet& ds,
|
const dimensionSet& ds,
|
||||||
@ -283,6 +290,7 @@ Foam::dimensionSet Foam::pow
|
|||||||
return dimPow;
|
return dimPow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::pow
|
Foam::dimensionSet Foam::pow
|
||||||
(
|
(
|
||||||
const dimensionedScalar& dS,
|
const dimensionedScalar& dS,
|
||||||
@ -309,61 +317,79 @@ Foam::dimensionSet Foam::sqr(const dimensionSet& ds)
|
|||||||
return pow(ds, 2);
|
return pow(ds, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::pow3(const dimensionSet& ds)
|
Foam::dimensionSet Foam::pow3(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return pow(ds, 3);
|
return pow(ds, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::pow4(const dimensionSet& ds)
|
Foam::dimensionSet Foam::pow4(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return pow(ds, 4);
|
return pow(ds, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::pow5(const dimensionSet& ds)
|
Foam::dimensionSet Foam::pow5(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return pow(ds, 5);
|
return pow(ds, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::pow6(const dimensionSet& ds)
|
Foam::dimensionSet Foam::pow6(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return pow(ds, 6);
|
return pow(ds, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::dimensionSet Foam::pow025(const dimensionSet& ds)
|
||||||
|
{
|
||||||
|
return sqrt(sqrt(ds));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::sqrt(const dimensionSet& ds)
|
Foam::dimensionSet Foam::sqrt(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return pow(ds, 0.5);
|
return pow(ds, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::magSqr(const dimensionSet& ds)
|
Foam::dimensionSet Foam::magSqr(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return pow(ds, 2);
|
return pow(ds, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::mag(const dimensionSet& ds)
|
Foam::dimensionSet Foam::mag(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::sign(const dimensionSet&)
|
Foam::dimensionSet Foam::sign(const dimensionSet&)
|
||||||
{
|
{
|
||||||
return dimless;
|
return dimless;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::pos(const dimensionSet&)
|
Foam::dimensionSet Foam::pos(const dimensionSet&)
|
||||||
{
|
{
|
||||||
return dimless;
|
return dimless;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::neg(const dimensionSet&)
|
Foam::dimensionSet Foam::neg(const dimensionSet&)
|
||||||
{
|
{
|
||||||
return dimless;
|
return dimless;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::inv(const dimensionSet& ds)
|
Foam::dimensionSet Foam::inv(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return dimless/ds;
|
return dimless/ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::trans(const dimensionSet& ds)
|
Foam::dimensionSet Foam::trans(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
if (dimensionSet::debug && !ds.dimensionless())
|
if (dimensionSet::debug && !ds.dimensionless())
|
||||||
@ -376,6 +402,7 @@ Foam::dimensionSet Foam::trans(const dimensionSet& ds)
|
|||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::transform(const dimensionSet& ds)
|
Foam::dimensionSet Foam::transform(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return ds;
|
return ds;
|
||||||
@ -389,6 +416,7 @@ Foam::dimensionSet Foam::operator-(const dimensionSet& ds)
|
|||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::operator+
|
Foam::dimensionSet Foam::operator+
|
||||||
(
|
(
|
||||||
const dimensionSet& ds1,
|
const dimensionSet& ds1,
|
||||||
@ -409,6 +437,7 @@ Foam::dimensionSet Foam::operator+
|
|||||||
return dimSum;
|
return dimSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::operator-
|
Foam::dimensionSet Foam::operator-
|
||||||
(
|
(
|
||||||
const dimensionSet& ds1,
|
const dimensionSet& ds1,
|
||||||
@ -429,6 +458,7 @@ Foam::dimensionSet Foam::operator-
|
|||||||
return dimDifference;
|
return dimDifference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::operator*
|
Foam::dimensionSet Foam::operator*
|
||||||
(
|
(
|
||||||
const dimensionSet& ds1,
|
const dimensionSet& ds1,
|
||||||
@ -445,6 +475,7 @@ Foam::dimensionSet Foam::operator*
|
|||||||
return dimProduct;
|
return dimProduct;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::operator/
|
Foam::dimensionSet Foam::operator/
|
||||||
(
|
(
|
||||||
const dimensionSet& ds1,
|
const dimensionSet& ds1,
|
||||||
@ -471,6 +502,7 @@ Foam::dimensionSet Foam::operator&
|
|||||||
return ds1*ds2;
|
return ds1*ds2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::operator^
|
Foam::dimensionSet Foam::operator^
|
||||||
(
|
(
|
||||||
const dimensionSet& ds1,
|
const dimensionSet& ds1,
|
||||||
@ -480,6 +512,7 @@ Foam::dimensionSet Foam::operator^
|
|||||||
return ds1*ds2;
|
return ds1*ds2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::operator&&
|
Foam::dimensionSet Foam::operator&&
|
||||||
(
|
(
|
||||||
const dimensionSet& ds1,
|
const dimensionSet& ds1,
|
||||||
|
|||||||
@ -70,6 +70,7 @@ dimensionSet pow3(const dimensionSet&);
|
|||||||
dimensionSet pow4(const dimensionSet&);
|
dimensionSet pow4(const dimensionSet&);
|
||||||
dimensionSet pow5(const dimensionSet&);
|
dimensionSet pow5(const dimensionSet&);
|
||||||
dimensionSet pow6(const dimensionSet&);
|
dimensionSet pow6(const dimensionSet&);
|
||||||
|
dimensionSet pow025(const dimensionSet&);
|
||||||
|
|
||||||
dimensionSet sqrt(const dimensionSet&);
|
dimensionSet sqrt(const dimensionSet&);
|
||||||
dimensionSet magSqr(const dimensionSet&);
|
dimensionSet magSqr(const dimensionSet&);
|
||||||
@ -226,6 +227,7 @@ public:
|
|||||||
friend dimensionSet pow4(const dimensionSet&);
|
friend dimensionSet pow4(const dimensionSet&);
|
||||||
friend dimensionSet pow5(const dimensionSet&);
|
friend dimensionSet pow5(const dimensionSet&);
|
||||||
friend dimensionSet pow6(const dimensionSet&);
|
friend dimensionSet pow6(const dimensionSet&);
|
||||||
|
friend dimensionSet pow025(const dimensionSet&);
|
||||||
|
|
||||||
friend dimensionSet sqrt(const dimensionSet&);
|
friend dimensionSet sqrt(const dimensionSet&);
|
||||||
friend dimensionSet magSqr(const dimensionSet&);
|
friend dimensionSet magSqr(const dimensionSet&);
|
||||||
|
|||||||
@ -38,32 +38,38 @@ dimensionedScalar operator+(const dimensionedScalar& ds1, const scalar s2)
|
|||||||
return ds1 + dimensionedScalar(s2);
|
return ds1 + dimensionedScalar(s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar operator+(const scalar s1, const dimensionedScalar& ds2)
|
dimensionedScalar operator+(const scalar s1, const dimensionedScalar& ds2)
|
||||||
{
|
{
|
||||||
return dimensionedScalar(s1) + ds2;
|
return dimensionedScalar(s1) + ds2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar operator-(const dimensionedScalar& ds1, const scalar s2)
|
dimensionedScalar operator-(const dimensionedScalar& ds1, const scalar s2)
|
||||||
{
|
{
|
||||||
return ds1 - dimensionedScalar(s2);
|
return ds1 - dimensionedScalar(s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar operator-(const scalar s1, const dimensionedScalar& ds2)
|
dimensionedScalar operator-(const scalar s1, const dimensionedScalar& ds2)
|
||||||
{
|
{
|
||||||
return dimensionedScalar(s1) - ds2;
|
return dimensionedScalar(s1) - ds2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar operator*(const dimensionedScalar& ds1, const scalar s2)
|
dimensionedScalar operator*(const dimensionedScalar& ds1, const scalar s2)
|
||||||
{
|
{
|
||||||
return ds1 * dimensionedScalar(s2);
|
return ds1 * dimensionedScalar(s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar operator/(const scalar s1, const dimensionedScalar& ds2)
|
dimensionedScalar operator/(const scalar s1, const dimensionedScalar& ds2)
|
||||||
{
|
{
|
||||||
return dimensionedScalar(s1)/ds2;
|
return dimensionedScalar(s1)/ds2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar pow
|
dimensionedScalar pow
|
||||||
(
|
(
|
||||||
const dimensionedScalar& ds,
|
const dimensionedScalar& ds,
|
||||||
@ -78,6 +84,7 @@ dimensionedScalar pow
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar pow3(const dimensionedScalar& ds)
|
dimensionedScalar pow3(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
@ -88,6 +95,7 @@ dimensionedScalar pow3(const dimensionedScalar& ds)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar pow4(const dimensionedScalar& ds)
|
dimensionedScalar pow4(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
@ -98,6 +106,7 @@ dimensionedScalar pow4(const dimensionedScalar& ds)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar pow5(const dimensionedScalar& ds)
|
dimensionedScalar pow5(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
@ -108,6 +117,7 @@ dimensionedScalar pow5(const dimensionedScalar& ds)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar pow6(const dimensionedScalar& ds)
|
dimensionedScalar pow6(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
@ -118,6 +128,18 @@ dimensionedScalar pow6(const dimensionedScalar& ds)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dimensionedScalar pow025(const dimensionedScalar& ds)
|
||||||
|
{
|
||||||
|
return dimensionedScalar
|
||||||
|
(
|
||||||
|
"pow025(" + ds.name() + ')',
|
||||||
|
pow025(ds.dimensions()),
|
||||||
|
pow025(ds.value())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar sqrt(const dimensionedScalar& ds)
|
dimensionedScalar sqrt(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
@ -128,6 +150,7 @@ dimensionedScalar sqrt(const dimensionedScalar& ds)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar cbrt(const dimensionedScalar& ds)
|
dimensionedScalar cbrt(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
@ -138,6 +161,7 @@ dimensionedScalar cbrt(const dimensionedScalar& ds)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar hypot
|
dimensionedScalar hypot
|
||||||
(
|
(
|
||||||
const dimensionedScalar& x,
|
const dimensionedScalar& x,
|
||||||
@ -152,6 +176,7 @@ dimensionedScalar hypot
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar sign(const dimensionedScalar& ds)
|
dimensionedScalar sign(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
@ -162,6 +187,7 @@ dimensionedScalar sign(const dimensionedScalar& ds)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar pos(const dimensionedScalar& ds)
|
dimensionedScalar pos(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
@ -172,6 +198,7 @@ dimensionedScalar pos(const dimensionedScalar& ds)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dimensionedScalar neg(const dimensionedScalar& ds)
|
dimensionedScalar neg(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
|
|||||||
@ -61,6 +61,7 @@ dimensionedScalar pow3(const dimensionedScalar&);
|
|||||||
dimensionedScalar pow4(const dimensionedScalar&);
|
dimensionedScalar pow4(const dimensionedScalar&);
|
||||||
dimensionedScalar pow5(const dimensionedScalar&);
|
dimensionedScalar pow5(const dimensionedScalar&);
|
||||||
dimensionedScalar pow6(const dimensionedScalar&);
|
dimensionedScalar pow6(const dimensionedScalar&);
|
||||||
|
dimensionedScalar pow025(const dimensionedScalar&);
|
||||||
|
|
||||||
dimensionedScalar sqrt(const dimensionedScalar&);
|
dimensionedScalar sqrt(const dimensionedScalar&);
|
||||||
dimensionedScalar cbrt(const dimensionedScalar&);
|
dimensionedScalar cbrt(const dimensionedScalar&);
|
||||||
|
|||||||
@ -376,6 +376,7 @@ UNARY_FUNCTION(scalar, scalar, pow3, pow3)
|
|||||||
UNARY_FUNCTION(scalar, scalar, pow4, pow4)
|
UNARY_FUNCTION(scalar, scalar, pow4, pow4)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow5, pow5)
|
UNARY_FUNCTION(scalar, scalar, pow5, pow5)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow6, pow6)
|
UNARY_FUNCTION(scalar, scalar, pow6, pow6)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pow025, pow025)
|
||||||
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
||||||
|
|||||||
@ -84,6 +84,7 @@ UNARY_FUNCTION(scalar, scalar, pow3, pow3)
|
|||||||
UNARY_FUNCTION(scalar, scalar, pow4, pow4)
|
UNARY_FUNCTION(scalar, scalar, pow4, pow4)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow5, pow5)
|
UNARY_FUNCTION(scalar, scalar, pow5, pow5)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow6, pow6)
|
UNARY_FUNCTION(scalar, scalar, pow6, pow6)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pow025, pow025)
|
||||||
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
||||||
|
|||||||
@ -104,6 +104,7 @@ UNARY_FUNCTION(scalar, scalar, pow3)
|
|||||||
UNARY_FUNCTION(scalar, scalar, pow4)
|
UNARY_FUNCTION(scalar, scalar, pow4)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow5)
|
UNARY_FUNCTION(scalar, scalar, pow5)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow6)
|
UNARY_FUNCTION(scalar, scalar, pow6)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pow025)
|
||||||
UNARY_FUNCTION(scalar, scalar, sqrt)
|
UNARY_FUNCTION(scalar, scalar, sqrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign)
|
UNARY_FUNCTION(scalar, scalar, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos)
|
UNARY_FUNCTION(scalar, scalar, pos)
|
||||||
|
|||||||
@ -57,6 +57,7 @@ void stabilise
|
|||||||
const scalar s
|
const scalar s
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
template<template<class> class Field>
|
template<template<class> class Field>
|
||||||
tmp<FieldField<Field, scalar> > stabilise
|
tmp<FieldField<Field, scalar> > stabilise
|
||||||
(
|
(
|
||||||
@ -64,6 +65,7 @@ tmp<FieldField<Field, scalar> > stabilise
|
|||||||
const scalar s
|
const scalar s
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
template<template<class> class Field>
|
template<template<class> class Field>
|
||||||
tmp<FieldField<Field, scalar> > stabilise
|
tmp<FieldField<Field, scalar> > stabilise
|
||||||
(
|
(
|
||||||
@ -95,6 +97,7 @@ UNARY_FUNCTION(scalar, scalar, pow3)
|
|||||||
UNARY_FUNCTION(scalar, scalar, pow4)
|
UNARY_FUNCTION(scalar, scalar, pow4)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow5)
|
UNARY_FUNCTION(scalar, scalar, pow5)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow6)
|
UNARY_FUNCTION(scalar, scalar, pow6)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pow025)
|
||||||
UNARY_FUNCTION(scalar, scalar, sqrt)
|
UNARY_FUNCTION(scalar, scalar, sqrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign)
|
UNARY_FUNCTION(scalar, scalar, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos)
|
UNARY_FUNCTION(scalar, scalar, pos)
|
||||||
|
|||||||
@ -109,6 +109,7 @@ UNARY_FUNCTION(scalar, scalar, pow3)
|
|||||||
UNARY_FUNCTION(scalar, scalar, pow4)
|
UNARY_FUNCTION(scalar, scalar, pow4)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow5)
|
UNARY_FUNCTION(scalar, scalar, pow5)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow6)
|
UNARY_FUNCTION(scalar, scalar, pow6)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pow025)
|
||||||
UNARY_FUNCTION(scalar, scalar, sqrt)
|
UNARY_FUNCTION(scalar, scalar, sqrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign)
|
UNARY_FUNCTION(scalar, scalar, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos)
|
UNARY_FUNCTION(scalar, scalar, pos)
|
||||||
|
|||||||
@ -96,6 +96,7 @@ UNARY_FUNCTION(scalar, scalar, pow3)
|
|||||||
UNARY_FUNCTION(scalar, scalar, pow4)
|
UNARY_FUNCTION(scalar, scalar, pow4)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow5)
|
UNARY_FUNCTION(scalar, scalar, pow5)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow6)
|
UNARY_FUNCTION(scalar, scalar, pow6)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pow025)
|
||||||
UNARY_FUNCTION(scalar, scalar, sqrt)
|
UNARY_FUNCTION(scalar, scalar, sqrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign)
|
UNARY_FUNCTION(scalar, scalar, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos)
|
UNARY_FUNCTION(scalar, scalar, pos)
|
||||||
|
|||||||
@ -447,6 +447,7 @@ UNARY_FUNCTION(scalar, scalar, pow3, pow3)
|
|||||||
UNARY_FUNCTION(scalar, scalar, pow4, pow4)
|
UNARY_FUNCTION(scalar, scalar, pow4, pow4)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow5, pow5)
|
UNARY_FUNCTION(scalar, scalar, pow5, pow5)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow6, pow6)
|
UNARY_FUNCTION(scalar, scalar, pow6, pow6)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pow025, pow025)
|
||||||
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
||||||
|
|||||||
@ -92,6 +92,7 @@ UNARY_FUNCTION(scalar, scalar, pow3, pow3)
|
|||||||
UNARY_FUNCTION(scalar, scalar, pow4, pow4)
|
UNARY_FUNCTION(scalar, scalar, pow4, pow4)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow5, pow5)
|
UNARY_FUNCTION(scalar, scalar, pow5, pow5)
|
||||||
UNARY_FUNCTION(scalar, scalar, pow6, pow6)
|
UNARY_FUNCTION(scalar, scalar, pow6, pow6)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pow025, pow025)
|
||||||
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
||||||
|
|||||||
@ -90,56 +90,67 @@ inline Scalar& setComponent(Scalar& s, const direction)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar component(const Scalar s, const direction)
|
inline Scalar component(const Scalar s, const direction)
|
||||||
{
|
{
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar sign(const Scalar s)
|
inline Scalar sign(const Scalar s)
|
||||||
{
|
{
|
||||||
return (s >= 0)? 1: -1;
|
return (s >= 0)? 1: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar pos(const Scalar s)
|
inline Scalar pos(const Scalar s)
|
||||||
{
|
{
|
||||||
return (s >= 0)? 1: 0;
|
return (s >= 0)? 1: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar neg(const Scalar s)
|
inline Scalar neg(const Scalar s)
|
||||||
{
|
{
|
||||||
return (s < 0)? 1: 0;
|
return (s < 0)? 1: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool equal(const Scalar& s1, const Scalar& s2)
|
inline bool equal(const Scalar& s1, const Scalar& s2)
|
||||||
{
|
{
|
||||||
return mag(s1 - s2) <= ScalarVSMALL;
|
return mag(s1 - s2) <= ScalarVSMALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool notEqual(const Scalar s1, const Scalar s2)
|
inline bool notEqual(const Scalar s1, const Scalar s2)
|
||||||
{
|
{
|
||||||
return mag(s1 - s2) > ScalarVSMALL;
|
return mag(s1 - s2) > ScalarVSMALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar limit(const Scalar s1, const Scalar s2)
|
inline Scalar limit(const Scalar s1, const Scalar s2)
|
||||||
{
|
{
|
||||||
return (mag(s1) < mag(s2)) ? s1: 0.0;
|
return (mag(s1) < mag(s2)) ? s1: 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar minMod(const Scalar s1, const Scalar s2)
|
inline Scalar minMod(const Scalar s1, const Scalar s2)
|
||||||
{
|
{
|
||||||
return (mag(s1) < mag(s2)) ? s1: s2;
|
return (mag(s1) < mag(s2)) ? s1: s2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar magSqr(const Scalar s)
|
inline Scalar magSqr(const Scalar s)
|
||||||
{
|
{
|
||||||
return s*s;
|
return s*s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar sqr(const Scalar s)
|
inline Scalar sqr(const Scalar s)
|
||||||
{
|
{
|
||||||
return s*s;
|
return s*s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar sqrtSumSqr(const Scalar a, const Scalar b)
|
inline Scalar sqrtSumSqr(const Scalar a, const Scalar b)
|
||||||
{
|
{
|
||||||
Scalar maga = mag(a);
|
Scalar maga = mag(a);
|
||||||
@ -155,61 +166,79 @@ inline Scalar sqrtSumSqr(const Scalar a, const Scalar b)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar pow3(const Scalar s)
|
inline Scalar pow3(const Scalar s)
|
||||||
{
|
{
|
||||||
return s*sqr(s);
|
return s*sqr(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar pow4(const Scalar s)
|
inline Scalar pow4(const Scalar s)
|
||||||
{
|
{
|
||||||
return sqr(sqr(s));
|
return sqr(sqr(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar pow5(const Scalar s)
|
inline Scalar pow5(const Scalar s)
|
||||||
{
|
{
|
||||||
return s*pow4(s);
|
return s*pow4(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar pow6(const Scalar s)
|
inline Scalar pow6(const Scalar s)
|
||||||
{
|
{
|
||||||
return pow3(sqr(s));
|
return pow3(sqr(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Scalar pow025(const Scalar s)
|
||||||
|
{
|
||||||
|
return sqrt(sqrt(s));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar inv(const Scalar s)
|
inline Scalar inv(const Scalar s)
|
||||||
{
|
{
|
||||||
return 1.0/s;
|
return 1.0/s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar dot(const Scalar s1, const Scalar s2)
|
inline Scalar dot(const Scalar s1, const Scalar s2)
|
||||||
{
|
{
|
||||||
return s1*s2;
|
return s1*s2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar cmptMultiply(const Scalar s1, const Scalar s2)
|
inline Scalar cmptMultiply(const Scalar s1, const Scalar s2)
|
||||||
{
|
{
|
||||||
return s1*s2;
|
return s1*s2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar cmptDivide(const Scalar s1, const Scalar s2)
|
inline Scalar cmptDivide(const Scalar s1, const Scalar s2)
|
||||||
{
|
{
|
||||||
return s1/s2;
|
return s1/s2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar cmptMax(const Scalar s)
|
inline Scalar cmptMax(const Scalar s)
|
||||||
{
|
{
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar cmptMin(const Scalar s)
|
inline Scalar cmptMin(const Scalar s)
|
||||||
{
|
{
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar cmptAv(const Scalar s)
|
inline Scalar cmptAv(const Scalar s)
|
||||||
{
|
{
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Scalar cmptMag(const Scalar s)
|
inline Scalar cmptMag(const Scalar s)
|
||||||
{
|
{
|
||||||
return mag(s);
|
return mag(s);
|
||||||
|
|||||||
@ -2661,10 +2661,22 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
{
|
{
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|
||||||
|
// Find maximum length of a patch name, for a nicer output
|
||||||
|
label maxPatchNameLen = 0;
|
||||||
|
forAll(meshMover.adaptPatchIDs(), i)
|
||||||
|
{
|
||||||
|
label patchI = meshMover.adaptPatchIDs()[i];
|
||||||
|
word patchName = patches[patchI].name();
|
||||||
|
maxPatchNameLen = max(maxPatchNameLen,label(patchName.size()));
|
||||||
|
}
|
||||||
|
|
||||||
Info<< nl
|
Info<< nl
|
||||||
<< "patch faces layers avg thickness[m]" << nl
|
<< setf(ios_base::left) << setw(maxPatchNameLen) << "patch"
|
||||||
<< " near-wall overall" << nl
|
<< setw(0) << " faces layers avg thickness[m]" << nl
|
||||||
<< "----- ----- ------ --------- -------" << endl;
|
<< setf(ios_base::left) << setw(maxPatchNameLen) << " "
|
||||||
|
<< setw(0) << " near-wall overall" << nl
|
||||||
|
<< setf(ios_base::left) << setw(maxPatchNameLen) << "-----"
|
||||||
|
<< setw(0) << " ----- ------ --------- -------" << endl;
|
||||||
|
|
||||||
forAll(meshMover.adaptPatchIDs(), i)
|
forAll(meshMover.adaptPatchIDs(), i)
|
||||||
{
|
{
|
||||||
@ -2704,18 +2716,24 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
|
|
||||||
label totNPoints = returnReduce(meshPoints.size(), sumOp<label>());
|
label totNPoints = returnReduce(meshPoints.size(), sumOp<label>());
|
||||||
|
|
||||||
//reduce(maxThickness, maxOp<scalar>());
|
// For empty patches, totNPoints is 0.
|
||||||
//reduce(minThickness, minOp<scalar>());
|
scalar avgThickness = 0;
|
||||||
scalar avgThickness =
|
scalar avgNearWallThickness = 0;
|
||||||
returnReduce(sumThickness, sumOp<scalar>())
|
|
||||||
/ totNPoints;
|
|
||||||
scalar avgNearWallThickness =
|
|
||||||
returnReduce(sumNearWallThickness, sumOp<scalar>())
|
|
||||||
/ totNPoints;
|
|
||||||
|
|
||||||
Info<< setf(ios_base::left) << setw(19) << patches[patchI].name();
|
if (totNPoints > 0)
|
||||||
//Sout.unsetf(ios_base::left);
|
{
|
||||||
Info<< setprecision(3)
|
//reduce(maxThickness, maxOp<scalar>());
|
||||||
|
//reduce(minThickness, minOp<scalar>());
|
||||||
|
avgThickness =
|
||||||
|
returnReduce(sumThickness, sumOp<scalar>())
|
||||||
|
/ totNPoints;
|
||||||
|
avgNearWallThickness =
|
||||||
|
returnReduce(sumNearWallThickness, sumOp<scalar>())
|
||||||
|
/ totNPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< setf(ios_base::left) << setw(maxPatchNameLen)
|
||||||
|
<< patches[patchI].name() << setprecision(3)
|
||||||
<< " " << setw(8)
|
<< " " << setw(8)
|
||||||
<< returnReduce(patches[patchI].size(), sumOp<scalar>())
|
<< returnReduce(patches[patchI].size(), sumOp<scalar>())
|
||||||
<< " " << setw(6) << layerParams.numLayers()[patchI]
|
<< " " << setw(6) << layerParams.numLayers()[patchI]
|
||||||
|
|||||||
@ -141,9 +141,18 @@ Foam::labelList Foam::decompositionMethod::decompose
|
|||||||
const pointField& coarsePoints
|
const pointField& coarsePoints
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalarField coarseWeights(0);
|
// Decompose based on agglomerated points
|
||||||
|
labelList coarseDistribution(decompose(coarsePoints));
|
||||||
|
|
||||||
return decompose(fineToCoarse, coarsePoints, coarseWeights);
|
// Rework back into decomposition for original mesh_
|
||||||
|
labelList fineDistribution(fineToCoarse.size());
|
||||||
|
|
||||||
|
forAll(fineDistribution, i)
|
||||||
|
{
|
||||||
|
fineDistribution[i] = coarseDistribution[fineToCoarse[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
return fineDistribution;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -139,7 +139,13 @@ void Foam::Cloud<ParticleType>::readFields()
|
|||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
void Foam::Cloud<ParticleType>::writeFields() const
|
void Foam::Cloud<ParticleType>::writeFields() const
|
||||||
{}
|
{
|
||||||
|
if (this->size())
|
||||||
|
{
|
||||||
|
const ParticleType& p = *this->first();
|
||||||
|
ParticleType::writeFields(p.cloud());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
|
#include "wallPolyPatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -46,21 +47,25 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
|||||||
Sf /= mag(Sf);
|
Sf /= mag(Sf);
|
||||||
vector Cf = mesh.faceCentres()[facei];
|
vector Cf = mesh.faceCentres()[facei];
|
||||||
|
|
||||||
// move reference point for wall
|
// patch interaction
|
||||||
if (!cloud_.internalFace(facei))
|
if (!cloud_.internalFace(facei))
|
||||||
{
|
{
|
||||||
const vector& C = mesh.cellCentres()[celli_];
|
label patchi = patch(facei);
|
||||||
scalar CCf = mag((C - Cf) & Sf);
|
const polyPatch& patch = mesh.boundaryMesh()[patchi];
|
||||||
// check if distance between cell centre and face centre
|
|
||||||
// is larger than wallImpactDistance
|
// move reference point for wall
|
||||||
if
|
if (isA<wallPolyPatch>(patch))
|
||||||
(
|
|
||||||
CCf
|
|
||||||
> static_cast<const ParticleType&>(*this).wallImpactDistance(Sf)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Cf -= static_cast<const ParticleType&>(*this)
|
const vector& C = mesh.cellCentres()[celli_];
|
||||||
.wallImpactDistance(Sf)*Sf;
|
scalar CCf = mag((C - Cf) & Sf);
|
||||||
|
// check if distance between cell centre and face centre
|
||||||
|
// is larger than wallImpactDistance
|
||||||
|
const ParticleType& p =
|
||||||
|
static_cast<const ParticleType&>(*this);
|
||||||
|
if (CCf > p.wallImpactDistance(Sf))
|
||||||
|
{
|
||||||
|
Cf -=p.wallImpactDistance(Sf)*Sf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,21 +195,24 @@ inline Foam::scalar Foam::Particle<ParticleType>::lambda
|
|||||||
Sf /= mag(Sf);
|
Sf /= mag(Sf);
|
||||||
vector Cf = mesh.faceCentres()[facei];
|
vector Cf = mesh.faceCentres()[facei];
|
||||||
|
|
||||||
// move reference point for wall
|
// patch interaction
|
||||||
if (!cloud_.internalFace(facei))
|
if (!cloud_.internalFace(facei))
|
||||||
{
|
{
|
||||||
const vector& C = mesh.cellCentres()[celli_];
|
label patchi = patch(facei);
|
||||||
scalar CCf = mag((C - Cf) & Sf);
|
const polyPatch& patch = mesh.boundaryMesh()[patchi];
|
||||||
// check if distance between cell centre and face centre
|
|
||||||
// is larger than wallImpactDistance
|
// move reference point for wall
|
||||||
if
|
if (isA<wallPolyPatch>(patch))
|
||||||
(
|
|
||||||
CCf
|
|
||||||
> static_cast<const ParticleType&>(*this).wallImpactDistance(Sf)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Cf -= static_cast<const ParticleType&>(*this)
|
const vector& C = mesh.cellCentres()[celli_];
|
||||||
.wallImpactDistance(Sf)*Sf;
|
scalar CCf = mag((C - Cf) & Sf);
|
||||||
|
// check if distance between cell centre and face centre
|
||||||
|
// is larger than wallImpactDistance
|
||||||
|
const ParticleType& p = static_cast<const ParticleType&>(*this);
|
||||||
|
if (CCf > p.wallImpactDistance(Sf))
|
||||||
|
{
|
||||||
|
Cf -=p.wallImpactDistance(Sf)*Sf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class indexedParticle Declaration
|
Class indexedParticle Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class indexedParticle
|
class indexedParticle
|
||||||
|
|||||||
@ -45,20 +45,17 @@ defineTemplateTypeNameAndDebug(Cloud<indexedParticle>, 0);
|
|||||||
Foam::indexedParticleCloud::indexedParticleCloud
|
Foam::indexedParticleCloud::indexedParticleCloud
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const word& cloudName
|
const word& cloudName,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<indexedParticle>(mesh, cloudName, false)
|
Cloud<indexedParticle>(mesh, cloudName, false)
|
||||||
{
|
{
|
||||||
indexedParticle::readFields(*this);
|
if (readFields)
|
||||||
|
{
|
||||||
|
indexedParticle::readFields(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::indexedParticleCloud::writeFields() const
|
|
||||||
{
|
|
||||||
indexedParticle::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class indexedParticleCloud Declaration
|
Class indexedParticleCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class indexedParticleCloud
|
class indexedParticleCloud
|
||||||
@ -69,14 +69,9 @@ public:
|
|||||||
indexedParticleCloud
|
indexedParticleCloud
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const polyMesh&,
|
||||||
const word& cloudName = "defaultCloud"
|
const word& cloudName = "defaultCloud",
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -43,12 +43,16 @@ defineTemplateTypeNameAndDebug(Cloud<passiveParticle>, 0);
|
|||||||
Foam::passiveParticleCloud::passiveParticleCloud
|
Foam::passiveParticleCloud::passiveParticleCloud
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const word& cloudName
|
const word& cloudName,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<passiveParticle>(mesh, cloudName, false)
|
Cloud<passiveParticle>(mesh, cloudName, false)
|
||||||
{
|
{
|
||||||
readFields();
|
if (readFields)
|
||||||
|
{
|
||||||
|
passiveParticle::readFields(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -63,18 +67,4 @@ Foam::passiveParticleCloud::passiveParticleCloud
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::passiveParticleCloud::readFields()
|
|
||||||
{
|
|
||||||
passiveParticle::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::passiveParticleCloud::writeFields() const
|
|
||||||
{
|
|
||||||
passiveParticle::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class passiveParticleCloud Declaration
|
Class passiveParticleCloud Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class passiveParticleCloud
|
class passiveParticleCloud
|
||||||
@ -72,7 +72,8 @@ public:
|
|||||||
passiveParticleCloud
|
passiveParticleCloud
|
||||||
(
|
(
|
||||||
const polyMesh&,
|
const polyMesh&,
|
||||||
const word& cloudName = "defaultCloud"
|
const word& cloudName = "defaultCloud",
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from mesh, cloud name, and a list of particles
|
//- Construct from mesh, cloud name, and a list of particles
|
||||||
@ -82,15 +83,6 @@ public:
|
|||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const IDLList<passiveParticle>& particles
|
const IDLList<passiveParticle>& particles
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Read fields
|
|
||||||
virtual void readFields();
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,70 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "CoalCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::CoalCloud<ThermoType>::CoalCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
)
|
|
||||||
:
|
|
||||||
ReactingMultiphaseCloud<CoalParcel<ThermoType> >
|
|
||||||
(
|
|
||||||
cloudName,
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
g,
|
|
||||||
thermo
|
|
||||||
)
|
|
||||||
{
|
|
||||||
CoalParcel<ThermoType>::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::CoalCloud<ThermoType>::~CoalCloud()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
void Foam::CoalCloud<ThermoType>::writeFields() const
|
|
||||||
{
|
|
||||||
CoalParcel<ThermoType>::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -26,9 +26,7 @@ Class
|
|||||||
CoalCloud
|
CoalCloud
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
Coal cloud templated on the type of carrier phase thermodynamics
|
||||||
SourceFiles
|
|
||||||
CoalCloud.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -37,69 +35,21 @@ SourceFiles
|
|||||||
|
|
||||||
#include "ReactingMultiphaseCloud.H"
|
#include "ReactingMultiphaseCloud.H"
|
||||||
#include "CoalParcel.H"
|
#include "CoalParcel.H"
|
||||||
|
#include "thermoPhysicsTypes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef ReactingMultiphaseCloud<CoalParcel<constGasThermoPhysics> >
|
||||||
|
constThermoCoalCloud;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
typedef ReactingMultiphaseCloud<CoalParcel<gasThermoPhysics> >
|
||||||
Class CoalCloud Declaration
|
thermoCoalCloud;
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class ThermoType>
|
typedef ReactingMultiphaseCloud<CoalParcel<icoPoly8ThermoPhysics> >
|
||||||
class CoalCloud
|
icoPoly8ThermoCoalCloud;
|
||||||
:
|
}
|
||||||
public ReactingMultiphaseCloud<CoalParcel<ThermoType> >
|
|
||||||
{
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
CoalCloud(const CoalCloud&);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const CoalCloud&);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//-Runtime type information
|
|
||||||
TypeName("CoalCloud");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct given carrier gas fields
|
|
||||||
CoalCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
~CoalCloud();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
#include "CoalCloud.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "createReactingCloudTypes.H"
|
|
||||||
#include "CoalCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
createReactingCloudType(CoalCloud);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,6 +1,3 @@
|
|||||||
/* Coal cloud */
|
|
||||||
CoalCloud/defineCoalCloud.C
|
|
||||||
|
|
||||||
/* Coal parcel and sub-models */
|
/* Coal parcel and sub-models */
|
||||||
CoalParcel/defineCoalParcel.C
|
CoalParcel/defineCoalParcel.C
|
||||||
CoalParcel/makeCoalParcelSubmodels.C
|
CoalParcel/makeCoalParcelSubmodels.C
|
||||||
|
|||||||
@ -92,8 +92,7 @@ License
|
|||||||
( \
|
( \
|
||||||
ReactingMultiphaseCloud<ParcelType##ThermoType>, \
|
ReactingMultiphaseCloud<ParcelType##ThermoType>, \
|
||||||
0 \
|
0 \
|
||||||
); \
|
);
|
||||||
defineParcelTypeNameAndDebug(CoalCloud<ParcelType##ThermoType>, 0);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -96,10 +96,7 @@ Foam::parcel::parcel
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::parcel::readFields
|
void Foam::parcel::readFields(Cloud<parcel>& c)
|
||||||
(
|
|
||||||
Cloud<parcel>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!c.size())
|
||||||
{
|
{
|
||||||
@ -195,10 +192,7 @@ void Foam::parcel::readFields
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::parcel::writeFields
|
void Foam::parcel::writeFields(const Cloud<parcel>& c)
|
||||||
(
|
|
||||||
const Cloud<parcel>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Particle<parcel>::writeFields(c);
|
Particle<parcel>::writeFields(c);
|
||||||
|
|
||||||
|
|||||||
@ -59,7 +59,8 @@ Foam::spray::spray
|
|||||||
const basicMultiComponentMixture& composition,
|
const basicMultiComponentMixture& composition,
|
||||||
const PtrList<gasThermoPhysics>& gasProperties,
|
const PtrList<gasThermoPhysics>& gasProperties,
|
||||||
const dictionary&,
|
const dictionary&,
|
||||||
const dimensionedVector& g
|
const dimensionedVector& g,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<parcel>(U.mesh(), false), // suppress className checking on positions
|
Cloud<parcel>(U.mesh(), false), // suppress className checking on positions
|
||||||
@ -345,7 +346,10 @@ Foam::spray::spray
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parcel::readFields(*this);
|
if (readFields)
|
||||||
|
{
|
||||||
|
parcel::readFields(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -355,12 +359,4 @@ Foam::spray::~spray()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::spray::writeFields() const
|
|
||||||
{
|
|
||||||
parcel::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -194,7 +194,8 @@ public:
|
|||||||
const basicMultiComponentMixture& composition,
|
const basicMultiComponentMixture& composition,
|
||||||
const PtrList<gasThermoPhysics>& gasProperties,
|
const PtrList<gasThermoPhysics>& gasProperties,
|
||||||
const dictionary& thermophysicalProperties,
|
const dictionary& thermophysicalProperties,
|
||||||
const dimensionedVector& g
|
const dimensionedVector& g,
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -339,12 +340,6 @@ public:
|
|||||||
|
|
||||||
//- Return Ambient Temperature
|
//- Return Ambient Temperature
|
||||||
void calculateAmbientTemperature();
|
void calculateAmbientTemperature();
|
||||||
|
|
||||||
|
|
||||||
// I/O
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -28,11 +28,9 @@ License
|
|||||||
#include "BinaryCollisionModel.H"
|
#include "BinaryCollisionModel.H"
|
||||||
#include "WallInteractionModel.H"
|
#include "WallInteractionModel.H"
|
||||||
#include "InflowBoundaryModel.H"
|
#include "InflowBoundaryModel.H"
|
||||||
|
#include "constants.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
using namespace Foam::constant;
|
||||||
|
|
||||||
template<class ParcelType>
|
|
||||||
Foam::scalar Foam::DsmcCloud<ParcelType>::kb = 1.380650277e-23;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
@ -526,7 +524,8 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const volScalarField& T,
|
const volScalarField& T,
|
||||||
const volVectorField& U
|
const volVectorField& U,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<ParcelType>(T.mesh(), cloudName, false),
|
Cloud<ParcelType>(T.mesh(), cloudName, false),
|
||||||
@ -630,6 +629,11 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
|
|||||||
{
|
{
|
||||||
collisionSelectionRemainder_[i] = rndGen_.scalar01();
|
collisionSelectionRemainder_[i] = rndGen_.scalar01();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
ParcelType::readFields(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -853,7 +857,7 @@ Foam::vector Foam::DsmcCloud<ParcelType>::equipartitionLinearVelocity
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
sqrt(kb*temperature/mass)
|
sqrt(physicoChemical::k.value()*temperature/mass)
|
||||||
*vector
|
*vector
|
||||||
(
|
(
|
||||||
rndGen_.GaussNormal(),
|
rndGen_.GaussNormal(),
|
||||||
@ -879,7 +883,7 @@ Foam::scalar Foam::DsmcCloud<ParcelType>::equipartitionInternalEnergy
|
|||||||
else if (iDof < 2.0 + SMALL && iDof > 2.0 - SMALL)
|
else if (iDof < 2.0 + SMALL && iDof > 2.0 - SMALL)
|
||||||
{
|
{
|
||||||
// Special case for iDof = 2, i.e. diatomics;
|
// Special case for iDof = 2, i.e. diatomics;
|
||||||
Ei = -log(rndGen_.scalar01())*kb*temperature;
|
Ei = -log(rndGen_.scalar01())*physicoChemical::k.value()*temperature;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -897,7 +901,7 @@ Foam::scalar Foam::DsmcCloud<ParcelType>::equipartitionInternalEnergy
|
|||||||
|
|
||||||
} while (P < rndGen_.scalar01());
|
} while (P < rndGen_.scalar01());
|
||||||
|
|
||||||
Ei = energyRatio*kb*temperature;
|
Ei = energyRatio*physicoChemical::k.value()*temperature;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ei;
|
return Ei;
|
||||||
|
|||||||
@ -171,12 +171,6 @@ class DsmcCloud
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static data members
|
|
||||||
|
|
||||||
//- Boltzmann constant
|
|
||||||
static scalar kb;
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given name and mesh, will read Parcels from file
|
//- Construct given name and mesh, will read Parcels from file
|
||||||
@ -184,7 +178,8 @@ public:
|
|||||||
(
|
(
|
||||||
const word& cloudName,
|
const word& cloudName,
|
||||||
const volScalarField& T,
|
const volScalarField& T,
|
||||||
const volVectorField& U
|
const volVectorField& U,
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct given name and mesh. Used to initialise.
|
//- Construct given name and mesh. Used to initialise.
|
||||||
@ -338,6 +333,7 @@ public:
|
|||||||
scalar mass
|
scalar mass
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Sub-models
|
// Sub-models
|
||||||
|
|
||||||
//- Return reference to binary elastic collision model
|
//- Return reference to binary elastic collision model
|
||||||
@ -429,11 +425,8 @@ public:
|
|||||||
//- Evolve the cloud (move, collide)
|
//- Evolve the cloud (move, collide)
|
||||||
void evolve();
|
void evolve();
|
||||||
|
|
||||||
|
|
||||||
//- Clear the Cloud
|
//- Clear the Cloud
|
||||||
inline void clear();
|
inline void clear();
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,9 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "mathConstants.H"
|
#include "constants.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -314,7 +316,8 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
|
|||||||
scalar mass
|
scalar mass
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return 2.0*sqrt(2.0*kb*temperature/(constant::math::pi*mass));
|
return
|
||||||
|
2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(math::pi*mass));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -325,7 +328,8 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
|
|||||||
scalar mass
|
scalar mass
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return 2.0*sqrt(2.0*kb*temperature/(constant::math::pi*mass));
|
return
|
||||||
|
2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(math::pi*mass));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -336,7 +340,7 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianRMSSpeed
|
|||||||
scalar mass
|
scalar mass
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return sqrt(3.0*kb*temperature/mass);
|
return sqrt(3.0*physicoChemical::k.value()*temperature/mass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -347,7 +351,7 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianRMSSpeed
|
|||||||
scalar mass
|
scalar mass
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return sqrt(3.0*kb*temperature/mass);
|
return sqrt(3.0*physicoChemical::k.value()*temperature/mass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -359,7 +363,7 @@ Foam::DsmcCloud<ParcelType>::maxwellianMostProbableSpeed
|
|||||||
scalar mass
|
scalar mass
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return sqrt(2.0*kb*temperature/mass);
|
return sqrt(2.0*physicoChemical::k.value()*temperature/mass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -371,7 +375,7 @@ Foam::DsmcCloud<ParcelType>::maxwellianMostProbableSpeed
|
|||||||
scalar mass
|
scalar mass
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return sqrt(2.0*kb*temperature/mass);
|
return sqrt(2.0*physicoChemical::k.value()*temperature/mass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -44,9 +44,7 @@ Foam::dsmcCloud::dsmcCloud
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
DsmcCloud<dsmcParcel>(cloudName, T, U)
|
DsmcCloud<dsmcParcel>(cloudName, T, U)
|
||||||
{
|
{}
|
||||||
dsmcParcel::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::dsmcCloud::dsmcCloud
|
Foam::dsmcCloud::dsmcCloud
|
||||||
@ -65,11 +63,4 @@ Foam::dsmcCloud::~dsmcCloud()
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::dsmcCloud::writeFields() const
|
|
||||||
{
|
|
||||||
dsmcParcel::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -86,12 +86,6 @@ public:
|
|||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
~dsmcCloud();
|
~dsmcCloud();
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -308,9 +308,9 @@ public:
|
|||||||
|
|
||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
static void readFields(DsmcCloud<ParcelType>& c);
|
static void readFields(Cloud<ParcelType>& c);
|
||||||
|
|
||||||
static void writeFields(const DsmcCloud<ParcelType>& c);
|
static void writeFields(const Cloud<ParcelType>& c);
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|||||||
@ -74,10 +74,7 @@ Foam::DsmcParcel<ParcelType>::DsmcParcel
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcParcel<ParcelType>::readFields
|
void Foam::DsmcParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||||
(
|
|
||||||
DsmcCloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!c.size())
|
||||||
{
|
{
|
||||||
@ -107,10 +104,7 @@ void Foam::DsmcParcel<ParcelType>::readFields
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::DsmcParcel<ParcelType>::writeFields
|
void Foam::DsmcParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
||||||
(
|
|
||||||
const DsmcCloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Particle<ParcelType>::writeFields(c);
|
Particle<ParcelType>::writeFields(c);
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,9 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "LarsenBorgnakkeVariableHardSphere.H"
|
#include "LarsenBorgnakkeVariableHardSphere.H"
|
||||||
#include "mathConstants.H"
|
#include "constants.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -157,8 +159,8 @@ Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::sigmaTcR
|
|||||||
|
|
||||||
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
|
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
|
||||||
scalar sigmaTPQ =
|
scalar sigmaTPQ =
|
||||||
constant::math::pi*dPQ*dPQ
|
math::pi*dPQ*dPQ
|
||||||
*pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5)
|
*pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5)
|
||||||
/exp(Foam::lgamma(2.5 - omegaPQ));
|
/exp(Foam::lgamma(2.5 - omegaPQ));
|
||||||
|
|
||||||
return sigmaTPQ*cR;
|
return sigmaTPQ*cR;
|
||||||
@ -253,7 +255,7 @@ void Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::collide
|
|||||||
|
|
||||||
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
|
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
|
||||||
|
|
||||||
scalar phi = constant::math::twoPi*rndGen.scalar01();
|
scalar phi = math::twoPi*rndGen.scalar01();
|
||||||
|
|
||||||
vector postCollisionRelU =
|
vector postCollisionRelU =
|
||||||
cR
|
cR
|
||||||
|
|||||||
@ -25,7 +25,9 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "VariableHardSphere.H"
|
#include "VariableHardSphere.H"
|
||||||
#include "mathConstants.H"
|
#include "constants.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -91,8 +93,8 @@ Foam::scalar Foam::VariableHardSphere<CloudType>::sigmaTcR
|
|||||||
|
|
||||||
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
|
// calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79
|
||||||
scalar sigmaTPQ =
|
scalar sigmaTPQ =
|
||||||
constant::math::pi*dPQ*dPQ
|
math::pi*dPQ*dPQ
|
||||||
*pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5)
|
*pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5)
|
||||||
/exp(Foam::lgamma(2.5 - omegaPQ));
|
/exp(Foam::lgamma(2.5 - omegaPQ));
|
||||||
|
|
||||||
return sigmaTPQ*cR;
|
return sigmaTPQ*cR;
|
||||||
@ -126,7 +128,7 @@ void Foam::VariableHardSphere<CloudType>::collide
|
|||||||
|
|
||||||
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
|
scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta);
|
||||||
|
|
||||||
scalar phi = constant::math::twoPi*rndGen.scalar01();
|
scalar phi = math::twoPi*rndGen.scalar01();
|
||||||
|
|
||||||
vector postCollisionRelU =
|
vector postCollisionRelU =
|
||||||
cR
|
cR
|
||||||
|
|||||||
@ -25,7 +25,9 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "FreeStream.H"
|
#include "FreeStream.H"
|
||||||
#include "mathConstants.H"
|
#include "constants.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -131,7 +133,7 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
|
|
||||||
Random& rndGen(cloud.rndGen());
|
Random& rndGen(cloud.rndGen());
|
||||||
|
|
||||||
scalar sqrtPi = sqrt(constant::math::pi);
|
scalar sqrtPi = sqrt(math::pi);
|
||||||
|
|
||||||
label particlesInserted = 0;
|
label particlesInserted = 0;
|
||||||
|
|
||||||
@ -370,7 +372,7 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
} while (P < rndGen.scalar01());
|
} while (P < rndGen.scalar01());
|
||||||
|
|
||||||
vector U =
|
vector U =
|
||||||
sqrt(CloudType::kb*faceTemperature/mass)
|
sqrt(physicoChemical::k.value()*faceTemperature/mass)
|
||||||
*(
|
*(
|
||||||
rndGen.GaussNormal()*t1
|
rndGen.GaussNormal()*t1
|
||||||
+ rndGen.GaussNormal()*t2
|
+ rndGen.GaussNormal()*t2
|
||||||
|
|||||||
@ -25,6 +25,9 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "MaxwellianThermal.H"
|
#include "MaxwellianThermal.H"
|
||||||
|
#include "constants.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -108,7 +111,7 @@ void Foam::MaxwellianThermal<CloudType>::correct
|
|||||||
scalar iDof = cloud.constProps(typeId).internalDegreesOfFreedom();
|
scalar iDof = cloud.constProps(typeId).internalDegreesOfFreedom();
|
||||||
|
|
||||||
U =
|
U =
|
||||||
sqrt(CloudType::kb*T/mass)
|
sqrt(physicoChemical::k.value()*T/mass)
|
||||||
*(
|
*(
|
||||||
rndGen.GaussNormal()*tw1
|
rndGen.GaussNormal()*tw1
|
||||||
+ rndGen.GaussNormal()*tw2
|
+ rndGen.GaussNormal()*tw2
|
||||||
|
|||||||
@ -18,13 +18,6 @@ $(BASECLOUDS)/reactingCloud/reactingCloud.C
|
|||||||
$(BASECLOUDS)/reactingMultiphaseCloud/reactingMultiphaseCloud.C
|
$(BASECLOUDS)/reactingMultiphaseCloud/reactingMultiphaseCloud.C
|
||||||
|
|
||||||
|
|
||||||
/* Cloud container/injection mechanisms */
|
|
||||||
$(DERIVEDCLOUDS)/basicKinematicCloud/basicKinematicCloud.C
|
|
||||||
$(DERIVEDCLOUDS)/basicThermoCloud/basicThermoCloud.C
|
|
||||||
$(DERIVEDCLOUDS)/BasicReactingCloud/defineBasicReactingCloud.C
|
|
||||||
$(DERIVEDCLOUDS)/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C
|
|
||||||
|
|
||||||
|
|
||||||
/* kinematic parcel sub-models */
|
/* kinematic parcel sub-models */
|
||||||
KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel
|
KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel
|
||||||
$(KINEMATICPARCEL)/basicKinematicParcel.C
|
$(KINEMATICPARCEL)/basicKinematicParcel.C
|
||||||
|
|||||||
@ -43,7 +43,8 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const volScalarField& mu,
|
const volScalarField& mu,
|
||||||
const dimensionedVector& g
|
const dimensionedVector& g,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<ParcelType>(rho.mesh(), cloudName, false),
|
Cloud<ParcelType>(rho.mesh(), cloudName, false),
|
||||||
@ -136,7 +137,12 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud
|
|||||||
mesh_,
|
mesh_,
|
||||||
dimensionedVector("zero", dimMass*dimVelocity, vector::zero)
|
dimensionedVector("zero", dimMass*dimVelocity, vector::zero)
|
||||||
)
|
)
|
||||||
{}
|
{
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
ParcelType::readFields(*this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -204,7 +204,8 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const volScalarField& mu,
|
const volScalarField& mu,
|
||||||
const dimensionedVector& g
|
const dimensionedVector& g,
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -67,10 +67,11 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
basicThermo& thermo
|
basicThermo& thermo,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo),
|
ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
||||||
reactingCloud(),
|
reactingCloud(),
|
||||||
constProps_(this->particleProperties()),
|
constProps_(this->particleProperties()),
|
||||||
mcCarrierThermo_
|
mcCarrierThermo_
|
||||||
@ -118,6 +119,11 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
ParcelType::readFields(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -152,7 +152,8 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
basicThermo& thermo
|
basicThermo& thermo,
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,10 +38,11 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
basicThermo& thermo
|
basicThermo& thermo,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo),
|
ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo, false),
|
||||||
reactingMultiphaseCloud(),
|
reactingMultiphaseCloud(),
|
||||||
constProps_(this->particleProperties()),
|
constProps_(this->particleProperties()),
|
||||||
devolatilisationModel_
|
devolatilisationModel_
|
||||||
@ -61,7 +62,12 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
dMassDevolatilisation_(0.0)
|
dMassDevolatilisation_(0.0)
|
||||||
{}
|
{
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
ParcelType::readFields(*this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -134,7 +134,8 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
basicThermo& thermo
|
basicThermo& thermo,
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,8 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
basicThermo& thermo
|
basicThermo& thermo,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
KinematicCloud<ParcelType>
|
KinematicCloud<ParcelType>
|
||||||
@ -48,7 +49,8 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
rho,
|
rho,
|
||||||
U,
|
U,
|
||||||
thermo.mu(),
|
thermo.mu(),
|
||||||
g
|
g,
|
||||||
|
false
|
||||||
),
|
),
|
||||||
thermoCloud(),
|
thermoCloud(),
|
||||||
constProps_(this->particleProperties()),
|
constProps_(this->particleProperties()),
|
||||||
@ -98,7 +100,12 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud
|
|||||||
this->mesh(),
|
this->mesh(),
|
||||||
dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0)
|
dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0)
|
||||||
)
|
)
|
||||||
{}
|
{
|
||||||
|
if (readFields)
|
||||||
|
{
|
||||||
|
ParcelType::readFields(*this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -140,7 +140,8 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
const volVectorField& U,
|
const volVectorField& U,
|
||||||
const dimensionedVector& g,
|
const dimensionedVector& g,
|
||||||
basicThermo& thermo
|
basicThermo& thermo,
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,70 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "BasicReactingCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicReactingCloud<ThermoType>::BasicReactingCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
)
|
|
||||||
:
|
|
||||||
ReactingCloud<BasicReactingParcel<ThermoType> >
|
|
||||||
(
|
|
||||||
cloudName,
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
g,
|
|
||||||
thermo
|
|
||||||
)
|
|
||||||
{
|
|
||||||
BasicReactingParcel<ThermoType>::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicReactingCloud<ThermoType>::~BasicReactingCloud()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
void Foam::BasicReactingCloud<ThermoType>::writeFields() const
|
|
||||||
{
|
|
||||||
BasicReactingParcel<ThermoType>::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -38,73 +38,21 @@ SourceFiles
|
|||||||
|
|
||||||
#include "ReactingCloud.H"
|
#include "ReactingCloud.H"
|
||||||
#include "BasicReactingParcel.H"
|
#include "BasicReactingParcel.H"
|
||||||
|
#include "thermoPhysicsTypes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef ReactingCloud<BasicReactingParcel<constGasThermoPhysics> >
|
||||||
|
constThermoReactingCloud;
|
||||||
|
|
||||||
// Forward declaration of classes
|
typedef ReactingCloud<BasicReactingParcel<gasThermoPhysics> >
|
||||||
template<class ThermoType>
|
thermoReactingCloud;
|
||||||
class BasicReactingCloud;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
typedef ReactingCloud<BasicReactingParcel<icoPoly8ThermoPhysics> >
|
||||||
Class BasicReactingCloud Declaration
|
icoPoly8ThermoReactingCloud;
|
||||||
\*---------------------------------------------------------------------------*/
|
}
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
class BasicReactingCloud
|
|
||||||
:
|
|
||||||
public ReactingCloud<BasicReactingParcel<ThermoType> >
|
|
||||||
{
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
BasicReactingCloud(const BasicReactingCloud&);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const BasicReactingCloud&);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("BasicReactingCloud");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct given carrier gas fields
|
|
||||||
BasicReactingCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
~BasicReactingCloud();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
#include "BasicReactingCloud.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "createReactingCloudTypes.H"
|
|
||||||
#include "BasicReactingCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
createReactingCloudType(BasicReactingCloud);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,70 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "BasicReactingMultiphaseCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicReactingMultiphaseCloud<ThermoType>::BasicReactingMultiphaseCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
)
|
|
||||||
:
|
|
||||||
ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> >
|
|
||||||
(
|
|
||||||
cloudName,
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
g,
|
|
||||||
thermo
|
|
||||||
)
|
|
||||||
{
|
|
||||||
BasicReactingMultiphaseParcel<ThermoType>::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::BasicReactingMultiphaseCloud<ThermoType>::~BasicReactingMultiphaseCloud()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
void Foam::BasicReactingMultiphaseCloud<ThermoType>::writeFields() const
|
|
||||||
{
|
|
||||||
BasicReactingMultiphaseParcel<ThermoType>::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -26,10 +26,8 @@ Class
|
|||||||
Foam::BasicReactingMultiphaseCloud
|
Foam::BasicReactingMultiphaseCloud
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Reacting multiphase cloud templated on the type of carrier phase thermodynamics
|
Reacting multiphase cloud templated on the type of carrier phase
|
||||||
|
thermodynamics
|
||||||
SourceFiles
|
|
||||||
BasicReactingMultiphaseCloud.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -38,73 +36,21 @@ SourceFiles
|
|||||||
|
|
||||||
#include "ReactingMultiphaseCloud.H"
|
#include "ReactingMultiphaseCloud.H"
|
||||||
#include "BasicReactingMultiphaseParcel.H"
|
#include "BasicReactingMultiphaseParcel.H"
|
||||||
|
#include "thermoPhysicsTypes.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef ReactingMultiphaseCloud<BasicReactingParcel<constGasThermoPhysics> >
|
||||||
|
constThermoReactingMultiphaseCloud;
|
||||||
|
|
||||||
// Forward declaration of classes
|
typedef ReactingMultiphaseCloud<BasicReactingParcel<gasThermoPhysics> >
|
||||||
template<class ThermoType>
|
thermoReactingMultiphaseCloud;
|
||||||
class BasicReactingMultiphaseCloud;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
typedef ReactingMultiphaseCloud<BasicReactingParcel<icoPoly8ThermoPhysics> >
|
||||||
Class BasicReactingMultiphaseCloud Declaration
|
icoPoly8ThermoReactingMultiphaseCloud;
|
||||||
\*---------------------------------------------------------------------------*/
|
}
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
class BasicReactingMultiphaseCloud
|
|
||||||
:
|
|
||||||
public ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> >
|
|
||||||
{
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
BasicReactingMultiphaseCloud(const BasicReactingMultiphaseCloud&);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const BasicReactingMultiphaseCloud&);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("BasicReactingMultiphaseCloud");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct given carrier gas fields
|
|
||||||
BasicReactingMultiphaseCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
~BasicReactingMultiphaseCloud();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
#include "BasicReactingMultiphaseCloud.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,38 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "createReactingCloudTypes.H"
|
|
||||||
#include "BasicReactingMultiphaseCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
createReactingCloudType(BasicReactingMultiphaseCloud);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "basicKinematicCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(basicKinematicCloud, 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::basicKinematicCloud::basicKinematicCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const volScalarField& mu,
|
|
||||||
const dimensionedVector& g
|
|
||||||
)
|
|
||||||
:
|
|
||||||
KinematicCloud<basicKinematicParcel>(cloudName, rho, U, mu, g)
|
|
||||||
{
|
|
||||||
basicKinematicParcel::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::basicKinematicCloud::~basicKinematicCloud()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::basicKinematicCloud::writeFields() const
|
|
||||||
{
|
|
||||||
basicKinematicParcel::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -43,56 +43,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef KinematicCloud<basicKinematicParcel> basicKinematicCloud;
|
||||||
/*---------------------------------------------------------------------------*\
|
}
|
||||||
Class basicKinematicCloud Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class basicKinematicCloud
|
|
||||||
:
|
|
||||||
public KinematicCloud<basicKinematicParcel>
|
|
||||||
{
|
|
||||||
// Private member functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
basicKinematicCloud(const basicKinematicCloud&);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const basicKinematicCloud&);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("basicKinematicCloud");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from components
|
|
||||||
basicKinematicCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const volScalarField& mu,
|
|
||||||
const dimensionedVector& g
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
~basicKinematicCloud();
|
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,68 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "basicThermoCloud.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
defineTypeNameAndDebug(basicThermoCloud, 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::basicThermoCloud::basicThermoCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
)
|
|
||||||
:
|
|
||||||
ThermoCloud<basicThermoParcel>(cloudName, rho, U, g, thermo)
|
|
||||||
{
|
|
||||||
basicThermoParcel::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::basicThermoCloud::~basicThermoCloud()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::basicThermoCloud::writeFields() const
|
|
||||||
{
|
|
||||||
basicThermoParcel::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -43,60 +43,8 @@ SourceFiles
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
typedef ThermoCloud<basicThermoParcel> basicThermoCloud;
|
||||||
/*---------------------------------------------------------------------------*\
|
}
|
||||||
Class basicThermoCloud Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
class basicThermoCloud
|
|
||||||
:
|
|
||||||
public ThermoCloud<basicThermoParcel>
|
|
||||||
{
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construct
|
|
||||||
basicThermoCloud
|
|
||||||
(
|
|
||||||
const basicThermoCloud&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const basicThermoCloud&);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
//- Runtime type information
|
|
||||||
TypeName("basicThermoCloud");
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct given carrier gas fields
|
|
||||||
basicThermoCloud
|
|
||||||
(
|
|
||||||
const word& cloudName,
|
|
||||||
const volScalarField& rho,
|
|
||||||
const volVectorField& U,
|
|
||||||
const dimensionedVector& g,
|
|
||||||
basicThermo& thermo
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
~basicThermoCloud();
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,50 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration |
|
|
||||||
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by the
|
|
||||||
Free Software Foundation; either version 2 of the License, or (at your
|
|
||||||
option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef createReactingCloudTypes_H
|
|
||||||
#define createReactingCloudTypes_H
|
|
||||||
|
|
||||||
#include "thermoPhysicsTypes.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#define createReactingCloudType(CloudType) \
|
|
||||||
\
|
|
||||||
createReactingCloudThermoType(CloudType, constGasThermoPhysics); \
|
|
||||||
createReactingCloudThermoType(CloudType, gasThermoPhysics); \
|
|
||||||
createReactingCloudThermoType(CloudType, icoPoly8ThermoPhysics);
|
|
||||||
|
|
||||||
|
|
||||||
#define createReactingCloudThermoType(CloudType, ThermoType) \
|
|
||||||
\
|
|
||||||
defineTemplateTypeNameAndDebug(CloudType<ThermoType>, 0);
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -520,10 +520,10 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- Read
|
||||||
static void readFields(KinematicCloud<ParcelType>& c);
|
static void readFields(Cloud<ParcelType>& c);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
static void writeFields(const KinematicCloud<ParcelType>& c);
|
static void writeFields(const Cloud<ParcelType>& c);
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|||||||
@ -103,10 +103,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::KinematicParcel<ParcelType>::readFields
|
void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||||
(
|
|
||||||
KinematicCloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!c.size())
|
||||||
{
|
{
|
||||||
@ -153,10 +150,7 @@ void Foam::KinematicParcel<ParcelType>::readFields
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::KinematicParcel<ParcelType>::writeFields
|
void Foam::KinematicParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
||||||
(
|
|
||||||
const KinematicCloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Particle<ParcelType>::writeFields(c);
|
Particle<ParcelType>::writeFields(c);
|
||||||
|
|
||||||
|
|||||||
@ -399,13 +399,10 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- Read
|
||||||
static void readFields(ReactingMultiphaseCloud<ParcelType>& c);
|
static void readFields(Cloud<ParcelType>& c);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
static void writeFields
|
static void writeFields(const Cloud<ParcelType>& c);
|
||||||
(
|
|
||||||
const ReactingMultiphaseCloud<ParcelType>& c
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|||||||
@ -94,14 +94,17 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
||||||
(
|
(
|
||||||
ReactingMultiphaseCloud<ParcelType>& c
|
Cloud<ParcelType>& cIn
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!cIn.size())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReactingMultiphaseCloud<ParcelType>& c =
|
||||||
|
dynamic_cast<ReactingMultiphaseCloud<ParcelType>&>(cIn);
|
||||||
|
|
||||||
ReactingParcel<ParcelType>::readFields(c);
|
ReactingParcel<ParcelType>::readFields(c);
|
||||||
|
|
||||||
// Get names and sizes for each Y...
|
// Get names and sizes for each Y...
|
||||||
@ -185,9 +188,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields
|
||||||
(
|
(
|
||||||
const ReactingMultiphaseCloud<ParcelType>& c
|
const Cloud<ParcelType>& cIn
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const ReactingMultiphaseCloud<ParcelType>& c =
|
||||||
|
dynamic_cast<const ReactingMultiphaseCloud<ParcelType>&>(cIn);
|
||||||
|
|
||||||
ReactingParcel<ParcelType>::writeFields(c);
|
ReactingParcel<ParcelType>::writeFields(c);
|
||||||
|
|
||||||
label np = c.size();
|
label np = c.size();
|
||||||
|
|||||||
@ -348,10 +348,10 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- Read
|
||||||
static void readFields(ReactingCloud<ParcelType>& c);
|
static void readFields(Cloud<ParcelType>& c);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
static void writeFields(const ReactingCloud<ParcelType>& c);
|
static void writeFields(const Cloud<ParcelType>& c);
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|||||||
@ -88,16 +88,16 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingParcel<ParcelType>::readFields
|
void Foam::ReactingParcel<ParcelType>::readFields(Cloud<ParcelType>& cIn)
|
||||||
(
|
|
||||||
ReactingCloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!cIn.size())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReactingCloud<ParcelType>& c =
|
||||||
|
dynamic_cast<ReactingCloud<ParcelType>&>(cIn);
|
||||||
|
|
||||||
ThermoParcel<ParcelType>::readFields(c);
|
ThermoParcel<ParcelType>::readFields(c);
|
||||||
|
|
||||||
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::MUST_READ));
|
IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::MUST_READ));
|
||||||
@ -152,12 +152,15 @@ void Foam::ReactingParcel<ParcelType>::readFields
|
|||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ReactingParcel<ParcelType>::writeFields
|
void Foam::ReactingParcel<ParcelType>::writeFields
|
||||||
(
|
(
|
||||||
const ReactingCloud<ParcelType>& c
|
const Cloud<ParcelType>& cIn
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
const ReactingCloud<ParcelType>& c =
|
||||||
|
dynamic_cast<const ReactingCloud<ParcelType>&>(cIn);
|
||||||
|
|
||||||
ThermoParcel<ParcelType>::writeFields(c);
|
ThermoParcel<ParcelType>::writeFields(c);
|
||||||
|
|
||||||
const label np = c.size();
|
const label np = c.size();
|
||||||
|
|
||||||
if (np > 0)
|
if (np > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -359,10 +359,10 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Read
|
//- Read
|
||||||
static void readFields(ThermoCloud<ParcelType>& c);
|
static void readFields(Cloud<ParcelType>& c);
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
static void writeFields(const ThermoCloud<ParcelType>& c);
|
static void writeFields(const Cloud<ParcelType>& c);
|
||||||
|
|
||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|||||||
@ -79,10 +79,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ThermoParcel<ParcelType>::readFields
|
void Foam::ThermoParcel<ParcelType>::readFields(Cloud<ParcelType>& c)
|
||||||
(
|
|
||||||
ThermoCloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!c.size())
|
||||||
{
|
{
|
||||||
@ -111,10 +108,7 @@ void Foam::ThermoParcel<ParcelType>::readFields
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
void Foam::ThermoParcel<ParcelType>::writeFields
|
void Foam::ThermoParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c)
|
||||||
(
|
|
||||||
const ThermoCloud<ParcelType>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
KinematicParcel<ParcelType>::writeFields(c);
|
KinematicParcel<ParcelType>::writeFields(c);
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,8 @@ Class
|
|||||||
Foam::particleForces
|
Foam::particleForces
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Particle forces
|
Provides a mechanism to calculate particle forces
|
||||||
|
Note: forces are force per unit mass (accelerations)
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
particleForces.C
|
particleForces.C
|
||||||
|
|||||||
@ -58,7 +58,7 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::Sh
|
|||||||
const scalar Sc
|
const scalar Sc
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return 2.0 + 0.6*Foam::sqrt(Re)*pow(Sc, 0.333);
|
return 2.0 + 0.6*Foam::sqrt(Re)*cbrt(Sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -115,42 +115,42 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the cloud dictionary
|
//- Return the cloud dictionary
|
||||||
const dictionary& dict() const;
|
const dictionary& dict() const;
|
||||||
|
|
||||||
//- Return the coefficients dictionary
|
//- Return the coefficients dictionary
|
||||||
const dictionary& coeffDict() const;
|
const dictionary& coeffDict() const;
|
||||||
|
|
||||||
//- Return the owner cloud object
|
//- Return the owner cloud object
|
||||||
const CloudType& owner() const;
|
const CloudType& owner() const;
|
||||||
|
|
||||||
//- Return the Bird htc correction flag
|
//- Return the Bird htc correction flag
|
||||||
const Switch& BirdCorrection() const;
|
const Switch& BirdCorrection() const;
|
||||||
|
|
||||||
//- Flag to indicate whether model activates heat transfer model
|
//- Flag to indicate whether model activates heat transfer model
|
||||||
virtual bool active() const = 0;
|
virtual bool active() const = 0;
|
||||||
|
|
||||||
|
|
||||||
// Evaluation
|
// Evaluation
|
||||||
|
|
||||||
//- Nusselt number
|
//- Nusselt number
|
||||||
virtual scalar Nu
|
virtual scalar Nu
|
||||||
(
|
(
|
||||||
const scalar Re,
|
const scalar Re,
|
||||||
const scalar Pr
|
const scalar Pr
|
||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return heat transfer coefficient
|
//- Return heat transfer coefficient
|
||||||
virtual scalar htc
|
virtual scalar htc
|
||||||
(
|
(
|
||||||
const scalar dp,
|
const scalar dp,
|
||||||
const scalar Re,
|
const scalar Re,
|
||||||
const scalar Pr,
|
const scalar Pr,
|
||||||
const scalar kappa,
|
const scalar kappa,
|
||||||
const scalar NCpW
|
const scalar NCpW
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,7 @@ Description
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class NoHeatTransfer Declaration
|
Class NoHeatTransfer Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -39,6 +39,7 @@ Description
|
|||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class RanzMarshall Declaration
|
Class RanzMarshall Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -76,9 +77,6 @@ public:
|
|||||||
//- Flag to indicate whether model activates heat transfer model
|
//- Flag to indicate whether model activates heat transfer model
|
||||||
virtual bool active() const;
|
virtual bool active() const;
|
||||||
|
|
||||||
//- Return the Bird correction flag
|
|
||||||
const Switch& BirdCorrection() const;
|
|
||||||
|
|
||||||
|
|
||||||
// Evaluation
|
// Evaluation
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ if (runTime.outputTime())
|
|||||||
|
|
||||||
averageTemperature =
|
averageTemperature =
|
||||||
(
|
(
|
||||||
2.0/(moleculeCloud::kb * accumulatedDOFs)
|
2.0/(physicoChemical::k.value()*accumulatedDOFs)
|
||||||
*
|
*
|
||||||
(
|
(
|
||||||
accumulatedTotalLinearKE + accumulatedTotalAngularKE
|
accumulatedTotalLinearKE + accumulatedTotalAngularKE
|
||||||
@ -70,10 +70,8 @@ if (runTime.outputTime())
|
|||||||
(
|
(
|
||||||
(
|
(
|
||||||
(accumulatedNMols/nAveragingSteps)
|
(accumulatedNMols/nAveragingSteps)
|
||||||
*
|
*physicoChemical::k.value()*averageTemperature
|
||||||
moleculeCloud::kb * averageTemperature
|
+ accumulatedTotalrDotfSum/(6.0*nAveragingSteps)
|
||||||
+
|
|
||||||
accumulatedTotalrDotfSum/(6.0 * nAveragingSteps)
|
|
||||||
)
|
)
|
||||||
/
|
/
|
||||||
meshVolume
|
meshVolume
|
||||||
|
|||||||
@ -382,9 +382,12 @@ public:
|
|||||||
int&
|
int&
|
||||||
);
|
);
|
||||||
|
|
||||||
static void readFields(moleculeCloud& mC);
|
|
||||||
|
|
||||||
static void writeFields(const moleculeCloud& mC);
|
// I-O
|
||||||
|
|
||||||
|
static void readFields(Cloud<molecule>& mC);
|
||||||
|
|
||||||
|
static void writeFields(const Cloud<molecule>& mC);
|
||||||
|
|
||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|||||||
@ -98,7 +98,7 @@ Foam::molecule::molecule
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::molecule::readFields(moleculeCloud& mC)
|
void Foam::molecule::readFields(Cloud<molecule>& mC)
|
||||||
{
|
{
|
||||||
if (!mC.size())
|
if (!mC.size())
|
||||||
{
|
{
|
||||||
@ -150,7 +150,7 @@ void Foam::molecule::readFields(moleculeCloud& mC)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::molecule::writeFields(const moleculeCloud& mC)
|
void Foam::molecule::writeFields(const Cloud<molecule>& mC)
|
||||||
{
|
{
|
||||||
Particle<molecule>::writeFields(mC);
|
Particle<molecule>::writeFields(mC);
|
||||||
|
|
||||||
@ -241,9 +241,10 @@ void Foam::molecule::writeFields(const moleculeCloud& mC)
|
|||||||
orientation2.write();
|
orientation2.write();
|
||||||
orientation3.write();
|
orientation3.write();
|
||||||
|
|
||||||
mC.writeXYZ
|
const moleculeCloud& m = dynamic_cast<const moleculeCloud&>(mC);
|
||||||
|
m.writeXYZ
|
||||||
(
|
(
|
||||||
mC.mesh().time().timePath() + "/lagrangian" + "/moleculeCloud.xmol"
|
m.mesh().time().timePath() + "/lagrangian" + "/moleculeCloud.xmol"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,8 @@ License
|
|||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "mathConstants.H"
|
#include "mathConstants.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -36,13 +38,6 @@ namespace Foam
|
|||||||
defineTemplateTypeNameAndDebug(Cloud<molecule>, 0);
|
defineTemplateTypeNameAndDebug(Cloud<molecule>, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
Foam::scalar Foam::moleculeCloud::kb = 1.380650277e-23;
|
|
||||||
|
|
||||||
Foam::scalar Foam::moleculeCloud::elementaryCharge = 1.602176487e-19;
|
|
||||||
|
|
||||||
Foam::scalar Foam::moleculeCloud::vacuumPermittivity = 8.854187817e-12;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::moleculeCloud::buildConstProps()
|
void Foam::moleculeCloud::buildConstProps()
|
||||||
@ -103,9 +98,7 @@ void Foam::moleculeCloud::buildConstProps()
|
|||||||
|
|
||||||
void Foam::moleculeCloud::setSiteSizesAndPositions()
|
void Foam::moleculeCloud::setSiteSizesAndPositions()
|
||||||
{
|
{
|
||||||
iterator mol(this->begin());
|
forAllIter(moleculeCloud, *this, mol)
|
||||||
|
|
||||||
for (mol = this->begin(); mol != this->end(); ++mol)
|
|
||||||
{
|
{
|
||||||
const molecule::constantProperties& cP = constProps(mol().id());
|
const molecule::constantProperties& cP = constProps(mol().id());
|
||||||
|
|
||||||
@ -123,14 +116,7 @@ void Foam::moleculeCloud::buildCellOccupancy()
|
|||||||
cellOccupancy_[cO].clear();
|
cellOccupancy_[cO].clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator mol(this->begin());
|
forAllIter(moleculeCloud, *this, mol)
|
||||||
|
|
||||||
for
|
|
||||||
(
|
|
||||||
mol = this->begin();
|
|
||||||
mol != this->end();
|
|
||||||
++mol
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
cellOccupancy_[mol().cell()].append(&mol());
|
cellOccupancy_[mol().cell()].append(&mol());
|
||||||
}
|
}
|
||||||
@ -225,9 +211,7 @@ void Foam::moleculeCloud::calculateTetherForce()
|
|||||||
{
|
{
|
||||||
const tetherPotentialList& tetherPot(pot_.tetherPotentials());
|
const tetherPotentialList& tetherPot(pot_.tetherPotentials());
|
||||||
|
|
||||||
iterator mol(this->begin());
|
forAllIter(moleculeCloud, *this, mol)
|
||||||
|
|
||||||
for (mol = this->begin(); mol != this->end(); ++mol)
|
|
||||||
{
|
{
|
||||||
if (mol().tethered())
|
if (mol().tethered())
|
||||||
{
|
{
|
||||||
@ -252,9 +236,7 @@ void Foam::moleculeCloud::calculateTetherForce()
|
|||||||
|
|
||||||
void Foam::moleculeCloud::calculateExternalForce()
|
void Foam::moleculeCloud::calculateExternalForce()
|
||||||
{
|
{
|
||||||
iterator mol(this->begin());
|
forAllIter(moleculeCloud, *this, mol)
|
||||||
|
|
||||||
for (mol = this->begin(); mol != this->end(); ++mol)
|
|
||||||
{
|
{
|
||||||
mol().a() += pot_.gravity();
|
mol().a() += pot_.gravity();
|
||||||
}
|
}
|
||||||
@ -624,11 +606,11 @@ void Foam::moleculeCloud::initialiseMolecules
|
|||||||
zoneDict.lookup("orientationAngles")
|
zoneDict.lookup("orientationAngles")
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar phi(orientationAngles.x()*constant::math::pi/180.0);
|
scalar phi(orientationAngles.x()*math::pi/180.0);
|
||||||
|
|
||||||
scalar theta(orientationAngles.y()*constant::math::pi/180.0);
|
scalar theta(orientationAngles.y()*math::pi/180.0);
|
||||||
|
|
||||||
scalar psi(orientationAngles.z()*constant::math::pi/180.0);
|
scalar psi(orientationAngles.z()*math::pi/180.0);
|
||||||
|
|
||||||
const tensor R
|
const tensor R
|
||||||
(
|
(
|
||||||
@ -994,11 +976,11 @@ void Foam::moleculeCloud::createMolecule
|
|||||||
{
|
{
|
||||||
pi = equipartitionAngularMomentum(temperature, cP);
|
pi = equipartitionAngularMomentum(temperature, cP);
|
||||||
|
|
||||||
scalar phi(rndGen_.scalar01()*constant::math::twoPi);
|
scalar phi(rndGen_.scalar01()*math::twoPi);
|
||||||
|
|
||||||
scalar theta(rndGen_.scalar01()*constant::math::twoPi);
|
scalar theta(rndGen_.scalar01()*math::twoPi);
|
||||||
|
|
||||||
scalar psi(rndGen_.scalar01()*constant::math::twoPi);
|
scalar psi(rndGen_.scalar01()*math::twoPi);
|
||||||
|
|
||||||
Q = tensor
|
Q = tensor
|
||||||
(
|
(
|
||||||
@ -1039,9 +1021,7 @@ Foam::label Foam::moleculeCloud::nSites() const
|
|||||||
{
|
{
|
||||||
label n = 0;
|
label n = 0;
|
||||||
|
|
||||||
const_iterator mol(this->begin());
|
forAllConstIter(moleculeCloud, *this, mol)
|
||||||
|
|
||||||
for (mol = this->begin(); mol != this->end(); ++mol)
|
|
||||||
{
|
{
|
||||||
n += constProps(mol().id()).nSites();
|
n += constProps(mol().id()).nSites();
|
||||||
}
|
}
|
||||||
@ -1055,7 +1035,8 @@ Foam::label Foam::moleculeCloud::nSites() const
|
|||||||
Foam::moleculeCloud::moleculeCloud
|
Foam::moleculeCloud::moleculeCloud
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const potential& pot
|
const potential& pot,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<molecule>(mesh, "moleculeCloud", false),
|
Cloud<molecule>(mesh, "moleculeCloud", false),
|
||||||
@ -1066,7 +1047,10 @@ Foam::moleculeCloud::moleculeCloud
|
|||||||
constPropList_(),
|
constPropList_(),
|
||||||
rndGen_(clock::getTime())
|
rndGen_(clock::getTime())
|
||||||
{
|
{
|
||||||
molecule::readFields(*this);
|
if (readFields)
|
||||||
|
{
|
||||||
|
molecule::readFields(*this);
|
||||||
|
}
|
||||||
|
|
||||||
buildConstProps();
|
buildConstProps();
|
||||||
|
|
||||||
@ -1082,9 +1066,10 @@ Foam::moleculeCloud::moleculeCloud
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const potential& pot,
|
const potential& pot,
|
||||||
const IOdictionary& mdInitialiseDict
|
const IOdictionary& mdInitialiseDict,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<molecule>(mesh, "moleculeCloud", false),
|
Cloud<molecule>(mesh, "moleculeCloud", false),
|
||||||
mesh_(mesh),
|
mesh_(mesh),
|
||||||
pot_(pot),
|
pot_(pot),
|
||||||
@ -1092,7 +1077,10 @@ Foam::moleculeCloud::moleculeCloud
|
|||||||
constPropList_(),
|
constPropList_(),
|
||||||
rndGen_(clock::getTime())
|
rndGen_(clock::getTime())
|
||||||
{
|
{
|
||||||
molecule::readFields(*this);
|
if (readFields)
|
||||||
|
{
|
||||||
|
molecule::readFields(*this);
|
||||||
|
}
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
@ -1126,10 +1114,8 @@ void Foam::moleculeCloud::calculateForce()
|
|||||||
{
|
{
|
||||||
buildCellOccupancy();
|
buildCellOccupancy();
|
||||||
|
|
||||||
iterator mol(this->begin());
|
|
||||||
|
|
||||||
// Set accumulated quantities to zero
|
// Set accumulated quantities to zero
|
||||||
for (mol = this->begin(); mol != this->end(); ++mol)
|
forAllIter(moleculeCloud, *this, mol)
|
||||||
{
|
{
|
||||||
mol().siteForces() = vector::zero;
|
mol().siteForces() = vector::zero;
|
||||||
|
|
||||||
@ -1166,9 +1152,7 @@ void Foam::moleculeCloud::applyConstraintsAndThermostats
|
|||||||
<< "----------------------------------------"
|
<< "----------------------------------------"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
iterator mol(this->begin());
|
forAllIter(moleculeCloud, *this, mol)
|
||||||
|
|
||||||
for (mol = this->begin(); mol != this->end(); ++mol)
|
|
||||||
{
|
{
|
||||||
mol().v() *= temperatureCorrectionFactor;
|
mol().v() *= temperatureCorrectionFactor;
|
||||||
|
|
||||||
@ -1177,21 +1161,13 @@ void Foam::moleculeCloud::applyConstraintsAndThermostats
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::moleculeCloud::writeFields() const
|
|
||||||
{
|
|
||||||
molecule::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::moleculeCloud::writeXYZ(const fileName& fName) const
|
void Foam::moleculeCloud::writeXYZ(const fileName& fName) const
|
||||||
{
|
{
|
||||||
OFstream str(fName);
|
OFstream str(fName);
|
||||||
|
|
||||||
str << nSites() << nl << "moleculeCloud site positions in angstroms" << nl;
|
str << nSites() << nl << "moleculeCloud site positions in angstroms" << nl;
|
||||||
|
|
||||||
const_iterator mol(this->begin());
|
forAllConstIter(moleculeCloud, *this, mol)
|
||||||
|
|
||||||
for (mol = this->begin(); mol != this->end(); ++mol)
|
|
||||||
{
|
{
|
||||||
const molecule::constantProperties& cP = constProps(mol().id());
|
const molecule::constantProperties& cP = constProps(mol().id());
|
||||||
|
|
||||||
|
|||||||
@ -156,22 +156,14 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static data members
|
|
||||||
|
|
||||||
static scalar kb;
|
|
||||||
|
|
||||||
static scalar elementaryCharge;
|
|
||||||
|
|
||||||
static scalar vacuumPermittivity;
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given mesh and potential references
|
//- Construct given mesh and potential references
|
||||||
moleculeCloud
|
moleculeCloud
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const potential& pot
|
const potential& pot,
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct given mesh, potential and mdInitialiseDict
|
//- Construct given mesh, potential and mdInitialiseDict
|
||||||
@ -179,7 +171,8 @@ public:
|
|||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const potential& pot,
|
const potential& pot,
|
||||||
const IOdictionary& mdInitialiseDict
|
const IOdictionary& mdInitialiseDict,
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -217,9 +210,6 @@ public:
|
|||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
void writeFields() const;
|
|
||||||
|
|
||||||
//- Write molecule sites in XYZ format
|
//- Write molecule sites in XYZ format
|
||||||
void writeXYZ(const fileName& fName) const;
|
void writeXYZ(const fileName& fName) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -24,6 +24,10 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "constants.H"
|
||||||
|
|
||||||
|
using namespace Foam::constant;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
inline void Foam::moleculeCloud::evaluatePair
|
inline void Foam::moleculeCloud::evaluatePair
|
||||||
@ -576,7 +580,7 @@ inline Foam::vector Foam::moleculeCloud::equipartitionLinearVelocity
|
|||||||
scalar mass
|
scalar mass
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return sqrt(kb*temperature/mass)*vector
|
return sqrt(physicoChemical::k.value()*temperature/mass)*vector
|
||||||
(
|
(
|
||||||
rndGen_.GaussNormal(),
|
rndGen_.GaussNormal(),
|
||||||
rndGen_.GaussNormal(),
|
rndGen_.GaussNormal(),
|
||||||
@ -591,7 +595,7 @@ inline Foam::vector Foam::moleculeCloud::equipartitionAngularMomentum
|
|||||||
const molecule::constantProperties& cP
|
const molecule::constantProperties& cP
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar sqrtKbT = sqrt(kb*temperature);
|
scalar sqrtKbT = sqrt(physicoChemical::k.value()*temperature);
|
||||||
|
|
||||||
if (cP.linearMolecule())
|
if (cP.linearMolecule())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,7 +42,8 @@ namespace Foam
|
|||||||
Foam::solidParticleCloud::solidParticleCloud
|
Foam::solidParticleCloud::solidParticleCloud
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
const word& cloudName
|
const word& cloudName,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<solidParticle>(mesh, cloudName, false),
|
Cloud<solidParticle>(mesh, cloudName, false),
|
||||||
@ -62,7 +63,10 @@ Foam::solidParticleCloud::solidParticleCloud
|
|||||||
e_(dimensionedScalar(particleProperties_.lookup("e")).value()),
|
e_(dimensionedScalar(particleProperties_.lookup("e")).value()),
|
||||||
mu_(dimensionedScalar(particleProperties_.lookup("mu")).value())
|
mu_(dimensionedScalar(particleProperties_.lookup("mu")).value())
|
||||||
{
|
{
|
||||||
solidParticle::readFields(*this);
|
if (readFields)
|
||||||
|
{
|
||||||
|
solidParticle::readFields(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -84,10 +88,4 @@ void Foam::solidParticleCloud::move(const dimensionedVector& g)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::solidParticleCloud::writeFields() const
|
|
||||||
{
|
|
||||||
solidParticle::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -86,7 +86,8 @@ public:
|
|||||||
solidParticleCloud
|
solidParticleCloud
|
||||||
(
|
(
|
||||||
const fvMesh&,
|
const fvMesh&,
|
||||||
const word& cloudName = "defaultCloud"
|
const word& cloudName = "defaultCloud",
|
||||||
|
bool readFields = true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -106,12 +107,6 @@ public:
|
|||||||
//- Move the particles under the influence of the given
|
//- Move the particles under the influence of the given
|
||||||
// gravitational acceleration
|
// gravitational acceleration
|
||||||
void move(const dimensionedVector& g);
|
void move(const dimensionedVector& g);
|
||||||
|
|
||||||
|
|
||||||
// Write
|
|
||||||
|
|
||||||
//- Write fields
|
|
||||||
virtual void writeFields() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,7 @@ bool Foam::triangleFuncs::intersectAxesBundle
|
|||||||
// V10:(-1.285715 8.99165e-16 -1.142858)
|
// V10:(-1.285715 8.99165e-16 -1.142858)
|
||||||
// V20:(0 0 -1.678573)
|
// V20:(0 0 -1.678573)
|
||||||
// i0:0
|
// i0:0
|
||||||
if (Foam::mag(det)/localScale < SMALL)
|
if (localScale < VSMALL || Foam::mag(det)/localScale < SMALL)
|
||||||
{
|
{
|
||||||
// Triangle parallel to dir
|
// Triangle parallel to dir
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -7,6 +7,5 @@ wmake libso forces
|
|||||||
wmake libso IO
|
wmake libso IO
|
||||||
wmake libso utilities
|
wmake libso utilities
|
||||||
wmake libso systemCall
|
wmake libso systemCall
|
||||||
wmake libso zones
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|||||||
@ -387,10 +387,7 @@ void Foam::streamLineParticle::hitPatch
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::streamLineParticle::readFields
|
void Foam::streamLineParticle::readFields(Cloud<streamLineParticle>& c)
|
||||||
(
|
|
||||||
Cloud<streamLineParticle>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (!c.size())
|
if (!c.size())
|
||||||
{
|
{
|
||||||
@ -426,10 +423,7 @@ void Foam::streamLineParticle::readFields
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::streamLineParticle::writeFields
|
void Foam::streamLineParticle::writeFields(const Cloud<streamLineParticle>& c)
|
||||||
(
|
|
||||||
const Cloud<streamLineParticle>& c
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
Particle<streamLineParticle>::writeFields(c);
|
Particle<streamLineParticle>::writeFields(c);
|
||||||
|
|
||||||
|
|||||||
@ -26,15 +26,11 @@ License
|
|||||||
|
|
||||||
#include "streamLineParticleCloud.H"
|
#include "streamLineParticleCloud.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
defineTemplateTypeNameAndDebug(Cloud<streamLineParticle>, 0);
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
defineTemplateTypeNameAndDebug(Cloud<streamLineParticle>, 0);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -42,12 +38,16 @@ defineTemplateTypeNameAndDebug(Cloud<streamLineParticle>, 0);
|
|||||||
Foam::streamLineParticleCloud::streamLineParticleCloud
|
Foam::streamLineParticleCloud::streamLineParticleCloud
|
||||||
(
|
(
|
||||||
const polyMesh& mesh,
|
const polyMesh& mesh,
|
||||||
const word& cloudName
|
const word& cloudName,
|
||||||
|
bool readFields
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
Cloud<streamLineParticle>(mesh, cloudName, false)
|
Cloud<streamLineParticle>(mesh, cloudName, false)
|
||||||
{
|
{
|
||||||
readFields();
|
if (readFields)
|
||||||
|
{
|
||||||
|
streamLineParticle::readFields(*this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -62,18 +62,4 @@ Foam::streamLineParticleCloud::streamLineParticleCloud
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::streamLineParticleCloud::readFields()
|
|
||||||
{
|
|
||||||
streamLineParticle::readFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::streamLineParticleCloud::writeFields() const
|
|
||||||
{
|
|
||||||
streamLineParticle::writeFields(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user