Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

Conflicts:
	src/thermophysicalModels/radiationModels/derivedFvPatchFields/radiationCoupledBase/radiationCoupledBase.C
This commit is contained in:
sergio
2012-10-04 11:01:41 +01:00
153 changed files with 1237 additions and 1737 deletions

View File

@ -7,6 +7,7 @@
#include "pointSet.H" #include "pointSet.H"
#include "IOmanip.H" #include "IOmanip.H"
#include "emptyPolyPatch.H" #include "emptyPolyPatch.H"
#include "processorPolyPatch.H"
Foam::label Foam::checkTopology Foam::label Foam::checkTopology
( (
@ -289,10 +290,18 @@ Foam::label Foam::checkTopology
} }
} }
if (!Pstream::parRun())
{ {
Pout<< "\nChecking patch topology for multiply connected surfaces ..." if (!Pstream::parRun())
<< endl; {
Info<< "\nChecking patch topology for multiply connected"
<< " surfaces..." << endl;
}
else
{
Info<< "\nChecking basic patch addressing..." << endl;
}
const polyBoundaryMesh& patches = mesh.boundaryMesh(); const polyBoundaryMesh& patches = mesh.boundaryMesh();
@ -301,90 +310,101 @@ Foam::label Foam::checkTopology
( (
mesh, mesh,
"nonManifoldPoints", "nonManifoldPoints",
mesh.nPoints()/100 mesh.nPoints()/1000
); );
Pout.setf(ios_base::left); Pout.setf(ios_base::left);
Pout<< " " Info<< " "
<< setw(20) << "Patch" << setw(20) << "Patch"
<< setw(9) << "Faces" << setw(9) << "Faces"
<< setw(9) << "Points" << setw(9) << "Points";
<< setw(34) << "Surface topology"; if (!Pstream::parRun())
{
Info<< setw(34) << "Surface topology";
}
if (allGeometry) if (allGeometry)
{ {
Pout<< " Bounding box"; Info<< " Bounding box";
} }
Pout<< endl; Info<< endl;
forAll(patches, patchI) forAll(patches, patchI)
{ {
const polyPatch& pp = patches[patchI]; const polyPatch& pp = patches[patchI];
Pout<< " " if (!isA<processorPolyPatch>(pp))
{
Info<< " "
<< setw(20) << pp.name() << setw(20) << pp.name()
<< setw(9) << pp.size() << setw(9) << returnReduce(pp.size(), sumOp<label>())
<< setw(9) << pp.nPoints(); << setw(9) << returnReduce(pp.nPoints(), sumOp<label>());
if (!Pstream::parRun())
primitivePatch::surfaceTopo pTyp = pp.surfaceType();
if (pp.empty())
{
Pout<< setw(34) << "ok (empty)";
}
else if (pTyp == primitivePatch::MANIFOLD)
{
if (pp.checkPointManifold(true, &points))
{ {
Pout<< setw(34) << "multiply connected (shared point)"; primitivePatch::surfaceTopo pTyp = pp.surfaceType();
}
else
{
Pout<< setw(34) << "ok (closed singly connected)";
}
// Add points on non-manifold edges to make set complete if (pp.empty())
pp.checkTopology(false, &points);
}
else
{
pp.checkTopology(false, &points);
if (pTyp == primitivePatch::OPEN)
{
Pout<< setw(34) << "ok (non-closed singly connected)";
}
else
{
Pout<< setw(34) << "multiply connected (shared edge)";
}
}
if (allGeometry)
{
const pointField& pts = pp.points();
const labelList& mp = pp.meshPoints();
if (returnReduce(mp.size(), sumOp<label>()) > 0)
{
boundBox bb(point::max, point::min);
forAll (mp, i)
{ {
bb.min() = min(bb.min(), pts[mp[i]]); Info<< setw(34) << "ok (empty)";
bb.max() = max(bb.max(), pts[mp[i]]); }
else if (pTyp == primitivePatch::MANIFOLD)
{
if (pp.checkPointManifold(true, &points))
{
Info<< setw(34)
<< "multiply connected (shared point)";
}
else
{
Info<< setw(34) << "ok (closed singly connected)";
}
// Add points on non-manifold edges to make set complete
pp.checkTopology(false, &points);
}
else
{
pp.checkTopology(false, &points);
if (pTyp == primitivePatch::OPEN)
{
Info<< setw(34)
<< "ok (non-closed singly connected)";
}
else
{
Info<< setw(34)
<< "multiply connected (shared edge)";
}
} }
reduce(bb.min(), minOp<vector>());
reduce(bb.max(), maxOp<vector>());
Pout<< ' ' << bb;
} }
if (allGeometry)
{
const pointField& pts = pp.points();
const labelList& mp = pp.meshPoints();
if (returnReduce(mp.size(), sumOp<label>()) > 0)
{
boundBox bb(point::max, point::min);
forAll (mp, i)
{
bb.min() = min(bb.min(), pts[mp[i]]);
bb.max() = max(bb.max(), pts[mp[i]]);
}
reduce(bb.min(), minOp<vector>());
reduce(bb.max(), maxOp<vector>());
Info<< ' ' << bb;
}
}
Info<< endl;
} }
Pout<< endl;
} }
if (points.size()) if (points.size())
{ {
Pout<< " <<Writing " << points.size() Info<< " <<Writing " << returnReduce(points.size(), sumOp<label>())
<< " conflicting points to set " << " conflicting points to set "
<< points.name() << endl; << points.name() << endl;
@ -392,7 +412,7 @@ Foam::label Foam::checkTopology
points.write(); points.write();
} }
//Pout.setf(ios_base::right); //Info.setf(ios_base::right);
} }
// Force creation of all addressing if requested. // Force creation of all addressing if requested.

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -115,6 +115,7 @@ int main(int argc, char *argv[])
runTimeMaster runTimeMaster
) )
); );
const word oldInstance = masterMesh.pointsInstance();
Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << nl; Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << nl;
@ -139,7 +140,13 @@ int main(int argc, char *argv[])
masterMesh.addMesh(meshToAdd); masterMesh.addMesh(meshToAdd);
masterMesh.merge(); masterMesh.merge();
masterMesh.polyMesh::write();
if (overwrite)
{
masterMesh.setInstance(oldInstance);
}
masterMesh.write();
Info<< "\nEnd\n" << endl; Info<< "\nEnd\n" << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -167,6 +167,26 @@ void getSymbolForRaw
} }
void error::safePrintStack(std::ostream& os)
{
// Get raw stack symbols
void *array[100];
size_t size = backtrace(array, 100);
char **strings = backtrace_symbols(array, size);
// See if they contain function between () e.g. "(__libc_start_main+0xd0)"
// and see if cplus_demangle can make sense of part before +
for (size_t i = 0; i < size; i++)
{
string msg(strings[i]);
fileName programFile;
word address;
os << '#' << label(i) << '\t' << msg << std::endl;
}
}
void error::printStack(Ostream& os) void error::printStack(Ostream& os)
{ {
// Reads the starting addresses for the dynamically linked libraries // Reads the starting addresses for the dynamically linked libraries

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -29,8 +29,7 @@ Description
SourceFiles SourceFiles
ISstreamI.H ISstreamI.H
ISread.C ISstream.C
ISreadToken.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -162,6 +162,10 @@ public:
operator dictionary() const; operator dictionary() const;
//- Helper function to print a stack (if OpenFOAM IO not yet
// initialised)
static void safePrintStack(std::ostream&);
//- Helper function to print a stack //- Helper function to print a stack
static void printStack(Ostream&); static void printStack(Ostream&);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -121,6 +121,17 @@ public:
} }
// Member functions
// Access
//- Return true if this patch field fixes a value
virtual bool fixesValue() const
{
return true;
}
// Member operators // Member operators
// Disable assignment operators // Disable assignment operators

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -278,6 +278,12 @@ public:
return internalField_; return internalField_;
} }
//- Return true if this patch field fixes a value
virtual bool fixesValue() const
{
return false;
}
//- Return true if this patch field is coupled //- Return true if this patch field is coupled
virtual bool coupled() const virtual bool coupled() const
{ {

View File

@ -710,7 +710,8 @@ void Foam::autoLayerDriver::setNumLayers
const indirectPrimitivePatch& pp, const indirectPrimitivePatch& pp,
pointField& patchDisp, pointField& patchDisp,
labelList& patchNLayers, labelList& patchNLayers,
List<extrudeMode>& extrudeStatus List<extrudeMode>& extrudeStatus,
label& nAddedCells
) const ) const
{ {
const fvMesh& mesh = meshRefiner_.mesh(); const fvMesh& mesh = meshRefiner_.mesh();
@ -797,6 +798,24 @@ void Foam::autoLayerDriver::setNumLayers
} }
} }
// Calculate number of cells to create
nAddedCells = 0;
forAll(pp.localFaces(), faceI)
{
const face& f = pp.localFaces()[faceI];
// Get max of extrusion per point
label nCells = 0;
forAll(f, fp)
{
nCells = max(nCells, patchNLayers[f[fp]]);
}
nAddedCells += nCells;
}
reduce(nAddedCells, sumOp<label>());
//reduce(nConflicts, sumOp<label>()); //reduce(nConflicts, sumOp<label>());
// //
//Info<< "Set displacement to zero for " << nConflicts //Info<< "Set displacement to zero for " << nConflicts
@ -2491,9 +2510,13 @@ void Foam::autoLayerDriver::addLayers
// extrudeStatus = EXTRUDE. // extrudeStatus = EXTRUDE.
labelList patchNLayers(pp().nPoints(), 0); labelList patchNLayers(pp().nPoints(), 0);
// Ideal number of cells added
label nIdealAddedCells = 0;
// Whether to add edge for all pp.localPoints. // Whether to add edge for all pp.localPoints.
List<extrudeMode> extrudeStatus(pp().nPoints(), EXTRUDE); List<extrudeMode> extrudeStatus(pp().nPoints(), EXTRUDE);
{ {
// Get number of layer per point from number of layers per patch // Get number of layer per point from number of layers per patch
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -2506,7 +2529,8 @@ void Foam::autoLayerDriver::addLayers
patchDisp, patchDisp,
patchNLayers, patchNLayers,
extrudeStatus extrudeStatus,
nIdealAddedCells
); );
// Precalculate mesh edge labels for patch edges // Precalculate mesh edge labels for patch edges
@ -2776,6 +2800,7 @@ void Foam::autoLayerDriver::addLayers
layerParams.nSmoothNormals(), layerParams.nSmoothNormals(),
layerParams.nSmoothSurfaceNormals(), layerParams.nSmoothSurfaceNormals(),
layerParams.minMedianAxisAngleCos(), layerParams.minMedianAxisAngleCos(),
layerParams.featureAngle(),
dispVec, dispVec,
medialRatio, medialRatio,
@ -3101,10 +3126,24 @@ void Foam::autoLayerDriver::addLayers
label nExtruded = countExtrusion(pp, extrudeStatus); label nExtruded = countExtrusion(pp, extrudeStatus);
label nTotFaces = returnReduce(pp().size(), sumOp<label>()); label nTotFaces = returnReduce(pp().size(), sumOp<label>());
label nAddedCells = 0;
{
forAll(flaggedCells, cellI)
{
if (flaggedCells[cellI])
{
nAddedCells++;
}
}
reduce(nAddedCells, sumOp<label>());
}
Info<< "Extruding " << nExtruded Info<< "Extruding " << nExtruded
<< " out of " << nTotFaces << " out of " << nTotFaces
<< " faces (" << 100.0*nExtruded/nTotFaces << "%)." << " faces (" << 100.0*nExtruded/nTotFaces << "%)."
<< " Removed extrusion at " << nTotChanged << " faces." << " Removed extrusion at " << nTotChanged << " faces."
<< endl
<< "Added " << nAddedCells << " out of " << nIdealAddedCells
<< " cells (" << 100.0*nAddedCells/nIdealAddedCells << "%)."
<< endl; << endl;
if (nTotChanged == 0) if (nTotChanged == 0)

View File

@ -192,7 +192,8 @@ class autoLayerDriver
const indirectPrimitivePatch& pp, const indirectPrimitivePatch& pp,
pointField& patchDisp, pointField& patchDisp,
labelList& patchNLayers, labelList& patchNLayers,
List<extrudeMode>& extrudeStatus List<extrudeMode>& extrudeStatus,
label& nIdealAddedCells
) const; ) const;
//- Helper function to make a pointVectorField with correct //- Helper function to make a pointVectorField with correct
@ -469,6 +470,7 @@ class autoLayerDriver
const label nSmoothNormals, const label nSmoothNormals,
const label nSmoothSurfaceNormals, const label nSmoothSurfaceNormals,
const scalar minMedianAxisAngleCos, const scalar minMedianAxisAngleCos,
const scalar featureAngle,
pointVectorField& dispVec, pointVectorField& dispVec,
pointScalarField& medialRatio, pointScalarField& medialRatio,

View File

@ -33,9 +33,10 @@ Description
#include "motionSmoother.H" #include "motionSmoother.H"
#include "pointData.H" #include "pointData.H"
#include "PointEdgeWave.H" #include "PointEdgeWave.H"
#include "OFstream.H" #include "OBJstream.H"
#include "meshTools.H" #include "meshTools.H"
#include "PatchTools.H" #include "PatchTools.H"
#include "unitConversion.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -775,6 +776,7 @@ void Foam::autoLayerDriver::medialAxisSmoothingInfo
const label nSmoothNormals, const label nSmoothNormals,
const label nSmoothSurfaceNormals, const label nSmoothSurfaceNormals,
const scalar minMedianAxisAngleCos, const scalar minMedianAxisAngleCos,
const scalar featureAngle,
pointVectorField& dispVec, pointVectorField& dispVec,
pointScalarField& medialRatio, pointScalarField& medialRatio,
@ -904,7 +906,7 @@ void Foam::autoLayerDriver::medialAxisSmoothingInfo
const edge& e = edges[edgeI]; const edge& e = edges[edgeI];
// Approximate medial axis location on edge. // Approximate medial axis location on edge.
//const point medialAxisPt = e.centre(points); //const point medialAxisPt = e.centre(points);
vector eVec = e.vec(mesh.points()); vector eVec = e.vec(points);
scalar eMag = mag(eVec); scalar eMag = mag(eVec);
if (eMag > VSMALL) if (eMag > VSMALL)
{ {
@ -961,42 +963,111 @@ void Foam::autoLayerDriver::medialAxisSmoothingInfo
labelHashSet adaptPatches(meshMover.adaptPatchIDs()); labelHashSet adaptPatches(meshMover.adaptPatchIDs());
forAll(patches, patchI) forAll(patches, patchI)
{ {
const polyPatch& pp = patches[patchI]; const polyPatch& pp = patches[patchI];
//const pointPatchVectorField& pvf = const pointPatchVectorField& pvf =
// meshMover.displacement().boundaryField()[patchI]; meshMover.displacement().boundaryField()[patchI];
if if
( (
!pp.coupled() !pp.coupled()
&& !isA<emptyPolyPatch>(pp) && !isA<emptyPolyPatch>(pp)
//&& pvf.constraintType() != word::null //exclude fixedValue
&& !adaptPatches.found(patchI) && !adaptPatches.found(patchI)
) )
{ {
Info<< "Inserting points on patch " << pp.name() << endl;
const labelList& meshPoints = pp.meshPoints(); const labelList& meshPoints = pp.meshPoints();
forAll(meshPoints, i) // Check the type of the patchField. The types are
// - fixedValue (0 or more layers) but the >0 layers have
// already been handled in the adaptPatches loop
// - constraint (but not coupled) types, e.g. symmetryPlane,
// slip.
if (pvf.fixesValue())
{ {
label pointI = meshPoints[i]; // Disable all movement on fixedValue patchFields
Info<< "Inserting all points on patch " << pp.name()
<< endl;
if (!pointMedialDist[pointI].valid(dummyTrackData)) forAll(meshPoints, i)
{ {
maxPoints.append(pointI); label pointI = meshPoints[i];
maxInfo.append if (!pointMedialDist[pointI].valid(dummyTrackData))
( {
pointData maxPoints.append(pointI);
maxInfo.append
( (
points[pointI], pointData
0.0, (
pointI, // passive data points[pointI],
vector::zero // passive data 0.0,
) pointI, // passive data
); vector::zero // passive data
pointMedialDist[pointI] = maxInfo.last(); )
);
pointMedialDist[pointI] = maxInfo.last();
}
}
}
else
{
// Based on geometry: analyse angle w.r.t. nearest moving
// point. In the pointWallDist we transported the
// normal as the passive vector. Note that this points
// out of the originating wall so inside of the domain
// on this patch.
Info<< "Inserting points on patch " << pp.name()
<< " if angle to nearest layer patch > "
<< featureAngle << " degrees." << endl;
scalar featureAngleCos = Foam::cos(degToRad(featureAngle));
pointField pointNormals
(
PatchTools::pointNormals
(
mesh,
pp,
identity(pp.size())+pp.start()
)
);
forAll(meshPoints, i)
{
label pointI = meshPoints[i];
if (!pointMedialDist[pointI].valid(dummyTrackData))
{
// Check if angle not too large.
scalar cosAngle =
(
-pointWallDist[pointI].v()
& pointNormals[i]
);
if (cosAngle > featureAngleCos)
{
// Extrusion direction practically perpendicular
// to the patch. Disable movement at the patch.
maxPoints.append(pointI);
maxInfo.append
(
pointData
(
points[pointI],
0.0,
pointI, // passive data
vector::zero // passive data
)
);
pointMedialDist[pointI] = maxInfo.last();
}
else
{
// Extrusion direction makes angle with patch
// so allow sliding - don't insert zero points
}
}
} }
} }
} }
@ -1141,13 +1212,12 @@ void Foam::autoLayerDriver::shrinkMeshMedialDistance
// reduce thickness where thickness/medial axis distance large // reduce thickness where thickness/medial axis distance large
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
autoPtr<OFstream> str; autoPtr<OBJstream> str;
label vertI = 0;
if (debug) if (debug)
{ {
str.reset str.reset
( (
new OFstream new OBJstream
( (
mesh.time().path() mesh.time().path()
/ "thicknessRatioExcludePoints_" / "thicknessRatioExcludePoints_"
@ -1159,13 +1229,12 @@ void Foam::autoLayerDriver::shrinkMeshMedialDistance
<< str().name() << endl; << str().name() << endl;
} }
autoPtr<OFstream> medialVecStr; autoPtr<OBJstream> medialVecStr;
label medialVertI = 0;
if (debug) if (debug)
{ {
medialVecStr.reset medialVecStr.reset
( (
new OFstream new OBJstream
( (
mesh.time().path() mesh.time().path()
/ "thicknessRatioExcludeMedialVec_" / "thicknessRatioExcludeMedialVec_"
@ -1227,21 +1296,19 @@ void Foam::autoLayerDriver::shrinkMeshMedialDistance
if (str.valid()) if (str.valid())
{ {
const point& pt = mesh.points()[pointI]; const point& pt = mesh.points()[pointI];
meshTools::writeOBJ(str(), pt); str().write(linePointRef(pt, pt+patchDisp[patchPointI]));
vertI++;
meshTools::writeOBJ(str(), pt+patchDisp[patchPointI]);
vertI++;
str()<< "l " << vertI-1 << ' ' << vertI << nl;
} }
if (medialVecStr.valid()) if (medialVecStr.valid())
{ {
const point& pt = mesh.points()[pointI]; const point& pt = mesh.points()[pointI];
meshTools::writeOBJ(medialVecStr(), pt); medialVecStr().write
medialVertI++; (
meshTools::writeOBJ(medialVecStr(), medialVec[pointI]); linePointRef
medialVertI++; (
medialVecStr()<< "l " << medialVertI-1 pt,
<< ' ' << medialVertI << nl; medialVec[pointI]
)
);
} }
} }
} }

View File

@ -178,6 +178,24 @@ class autoSnapDriver
vector& edgeOffset // offset from pt to point on edge vector& edgeOffset // offset from pt to point on edge
) const; ) const;
//- For any reverse (so from feature back to mesh) attraction:
// add attraction if diagonal points on face attracted
void stringFeatureEdges
(
const label iter,
const scalar featureCos,
const indirectPrimitivePatch& pp,
const scalarField& snapDist,
const vectorField& rawPatchAttraction,
const List<pointConstraint>& rawPatchConstraints,
vectorField& patchAttraction,
List<pointConstraint>& patchConstraints
) const;
//- Return hit if on multiple points //- Return hit if on multiple points
pointIndexHit findMultiPatchPoint pointIndexHit findMultiPatchPoint
( (

View File

@ -848,17 +848,17 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
vector d = r.refPoint()-pt; vector d = r.refPoint()-pt;
d -= (d&n)*n; d -= (d&n)*n;
// Correct for attraction to non-dominant face //// Correct for attraction to non-dominant face
correctAttraction //correctAttraction
( //(
surfacePoints, // surfacePoints,
surfaceCount, // surfaceCount,
r.refPoint(), // r.refPoint(),
n, // normalised normal // n, // normalised normal
pt, // pt,
//
d // perpendicular offset vector // d // perpendicular offset vector
); //);
// Trim to snap distance // Trim to snap distance
if (magSqr(d) > sqr(snapDist[pointI])) if (magSqr(d) > sqr(snapDist[pointI]))
@ -893,6 +893,15 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
patchConstraint.applyConstraint(surfaceNormals[0]); patchConstraint.applyConstraint(surfaceNormals[0]);
patchConstraint.applyConstraint(surfaceNormals[1]); patchConstraint.applyConstraint(surfaceNormals[1]);
patchConstraint.applyConstraint(surfaceNormals[2]); patchConstraint.applyConstraint(surfaceNormals[2]);
//Pout<< "# Feature point " << pt << nl;
//meshTools::writeOBJ(Pout, pt);
//meshTools::writeOBJ(Pout, surfacePoints[0]);
//meshTools::writeOBJ(Pout, surfacePoints[1]);
//meshTools::writeOBJ(Pout, surfacePoints[2]);
//Pout<< "l 1 2" << nl
// << "l 1 3" << nl
// << "l 1 4" << nl;
} }
} }
@ -1001,6 +1010,195 @@ void Foam::autoSnapDriver::featureAttractionUsingReconstruction
} }
void Foam::autoSnapDriver::stringFeatureEdges
(
const label iter,
const scalar featureCos,
const indirectPrimitivePatch& pp,
const scalarField& snapDist,
const vectorField& rawPatchAttraction,
const List<pointConstraint>& rawPatchConstraints,
vectorField& patchAttraction,
List<pointConstraint>& patchConstraints
) const
{
// Snap edges to feature edges
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Walk existing edges and snap remaining ones (that are marked as
// feature edges in rawPatchConstraints)
// What this does is fill in any faces where not all points
// on the face are being attracted:
/*
+
/ \
/ \
---+ +---
\ /
\ /
+
*/
// so the top and bottom will never get attracted since the nearest
// back from the feature edge will always be one of the left or right
// points since the face is diamond like. So here we walk the feature edges
// and add any non-attracted points.
while (true)
{
label nChanged = 0;
const labelListList& pointEdges = pp.pointEdges();
forAll(pointEdges, pointI)
{
if (patchConstraints[pointI].first() == 2)
{
const point& pt = pp.localPoints()[pointI];
const labelList& pEdges = pointEdges[pointI];
const vector& featVec = patchConstraints[pointI].second();
// Detect whether there are edges in both directions.
// (direction along the feature edge that is)
bool hasPos = false;
bool hasNeg = false;
forAll(pEdges, pEdgeI)
{
const edge& e = pp.edges()[pEdges[pEdgeI]];
label nbrPointI = e.otherVertex(pointI);
if (patchConstraints[nbrPointI].first() > 1)
{
const point& nbrPt = pp.localPoints()[nbrPointI];
const point featPt =
nbrPt + patchAttraction[nbrPointI];
const scalar cosAngle = (featVec & (featPt-pt));
if (cosAngle > 0)
{
hasPos = true;
}
else
{
hasNeg = true;
}
}
}
if (!hasPos || !hasNeg)
{
//Pout<< "**Detected feature string end at "
// << pp.localPoints()[pointI] << endl;
// No string. Assign best choice on either side
label bestPosPointI = -1;
scalar minPosDistSqr = GREAT;
label bestNegPointI = -1;
scalar minNegDistSqr = GREAT;
forAll(pEdges, pEdgeI)
{
const edge& e = pp.edges()[pEdges[pEdgeI]];
label nbrPointI = e.otherVertex(pointI);
if
(
patchConstraints[nbrPointI].first() <= 1
&& rawPatchConstraints[nbrPointI].first() > 1
)
{
const vector& nbrFeatVec =
rawPatchConstraints[pointI].second();
if (mag(featVec&nbrFeatVec) > featureCos)
{
// nbrPointI attracted to sameish feature
// Note: also check on position.
scalar d2 = magSqr
(
rawPatchAttraction[nbrPointI]
);
const point featPt =
pp.localPoints()[nbrPointI]
+ rawPatchAttraction[nbrPointI];
const scalar cosAngle =
(featVec & (featPt-pt));
if (cosAngle > 0)
{
if (!hasPos && d2 < minPosDistSqr)
{
minPosDistSqr = d2;
bestPosPointI = nbrPointI;
}
}
else
{
if (!hasNeg && d2 < minNegDistSqr)
{
minNegDistSqr = d2;
bestNegPointI = nbrPointI;
}
}
}
}
}
if (bestPosPointI != -1)
{
// Use reconstructed-feature attraction. Use only
// part of it since not sure...
//const point& bestPt =
// pp.localPoints()[bestPosPointI];
//Pout<< "**Overriding point " << bestPt
// << " on reconstructed feature edge at "
// << rawPatchAttraction[bestPosPointI]+bestPt
// << " to attracted-to-feature-edge." << endl;
patchAttraction[bestPosPointI] =
0.5*rawPatchAttraction[bestPosPointI];
patchConstraints[bestPosPointI] =
rawPatchConstraints[bestPosPointI];
nChanged++;
}
if (bestNegPointI != -1)
{
// Use reconstructed-feature attraction. Use only
// part of it since not sure...
//const point& bestPt =
// pp.localPoints()[bestNegPointI];
//Pout<< "**Overriding point " << bestPt
// << " on reconstructed feature edge at "
// << rawPatchAttraction[bestNegPointI]+bestPt
// << " to attracted-to-feature-edge." << endl;
patchAttraction[bestNegPointI] =
0.5*rawPatchAttraction[bestNegPointI];
patchConstraints[bestNegPointI] =
rawPatchConstraints[bestNegPointI];
nChanged++;
}
}
}
}
reduce(nChanged, sumOp<label>());
Info<< "Stringing feature edges : changed " << nChanged << " points"
<< endl;
if (nChanged == 0)
{
break;
}
}
}
Foam::pointIndexHit Foam::autoSnapDriver::findNearFeatureEdge Foam::pointIndexHit Foam::autoSnapDriver::findNearFeatureEdge
( (
const indirectPrimitivePatch& pp, const indirectPrimitivePatch& pp,
@ -2113,156 +2311,20 @@ void Foam::autoSnapDriver::featureAttractionUsingFeatureEdges
// Walk existing edges and snap remaining ones (that are marked as // Walk existing edges and snap remaining ones (that are marked as
// feature edges in allPatchConstraints) // feature edges in allPatchConstraints)
while (true) stringFeatureEdges
{ (
label nChanged = 0; iter,
featureCos,
const labelListList& pointEdges = pp.pointEdges(); pp,
forAll(pointEdges, pointI) snapDist,
{
if (patchConstraints[pointI].first() == 2)
{
const point& pt = pp.localPoints()[pointI];
const labelList& pEdges = pointEdges[pointI];
const vector& featVec = patchConstraints[pointI].second();
// Detect whether there are edges in both directions. allPatchAttraction,
// (direction along the feature edge that is) allPatchConstraints,
bool hasPos = false;
bool hasNeg = false;
forAll(pEdges, pEdgeI)
{
const edge& e = pp.edges()[pEdges[pEdgeI]];
label nbrPointI = e.otherVertex(pointI);
if (patchConstraints[nbrPointI].first() > 1)
{
const point& nbrPt = pp.localPoints()[nbrPointI];
const point featPt =
nbrPt + patchAttraction[nbrPointI];
const scalar cosAngle = (featVec & (featPt-pt));
if (cosAngle > 0)
{
hasPos = true;
}
else
{
hasNeg = true;
}
}
}
if (!hasPos || !hasNeg)
{
//Pout<< "**Detected feature string end at "
// << pp.localPoints()[pointI] << endl;
// No string. Assign best choice on either side
label bestPosPointI = -1;
scalar minPosDistSqr = GREAT;
label bestNegPointI = -1;
scalar minNegDistSqr = GREAT;
forAll(pEdges, pEdgeI)
{
const edge& e = pp.edges()[pEdges[pEdgeI]];
label nbrPointI = e.otherVertex(pointI);
if
(
patchConstraints[nbrPointI].first() <= 1
&& allPatchConstraints[nbrPointI].first() > 1
)
{
const vector& nbrFeatVec =
allPatchConstraints[pointI].second();
if (mag(featVec&nbrFeatVec) > featureCos)
{
// nbrPointI attracted to sameish feature
// Note: also check on position.
scalar d2 = magSqr
(
allPatchAttraction[nbrPointI]
);
const point featPt =
pp.localPoints()[nbrPointI]
+ allPatchAttraction[nbrPointI];
const scalar cosAngle =
(featVec & (featPt-pt));
if (cosAngle > 0)
{
if (!hasPos && d2 < minPosDistSqr)
{
minPosDistSqr = d2;
bestPosPointI = nbrPointI;
}
}
else
{
if (!hasNeg && d2 < minNegDistSqr)
{
minNegDistSqr = d2;
bestNegPointI = nbrPointI;
}
}
}
}
}
if (bestPosPointI != -1)
{
// Use reconstructed-feature attraction. Use only
// part of it since not sure...
//const point& bestPt =
// pp.localPoints()[bestPosPointI];
//Pout<< "**Overriding point " << bestPt
// << " on reconstructed feature edge at "
// << allPatchAttraction[bestPosPointI]+bestPt
// << " to attracted-to-feature-edge." << endl;
patchAttraction[bestPosPointI] =
0.5*allPatchAttraction[bestPosPointI];
patchConstraints[bestPosPointI] =
allPatchConstraints[bestPosPointI];
nChanged++;
}
if (bestNegPointI != -1)
{
// Use reconstructed-feature attraction. Use only
// part of it since not sure...
//const point& bestPt =
// pp.localPoints()[bestNegPointI];
//Pout<< "**Overriding point " << bestPt
// << " on reconstructed feature edge at "
// << allPatchAttraction[bestNegPointI]+bestPt
// << " to attracted-to-feature-edge." << endl;
patchAttraction[bestNegPointI] =
0.5*allPatchAttraction[bestNegPointI];
patchConstraints[bestNegPointI] =
allPatchConstraints[bestNegPointI];
nChanged++;
}
}
}
}
reduce(nChanged, sumOp<label>());
Info<< "Stringing feature edges : changed " << nChanged << " points"
<< endl;
if (nChanged == 0)
{
break;
}
}
patchAttraction,
patchConstraints
);
// Avoid diagonal attraction // Avoid diagonal attraction

View File

@ -312,7 +312,8 @@ Foam::label Foam::meshRefinement::markFeatureRefinement
{ {
Pout<< "Adding particle from point:" << pointI Pout<< "Adding particle from point:" << pointI
<< " coord:" << featureMesh.points()[pointI] << " coord:" << featureMesh.points()[pointI]
<< " pEdges:" << pointEdges[pointI] << " since number of emanating edges:"
<< pointEdges[pointI].size()
<< endl; << endl;
} }

View File

@ -46,7 +46,7 @@ temperatureThermoBaffleFvPatchScalarField
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF),
owner_(false), owner_(false),
baffle_(), baffle_(),
solidThermoType_("undefined"), solidThermoType_(new primitiveEntry("thermoType", "undefined")),
dict_(dictionary::null) dict_(dictionary::null)
{} {}
@ -69,7 +69,7 @@ temperatureThermoBaffleFvPatchScalarField
), ),
owner_(ptf.owner_), owner_(ptf.owner_),
baffle_(ptf.baffle_), baffle_(ptf.baffle_),
solidThermoType_(ptf.solidThermoType_), solidThermoType_(ptf.solidThermoType_().clone()),
dict_(ptf.dict_) dict_(ptf.dict_)
{} {}
@ -85,7 +85,7 @@ temperatureThermoBaffleFvPatchScalarField
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF, dict), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF, dict),
owner_(false), owner_(false),
baffle_(), baffle_(),
solidThermoType_(), solidThermoType_(new primitiveEntry("thermoType", "undefined")),
dict_(dict) dict_(dict)
{ {
if (!isA<mappedPatchBase>(patch().patch())) if (!isA<mappedPatchBase>(patch().patch()))
@ -126,7 +126,7 @@ temperatureThermoBaffleFvPatchScalarField
Info << "Creating thermal baffle" << nbrMesh << endl; Info << "Creating thermal baffle" << nbrMesh << endl;
baffle_.reset(baffle::New(thisMesh, dict).ptr()); baffle_.reset(baffle::New(thisMesh, dict).ptr());
owner_ = true; owner_ = true;
dict.lookup("thermoType") >> solidThermoType_; solidThermoType_ = dict.lookupEntry("thermoType", false, false).clone();
baffle_->rename(nbrMesh); baffle_->rename(nbrMesh);
} }
} }
@ -142,7 +142,7 @@ temperatureThermoBaffleFvPatchScalarField
turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(ptf, iF), turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(ptf, iF),
owner_(ptf.owner_), owner_(ptf.owner_),
baffle_(ptf.baffle_), baffle_(ptf.baffle_),
solidThermoType_(ptf.solidThermoType_), solidThermoType_(ptf.solidThermoType_().clone()),
dict_(ptf.dict_) dict_(ptf.dict_)
{} {}
@ -219,8 +219,7 @@ void temperatureThermoBaffleFvPatchScalarField::write(Ostream& os) const
os.writeKeyword(word(thermoModel + "Coeffs")); os.writeKeyword(word(thermoModel + "Coeffs"));
os << dict_.subDict(thermoModel + "Coeffs") << nl; os << dict_.subDict(thermoModel + "Coeffs") << nl;
os.writeKeyword("thermoType") << solidThermoType_ os << solidThermoType_() << nl;
<< token::END_STATEMENT << nl;
os.writeKeyword("mixture"); os.writeKeyword("mixture");
os << dict_.subDict("mixture") << nl; os << dict_.subDict("mixture") << nl;

View File

@ -140,7 +140,7 @@ class temperatureThermoBaffleFvPatchScalarField
autoPtr<regionModels::thermoBaffleModels::thermoBaffleModel> baffle_; autoPtr<regionModels::thermoBaffleModels::thermoBaffleModel> baffle_;
//- Solid thermo type //- Solid thermo type
word solidThermoType_; autoPtr<entry> solidThermoType_;
//- Dictionary //- Dictionary
dictionary dict_; dictionary dict_;

View File

@ -318,7 +318,13 @@ const tmp<volScalarField> thermoBaffle2D::Cp() const
const volScalarField& thermoBaffle2D::kappaRad() const const volScalarField& thermoBaffle2D::kappaRad() const
{ {
return thermo_->kappaRad(); // ***HGW return thermo_->kappaRad();
FatalErrorIn
(
"thermoBaffle2D::kappaRad()"
) << "not currently supported"
<< exit(FatalError);
return volScalarField::null();
} }

View File

@ -1,11 +1,11 @@
basicThermo/basicThermo.C basicThermo/basicThermo.C
fluidThermo/fluidThermo.C fluidThermo/fluidThermo.C
psiThermo/psiThermo/psiThermo.C psiThermo/psiThermo.C
psiThermo/hePsiThermo/hePsiThermos.C psiThermo/psiThermos.C
rhoThermo/rhoThermo/rhoThermo.C rhoThermo/rhoThermo.C
rhoThermo/heRhoThermo/heRhoThermos.C rhoThermo/rhoThermos.C
derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C derivedFvPatchFields/fixedEnergy/fixedEnergyFvPatchScalarField.C
derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C derivedFvPatchFields/gradientEnergy/gradientEnergyFvPatchScalarField.C

View File

@ -105,10 +105,22 @@ public:
// Selectors // Selectors
//- Generic lookup for each of the related thermodynamics packages
template<class Thermo, class Table>
static typename Table::iterator lookupThermo
(
const dictionary& thermoDict,
Table* tablePtr
);
//- Generic New for each of the related thermodynamics packages //- Generic New for each of the related thermodynamics packages
template<class Thermo> template<class Thermo>
static autoPtr<Thermo> New(const fvMesh&); static autoPtr<Thermo> New(const fvMesh&);
//- Generic New for each of the related thermodynamics packages
template<class Thermo>
static autoPtr<Thermo> New(const fvMesh&, const dictionary&);
//- Specialisation of the Generic New for basicThermo //- Specialisation of the Generic New for basicThermo
static autoPtr<basicThermo> New(const fvMesh&); static autoPtr<basicThermo> New(const fvMesh&);

View File

@ -27,25 +27,13 @@ License
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
template<class Thermo> template<class Thermo, class Table>
Foam::autoPtr<Thermo> Foam::basicThermo::New typename Table::iterator Foam::basicThermo::lookupThermo
( (
const fvMesh& mesh const dictionary& thermoDict,
Table* tablePtr
) )
{ {
IOdictionary thermoDict
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
);
word thermoTypeName; word thermoTypeName;
if (thermoDict.isDict("thermoType")) if (thermoDict.isDict("thermoType"))
@ -76,16 +64,13 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New
+ word(thermoTypeDict.lookup("specie")) + ">>," + word(thermoTypeDict.lookup("specie")) + ">>,"
+ word(thermoTypeDict.lookup("energy")) + ">>>"; + word(thermoTypeDict.lookup("energy")) + ">>>";
Info<< thermoTypeName << endl;
// Lookup the thermo package // Lookup the thermo package
typename Thermo::fvMeshConstructorTable::iterator cstrIter = typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
Thermo::fvMeshConstructorTablePtr_->find(thermoTypeName);
// Print error message if package not found in the table // Print error message if package not found in the table
if (cstrIter == Thermo::fvMeshConstructorTablePtr_->end()) if (cstrIter == tablePtr->end())
{ {
FatalErrorIn(Thermo::typeName + "::New(const fvMesh&)") FatalErrorIn(Thermo::typeName + "::New")
<< "Unknown " << Thermo::typeName << " type " << nl << "Unknown " << Thermo::typeName << " type " << nl
<< "thermoType" << thermoTypeDict << nl << nl << "thermoType" << thermoTypeDict << nl << nl
<< "Valid " << Thermo::typeName << " types are:" << nl << nl; << "Valid " << Thermo::typeName << " types are:" << nl << nl;
@ -93,7 +78,7 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New
// Get the list of all the suitable thermo packages available // Get the list of all the suitable thermo packages available
wordList validThermoTypeNames wordList validThermoTypeNames
( (
Thermo::fvMeshConstructorTablePtr_->sortedToc() tablePtr->sortedToc()
); );
// Build a table of the thermo packages constituent parts // Build a table of the thermo packages constituent parts
@ -123,7 +108,7 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New
FatalError<< exit(FatalError); FatalError<< exit(FatalError);
} }
return autoPtr<Thermo>(cstrIter()(mesh)); return cstrIter;
} }
else else
{ {
@ -131,22 +116,69 @@ Foam::autoPtr<Thermo> Foam::basicThermo::New
Info<< "Selecting thermodynamics package " << thermoTypeName << endl; Info<< "Selecting thermodynamics package " << thermoTypeName << endl;
typename Thermo::fvMeshConstructorTable::iterator cstrIter = typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
Thermo::fvMeshConstructorTablePtr_->find(thermoTypeName);
if (cstrIter == Thermo::fvMeshConstructorTablePtr_->end()) if (cstrIter == tablePtr->end())
{ {
FatalErrorIn(Thermo::typeName + "::New(const fvMesh&)") FatalErrorIn(Thermo::typeName + "::New")
<< "Unknown " << Thermo::typeName << " type " << "Unknown " << Thermo::typeName << " type "
<< thermoTypeName << nl << nl << thermoTypeName << nl << nl
<< "Valid " << Thermo::typeName << " types are:" << nl << "Valid " << Thermo::typeName << " types are:" << nl
<< Thermo::fvMeshConstructorTablePtr_->sortedToc() << nl << tablePtr->sortedToc() << nl
<< exit(FatalError); << exit(FatalError);
} }
return autoPtr<Thermo>(cstrIter()(mesh)); return cstrIter;
} }
} }
template<class Thermo>
Foam::autoPtr<Thermo> Foam::basicThermo::New
(
const fvMesh& mesh
)
{
IOdictionary thermoDict
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
);
typename Thermo::fvMeshConstructorTable::iterator cstrIter =
lookupThermo<Thermo, typename Thermo::fvMeshConstructorTable>
(
thermoDict,
Thermo::fvMeshConstructorTablePtr_
);
return autoPtr<Thermo>(cstrIter()(mesh));
}
template<class Thermo>
Foam::autoPtr<Thermo> Foam::basicThermo::New
(
const fvMesh& mesh,
const dictionary& dict
)
{
typename Thermo::dictionaryConstructorTable::iterator cstrIter =
lookupThermo<Thermo, typename Thermo::dictionaryConstructorTable>
(
dict,
Thermo::dictionaryConstructorTablePtr_
);
return autoPtr<Thermo>(cstrIter()(mesh, dict));
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -37,7 +37,7 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\ #define makeThermoTypedefs(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
\ \
typedef \ typedef \
Transport \ Transport \
@ -58,10 +58,8 @@ typedef \
typedef \ typedef \
Cthermo \ Cthermo \
< \ < \
Mixture \ BaseThermo, \
< \ Mixture<Transport##Type##Thermo##EqnOfState##Specie> \
Transport##Type##Thermo##EqnOfState##Specie \
> \
> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \ > Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie; \
\ \
defineTemplateTypeNameAndDebugWithName \ defineTemplateTypeNameAndDebugWithName \
@ -73,7 +71,22 @@ defineTemplateTypeNameAndDebugWithName \
+ ">>" \ + ">>" \
).c_str(), \ ).c_str(), \
0 \ 0 \
); \ );
#define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
\
makeThermoTypedefs \
( \
BaseThermo, \
Cthermo, \
Mixture, \
Transport, \
Type, \
Thermo, \
EqnOfState, \
Specie \
) \
\ \
addToRunTimeSelectionTable \ addToRunTimeSelectionTable \
( \ ( \

View File

@ -27,8 +27,8 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
void Foam::hePsiThermo<MixtureType>::calculate() void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::calculate()
{ {
const scalarField& hCells = this->he_.internalField(); const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_.internalField(); const scalarField& pCells = this->p_.internalField();
@ -101,10 +101,10 @@ void Foam::hePsiThermo<MixtureType>::calculate()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::hePsiThermo<MixtureType>::hePsiThermo(const fvMesh& mesh) Foam::hePsiThermo<BasicPsiThermo, MixtureType>::hePsiThermo(const fvMesh& mesh)
: :
heThermo<psiThermo, MixtureType>(mesh) heThermo<BasicPsiThermo, MixtureType>(mesh)
{ {
calculate(); calculate();
@ -115,19 +115,20 @@ Foam::hePsiThermo<MixtureType>::hePsiThermo(const fvMesh& mesh)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::hePsiThermo<MixtureType>::~hePsiThermo() Foam::hePsiThermo<BasicPsiThermo, MixtureType>::~hePsiThermo()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
void Foam::hePsiThermo<MixtureType>::correct() void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::correct()
{ {
if (debug) if (debug)
{ {
Info<< "entering hePsiThermo<MixtureType>::correct()" << endl; Info<< "entering hePsiThermo<BasicPsiThermo, MixtureType>::correct()"
<< endl;
} }
// force the saving of the old-time values // force the saving of the old-time values
@ -137,7 +138,8 @@ void Foam::hePsiThermo<MixtureType>::correct()
if (debug) if (debug)
{ {
Info<< "exiting hePsiThermo<MixtureType>::correct()" << endl; Info<< "exiting hePsiThermo<BasicPsiThermo, MixtureType>::correct()"
<< endl;
} }
} }

View File

@ -25,7 +25,7 @@ Class
Foam::hePsiThermo Foam::hePsiThermo
Description Description
Enthalpy for a mixture based on compressibility Energy for a mixture based on compressibility
SourceFiles SourceFiles
hePsiThermo.C hePsiThermo.C
@ -47,10 +47,10 @@ namespace Foam
Class hePsiThermo Declaration Class hePsiThermo Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
class hePsiThermo class hePsiThermo
: :
public heThermo<psiThermo, MixtureType> public heThermo<BasicPsiThermo, MixtureType>
{ {
// Private Member Functions // Private Member Functions
@ -58,7 +58,7 @@ class hePsiThermo
void calculate(); void calculate();
//- Construct as copy (not implemented) //- Construct as copy (not implemented)
hePsiThermo(const hePsiThermo<MixtureType>&); hePsiThermo(const hePsiThermo<BasicPsiThermo, MixtureType>&);
public: public:

View File

@ -27,8 +27,8 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
void Foam::heRhoThermo<MixtureType>::calculate() void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate()
{ {
const scalarField& hCells = this->he().internalField(); const scalarField& hCells = this->he().internalField();
const scalarField& pCells = this->p_.internalField(); const scalarField& pCells = this->p_.internalField();
@ -106,10 +106,10 @@ void Foam::heRhoThermo<MixtureType>::calculate()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::heRhoThermo<MixtureType>::heRhoThermo(const fvMesh& mesh) Foam::heRhoThermo<BasicPsiThermo, MixtureType>::heRhoThermo(const fvMesh& mesh)
: :
heThermo<rhoThermo, MixtureType>(mesh) heThermo<BasicPsiThermo, MixtureType>(mesh)
{ {
calculate(); calculate();
} }
@ -117,15 +117,15 @@ Foam::heRhoThermo<MixtureType>::heRhoThermo(const fvMesh& mesh)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::heRhoThermo<MixtureType>::~heRhoThermo() Foam::heRhoThermo<BasicPsiThermo, MixtureType>::~heRhoThermo()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
void Foam::heRhoThermo<MixtureType>::correct() void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::correct()
{ {
if (debug) if (debug)
{ {

View File

@ -25,7 +25,7 @@ Class
Foam::heRhoThermo Foam::heRhoThermo
Description Description
Enthalpy for a mixture based on density Energy for a mixture based on density
SourceFiles SourceFiles
heRhoThermo.C heRhoThermo.C
@ -47,10 +47,10 @@ namespace Foam
Class heRhoThermo Declaration Class heRhoThermo Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
class heRhoThermo class heRhoThermo
: :
public heThermo<rhoThermo, MixtureType> public heThermo<BasicPsiThermo, MixtureType>
{ {
// Private Member Functions // Private Member Functions
@ -58,7 +58,7 @@ class heRhoThermo
void calculate(); void calculate();
//- Construct as copy (not implemented) //- Construct as copy (not implemented)
heRhoThermo(const heRhoThermo<MixtureType>&); heRhoThermo(const heRhoThermo<BasicPsiThermo, MixtureType>&);
public: public:

View File

@ -58,12 +58,11 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
Info<< "Selecting chemistry type " << chemistryTypeDict << endl; Info<< "Selecting chemistry type " << chemistryTypeDict << endl;
const int nCmpt = 8; const int nCmpt = 7;
const char* cmptNames[nCmpt] = const char* cmptNames[nCmpt] =
{ {
"chemistrySolver", "chemistrySolver",
"chemistryModel", "chemistryThermo",
"???ChemistryModel",
"transport", "transport",
"thermo", "thermo",
"equationOfState", "equationOfState",
@ -109,9 +108,8 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
// Construct the name of the chemistry type from the components // Construct the name of the chemistry type from the components
chemistryTypeName = chemistryTypeName =
word(chemistryTypeDict.lookup("chemistrySolver")) + '<' word(chemistryTypeDict.lookup("chemistrySolver")) + '<'
+ word(chemistryTypeDict.lookup("chemistryModel")) + '<' + word(chemistryTypeDict.lookup("chemistryThermo")) + ','
+ ChemistryModel::typeName + ',' + thermoTypeName + ">";
+ thermoTypeName + ">>";
typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter = typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName); ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
@ -160,8 +158,7 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
FatalError<< exit(FatalError); FatalError<< exit(FatalError);
} }
return autoPtr<ChemistryModel> return autoPtr<ChemistryModel>(cstrIter()(mesh));
(cstrIter()(mesh, typeName, chemistryTypeName));
} }
else else
{ {
@ -183,8 +180,7 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
<< exit(FatalError); << exit(FatalError);
} }
return autoPtr<ChemistryModel> return autoPtr<ChemistryModel>(cstrIter()(mesh));
(cstrIter()(mesh, typeName, chemistryTypeName));
} }
} }

View File

@ -23,21 +23,18 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "ODEChemistryModel.H" #include "chemistryModel.H"
#include "chemistrySolver.H"
#include "reactingMixture.H" #include "reactingMixture.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::ODEChemistryModel<CompType, ThermoType>::ODEChemistryModel Foam::chemistryModel<CompType, ThermoType>::chemistryModel
( (
const fvMesh& mesh, const fvMesh& mesh
const word& ODEModelName,
const word& thermoTypeName
) )
: :
CompType(mesh, thermoTypeName), CompType(mesh),
ODE(), ODE(),
@ -80,7 +77,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::ODEChemistryModel
); );
} }
Info<< "ODEChemistryModel: Number of species = " << nSpecie_ Info<< "chemistryModel: Number of species = " << nSpecie_
<< " and reactions = " << nReaction_ << endl; << " and reactions = " << nReaction_ << endl;
} }
@ -88,7 +85,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::ODEChemistryModel
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::ODEChemistryModel<CompType, ThermoType>::~ODEChemistryModel() Foam::chemistryModel<CompType, ThermoType>::~chemistryModel()
{} {}
@ -96,7 +93,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::~ODEChemistryModel()
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::omega Foam::chemistryModel<CompType, ThermoType>::omega
( (
const scalarField& c, const scalarField& c,
const scalar T, const scalar T,
@ -138,7 +135,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::omega
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omegaI Foam::scalar Foam::chemistryModel<CompType, ThermoType>::omegaI
( (
const label index, const label index,
const scalarField& c, const scalarField& c,
@ -160,7 +157,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omegaI
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::updateConcsInReactionI void Foam::chemistryModel<CompType, ThermoType>::updateConcsInReactionI
( (
const label index, const label index,
const scalar dt, const scalar dt,
@ -189,7 +186,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::updateConcsInReactionI
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::updateRRInReactionI void Foam::chemistryModel<CompType, ThermoType>::updateRRInReactionI
( (
const label index, const label index,
const scalar pr, const scalar pr,
@ -220,7 +217,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::updateRRInReactionI
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega Foam::scalar Foam::chemistryModel<CompType, ThermoType>::omega
( (
const Reaction<ThermoType>& R, const Reaction<ThermoType>& R,
const scalarField& c, const scalarField& c,
@ -338,7 +335,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::derivatives void Foam::chemistryModel<CompType, ThermoType>::derivatives
( (
const scalar time, const scalar time,
const scalarField &c, const scalarField &c,
@ -389,7 +386,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::derivatives
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian void Foam::chemistryModel<CompType, ThermoType>::jacobian
( (
const scalar t, const scalar t,
const scalarField& c, const scalarField& c,
@ -532,7 +529,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::tc() const Foam::chemistryModel<CompType, ThermoType>::tc() const
{ {
scalar pf, cf, pr, cr; scalar pf, cf, pr, cr;
label lRef, rRef; label lRef, rRef;
@ -570,6 +567,8 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
); );
scalarField& tc = ttc(); scalarField& tc = ttc();
const scalarField& T = this->thermo().T();
const scalarField& p = this->thermo().p();
const label nReaction = reactions_.size(); const label nReaction = reactions_.size();
@ -578,8 +577,8 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
forAll(rho, celli) forAll(rho, celli)
{ {
scalar rhoi = rho[celli]; scalar rhoi = rho[celli];
scalar Ti = this->thermo().T()[celli]; scalar Ti = T[celli];
scalar pi = this->thermo().p()[celli]; scalar pi = p[celli];
scalarField c(nSpecie_); scalarField c(nSpecie_);
scalar cSum = 0.0; scalar cSum = 0.0;
@ -615,7 +614,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::Sh() const Foam::chemistryModel<CompType, ThermoType>::Sh() const
{ {
tmp<volScalarField> tSh tmp<volScalarField> tSh
( (
@ -657,7 +656,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::Sh() const
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const Foam::chemistryModel<CompType, ThermoType>::dQ() const
{ {
tmp<volScalarField> tdQ tmp<volScalarField> tdQ
( (
@ -689,7 +688,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::label Foam::ODEChemistryModel<CompType, ThermoType>::nEqns() const Foam::label Foam::chemistryModel<CompType, ThermoType>::nEqns() const
{ {
// nEqns = number of species + temperature + pressure // nEqns = number of species + temperature + pressure
return nSpecie_ + 2; return nSpecie_ + 2;
@ -697,7 +696,7 @@ Foam::label Foam::ODEChemistryModel<CompType, ThermoType>::nEqns() const
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::calculate() void Foam::chemistryModel<CompType, ThermoType>::calculate()
{ {
if (!this->chemistry_) if (!this->chemistry_)
{ {
@ -718,11 +717,14 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::calculate()
this->thermo().rho() this->thermo().rho()
); );
const scalarField& T = this->thermo().T();
const scalarField& p = this->thermo().p();
forAll(rho, celli) forAll(rho, celli)
{ {
const scalar rhoi = rho[celli]; const scalar rhoi = rho[celli];
const scalar Ti = this->thermo().T()[celli]; const scalar Ti = T[celli];
const scalar pi = this->thermo().p()[celli]; const scalar pi = p[celli];
scalarField c(nSpecie_, 0.0); scalarField c(nSpecie_, 0.0);
for (label i=0; i<nSpecie_; i++) for (label i=0; i<nSpecie_; i++)
@ -742,7 +744,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::calculate()
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
( (
const scalar t0, const scalar t0,
const scalar deltaT const scalar deltaT
@ -773,13 +775,16 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
tmp<volScalarField> thc = this->thermo().hc(); tmp<volScalarField> thc = this->thermo().hc();
const scalarField& hc = thc(); const scalarField& hc = thc();
const scalarField& he = this->thermo().he();
const scalarField& T = this->thermo().T();
const scalarField& p = this->thermo().p();
forAll(rho, celli) forAll(rho, celli)
{ {
const scalar rhoi = rho[celli]; const scalar rhoi = rho[celli];
const scalar hi = this->thermo().he()[celli] + hc[celli]; const scalar hi = he[celli] + hc[celli];
const scalar pi = this->thermo().p()[celli]; const scalar pi = p[celli];
scalar Ti = this->thermo().T()[celli]; scalar Ti = T[celli];
scalarField c(nSpecie_, 0.0); scalarField c(nSpecie_, 0.0);
scalarField c0(nSpecie_, 0.0); scalarField c0(nSpecie_, 0.0);
@ -833,7 +838,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
( (
scalarField &c, scalarField &c,
const scalar T, const scalar T,
@ -844,7 +849,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
{ {
notImplemented notImplemented
( (
"ODEChemistryModel::solve" "chemistryModel::solve"
"(" "("
"scalarField&, " "scalarField&, "
"const scalar, " "const scalar, "

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::ODEChemistryModel Foam::chemistryModel
Description Description
Extends base chemistry model by adding a thermo package, and ODE functions. Extends base chemistry model by adding a thermo package, and ODE functions.
@ -30,13 +30,13 @@ Description
terms. terms.
SourceFiles SourceFiles
ODEChemistryModelI.H chemistryModelI.H
ODEChemistryModel.C chemistryModel.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef ODEChemistryModel_H #ifndef chemistryModel_H
#define ODEChemistryModel_H #define chemistryModel_H
#include "Reaction.H" #include "Reaction.H"
#include "ODE.H" #include "ODE.H"
@ -53,11 +53,11 @@ namespace Foam
class fvMesh; class fvMesh;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class ODEChemistryModel Declaration Class chemistryModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
class ODEChemistryModel class chemistryModel
: :
public CompType, public CompType,
public ODE public ODE
@ -65,10 +65,10 @@ class ODEChemistryModel
// Private Member Functions // Private Member Functions
//- Disallow copy constructor //- Disallow copy constructor
ODEChemistryModel(const ODEChemistryModel&); chemistryModel(const chemistryModel&);
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const ODEChemistryModel&); void operator=(const chemistryModel&);
protected: protected:
@ -104,22 +104,17 @@ protected:
public: public:
//- Runtime type information //- Runtime type information
TypeName("ODEChemistryModel"); TypeName("chemistryModel");
// Constructors // Constructors
//- Construct from components //- Construct from mesh
ODEChemistryModel chemistryModel(const fvMesh& mesh);
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoTypeName
);
//- Destructor //- Destructor
virtual ~ODEChemistryModel(); virtual ~chemistryModel();
// Member Functions // Member Functions
@ -263,12 +258,12 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "ODEChemistryModelI.H" #include "chemistryModelI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
# include "ODEChemistryModel.C" # include "chemistryModel.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -30,7 +30,7 @@ License
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >& inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
Foam::ODEChemistryModel<CompType, ThermoType>::RR() Foam::chemistryModel<CompType, ThermoType>::RR()
{ {
return RR_; return RR_;
} }
@ -38,7 +38,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::RR()
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
inline const Foam::PtrList<Foam::Reaction<ThermoType> >& inline const Foam::PtrList<Foam::Reaction<ThermoType> >&
Foam::ODEChemistryModel<CompType, ThermoType>::reactions() const Foam::chemistryModel<CompType, ThermoType>::reactions() const
{ {
return reactions_; return reactions_;
} }
@ -46,7 +46,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::reactions() const
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
inline const Foam::PtrList<ThermoType>& inline const Foam::PtrList<ThermoType>&
Foam::ODEChemistryModel<CompType, ThermoType>::specieThermo() const Foam::chemistryModel<CompType, ThermoType>::specieThermo() const
{ {
return specieThermo_; return specieThermo_;
} }
@ -54,7 +54,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::specieThermo() const
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
inline Foam::label inline Foam::label
Foam::ODEChemistryModel<CompType, ThermoType>::nSpecie() const Foam::chemistryModel<CompType, ThermoType>::nSpecie() const
{ {
return nSpecie_; return nSpecie_;
} }
@ -62,7 +62,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::nSpecie() const
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
inline Foam::label inline Foam::label
Foam::ODEChemistryModel<CompType, ThermoType>::nReaction() const Foam::chemistryModel<CompType, ThermoType>::nReaction() const
{ {
return nReaction_; return nReaction_;
} }
@ -70,7 +70,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::nReaction() const
template<class CompType, class ThermoType> template<class CompType, class ThermoType>
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>& inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
Foam::ODEChemistryModel<CompType, ThermoType>::RR Foam::chemistryModel<CompType, ThermoType>::RR
( (
const label i const label i
) const ) const

View File

@ -25,7 +25,6 @@ License
#include "psiChemistryModel.H" #include "psiChemistryModel.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "Time.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
@ -35,12 +34,12 @@ namespace Foam
defineRunTimeSelectionTable(psiChemistryModel, fvMesh); defineRunTimeSelectionTable(psiChemistryModel, fvMesh);
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::psiChemistryModel::psiChemistryModel Foam::psiChemistryModel::psiChemistryModel
( (
const fvMesh& mesh, const fvMesh& mesh
const word& thermoTypeName
) )
: :
basicChemistryModel(mesh), basicChemistryModel(mesh),

View File

@ -78,7 +78,7 @@ protected:
public: public:
//- Runtime type information //- Runtime type information
TypeName("psiChemistryModel"); TypeName("psi");
//- Declare run-time constructor selection tables //- Declare run-time constructor selection tables
@ -87,19 +87,15 @@ public:
autoPtr, autoPtr,
psiChemistryModel, psiChemistryModel,
fvMesh, fvMesh,
( (const fvMesh& mesh),
const fvMesh& mesh, (mesh)
const word& compTypeName,
const word& thermoTypeName
),
(mesh, compTypeName, thermoTypeName)
); );
// Constructors // Constructors
//- Construct from mesh //- Construct from mesh
psiChemistryModel(const fvMesh& mesh, const word& thermoTypeName); psiChemistryModel(const fvMesh& mesh);
//- Selector //- Selector

View File

@ -32,7 +32,7 @@ Description
#include "makeChemistryModel.H" #include "makeChemistryModel.H"
#include "psiChemistryModel.H" #include "psiChemistryModel.H"
#include "ODEChemistryModel.H" #include "chemistryModel.H"
#include "thermoPhysicsTypes.H" #include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -41,35 +41,35 @@ namespace Foam
{ {
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
psiChemistryModel, psiChemistryModel,
constGasThermoPhysics constGasThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
psiChemistryModel, psiChemistryModel,
gasThermoPhysics gasThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
psiChemistryModel, psiChemistryModel,
constIncompressibleGasThermoPhysics constIncompressibleGasThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
psiChemistryModel, psiChemistryModel,
incompressibleGasThermoPhysics incompressibleGasThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
psiChemistryModel, psiChemistryModel,
icoPoly8ThermoPhysics icoPoly8ThermoPhysics
); );

View File

@ -25,7 +25,6 @@ License
#include "rhoChemistryModel.H" #include "rhoChemistryModel.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "Time.H"
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
@ -35,12 +34,12 @@ namespace Foam
defineRunTimeSelectionTable(rhoChemistryModel, fvMesh); defineRunTimeSelectionTable(rhoChemistryModel, fvMesh);
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::rhoChemistryModel::rhoChemistryModel Foam::rhoChemistryModel::rhoChemistryModel
( (
const fvMesh& mesh, const fvMesh& mesh
const word& thermoTypeName
) )
: :
basicChemistryModel(mesh), basicChemistryModel(mesh),

View File

@ -78,7 +78,7 @@ protected:
public: public:
//- Runtime type information //- Runtime type information
TypeName("rhoChemistryModel"); TypeName("rho");
//- Declare run-time constructor selection tables //- Declare run-time constructor selection tables
@ -88,18 +88,16 @@ public:
rhoChemistryModel, rhoChemistryModel,
fvMesh, fvMesh,
( (
const fvMesh& mesh, const fvMesh& mesh
const word& compTypeName,
const word& thermoTypeName
), ),
(mesh, compTypeName, thermoTypeName) (mesh)
); );
// Constructors // Constructors
//- Construct from mesh //- Construct from mesh
rhoChemistryModel(const fvMesh& mesh, const word& thermoTypeName); rhoChemistryModel(const fvMesh& mesh);
//- Selector //- Selector

View File

@ -32,7 +32,7 @@ Description
#include "makeChemistryModel.H" #include "makeChemistryModel.H"
#include "rhoChemistryModel.H" #include "rhoChemistryModel.H"
#include "ODEChemistryModel.H" #include "chemistryModel.H"
#include "thermoPhysicsTypes.H" #include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -41,35 +41,35 @@ namespace Foam
{ {
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
rhoChemistryModel, rhoChemistryModel,
constGasThermoPhysics constGasThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
rhoChemistryModel, rhoChemistryModel,
gasThermoPhysics gasThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
rhoChemistryModel, rhoChemistryModel,
constIncompressibleGasThermoPhysics constIncompressibleGasThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
rhoChemistryModel, rhoChemistryModel,
incompressibleGasThermoPhysics incompressibleGasThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
ODEChemistryModel, chemistryModel,
rhoChemistryModel, rhoChemistryModel,
icoPoly8ThermoPhysics icoPoly8ThermoPhysics
); );

View File

@ -29,15 +29,13 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::EulerImplicit<ODEChemistryType>::EulerImplicit Foam::EulerImplicit<ChemistryModel>::EulerImplicit
( (
const fvMesh& mesh, const fvMesh& mesh
const word& ODEModelName,
const word& thermoType
) )
: :
chemistrySolver<ODEChemistryType>(mesh, ODEModelName, thermoType), chemistrySolver<ChemistryModel>(mesh),
coeffsDict_(this->subDict("EulerImplicitCoeffs")), coeffsDict_(this->subDict("EulerImplicitCoeffs")),
cTauChem_(readScalar(coeffsDict_.lookup("cTauChem"))), cTauChem_(readScalar(coeffsDict_.lookup("cTauChem"))),
eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter")) eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter"))
@ -46,15 +44,15 @@ Foam::EulerImplicit<ODEChemistryType>::EulerImplicit
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::EulerImplicit<ODEChemistryType>::~EulerImplicit() Foam::EulerImplicit<ChemistryModel>::~EulerImplicit()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::scalar Foam::EulerImplicit<ODEChemistryType>::solve Foam::scalar Foam::EulerImplicit<ChemistryModel>::solve
( (
scalarField &c, scalarField &c,
const scalar T, const scalar T,

View File

@ -46,10 +46,10 @@ namespace Foam
Class EulerImplicit Declaration Class EulerImplicit Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class ODEChemistryType> template<class ChemistryModel>
class EulerImplicit class EulerImplicit
: :
public chemistrySolver<ODEChemistryType> public chemistrySolver<ChemistryModel>
{ {
// Private data // Private data
@ -74,13 +74,8 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from mesh
EulerImplicit EulerImplicit(const fvMesh& mesh);
(
const fvMesh& mesh,
const word& ODEmodelName,
const word& thermoType
);
//- Destructor //- Destructor

View File

@ -27,23 +27,20 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::chemistrySolver<ODEChemistryType>::chemistrySolver Foam::chemistrySolver<ChemistryModel>::chemistrySolver
( (
const fvMesh& mesh, const fvMesh& mesh
const word& ODEModelName,
const word& thermoType
) )
: :
ODEChemistryType(mesh, ODEModelName, thermoType), ChemistryModel(mesh)
name_(ODEModelName)
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::chemistrySolver<ODEChemistryType>::~chemistrySolver() Foam::chemistrySolver<ChemistryModel>::~chemistrySolver()
{} {}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,7 @@ SourceFiles
#ifndef chemistrySolver_H #ifndef chemistrySolver_H
#define chemistrySolver_H #define chemistrySolver_H
#include "ODEChemistryModel.H" #include "chemistryModel.H"
#include "IOdictionary.H" #include "IOdictionary.H"
#include "scalarField.H" #include "scalarField.H"
@ -48,30 +48,18 @@ namespace Foam
Class chemistrySolver Declaration Class chemistrySolver Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class ODEChemistryType> template<class ChemistryModel>
class chemistrySolver class chemistrySolver
: :
public ODEChemistryType public ChemistryModel
{ {
protected:
// Protected data
//- Name of the chemistry solver
const word name_;
public: public:
// Constructors // Constructors
//- Construct from components //- Construct from components
chemistrySolver chemistrySolver(const fvMesh& mesh);
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
);
//- Destructor //- Destructor

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,7 +28,7 @@ License
#include "chemistrySolver.H" #include "chemistrySolver.H"
#include "ODEChemistryModel.H" #include "chemistryModel.H"
#include "noChemistrySolver.H" #include "noChemistrySolver.H"
#include "EulerImplicit.H" #include "EulerImplicit.H"
@ -37,21 +37,22 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeChemistrySolverType(SS, ODEChem, Comp, Thermo) \ #define makeChemistrySolverType(SS, Comp, Thermo) \
\ \
typedef SS<ODEChem<Comp, Thermo> > SS##ODEChem##Comp##Thermo; \ typedef SS<chemistryModel<Comp, Thermo> > SS##Comp##Thermo; \
\ \
defineTemplateTypeNameAndDebugWithName \ defineTemplateTypeNameAndDebugWithName \
( \ ( \
SS##ODEChem##Comp##Thermo, \ SS##Comp##Thermo, \
(#SS"<"#ODEChem"<"#Comp"," + Thermo::typeName() + ">>").c_str(), \ (#SS"<" + word(Comp::typeName_()) \
+ "," + Thermo::typeName() + ">").c_str(), \
0 \ 0 \
); \ ); \
\ \
addToRunTimeSelectionTable \ addToRunTimeSelectionTable \
( \ ( \
Comp, \ Comp, \
SS##ODEChem##Comp##Thermo, \ SS##Comp##Thermo, \
fvMesh \ fvMesh \
); );
@ -61,7 +62,6 @@ License
makeChemistrySolverType \ makeChemistrySolverType \
( \ ( \
noChemistrySolver, \ noChemistrySolver, \
ODEChemistryModel, \
CompChemModel, \ CompChemModel, \
Thermo \ Thermo \
); \ ); \
@ -69,7 +69,6 @@ License
makeChemistrySolverType \ makeChemistrySolverType \
( \ ( \
EulerImplicit, \ EulerImplicit, \
ODEChemistryModel, \
CompChemModel, \ CompChemModel, \
Thermo \ Thermo \
); \ ); \
@ -77,7 +76,6 @@ License
makeChemistrySolverType \ makeChemistrySolverType \
( \ ( \
ode, \ ode, \
ODEChemistryModel, \
CompChemModel, \ CompChemModel, \
Thermo \ Thermo \
); \ ); \
@ -85,7 +83,6 @@ License
makeChemistrySolverType \ makeChemistrySolverType \
( \ ( \
sequential, \ sequential, \
ODEChemistryModel, \
CompChemModel, \ CompChemModel, \
Thermo \ Thermo \
); );

View File

@ -28,29 +28,27 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::noChemistrySolver<ODEChemistryType>::noChemistrySolver Foam::noChemistrySolver<ChemistryModel>::noChemistrySolver
( (
const fvMesh& mesh, const fvMesh& mesh
const word& ODEModelName,
const word& thermoType
) )
: :
chemistrySolver<ODEChemistryType>(mesh, ODEModelName, thermoType) chemistrySolver<ChemistryModel>(mesh)
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::noChemistrySolver<ODEChemistryType>::~noChemistrySolver() Foam::noChemistrySolver<ChemistryModel>::~noChemistrySolver()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::scalar Foam::noChemistrySolver<ODEChemistryType>::solve Foam::scalar Foam::noChemistrySolver<ChemistryModel>::solve
( (
scalarField&, scalarField&,
const scalar, const scalar,

View File

@ -47,10 +47,10 @@ namespace Foam
Class noChemistrySolver Declaration Class noChemistrySolver Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class ODEChemistryType> template<class ChemistryModel>
class noChemistrySolver class noChemistrySolver
: :
public chemistrySolver<ODEChemistryType> public chemistrySolver<ChemistryModel>
{ {
public: public:
@ -61,14 +61,8 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from components
noChemistrySolver noChemistrySolver(const fvMesh& mesh);
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
);
//- Destructor //- Destructor

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,19 +24,17 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "ode.H" #include "ode.H"
#include "ODEChemistryModel.H" #include "chemistryModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::ode<ODEChemistryType>::ode Foam::ode<ChemistryModel>::ode
( (
const fvMesh& mesh, const fvMesh& mesh
const word& ODEModelName,
const word& thermoType
) )
: :
chemistrySolver<ODEChemistryType>(mesh, ODEModelName, thermoType), chemistrySolver<ChemistryModel>(mesh),
coeffsDict_(this->subDict("odeCoeffs")), coeffsDict_(this->subDict("odeCoeffs")),
solverName_(coeffsDict_.lookup("solver")), solverName_(coeffsDict_.lookup("solver")),
odeSolver_(ODESolver::New(solverName_, *this)), odeSolver_(ODESolver::New(solverName_, *this)),
@ -46,15 +44,15 @@ Foam::ode<ODEChemistryType>::ode
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::ode<ODEChemistryType>::~ode() Foam::ode<ChemistryModel>::~ode()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::scalar Foam::ode<ODEChemistryType>::solve Foam::scalar Foam::ode<ChemistryModel>::solve
( (
scalarField& c, scalarField& c,
const scalar T, const scalar T,

View File

@ -47,10 +47,10 @@ namespace Foam
Class ode Declaration Class ode Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class ODEChemistryType> template<class ChemistryModel>
class ode class ode
: :
public chemistrySolver<ODEChemistryType> public chemistrySolver<ChemistryModel>
{ {
// Private data // Private data
@ -66,18 +66,13 @@ class ode
public: public:
//- Runtime type information //- Runtime type information
TypeName("ODE"); TypeName("ode");
// Constructors // Constructors
//- Construct from components //- Construct from mesh
ode ode(const fvMesh& mesh);
(
const fvMesh& mesh,
const word& ODEModeNewlName,
const word& thermoType
);
//- Destructor //- Destructor

View File

@ -28,15 +28,13 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::sequential<ODEChemistryType>::sequential Foam::sequential<ChemistryModel>::sequential
( (
const fvMesh& mesh, const fvMesh& mesh
const word& ODEModelName,
const word& thermoType
) )
: :
chemistrySolver<ODEChemistryType>(mesh, ODEModelName, thermoType), chemistrySolver<ChemistryModel>(mesh),
coeffsDict_(this->subDict("sequentialCoeffs")), coeffsDict_(this->subDict("sequentialCoeffs")),
cTauChem_(readScalar(coeffsDict_.lookup("cTauChem"))), cTauChem_(readScalar(coeffsDict_.lookup("cTauChem"))),
eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter")) eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter"))
@ -45,15 +43,15 @@ Foam::sequential<ODEChemistryType>::sequential
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::sequential<ODEChemistryType>::~sequential() Foam::sequential<ChemistryModel>::~sequential()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ODEChemistryType> template<class ChemistryModel>
Foam::scalar Foam::sequential<ODEChemistryType>::solve Foam::scalar Foam::sequential<ChemistryModel>::solve
( (
scalarField &c, scalarField &c,
const scalar T, const scalar T,

View File

@ -48,17 +48,16 @@ namespace Foam
Class sequential Declaration Class sequential Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class ODEChemistryType> template<class ChemistryModel>
class sequential class sequential
: :
public chemistrySolver<ODEChemistryType> public chemistrySolver<ChemistryModel>
{ {
// Private data // Private data
//- Coefficients dictionary //- Coefficients dictionary
dictionary coeffsDict_; dictionary coeffsDict_;
// Model constants // Model constants
//- Chemistry time scale //- Chemistry time scale
@ -76,13 +75,8 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from mesh
sequential sequential(const fvMesh& mesh);
(
const fvMesh& mesh,
const word& ODEModelName,
const word& thermoType
);
//- Destructor //- Destructor

View File

@ -149,6 +149,7 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
"radiationProperties" "radiationProperties"
); );
// Force recalculation of mapping and schedule // Force recalculation of mapping and schedule
const mapDistribute& distMap = mpp.map(); const mapDistribute& distMap = mpp.map();
@ -157,6 +158,7 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
nbrMesh nbrMesh
).boundary()[mpp.samplePolyPatch().index()]; ).boundary()[mpp.samplePolyPatch().index()];
scalarField emissivity scalarField emissivity
( (
radiation.absorptionEmission().e()().boundaryField() radiation.absorptionEmission().e()().boundaryField()
@ -182,8 +184,7 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
FatalErrorIn FatalErrorIn
( (
"radiationCoupledBase::emissivity(const scalarField&)" "radiationCoupledBase::emissivity(const scalarField&)"
) ) << "Unimplemented method " << method_ << endl
<< "Unimplemented method " << method_ << endl
<< "Please set 'emissivity' to one of " << "Please set 'emissivity' to one of "
<< emissivityMethodTypeNames_.toc() << emissivityMethodTypeNames_.toc()
<< " and 'emissivityName' to the name of the volScalar" << " and 'emissivityName' to the name of the volScalar"
@ -191,6 +192,7 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
} }
break; break;
} }
return scalarField(0); return scalarField(0);
} }

View File

@ -4,14 +4,14 @@ chemistryReaders/chemistryReader/makeChemistryReaders.C
mixtures/basicMultiComponentMixture/basicMultiComponentMixture.C mixtures/basicMultiComponentMixture/basicMultiComponentMixture.C
psiReactionThermo/psiReactionThermo/psiReactionThermo.C psiReactionThermo/psiReactionThermo.C
psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C psiReactionThermo/psiReactionThermos.C
psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C psiuReactionThermo/psiuReactionThermo.C
psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C psiuReactionThermo/psiuReactionThermos.C
rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C rhoReactionThermo/rhoReactionThermo.C
rhoReactionThermo/heRhoReactionThermo/heRhoReactionThermos.C rhoReactionThermo/rhoReactionThermos.C
derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C
derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C derivedFvPatchFields/gradientUnburntEnthalpy/gradientUnburntEnthalpyFvPatchScalarField.C

View File

@ -35,6 +35,7 @@ License
\ \
typedef MixtureThermo \ typedef MixtureThermo \
< \ < \
CThermo, \
SpecieMixture \ SpecieMixture \
< \ < \
Mixture \ Mixture \

View File

@ -1,147 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "hePsiReactionThermo.H"
#include "fvMesh.H"
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType>
void Foam::hePsiReactionThermo<MixtureType>::calculate()
{
const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_.internalField();
scalarField& TCells = this->T_.internalField();
scalarField& psiCells = this->psi_.internalField();
scalarField& muCells = this->mu_.internalField();
scalarField& alphaCells = this->alpha_.internalField();
forAll(TCells, celli)
{
const typename MixtureType::thermoType& mixture =
this->cellMixture(celli);
TCells[celli] = mixture.THE
(
hCells[celli],
pCells[celli],
TCells[celli]
);
psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]);
muCells[celli] = mixture.mu(pCells[celli], TCells[celli]);
alphaCells[celli] = mixture.alphah(pCells[celli], TCells[celli]);
}
forAll(this->T_.boundaryField(), patchi)
{
fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi];
fvPatchScalarField& ph = this->he_.boundaryField()[patchi];
fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi];
fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi];
if (pT.fixesValue())
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture =
this->patchFaceMixture(patchi, facei);
ph[facei] = mixture.HE(pp[facei], pT[facei]);
ppsi[facei] = mixture.psi(pp[facei], pT[facei]);
pmu_[facei] = mixture.mu(pp[facei], pT[facei]);
palpha_[facei] = mixture.alphah(pp[facei], pT[facei]);
}
}
else
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture =
this->patchFaceMixture(patchi, facei);
pT[facei] = mixture.THE(ph[facei], pp[facei], pT[facei]);
ppsi[facei] = mixture.psi(pp[facei], pT[facei]);
pmu_[facei] = mixture.mu(pp[facei], pT[facei]);
palpha_[facei] = mixture.alphah(pp[facei], pT[facei]);
}
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::hePsiReactionThermo<MixtureType>::hePsiReactionThermo(const fvMesh& mesh)
:
heThermo<psiReactionThermo, MixtureType>(mesh)
{
calculate();
// Switch on saving old time
this->psi_.oldTime();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::hePsiReactionThermo<MixtureType>::~hePsiReactionThermo()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType>
void Foam::hePsiReactionThermo<MixtureType>::correct()
{
if (debug)
{
Info<< "entering hePsiReactionThermo<MixtureType>::correct()" << endl;
}
// force the saving of the old-time values
this->psi_.oldTime();
calculate();
if (debug)
{
Info<< "exiting hePsiReactionThermo<MixtureType>::correct()" << endl;
}
}
// ************************************************************************* //

View File

@ -26,7 +26,7 @@ License
#include "makeReactionThermo.H" #include "makeReactionThermo.H"
#include "psiReactionThermo.H" #include "psiReactionThermo.H"
#include "hePsiReactionThermo.H" #include "hePsiThermo.H"
#include "specie.H" #include "specie.H"
#include "perfectGas.H" #include "perfectGas.H"
@ -59,7 +59,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
homogeneousMixture, homogeneousMixture,
constTransport, constTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -72,7 +72,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
inhomogeneousMixture, inhomogeneousMixture,
constTransport, constTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -85,7 +85,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
veryInhomogeneousMixture, veryInhomogeneousMixture,
constTransport, constTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -101,7 +101,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
homogeneousMixture, homogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -114,7 +114,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
inhomogeneousMixture, inhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -127,7 +127,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
veryInhomogeneousMixture, veryInhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -143,7 +143,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
homogeneousMixture, homogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -156,7 +156,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
inhomogeneousMixture, inhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -169,7 +169,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
veryInhomogeneousMixture, veryInhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -185,7 +185,7 @@ makeReactionMixtureThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
multiComponentMixture, multiComponentMixture,
constGasThermoPhysics constGasThermoPhysics
); );
@ -194,7 +194,7 @@ makeReactionMixtureThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
multiComponentMixture, multiComponentMixture,
gasThermoPhysics gasThermoPhysics
); );
@ -206,7 +206,7 @@ makeReactionMixtureThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
reactingMixture, reactingMixture,
constGasThermoPhysics constGasThermoPhysics
); );
@ -215,7 +215,7 @@ makeReactionMixtureThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
reactingMixture, reactingMixture,
gasThermoPhysics gasThermoPhysics
); );
@ -224,7 +224,7 @@ makeReactionMixtureThermo
( (
psiThermo, psiThermo,
psiReactionThermo, psiReactionThermo,
hePsiReactionThermo, hePsiThermo,
singleStepReactingMixture, singleStepReactingMixture,
gasThermoPhysics gasThermoPhysics
); );

View File

@ -23,14 +23,14 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "heheuReactionThermo.H" #include "heheuPsiThermo.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "fixedValueFvPatchFields.H" #include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
void Foam::heheuReactionThermo<MixtureType>::calculate() void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::calculate()
{ {
const scalarField& hCells = this->he_.internalField(); const scalarField& hCells = this->he_.internalField();
const scalarField& heuCells = this->heu_.internalField(); const scalarField& heuCells = this->heu_.internalField();
@ -118,8 +118,11 @@ void Foam::heheuReactionThermo<MixtureType>::calculate()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::heheuReactionThermo<MixtureType>::heheuReactionThermo(const fvMesh& mesh) Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heheuPsiThermo
(
const fvMesh& mesh
)
: :
heThermo<psiuReactionThermo, MixtureType>(mesh), heThermo<psiuReactionThermo, MixtureType>(mesh),
Tu_ Tu_
@ -188,19 +191,20 @@ Foam::heheuReactionThermo<MixtureType>::heheuReactionThermo(const fvMesh& mesh)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::heheuReactionThermo<MixtureType>::~heheuReactionThermo() Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::~heheuPsiThermo()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
void Foam::heheuReactionThermo<MixtureType>::correct() void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()
{ {
if (debug) if (debug)
{ {
Info<< "entering heheuReactionThermo<MixtureType>::correct()" << endl; Info<< "entering heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()"
<< endl;
} }
// force the saving of the old-time values // force the saving of the old-time values
@ -210,14 +214,15 @@ void Foam::heheuReactionThermo<MixtureType>::correct()
if (debug) if (debug)
{ {
Info<< "exiting heheuReactionThermo<MixtureType>::correct()" << endl; Info<< "exiting heheuPsiThermo<BasicPsiThermo, MixtureType>::correct()"
<< endl;
} }
} }
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::heheuReactionThermo<MixtureType>::heu Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
( (
const scalarField& p, const scalarField& p,
const scalarField& Tu, const scalarField& Tu,
@ -236,9 +241,9 @@ Foam::heheuReactionThermo<MixtureType>::heu
} }
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::heheuReactionThermo<MixtureType>::heu Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
( (
const scalarField& p, const scalarField& p,
const scalarField& Tu, const scalarField& Tu,
@ -258,9 +263,9 @@ Foam::heheuReactionThermo<MixtureType>::heu
} }
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::Tb() const Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::Tb() const
{ {
tmp<volScalarField> tTb tmp<volScalarField> tTb
( (
@ -314,9 +319,9 @@ Foam::heheuReactionThermo<MixtureType>::Tb() const
} }
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::psiu() const Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psiu() const
{ {
tmp<volScalarField> tpsiu tmp<volScalarField> tpsiu
( (
@ -365,9 +370,9 @@ Foam::heheuReactionThermo<MixtureType>::psiu() const
} }
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::psib() const Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psib() const
{ {
tmp<volScalarField> tpsib tmp<volScalarField> tpsib
( (
@ -417,9 +422,9 @@ Foam::heheuReactionThermo<MixtureType>::psib() const
} }
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::muu() const Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::muu() const
{ {
tmp<volScalarField> tmuu tmp<volScalarField> tmuu
( (
@ -472,9 +477,9 @@ Foam::heheuReactionThermo<MixtureType>::muu() const
} }
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::heheuReactionThermo<MixtureType>::mub() const Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::mub() const
{ {
tmp<volScalarField> tmub tmp<volScalarField> tmub
( (

View File

@ -36,7 +36,6 @@ SourceFiles
#define heheuReactionThermo_H #define heheuReactionThermo_H
#include "heThermo.H" #include "heThermo.H"
#include "psiuReactionThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -44,13 +43,13 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class heheuReactionThermo Declaration Class heheuPsiThermo Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class MixtureType> template<class BasicPsiThermo, class MixtureType>
class heheuReactionThermo class heheuPsiThermo
: :
public heThermo<psiuReactionThermo, MixtureType> public heThermo<BasicPsiThermo, MixtureType>
{ {
// Private Member Functions // Private Member Functions
@ -63,23 +62,26 @@ class heheuReactionThermo
void calculate(); void calculate();
//- Construct as copy (not implemented) //- Construct as copy (not implemented)
heheuReactionThermo(const heheuReactionThermo<MixtureType>&); heheuPsiThermo
(
const heheuPsiThermo<BasicPsiThermo, MixtureType>&
);
public: public:
//- Runtime type information //- Runtime type information
TypeName("heheuReactionThermo"); TypeName("heheuPsiThermo");
// Constructors // Constructors
//- Construct from mesh //- Construct from mesh
heheuReactionThermo(const fvMesh&); heheuPsiThermo(const fvMesh&);
//- Destructor //- Destructor
virtual ~heheuReactionThermo(); virtual ~heheuPsiThermo();
// Member functions // Member functions
@ -155,7 +157,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#ifdef NoRepository #ifdef NoRepository
# include "heheuReactionThermo.C" # include "heheuPsiThermo.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "psiuReactionThermo.H" #include "psiuReactionThermo.H"
#include "heheuReactionThermo.H" #include "heheuPsiThermo.H"
#include "makeReactionThermo.H" #include "makeReactionThermo.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
@ -56,7 +56,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiuReactionThermo, psiuReactionThermo,
heheuReactionThermo, heheuPsiThermo,
homogeneousMixture, homogeneousMixture,
constTransport, constTransport,
absoluteEnthalpy, absoluteEnthalpy,
@ -69,7 +69,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiuReactionThermo, psiuReactionThermo,
heheuReactionThermo, heheuPsiThermo,
inhomogeneousMixture, inhomogeneousMixture,
constTransport, constTransport,
absoluteEnthalpy, absoluteEnthalpy,
@ -82,7 +82,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiuReactionThermo, psiuReactionThermo,
heheuReactionThermo, heheuPsiThermo,
veryInhomogeneousMixture, veryInhomogeneousMixture,
constTransport, constTransport,
absoluteEnthalpy, absoluteEnthalpy,
@ -95,7 +95,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiuReactionThermo, psiuReactionThermo,
heheuReactionThermo, heheuPsiThermo,
homogeneousMixture, homogeneousMixture,
sutherlandTransport, sutherlandTransport,
absoluteEnthalpy, absoluteEnthalpy,
@ -108,7 +108,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiuReactionThermo, psiuReactionThermo,
heheuReactionThermo, heheuPsiThermo,
inhomogeneousMixture, inhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
absoluteEnthalpy, absoluteEnthalpy,
@ -121,7 +121,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiuReactionThermo, psiuReactionThermo,
heheuReactionThermo, heheuPsiThermo,
veryInhomogeneousMixture, veryInhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
absoluteEnthalpy, absoluteEnthalpy,
@ -134,7 +134,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiuReactionThermo, psiuReactionThermo,
heheuReactionThermo, heheuPsiThermo,
egrMixture, egrMixture,
constTransport, constTransport,
absoluteEnthalpy, absoluteEnthalpy,
@ -147,7 +147,7 @@ makeReactionThermo
( (
psiThermo, psiThermo,
psiuReactionThermo, psiuReactionThermo,
heheuReactionThermo, heheuPsiThermo,
egrMixture, egrMixture,
sutherlandTransport, sutherlandTransport,
absoluteEnthalpy, absoluteEnthalpy,

View File

@ -1,145 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "heRhoReactionThermo.H"
#include "fvMesh.H"
#include "fixedValueFvPatchFields.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class MixtureType>
void Foam::heRhoReactionThermo<MixtureType>::calculate()
{
const scalarField& hCells = this->he_.internalField();
const scalarField& pCells = this->p_.internalField();
scalarField& TCells = this->T_.internalField();
scalarField& psiCells = this->psi_.internalField();
scalarField& rhoCells = this->rho_.internalField();
scalarField& muCells = this->mu_.internalField();
scalarField& alphaCells = this->alpha_.internalField();
forAll(TCells, celli)
{
const typename MixtureType::thermoType& mixture =
this->cellMixture(celli);
TCells[celli] = mixture.THE
(
hCells[celli],
pCells[celli],
TCells[celli]
);
psiCells[celli] = mixture.psi(pCells[celli], TCells[celli]);
rhoCells[celli] = mixture.rho(pCells[celli], TCells[celli]);
muCells[celli] = mixture.mu(pCells[celli], TCells[celli]);
alphaCells[celli] = mixture.alphah(pCells[celli], TCells[celli]);
}
forAll(this->T_.boundaryField(), patchi)
{
fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi];
fvPatchScalarField& prho = this->rho_.boundaryField()[patchi];
fvPatchScalarField& ph = this->he_.boundaryField()[patchi];
fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi];
fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi];
if (pT.fixesValue())
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture =
this->patchFaceMixture(patchi, facei);
ph[facei] = mixture.HE(pp[facei], pT[facei]);
ppsi[facei] = mixture.psi(pp[facei], pT[facei]);
prho[facei] = mixture.rho(pp[facei], pT[facei]);
pmu_[facei] = mixture.mu(pp[facei], pT[facei]);
palpha_[facei] = mixture.alphah(pp[facei], pT[facei]);
}
}
else
{
forAll(pT, facei)
{
const typename MixtureType::thermoType& mixture =
this->patchFaceMixture(patchi, facei);
pT[facei] = mixture.THE(ph[facei], pp[facei], pT[facei]);
ppsi[facei] = mixture.psi(pp[facei], pT[facei]);
prho[facei] = mixture.rho(pp[facei], pT[facei]);
pmu_[facei] = mixture.mu(pp[facei], pT[facei]);
palpha_[facei] = mixture.alphah(pp[facei], pT[facei]);
}
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::heRhoReactionThermo<MixtureType>::heRhoReactionThermo(const fvMesh& mesh)
:
heThermo<rhoReactionThermo, MixtureType>(mesh)
{
calculate();
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class MixtureType>
Foam::heRhoReactionThermo<MixtureType>::~heRhoReactionThermo()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class MixtureType>
void Foam::heRhoReactionThermo<MixtureType>::correct()
{
if (debug)
{
Info<< "entering heRhoReactionThermo<MixtureType>::correct()" << endl;
}
calculate();
if (debug)
{
Info<< "exiting heRhoReactionThermo<MixtureType>::correct()" << endl;
}
}
// ************************************************************************* //

View File

@ -1,100 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::heRhoReactionThermo
Description
Foam::heRhoReactionThermo
SourceFiles
heRhoReactionThermo.C
\*---------------------------------------------------------------------------*/
#ifndef heRhoReactionThermo_H
#define heRhoReactionThermo_H
#include "heThermo.H"
#include "rhoReactionThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class heRhoReactionThermo Declaration
\*---------------------------------------------------------------------------*/
template<class MixtureType>
class heRhoReactionThermo
:
public heThermo<rhoReactionThermo, MixtureType>
{
// Private Member Functions
void calculate();
//- Construct as copy (not implemented)
heRhoReactionThermo(const heRhoReactionThermo<MixtureType>&);
public:
//- Runtime type information
TypeName("heRhoReactionThermo");
// Constructors
//- Construct from mesh
heRhoReactionThermo(const fvMesh&);
//- Destructor
virtual ~heRhoReactionThermo();
// Member functions
//- Update properties
virtual void correct();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "heRhoReactionThermo.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -26,7 +26,7 @@ License
#include "makeReactionThermo.H" #include "makeReactionThermo.H"
#include "rhoReactionThermo.H" #include "rhoReactionThermo.H"
#include "heRhoReactionThermo.H" #include "heRhoThermo.H"
#include "specie.H" #include "specie.H"
#include "perfectGas.H" #include "perfectGas.H"
@ -59,7 +59,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
homogeneousMixture, homogeneousMixture,
constTransport, constTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -72,7 +72,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
inhomogeneousMixture, inhomogeneousMixture,
constTransport, constTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -85,7 +85,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
veryInhomogeneousMixture, veryInhomogeneousMixture,
constTransport, constTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -98,7 +98,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
homogeneousMixture, homogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -111,7 +111,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
inhomogeneousMixture, inhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -124,7 +124,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
veryInhomogeneousMixture, veryInhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -138,7 +138,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
homogeneousMixture, homogeneousMixture,
constTransport, constTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -151,7 +151,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
inhomogeneousMixture, inhomogeneousMixture,
constTransport, constTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -164,7 +164,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
veryInhomogeneousMixture, veryInhomogeneousMixture,
constTransport, constTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -177,7 +177,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
homogeneousMixture, homogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -190,7 +190,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
inhomogeneousMixture, inhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -203,7 +203,7 @@ makeReactionThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
veryInhomogeneousMixture, veryInhomogeneousMixture,
sutherlandTransport, sutherlandTransport,
sensibleEnthalpy, sensibleEnthalpy,
@ -219,7 +219,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
constGasThermoPhysics constGasThermoPhysics
); );
@ -228,7 +228,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
gasThermoPhysics gasThermoPhysics
); );
@ -237,7 +237,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
constIncompressibleGasThermoPhysics constIncompressibleGasThermoPhysics
); );
@ -246,7 +246,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
incompressibleGasThermoPhysics incompressibleGasThermoPhysics
); );
@ -255,7 +255,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
icoPoly8ThermoPhysics icoPoly8ThermoPhysics
); );
@ -267,7 +267,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
reactingMixture, reactingMixture,
constGasThermoPhysics constGasThermoPhysics
); );
@ -276,7 +276,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
reactingMixture, reactingMixture,
gasThermoPhysics gasThermoPhysics
); );
@ -285,7 +285,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
reactingMixture, reactingMixture,
constIncompressibleGasThermoPhysics constIncompressibleGasThermoPhysics
); );
@ -294,7 +294,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
reactingMixture, reactingMixture,
incompressibleGasThermoPhysics incompressibleGasThermoPhysics
); );
@ -303,7 +303,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
reactingMixture, reactingMixture,
icoPoly8ThermoPhysics icoPoly8ThermoPhysics
); );
@ -312,7 +312,7 @@ makeReactionMixtureThermo
( (
rhoThermo, rhoThermo,
rhoReactionThermo, rhoReactionThermo,
heRhoReactionThermo, heRhoThermo,
singleStepReactingMixture, singleStepReactingMixture,
gasThermoPhysics gasThermoPhysics
); );

View File

@ -32,12 +32,10 @@ template<class CompType, class SolidThermo, class GasThermo>
Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>:: Foam::ODESolidChemistryModel<CompType, SolidThermo, GasThermo>::
ODESolidChemistryModel ODESolidChemistryModel
( (
const fvMesh& mesh, const fvMesh& mesh
const word& compTypeName,
const word& solidThermoName
) )
: :
CompType(mesh, solidThermoName), CompType(mesh),
ODE(), ODE(),
Ys_(this->solid().composition().Y()), Ys_(this->solid().composition().Y()),
pyrolisisGases_ pyrolisisGases_

View File

@ -138,13 +138,8 @@ public:
// Constructors // Constructors
//- Construct from components //- Construct from mesh
ODESolidChemistryModel ODESolidChemistryModel(const fvMesh& mesh);
(
const fvMesh& mesh,
const word& compTypeName,
const word& SolidThermoName
);
//- Destructor //- Destructor

View File

@ -39,12 +39,11 @@ namespace Foam
Foam::solidChemistryModel::solidChemistryModel Foam::solidChemistryModel::solidChemistryModel
( (
const fvMesh& mesh, const fvMesh& mesh
const word& solidThermoTypeName
) )
: :
basicChemistryModel(mesh), basicChemistryModel(mesh),
solidThermo_(solidReactionThermo::New(mesh)) //, thermoTypeName)) solidThermo_(solidReactionThermo::New(mesh))
{} {}

View File

@ -88,23 +88,15 @@ public:
autoPtr, autoPtr,
solidChemistryModel, solidChemistryModel,
fvMesh, fvMesh,
( (const fvMesh& mesh),
const fvMesh& mesh, (mesh)
const word& compTypeName,
const word& solidThermoTypeName
),
(mesh, compTypeName, solidThermoTypeName)
); );
// Constructors // Constructors
//- Construct from mesh and thermo type name //- Construct from mesh
solidChemistryModel solidChemistryModel(const fvMesh& mesh);
(
const fvMesh& mesh,
const word& solidThermoTypeName
);
//- Selector //- Selector

View File

@ -104,8 +104,7 @@ Foam::autoPtr<Foam::solidChemistryModel> Foam::solidChemistryModel::New
} }
} }
return autoPtr<solidChemistryModel> return autoPtr<solidChemistryModel>(cstrIter()(mesh));
(cstrIter()(mesh, ODEModelName, thermoTypeName));
} }

View File

@ -1,4 +1,4 @@
reaction/Reactions/solidReaction/solidReaction.C reaction/Reactions/solidReaction/solidReaction.C
reaction/reactions/makeSolidReactionThermoReactions.C reaction/reactions/makeSolidReactions.C
LIB = $(FOAM_LIBBIN)/libsolidSpecie LIB = $(FOAM_LIBBIN)/libsolidSpecie

View File

@ -22,10 +22,10 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
InClass InClass
Foam::makeSolidReactionThermo Foam::makeSolidReaction
Description Description
Macros for instantiating reactions on given solid thermo packages Macros for instantiating reactions for solid
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -79,5 +79,4 @@ namespace Foam
#endif #endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "makeSolidReactionThermo.H" #include "makeSolidReaction.H"
#include "solidArrheniusReactionRate.H" #include "solidArrheniusReactionRate.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,10 +1,11 @@
solidThermo/solidThermo.C solidThermo/solidThermo.C
solidThermo/solidThermoNew.C solidThermo/solidThermoNew.C
solidThermo/solidThermos.C
mixtures/basicSolidMixture/basicSolidMixture.C mixtures/basicSolidMixture/basicSolidMixture.C
solidReactionThermo/solidReactionThermo.C solidReactionThermo/solidReactionThermo.C
solidReactionThermo/solidReactionThermoNew.C solidReactionThermo/solidReactionThermoNew.C
heSolidThermo/heSolidThermos.C solidReactionThermo/solidReactionThermos.C
LIB = $(FOAM_LIBBIN)/libsolidThermo LIB = $(FOAM_LIBBIN)/libsolidThermo

View File

@ -191,21 +191,9 @@ public:
//- Density //- Density
virtual scalar rho(scalar p, scalar T, label celli) const = 0; virtual scalar rho(scalar p, scalar T, label celli) const = 0;
//- Absorption coefficient
virtual scalar kappaRad(scalar p, scalar T, label celli) const = 0;
//- Scatter coefficient
virtual scalar sigmaS(scalar p, scalar T, label celli) const = 0;
//- Thermal conductivity //- Thermal conductivity
virtual scalar kappa(scalar p, scalar T, label celli) const = 0; virtual scalar kappa(scalar p, scalar T, label celli) const = 0;
//- Emissivity coefficient
virtual scalar emissivity
(
scalar p, scalar T, label celli
) const = 0;
//- Specific heat capacity //- Specific heat capacity
virtual scalar Cp(scalar p, scalar T, label celli) const = 0; virtual scalar Cp(scalar p, scalar T, label celli) const = 0;
}; };
@ -217,7 +205,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "basicSolidMixtureI.H" #include "basicSolidMixtureI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -29,7 +29,6 @@ Description
#include "basicMixture.H" #include "basicMixture.H"
#include "makeBasicMixture.H" #include "makeBasicMixture.H"
#include "rhoConst.H" #include "rhoConst.H"
#include "hConstThermo.H" #include "hConstThermo.H"
@ -39,8 +38,6 @@ Description
#include "constAnIsoSolidTransport.H" #include "constAnIsoSolidTransport.H"
#include "exponentialSolidTransport.H" #include "exponentialSolidTransport.H"
#include "constSolidRad.H"
#include "sensibleInternalEnergy.H" #include "sensibleInternalEnergy.H"
#include "sensibleEnthalpy.H" #include "sensibleEnthalpy.H"
#include "thermo.H" #include "thermo.H"

View File

@ -316,36 +316,6 @@ Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::rho
} }
template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::kappaRad
(
scalar p, scalar T, label celli
) const
{
scalar tmp = 0.0;
forAll(solidData_, i)
{
tmp += solidData_[i].kappaRad(T)*X(i, celli, p, T);
}
return tmp;
}
template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::sigmaS
(
scalar p, scalar T, label celli
) const
{
scalar tmp = 0.0;
forAll(solidData_, i)
{
tmp += solidData_[i].sigmaS(T)*X(i, celli, p, T);
}
return tmp;
}
template<class ThermoType> template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::kappa Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::kappa
( (
@ -361,21 +331,6 @@ Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::kappa
} }
template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::emissivity
(
scalar p, scalar T, label celli
) const
{
scalar tmp = 0.0;
forAll(solidData_, i)
{
tmp += solidData_[i].emissivity(T)*X(i, celli, p, T);
}
return tmp;
}
template<class ThermoType> template<class ThermoType>
Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::Cp Foam::scalar Foam::multiComponentSolidMixture<ThermoType>::Cp
( (

View File

@ -208,21 +208,11 @@ public:
//- Density //- Density
virtual scalar rho(scalar p, scalar T, label celli) const; virtual scalar rho(scalar p, scalar T, label celli) const;
//- Absorption coefficient
virtual scalar kappaRad(scalar p, scalar T, label celli) const;
//- Scatter coefficient
virtual scalar sigmaS(scalar p, scalar T, label celli) const;
//- Thermal conductivity //- Thermal conductivity
virtual scalar kappa(scalar p, scalar T, label celli) const; virtual scalar kappa(scalar p, scalar T, label celli) const;
//- Emissivity coefficient
virtual scalar emissivity(scalar p, scalar T, label celli) const;
//- Specific heat capacity //- Specific heat capacity
virtual scalar Cp(scalar p, scalar T, label celli) const; virtual scalar Cp(scalar p, scalar T, label celli) const;
}; };

View File

@ -31,7 +31,7 @@ License
namespace Foam namespace Foam
{ {
defineTypeNameAndDebug(solidReactionThermo, 0); defineTypeNameAndDebug(solidReactionThermo, 0);
defineRunTimeSelectionTable(solidReactionThermo, mesh); defineRunTimeSelectionTable(solidReactionThermo, fvMesh);
defineRunTimeSelectionTable(solidReactionThermo, dictionary); defineRunTimeSelectionTable(solidReactionThermo, dictionary);
} }

View File

@ -66,7 +66,7 @@ public:
( (
autoPtr, autoPtr,
solidReactionThermo, solidReactionThermo,
mesh, fvMesh,
(const fvMesh& mesh), (const fvMesh& mesh),
(mesh) (mesh)
); );

View File

@ -53,16 +53,16 @@ Foam::autoPtr<Foam::solidReactionThermo> Foam::solidReactionThermo::New
Info<< "Selecting thermodynamics package " << modelType << endl; Info<< "Selecting thermodynamics package " << modelType << endl;
meshConstructorTable::iterator cstrIter = fvMeshConstructorTable::iterator cstrIter =
meshConstructorTablePtr_->find(modelType); fvMeshConstructorTablePtr_->find(modelType);
if (cstrIter == meshConstructorTablePtr_->end()) if (cstrIter == fvMeshConstructorTablePtr_->end())
{ {
FatalErrorIn("solidReactionThermo::New(const fvMesh&)") FatalErrorIn("solidReactionThermo::New(const fvMesh&)")
<< "Unknown solidReactionThermo type " << "Unknown solidReactionThermo type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid solidReactionThermo types:" << nl << "Valid solidReactionThermo types:" << nl
<< meshConstructorTablePtr_->sortedToc() << nl << fvMeshConstructorTablePtr_->sortedToc() << nl
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -21,80 +21,46 @@ License
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::hePsiReactionThermo
Description
Foam::hePsiReactionThermo
SourceFiles
hePsiReactionThermo.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef hePsiReactionThermo_H #include "makeSolidThermo.H"
#define hePsiReactionThermo_H #include "solidReactionThermo.H"
#include "heSolidThermo.H"
#include "specie.H"
#include "rhoConst.H"
#include "hConstThermo.H"
#include "hExponentialThermo.H"
#include "constIsoSolidTransport.H"
#include "constAnIsoSolidTransport.H"
#include "exponentialSolidTransport.H"
#include "reactingSolidMixture.H"
#include "sensibleEnthalpy.H"
#include "thermo.H"
#include "heThermo.H"
#include "psiReactionThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /* * * * * * * * * * * * * * * * * Enthalpy-based * * * * * * * * * * * * * */
Class hePsiReactionThermo Declaration
\*---------------------------------------------------------------------------*/
template<class MixtureType> makeSolidThermo
class hePsiReactionThermo (
: solidReactionThermo,
public heThermo<psiReactionThermo, MixtureType> heSolidThermo,
{ reactingSolidMixture,
// Private Member Functions constIsoSolidTransport,
sensibleEnthalpy,
void calculate(); hConstThermo,
rhoConst,
//- Construct as copy (not implemented) specie
hePsiReactionThermo(const hePsiReactionThermo<MixtureType>&); );
public:
//- Runtime type information
TypeName("hePsiReactionThermo");
// Constructors
//- Construct from mesh
hePsiReactionThermo(const fvMesh&);
//- Destructor
virtual ~hePsiReactionThermo();
// Member functions
//- Update properties
virtual void correct();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "hePsiReactionThermo.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* // // ************************************************************************* //

View File

@ -230,192 +230,6 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa() const
} }
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::kappaRad() const
{
const fvMesh& mesh = this->T_.mesh();
tmp<volScalarField> tkappaRad
(
new volScalarField
(
IOobject
(
"kappaRad",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
inv(dimLength)
)
);
volScalarField& kappaRad = tkappaRad();
scalarField& kappaRadCells = kappaRad.internalField();
const scalarField& TCells = this->T_.internalField();
const scalarField& pCells = this->p_.internalField();
forAll(kappaRadCells, celli)
{
kappaRadCells[celli] =
this->cellVolMixture
(
pCells[celli],
TCells[celli],
celli
).kappaRad(TCells[celli]);
}
forAll(kappaRad.boundaryField(), patchi)
{
scalarField& kappaRadp = kappaRad.boundaryField()[patchi];
const scalarField& pT = this->T_.boundaryField()[patchi];
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(kappaRadp, facei)
{
kappaRadp[facei] =
this->patchFaceVolMixture
(
pp[facei],
pT[facei],
patchi,
facei
).kappaRad(pT[facei]);
}
}
return tkappaRad;
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::sigmaS() const
{
const fvMesh& mesh = this->T_.mesh();
tmp<volScalarField> tsigmaS
(
new volScalarField
(
IOobject
(
"sigmaS",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
inv(dimLength)
)
);
volScalarField& sigmaS = tsigmaS();
scalarField& sigmaSCells = sigmaS.internalField();
const scalarField& TCells = this->T_.internalField();
const scalarField& pCells = this->p_.internalField();
forAll(sigmaSCells, celli)
{
sigmaSCells[celli] =
this->cellVolMixture
(
pCells[celli],
TCells[celli],
celli
).sigmaS(TCells[celli]);
}
forAll(sigmaS.boundaryField(), patchi)
{
scalarField& sigmaSp = sigmaS.boundaryField()[patchi];
const scalarField& pT = this->T_.boundaryField()[patchi];
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(sigmaSp, facei)
{
sigmaSp[facei] =
this->patchFaceVolMixture
(
pp[facei],
pT[facei],
patchi,
facei
).sigmaS(pT[facei]);
}
}
return tsigmaS;
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::volScalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::emissivity() const
{
const fvMesh& mesh = this->T_.mesh();
tmp<volScalarField> temissivity
(
new volScalarField
(
IOobject
(
"emissivity",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
inv(dimLength)
)
);
volScalarField& emissivity = temissivity();
scalarField& emissivityCells = emissivity.internalField();
const scalarField& TCells = this->T_.internalField();
const scalarField& pCells = this->p_.internalField();
forAll(emissivityCells, celli)
{
emissivityCells[celli] =
this->cellVolMixture
(
pCells[celli],
TCells[celli],
celli
).emissivity(TCells[celli]);
}
forAll(emissivity.boundaryField(), patchi)
{
scalarField& emissivityp = emissivity.boundaryField()[patchi];
const scalarField& pT = this->T_.boundaryField()[patchi];
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(emissivityp, facei)
{
emissivityp[facei] =
this->patchFaceVolMixture
(
pp[facei],
pT[facei],
patchi,
facei
).emissivity(pT[facei]);
}
}
return temissivity;
}
template<class BasicSolidThermo, class MixtureType> template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::vectorField> Foam::tmp<Foam::vectorField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa
@ -445,89 +259,4 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa
} }
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::kappaRad
(
const label patchi
) const
{
const scalarField& Tp = this->T_.boundaryField()[patchi];
tmp<scalarField> tKappaRad(new scalarField(Tp.size()));
scalarField& KappapRadp = tKappaRad();
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(Tp, facei)
{
KappapRadp[facei] =
this->patchFaceVolMixture
(
pp[facei],
Tp[facei],
patchi,
facei
).kappaRad(Tp[facei]);
}
return tKappaRad;
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::sigmaS
(
const label patchi
) const
{
const scalarField& Tp = this->T_.boundaryField()[patchi];
tmp<scalarField> tsigmaS(new scalarField(Tp.size()));
scalarField& sigmaSp = tsigmaS();
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(Tp, facei)
{
sigmaSp[facei] =
this->patchFaceVolMixture
(
pp[facei],
Tp[facei],
patchi,
facei
).sigmaS(Tp[facei]);
}
return tsigmaS;
}
template<class BasicSolidThermo, class MixtureType>
Foam::tmp<Foam::scalarField>
Foam::heSolidThermo<BasicSolidThermo, MixtureType>::emissivity
(
const label patchi
) const
{
const scalarField& Tp = this->T_.boundaryField()[patchi];
tmp<scalarField> temissivity(new scalarField(Tp.size()));
scalarField& emissivity = temissivity();
const scalarField& pp = this->p_.boundaryField()[patchi];
forAll(Tp, facei)
{
emissivity[facei] =
this->patchFaceVolMixture
(
pp[facei],
Tp[facei],
patchi,
facei
).emissivity(Tp[facei]);
}
return temissivity;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -25,7 +25,7 @@ Class
Foam::heSolidThermo Foam::heSolidThermo
Description Description
Enthalpy, internal energy based for a solid mixture. Energy for a solid mixture
SourceFiles SourceFiles
heSolidThermo.C heSolidThermo.C
@ -51,7 +51,6 @@ class heSolidThermo
: :
public heThermo<BasicSolidThermo, MixtureType> public heThermo<BasicSolidThermo, MixtureType>
{ {
// Private Member Functions // Private Member Functions
//- Calculate the thermo variables //- Calculate the thermo variables
@ -91,29 +90,11 @@ public:
//- Anisotropic thermal conductivity [W/m/K] //- Anisotropic thermal conductivity [W/m/K]
virtual tmp<volVectorField> Kappa() const; virtual tmp<volVectorField> Kappa() const;
//- Absorption coefficient [1/m]
virtual tmp<volScalarField> kappaRad() const;
//- Scatter coefficient
virtual tmp<volScalarField> sigmaS() const;
//- Emissivity coefficient [1/m]
virtual tmp<volScalarField> emissivity() const;
// Per patch calculation // Per patch calculation
//- Anisotropic thermal conductivity [W/m/K] //- Anisotropic thermal conductivity [W/m/K]
virtual tmp<vectorField> Kappa(const label patchI) const; virtual tmp<vectorField> Kappa(const label patchI) const;
//- Absorption coefficient [1/m]
virtual tmp<scalarField> kappaRad(const label patchI) const;
//- Scatter coefficient
virtual tmp<scalarField> sigmaS(const label patchI) const;
//- Emissivity coefficient [1/m]
virtual tmp<scalarField> emissivity(const label patchI) const;
}; };

View File

@ -32,79 +32,42 @@ Description
#ifndef makeSolidThermo_H #ifndef makeSolidThermo_H
#define makesolidThermo_H #define makesolidThermo_H
#include "addToRunTimeSelectionTable.H" #include "makeThermo.H"
#include "basicThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeSolidThermo(BaseThermo,Cthermo,Mixture,Transport,Radiation,Type,Thermo,EqnOfState,Specie)\ #define makeSolidThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie)\
\ \
typedef \ makeThermoTypedefs \
Transport \
< \
Radiation \
< \
species::thermo \
< \
Thermo \
< \
EqnOfState \
< \
Specie \
> \
>, \
Type \
> \
> \
> Transport##Radiation##Type##Thermo##EqnOfState##Specie; \
\
typedef \
Mixture \
< \
Transport##Radiation##Type##Thermo##EqnOfState##Specie \
> Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie; \
\
typedef \
Cthermo \
< \
BaseThermo, \
Mixture##Transport##Radiation##Type##Thermo##EqnOfState##Specie \
> Cthermo##Mixture##Transport##Radiation##Type##Thermo \
##EqnOfState##Specie; \
\
defineTemplateTypeNameAndDebugWithName \
( \ ( \
Cthermo##Mixture##Transport##Radiation##Type##Thermo \ BaseThermo, \
##EqnOfState##Specie, \ Cthermo, \
( \ Mixture, \
#Cthermo"<"#Mixture"<" \ Transport, \
+ Transport##Radiation##Type##Thermo##EqnOfState##Specie::typeName() \ Type, \
+ ">>" \ Thermo, \
).c_str(), \ EqnOfState, \
0 \ Specie \
); \ ) \
\ \
addToRunTimeSelectionTable \ addToRunTimeSelectionTable \
( \ ( \
basicThermo, \ basicThermo, \
Cthermo##Mixture##Transport##Radiation##Type##Thermo \ Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
##EqnOfState##Specie, \
fvMesh \ fvMesh \
); \ ); \
\ \
addToRunTimeSelectionTable \ addToRunTimeSelectionTable \
( \ ( \
BaseThermo, \ BaseThermo, \
Cthermo##Mixture##Transport##Radiation##Type##Thermo \ Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
##EqnOfState##Specie, \
fvMesh \ fvMesh \
); \ ); \
\ \
addToRunTimeSelectionTable \ addToRunTimeSelectionTable \
( \ ( \
BaseThermo, \ BaseThermo, \
Cthermo##Mixture##Transport##Radiation##Type##Thermo \ Cthermo##Mixture##Transport##Type##Thermo##EqnOfState##Specie, \
##EqnOfState##Specie, \
dictionary \ dictionary \
); );

View File

@ -127,49 +127,20 @@ public:
//- Thermal conductivity [W/m/K] //- Thermal conductivity [W/m/K]
virtual tmp<volVectorField> Kappa() const = 0; virtual tmp<volVectorField> Kappa() const = 0;
//- Absorption coefficient [1/m]
virtual tmp<volScalarField> kappaRad() const = 0;
//- Scatter coefficient
virtual tmp<volScalarField> sigmaS() const = 0;
//- Emissivity coefficient [1/m]
virtual tmp<volScalarField> emissivity() const = 0;
// Per patch calculation // Per patch calculation
//- Anisotropic thermal conductivity [W/m/K] //- Anisotropic thermal conductivity [W/m/K]
virtual tmp<vectorField> Kappa virtual tmp<vectorField> Kappa
( (
const label patchI const label patchI
) const = 0; ) const = 0;
//- Absorption coefficient [1/m]
virtual tmp<scalarField> kappaRad
(
const label patchI
) const = 0;
//- Scatter coefficient
virtual tmp<scalarField> sigmaS
(
const label patchI
) const = 0;
//- Emissivity coefficient [1/m]
virtual tmp<scalarField> emissivity
(
const label patchI
) const = 0;
// I-O // I-O
//- Read thermophysicalProperties dictionary //- Read thermophysicalProperties dictionary
virtual bool read(); virtual bool read();
}; };

View File

@ -32,48 +32,20 @@ Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
const fvMesh& mesh const fvMesh& mesh
) )
{ {
if (debug) return basicThermo::New<solidThermo>(mesh);
{
Info<< "solidThermo::New(const fvMesh&): "
<< "constructing solidThermo"
<< endl;
}
const word thermoType
(
IOdictionary
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("thermoType")
);
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(thermoType);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn
(
"solidThermo::New(const fvMesh&)"
) << "Unknown solidThermo type " << thermoType
<< endl << endl
<< "Valid solidThermo types are :" << endl
<< fvMeshConstructorTablePtr_->toc()
<< exit(FatalError);
}
return autoPtr<solidThermo>(cstrIter()(mesh));
} }
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
(
const fvMesh& mesh,
const dictionary& dict
)
{
return basicThermo::New<solidThermo>(mesh, dict);
}
/*
Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
( (
const fvMesh& mesh, const fvMesh& mesh,
@ -106,6 +78,7 @@ Foam::autoPtr<Foam::solidThermo> Foam::solidThermo::New
return autoPtr<solidThermo>(cstrIter()(mesh, dict)); return autoPtr<solidThermo>(cstrIter()(mesh, dict));
} }
*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -23,8 +23,9 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "makeSolidThermo.H" #include "makeSolidThermo.H"
#include "solidThermo.H"
#include "heSolidThermo.H"
#include "specie.H" #include "specie.H"
#include "rhoConst.H" #include "rhoConst.H"
@ -33,7 +34,6 @@ License
#include "constIsoSolidTransport.H" #include "constIsoSolidTransport.H"
#include "constAnIsoSolidTransport.H" #include "constAnIsoSolidTransport.H"
#include "exponentialSolidTransport.H" #include "exponentialSolidTransport.H"
#include "constSolidRad.H"
#include "pureSolidMixture.H" #include "pureSolidMixture.H"
#include "multiComponentSolidMixture.H" #include "multiComponentSolidMixture.H"
#include "reactingSolidMixture.H" #include "reactingSolidMixture.H"
@ -41,11 +41,6 @@ License
#include "sensibleInternalEnergy.H" #include "sensibleInternalEnergy.H"
#include "thermo.H" #include "thermo.H"
#include "heThermo.H"
#include "solidThermo.H"
#include "solidReactionThermo.H"
#include "heSolidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -60,7 +55,6 @@ makeSolidThermo
heSolidThermo, heSolidThermo,
pureSolidMixture, pureSolidMixture,
constIsoSolidTransport, constIsoSolidTransport,
constSolidRad,
sensibleEnthalpy, sensibleEnthalpy,
hConstThermo, hConstThermo,
rhoConst, rhoConst,
@ -73,7 +67,6 @@ makeSolidThermo
heSolidThermo, heSolidThermo,
pureSolidMixture, pureSolidMixture,
constAnIsoSolidTransport, constAnIsoSolidTransport,
constSolidRad,
sensibleEnthalpy, sensibleEnthalpy,
hConstThermo, hConstThermo,
rhoConst, rhoConst,
@ -86,7 +79,6 @@ makeSolidThermo
heSolidThermo, heSolidThermo,
pureSolidMixture, pureSolidMixture,
exponentialSolidTransport, exponentialSolidTransport,
constSolidRad,
sensibleEnthalpy, sensibleEnthalpy,
hExponentialThermo, hExponentialThermo,
rhoConst, rhoConst,
@ -99,20 +91,6 @@ makeSolidThermo
heSolidThermo, heSolidThermo,
multiComponentSolidMixture, multiComponentSolidMixture,
constIsoSolidTransport, constIsoSolidTransport,
constSolidRad,
sensibleEnthalpy,
hConstThermo,
rhoConst,
specie
);
makeSolidThermo
(
solidReactionThermo,
heSolidThermo,
reactingSolidMixture,
constIsoSolidTransport,
constSolidRad,
sensibleEnthalpy, sensibleEnthalpy,
hConstThermo, hConstThermo,
rhoConst, rhoConst,

View File

@ -1,11 +1,6 @@
atomicWeights = atomicWeights atomicWeights/atomicWeights.C
specie = specie specie/specie.C
equationOfState = equationOfState reaction/reactions/makeReactions.C
reactions = reaction/reactions reaction/reactions/makeLangmuirHinshelwoodReactions.C
$(atomicWeights)/atomicWeights.C
$(specie)/specie.C
$(reactions)/makeReactionThermoReactions.C
$(reactions)/makeLangmuirHinshelwoodReactions.C
LIB = $(FOAM_LIBBIN)/libspecie LIB = $(FOAM_LIBBIN)/libspecie

View File

@ -17,7 +17,7 @@ FoamFile
thermoType thermoType
{ {
type heheuReactionThermo; type heheuPsiThermo;
mixture inhomogeneousMixture; mixture inhomogeneousMixture;
transport sutherland; transport sutherland;
thermo janaf; thermo janaf;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType thermoType
{ {
type heheuReactionThermo; type heheuPsiThermo;
mixture homogeneousMixture; mixture homogeneousMixture;
transport sutherland; transport sutherland;
thermo janaf; thermo janaf;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType chemistryType
{ {
chemistryModel ODEChemistryModel;
chemistrySolver ode; chemistrySolver ode;
chemistryThermo psi;
} }
chemistry on; chemistry on;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType thermoType
{ {
type hePsiReactionThermo; type hePsiThermo;
mixture reactingMixture; mixture reactingMixture;
transport sutherland; transport sutherland;
thermo janaf; thermo janaf;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType chemistryType
{ {
chemistryModel ODEChemistryModel;
chemistrySolver ode; chemistrySolver ode;
chemistryThermo psi;
} }
chemistry on; chemistry on;

View File

@ -17,7 +17,7 @@ FoamFile
thermoType thermoType
{ {
type hePsiReactionThermo; type hePsiThermo;
mixture reactingMixture; mixture reactingMixture;
transport sutherland; transport sutherland;
thermo janaf; thermo janaf;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType chemistryType
{ {
chemistryModel ODEChemistryModel;
chemistrySolver ode; chemistrySolver ode;
chemistryThermo psi;
} }
chemistry on; chemistry on;

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