diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index d929b14128c31846ca02b528f6771c7ef19b04ee..b25fd944c50504289bbf0aa801e2204e299c3596 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -15,15 +15,15 @@ } label nSpecie = Y.size(); - PtrList<gasThermoPhysics> specieData(Y.size()); + PtrList<gasHThermoPhysics> specieData(Y.size()); forAll(specieData, i) { specieData.set ( i, - new gasThermoPhysics + new gasHThermoPhysics ( - dynamic_cast<const reactingMixture<gasThermoPhysics>&> + dynamic_cast<const reactingMixture<gasHThermoPhysics>&> (thermo).speciesData()[i] ) ); diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index bafe30550467b75f30c33effec03008170addf4e..cdd6f52d15fce2954c01764e5f51700260adb9f3 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -383,12 +383,7 @@ int main(int argc, char *argv[]) // Determine extrudePatch normal pointField extrudePatchPointNormals ( - PatchTools::pointNormals //calcNormals - ( - mesh, - extrudePatch, - meshFaces - ) + PatchTools::pointNormals(mesh, extrudePatch) ); @@ -629,12 +624,13 @@ int main(int argc, char *argv[]) const labelListList& layerFaces = layerExtrude.layerFaces(); backPatchFaces.setSize(layerFaces.size()); frontPatchFaces.setSize(layerFaces.size()); - forAll(backPatchFaces, i) + forAll(backPatchFaces, patchFaceI) { - backPatchFaces[i] = layerFaces[i].first(); - frontPatchFaces[i] = layerFaces[i].last(); + backPatchFaces[patchFaceI] = layerFaces[patchFaceI].first(); + frontPatchFaces[patchFaceI] = layerFaces[patchFaceI].last(); } + // Create dummy fvSchemes, fvSolution createDummyFvMeshFiles(mesh, regionDir); @@ -654,6 +650,13 @@ int main(int argc, char *argv[]) mesh ); + layerExtrude.updateMesh + ( + map(), + identity(extrudePatch.size()), + identity(extrudePatch.nPoints()) + ); + // Calculate face labels for front and back. frontPatchFaces = renumber ( diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/Make/options b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/Make/options index 9a1bd9942c97cc352b8d14e5a92e62de35537a7a..49cad25f210163dffa9ff87fe916b6e6dffc4b10 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/Make/options +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/Make/options @@ -1,10 +1,12 @@ EXE_INC = \ + -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/mesh/extrudeModel/lnInclude EXE_LIBS = \ + -lsurfMesh \ -lfiniteVolume \ -lmeshTools \ -ldynamicMesh \ diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index b159f9c096dd5e8d5813568a2fe52a9d3abfeee3..112de47faf92be168361d9d626ee8a027baea00f 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -133,6 +133,8 @@ Notes: #include "pointFields.H" //#include "ReadFields.H" #include "fvMeshTools.H" +#include "OBJstream.H" +#include "PatchTools.H" using namespace Foam; @@ -1233,6 +1235,252 @@ void setCouplingInfo } +// Extrude and write geometric properties +void extrudeGeometricProperties +( + const polyMesh& mesh, + const primitiveFacePatch& extrudePatch, + const createShellMesh& extruder, + const polyMesh& regionMesh, + const extrudeModel& model +) +{ + const pointIOField patchFaceCentres + ( + IOobject + ( + "patchFaceCentres", + mesh.pointsInstance(), + mesh.meshSubDir, + mesh, + IOobject::MUST_READ + ) + ); + + const pointIOField patchEdgeCentres + ( + IOobject + ( + "patchEdgeCentres", + mesh.pointsInstance(), + mesh.meshSubDir, + mesh, + IOobject::MUST_READ + ) + ); + + //forAll(extrudePatch.edges(), edgeI) + //{ + // const edge& e = extrudePatch.edges()[edgeI]; + // Pout<< "Edge:" << e.centre(extrudePatch.localPoints()) << nl + // << "read:" << patchEdgeCentres[edgeI] + // << endl; + //} + + + // Determine edge normals on original patch + labelList patchEdges; + labelList coupledEdges; + PackedBoolList sameEdgeOrientation; + PatchTools::matchEdges + ( + extrudePatch, + mesh.globalData().coupledPatch(), + patchEdges, + coupledEdges, + sameEdgeOrientation + ); + + pointField patchEdgeNormals + ( + PatchTools::edgeNormals + ( + mesh, + extrudePatch, + patchEdges, + coupledEdges + ) + ); + + + pointIOField faceCentres + ( + IOobject + ( + "faceCentres", + regionMesh.pointsInstance(), + regionMesh.meshSubDir, + regionMesh, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + regionMesh.nFaces() + ); + + + // Work out layers. Guaranteed in columns so no fancy parallel bits. + + + forAll(extruder.faceToFaceMap(), faceI) + { + if (extruder.faceToFaceMap()[faceI] != 0) + { + // 'horizontal' face + label patchFaceI = mag(extruder.faceToFaceMap()[faceI])-1; + + label cellI = regionMesh.faceOwner()[faceI]; + if (regionMesh.isInternalFace(faceI)) + { + cellI = max(cellI, regionMesh.faceNeighbour()[faceI]); + } + + // Calculate layer from cell numbering (see createShellMesh) + label layerI = (cellI % model.nLayers()); + + if + ( + !regionMesh.isInternalFace(faceI) + && extruder.faceToFaceMap()[faceI] > 0 + ) + { + // Top face + layerI++; + } + + + // Recalculate based on extrusion model + faceCentres[faceI] = model + ( + patchFaceCentres[patchFaceI], + extrudePatch.faceNormals()[patchFaceI], + layerI + ); + } + else + { + // 'vertical face + label patchEdgeI = extruder.faceToEdgeMap()[faceI]; + label layerI = + ( + regionMesh.faceOwner()[faceI] + % model.nLayers() + ); + + // Extrude patch edge centre to this layer + point pt0 = model + ( + patchEdgeCentres[patchEdgeI], + patchEdgeNormals[patchEdgeI], + layerI + ); + // Extrude patch edge centre to next layer + point pt1 = model + ( + patchEdgeCentres[patchEdgeI], + patchEdgeNormals[patchEdgeI], + layerI+1 + ); + + // Interpolate + faceCentres[faceI] = 0.5*(pt0+pt1); + } + } + + pointIOField cellCentres + ( + IOobject + ( + "cellCentres", + regionMesh.pointsInstance(), + regionMesh.meshSubDir, + regionMesh, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + regionMesh.nCells() + ); + + forAll(extruder.cellToFaceMap(), cellI) + { + label patchFaceI = extruder.cellToFaceMap()[cellI]; + + // Calculate layer from cell numbering (see createShellMesh) + label layerI = (cellI % model.nLayers()); + + // Recalculate based on extrusion model + point pt0 = model + ( + patchFaceCentres[patchFaceI], + extrudePatch.faceNormals()[patchFaceI], + layerI + ); + point pt1 = model + ( + patchFaceCentres[patchFaceI], + extrudePatch.faceNormals()[patchFaceI], + layerI+1 + ); + + // Interpolate + cellCentres[cellI] = 0.5*(pt0+pt1); + } + + + // Bit of checking + if (false) + { + OBJstream faceStr(regionMesh.time().path()/"faceCentres.obj"); + OBJstream cellStr(regionMesh.time().path()/"cellCentres.obj"); + + forAll(faceCentres, faceI) + { + Pout<< "Model :" << faceCentres[faceI] << endl + << "regionMesh:" << regionMesh.faceCentres()[faceI] << endl; + faceStr.write + ( + linePointRef + ( + faceCentres[faceI], + regionMesh.faceCentres()[faceI] + ) + ); + } + forAll(cellCentres, cellI) + { + Pout<< "Model :" << cellCentres[cellI] << endl + << "regionMesh:" << regionMesh.cellCentres()[cellI] << endl; + cellStr.write + ( + linePointRef + ( + cellCentres[cellI], + regionMesh.cellCentres()[cellI] + ) + ); + } + } + + + + Info<< "Writing geometric properties for mesh " << regionMesh.name() + << " to " << regionMesh.pointsInstance() << nl + << endl; + + bool ok = faceCentres.write() && cellCentres.write(); + + if (!ok) + { + FatalErrorIn("extrudeGeometricProperties(..)") + << "Failed writing " << faceCentres.objectPath() + << " and " << cellCentres.objectPath() + << exit(FatalError); + } +} + + + // Main program: int main(int argc, char *argv[]) @@ -2393,6 +2641,36 @@ int main(int argc, char *argv[]) } + // See if we need to extrude coordinates as well + { + autoPtr<pointIOField> patchFaceCentresPtr; + + IOobject io + ( + "patchFaceCentres", + mesh.pointsInstance(), + mesh.meshSubDir, + mesh, + IOobject::MUST_READ + ); + if (io.headerOk()) + { + // Read patchFaceCentres and patchEdgeCentres + Info<< "Reading patch face,edge centres : " + << io.name() << " and patchEdgeCentres" << endl; + + extrudeGeometricProperties + ( + mesh, + extrudePatch, + extruder, + regionMesh, + model() + ); + } + } + + // Insert baffles into original mesh diff --git a/src/OpenFOAM/primitives/quaternion/quaternion.C b/src/OpenFOAM/primitives/quaternion/quaternion.C index cedbb56c32d81791f761dbfd759aa4039c71810e..8f6bf087a360e69c7f6d514a89cb713eda77b874 100644 --- a/src/OpenFOAM/primitives/quaternion/quaternion.C +++ b/src/OpenFOAM/primitives/quaternion/quaternion.C @@ -30,8 +30,8 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // const char* const Foam::quaternion::typeName = "quaternion"; -const Foam::quaternion Foam::quaternion::zero(0, vector::zero); -const Foam::quaternion Foam::quaternion::I(1, vector::zero); +const Foam::quaternion Foam::quaternion::zero(0, vector(0, 0, 0)); +const Foam::quaternion Foam::quaternion::I(1, vector(0, 0, 0)); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/septernion/septernion.C b/src/OpenFOAM/primitives/septernion/septernion.C index 4bbdf82802810664c515751a53984ce030278710..5a90f8de2d4841ff5af22a2c05c9e7a827d11278 100644 --- a/src/OpenFOAM/primitives/septernion/septernion.C +++ b/src/OpenFOAM/primitives/septernion/septernion.C @@ -30,8 +30,16 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // const char* const Foam::septernion::typeName = "septernion"; -const Foam::septernion Foam::septernion::zero(vector::zero, quaternion::zero); -const Foam::septernion Foam::septernion::I(vector::zero, quaternion::I); +const Foam::septernion Foam::septernion::zero +( + vector(0, 0, 0), + quaternion(0, vector(0, 0, 0)) +); +const Foam::septernion Foam::septernion::I +( + vector(0, 0, 0), + quaternion(1, vector(0, 0, 0)) +); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/triad/triad.C b/src/OpenFOAM/primitives/triad/triad.C index 2382e2c3219c65880c20da4619090aa8d9179266..10c77307b4d47da99fc7d5fb16af48d71077eda7 100644 --- a/src/OpenFOAM/primitives/triad/triad.C +++ b/src/OpenFOAM/primitives/triad/triad.C @@ -32,23 +32,48 @@ License namespace Foam { -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - template<> const char* const triad::Vector<vector>::typeName = "triad"; template<> const char* triad::Vector<vector>::componentNames[] = {"x", "y", "z"}; -const triad triad::zero(vector::zero, vector::zero, vector::zero); - -const triad triad::one(vector::one, vector::one, vector::one); - -const triad triad::max(vector::max, vector::max, vector::max); - -const triad triad::min(vector::min, vector::min, vector::min); +const triad triad::zero +( + vector(0, 0, 0), + vector(0, 0, 0), + vector(0, 0, 0) +); + +const triad triad::one +( + vector(1, 1, 1), + vector(1, 1, 1), + vector(1, 1, 1) +); + +const triad triad::max +( + vector(VGREAT, VGREAT, VGREAT), + vector(VGREAT, VGREAT, VGREAT), + vector(VGREAT, VGREAT, VGREAT) +); + +const triad triad::min +( + vector(-VGREAT, -VGREAT, -VGREAT), + vector(-VGREAT, -VGREAT, -VGREAT), + vector(-VGREAT, -VGREAT, -VGREAT) +); + +const triad triad::unset +( + vector(VGREAT, VGREAT, VGREAT), + vector(VGREAT, VGREAT, VGREAT), + vector(VGREAT, VGREAT, VGREAT) +); -const triad triad::unset(triad::max); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -348,8 +373,4 @@ void Foam::triad::operator=(const tensor& t) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/combustionModels/FSD/FSDs.C b/src/combustionModels/FSD/FSDs.C index 4ee6d7bb36e1af69b21c4e1473738dee389015fa..aed10a40a1f4a58324238d172c236a2a599bb76a 100644 --- a/src/combustionModels/FSD/FSDs.C +++ b/src/combustionModels/FSD/FSDs.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,11 +38,12 @@ namespace Foam { namespace combustionModels { + // Combustion models based on sensibleEnthalpy makeCombustionTypesThermo ( FSD, psiThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, psiCombustionModel ); @@ -50,7 +51,7 @@ namespace combustionModels ( FSD, psiThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, psiCombustionModel ); @@ -58,7 +59,7 @@ namespace combustionModels ( FSD, rhoThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, rhoCombustionModel ); @@ -66,7 +67,40 @@ namespace combustionModels ( FSD, rhoThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, + rhoCombustionModel + ); + + // Combustion models based on sensibleInternalEnergy + makeCombustionTypesThermo + ( + FSD, + psiThermoCombustion, + gasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + FSD, + psiThermoCombustion, + constGasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + FSD, + rhoThermoCombustion, + gasEThermoPhysics, + rhoCombustionModel + ); + + makeCombustionTypesThermo + ( + FSD, + rhoThermoCombustion, + constGasEThermoPhysics, rhoCombustionModel ); } diff --git a/src/combustionModels/diffusion/diffusions.C b/src/combustionModels/diffusion/diffusions.C index 73c201f0fcc483897c74dba408c4c68ee2bf6156..0376a91bf906e6e71b331e56fd65330568bb8ee9 100644 --- a/src/combustionModels/diffusion/diffusions.C +++ b/src/combustionModels/diffusion/diffusions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,11 +36,12 @@ namespace Foam { namespace combustionModels { + // Combustion models based on sensibleEnthalpy makeCombustionTypesThermo ( diffusion, psiThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, psiCombustionModel ); @@ -48,7 +49,7 @@ namespace combustionModels ( diffusion, psiThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, psiCombustionModel ); @@ -56,7 +57,7 @@ namespace combustionModels ( diffusion, rhoThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, rhoCombustionModel ); @@ -64,7 +65,41 @@ namespace combustionModels ( diffusion, rhoThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, + rhoCombustionModel + ); + + // Combustion models based on sensibleInternalEnergy + + makeCombustionTypesThermo + ( + diffusion, + psiThermoCombustion, + gasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + diffusion, + psiThermoCombustion, + constGasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + diffusion, + rhoThermoCombustion, + gasEThermoPhysics, + rhoCombustionModel + ); + + makeCombustionTypesThermo + ( + diffusion, + rhoThermoCombustion, + constGasEThermoPhysics, rhoCombustionModel ); } diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C index b8a48ed0ce879b214d4ee34883971f1eeb2fd5b4..89ea70d85c7986dd9b53342aa877ea5febf0ce66 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,11 +36,47 @@ namespace Foam { namespace combustionModels { + // Combustion models based on sensibleEnthalpy + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + psiThermoCombustion, + gasHThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + psiThermoCombustion, + constGasHThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + rhoThermoCombustion, + gasHThermoPhysics, + rhoCombustionModel + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + rhoThermoCombustion, + constGasHThermoPhysics, + rhoCombustionModel + ); + + // Combustion models based on sensibleInternalEnergy + makeCombustionTypesThermo ( infinitelyFastChemistry, psiThermoCombustion, - gasThermoPhysics, + gasEThermoPhysics, psiCombustionModel ); @@ -48,7 +84,7 @@ namespace combustionModels ( infinitelyFastChemistry, psiThermoCombustion, - constGasThermoPhysics, + constGasEThermoPhysics, psiCombustionModel ); @@ -56,7 +92,7 @@ namespace combustionModels ( infinitelyFastChemistry, rhoThermoCombustion, - gasThermoPhysics, + gasEThermoPhysics, rhoCombustionModel ); @@ -64,7 +100,7 @@ namespace combustionModels ( infinitelyFastChemistry, rhoThermoCombustion, - constGasThermoPhysics, + constGasEThermoPhysics, rhoCombustionModel ); } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C index 12e4ebb6eb99b59da4dcd6f82c1fcbbddca44e6f..49ee1a445e70abd754853161e3d791d9aabe4786 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -2052,6 +2052,9 @@ void Foam::polyTopoChange::reorderCoupledFaces if (anyChanged) { + // Reorder faces according to oldToNew. + reorderCompactFaces(oldToNew.size(), oldToNew); + // Rotate faces (rotation is already in new face indices). forAll(rotation, faceI) { @@ -2060,9 +2063,6 @@ void Foam::polyTopoChange::reorderCoupledFaces inplaceRotateList<List, label>(faces_[faceI], rotation[faceI]); } } - - // Reorder faces according to oldToNew. - reorderCompactFaces(oldToNew.size(), oldToNew); } } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C index b4a973a70828fe0355fe41e671a4e5635b3529b2..62e40e215b07b72e1dc4af5168a1d14d7265fc9f 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,39 +39,76 @@ Description namespace Foam { + // Chemistry moldels based on sensibleEnthalpy makeChemistryModel ( chemistryModel, psiChemistryModel, - constGasThermoPhysics + constGasHThermoPhysics ); makeChemistryModel ( chemistryModel, psiChemistryModel, - gasThermoPhysics + gasHThermoPhysics ); makeChemistryModel ( chemistryModel, psiChemistryModel, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics ); makeChemistryModel ( chemistryModel, psiChemistryModel, - incompressibleGasThermoPhysics + incompressibleGasHThermoPhysics ); makeChemistryModel ( chemistryModel, psiChemistryModel, - icoPoly8ThermoPhysics + icoPoly8HThermoPhysics + ); + + // Chemistry moldels based on sensibleInternalEnergy + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + constGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + gasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + constIncompressibleGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + incompressibleGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + icoPoly8EThermoPhysics ); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C index e5be84743cb2412f03d8f75eab542653fd0a6a90..5ecc84043af7b24e086ddf419da1bd418fc1b85c 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,39 +39,77 @@ Description namespace Foam { + // Chemistry moldels based on sensibleEnthalpy makeChemistryModel ( chemistryModel, rhoChemistryModel, - constGasThermoPhysics + constGasHThermoPhysics ); makeChemistryModel ( chemistryModel, rhoChemistryModel, - gasThermoPhysics + gasHThermoPhysics ); makeChemistryModel ( chemistryModel, rhoChemistryModel, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics ); makeChemistryModel ( chemistryModel, rhoChemistryModel, - incompressibleGasThermoPhysics + incompressibleGasHThermoPhysics ); makeChemistryModel ( chemistryModel, rhoChemistryModel, - icoPoly8ThermoPhysics + icoPoly8HThermoPhysics + ); + + + // Chemistry moldels based on sensibleInternalEnergy + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + constGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + gasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + constIncompressibleGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + incompressibleGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + icoPoly8EThermoPhysics ); } diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C index 189d43bdfa917426b6348fa5b4823c820e3574a9..ed2c8c2ba61b67f098bd8c15f3815115763a63e1 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,24 +33,61 @@ License namespace Foam { - makeChemistrySolverTypes(psiChemistryModel, constGasThermoPhysics); - makeChemistrySolverTypes(psiChemistryModel, gasThermoPhysics); + // Chemistry solvers based on sensibleEnthalpy + makeChemistrySolverTypes(psiChemistryModel, constGasHThermoPhysics); + makeChemistrySolverTypes(psiChemistryModel, gasHThermoPhysics); makeChemistrySolverTypes ( psiChemistryModel, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics + ); + makeChemistrySolverTypes + ( + psiChemistryModel, + incompressibleGasHThermoPhysics) + ; + makeChemistrySolverTypes(psiChemistryModel, icoPoly8HThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, constGasHThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, gasHThermoPhysics); + makeChemistrySolverTypes + ( + rhoChemistryModel, + constIncompressibleGasHThermoPhysics + ); + makeChemistrySolverTypes + ( + rhoChemistryModel, + incompressibleGasHThermoPhysics + ); + makeChemistrySolverTypes(rhoChemistryModel, icoPoly8HThermoPhysics); + + // Chemistry solvers based on sensibleInternalEnergy + makeChemistrySolverTypes(psiChemistryModel, constGasEThermoPhysics); + makeChemistrySolverTypes(psiChemistryModel, gasEThermoPhysics); + makeChemistrySolverTypes + ( + psiChemistryModel, + constIncompressibleGasEThermoPhysics + ); + makeChemistrySolverTypes + ( + psiChemistryModel, + incompressibleGasEThermoPhysics + ); + makeChemistrySolverTypes(psiChemistryModel, icoPoly8EThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, constGasEThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, gasEThermoPhysics); + makeChemistrySolverTypes + ( + rhoChemistryModel, + constIncompressibleGasEThermoPhysics ); - makeChemistrySolverTypes(psiChemistryModel, incompressibleGasThermoPhysics); - makeChemistrySolverTypes(psiChemistryModel, icoPoly8ThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, constGasThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, gasThermoPhysics); makeChemistrySolverTypes ( rhoChemistryModel, - constIncompressibleGasThermoPhysics + incompressibleGasEThermoPhysics ); - makeChemistrySolverTypes(rhoChemistryModel, incompressibleGasThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, icoPoly8ThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, icoPoly8EThermoPhysics); } diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C index b7474a9fafba56f46d2fae5eb0199ae2b04c8aa1..b90e447c0b2350e1f138a3b55849437a27363f3e 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,23 +37,50 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makeChemistryReader(constGasThermoPhysics); -makeChemistryReader(gasThermoPhysics); -makeChemistryReader(constIncompressibleGasThermoPhysics); -makeChemistryReader(incompressibleGasThermoPhysics); -makeChemistryReader(icoPoly8ThermoPhysics); -makeChemistryReader(hConstSolidThermoPhysics); -makeChemistryReader(hExponentialSolidThermoPhysics); +// Solid chemistry readers based on sensibleEnthalpy + +makeChemistryReader(constGasHThermoPhysics); +makeChemistryReader(gasHThermoPhysics); +makeChemistryReader(constIncompressibleGasHThermoPhysics); +makeChemistryReader(incompressibleGasHThermoPhysics); +makeChemistryReader(icoPoly8HThermoPhysics); + +makeChemistryReaderType(foamChemistryReader, constGasHThermoPhysics); +makeChemistryReaderType(foamChemistryReader, gasHThermoPhysics); +makeChemistryReaderType +( + foamChemistryReader, + constIncompressibleGasHThermoPhysics +); +makeChemistryReaderType(foamChemistryReader, incompressibleGasHThermoPhysics); +makeChemistryReaderType(foamChemistryReader, icoPoly8HThermoPhysics); + -makeChemistryReaderType(foamChemistryReader, constGasThermoPhysics); -makeChemistryReaderType(foamChemistryReader, gasThermoPhysics); + +// Solid chemistry readers based on sensibleInternalEnergy + +makeChemistryReader(constGasEThermoPhysics); +makeChemistryReader(gasEThermoPhysics); +makeChemistryReader(constIncompressibleGasEThermoPhysics); +makeChemistryReader(incompressibleGasEThermoPhysics); +makeChemistryReader(icoPoly8EThermoPhysics); + +makeChemistryReaderType(foamChemistryReader, constGasEThermoPhysics); +makeChemistryReaderType(foamChemistryReader, gasEThermoPhysics); makeChemistryReaderType ( foamChemistryReader, - constIncompressibleGasThermoPhysics + constIncompressibleGasEThermoPhysics ); -makeChemistryReaderType(foamChemistryReader, incompressibleGasThermoPhysics); -makeChemistryReaderType(foamChemistryReader, icoPoly8ThermoPhysics); +makeChemistryReaderType(foamChemistryReader, incompressibleGasEThermoPhysics); +makeChemistryReaderType(foamChemistryReader, icoPoly8EThermoPhysics); + + +// Solid chemistry readers for solids based on sensibleInternalEnergy + +makeChemistryReader(hConstSolidThermoPhysics); +makeChemistryReader(hExponentialSolidThermoPhysics); + makeChemistryReaderType(foamChemistryReader, hConstSolidThermoPhysics); makeChemistryReaderType(foamChemistryReader, hExponentialSolidThermoPhysics); diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L index c0cce76a2ade77865be53adf2194423a12bc928f..678300a172ca945e6da19b0cea0377a753de995e 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -296,13 +296,13 @@ List<specieElement> currentSpecieComposition(5); scalar currentLowT = 0; scalar currentHighT = 0; scalar currentCommonT = 0; -gasThermoPhysics::coeffArray highCpCoeffs(scalarList(7)); -gasThermoPhysics::coeffArray lowCpCoeffs(scalarList(7)); +gasHThermoPhysics::coeffArray highCpCoeffs(scalarList(7)); +gasHThermoPhysics::coeffArray lowCpCoeffs(scalarList(7)); -gasReaction::specieCoeffs currentSpecieCoeff; +gasHReaction::specieCoeffs currentSpecieCoeff; -DynamicList<gasReaction::specieCoeffs> lhs; -DynamicList<gasReaction::specieCoeffs> rhs; +DynamicList<gasHReaction::specieCoeffs> lhs; +DynamicList<gasHReaction::specieCoeffs> rhs; scalarList ArrheniusCoeffs(3); DynamicList<scalar> reactionCoeffs; @@ -312,7 +312,7 @@ label currentThirdBodyIndex = -1; word reactionCoeffsName = word::null; HashTable<scalarList> reactionCoeffsTable; -DynamicList<gasReaction::specieCoeffs> *lrhsPtr = &lhs; +DynamicList<gasHReaction::specieCoeffs> *lrhsPtr = &lhs; reactionType rType = unknownReactionType; reactionRateType rrType = Arrhenius; @@ -609,7 +609,7 @@ bool finishReaction = false; <readThermoLineLabel4>{thermoLineLabel4} { - HashPtrTable<gasThermoPhysics>::iterator specieThermoIter + HashPtrTable<gasHThermoPhysics>::iterator specieThermoIter ( speciesThermo_.find(currentSpecieName) ); @@ -622,7 +622,7 @@ bool finishReaction = false; speciesThermo_.insert ( currentSpecieName, - new gasThermoPhysics + new gasHThermoPhysics ( janafThermo<perfectGas<specie> > ( @@ -1429,7 +1429,7 @@ bool finishReaction = false; <readReactionOrder>{reactionCoeff}{endReactionCoeffs} { - DynamicList<gasReaction::specieCoeffs>& lrhs = *lrhsPtr; + DynamicList<gasHReaction::specieCoeffs>& lrhs = *lrhsPtr; bool found = false; diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C index 922c1227b9c55615fd44f985bd2eef75e9e0fc59..5ee2a03ac3da93eda3043e7c6ccd96948a99b327 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ License namespace Foam { - addChemistryReaderType(chemkinReader, gasThermoPhysics); + addChemistryReaderType(chemkinReader, gasHThermoPhysics); } @@ -168,8 +168,8 @@ template<class ReactionRateType> void Foam::chemkinReader::addReactionType ( const reactionType rType, - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const ReactionRateType& rr ) { @@ -180,9 +180,9 @@ void Foam::chemkinReader::addReactionType reactions_.append ( new IrreversibleReaction - <Reaction, gasThermoPhysics, ReactionRateType> + <Reaction, gasHThermoPhysics, ReactionRateType> ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), @@ -200,9 +200,9 @@ void Foam::chemkinReader::addReactionType reactions_.append ( new ReversibleReaction - <Reaction, gasThermoPhysics, ReactionRateType> + <Reaction, gasHThermoPhysics, ReactionRateType> ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), @@ -240,8 +240,8 @@ void Foam::chemkinReader::addPressureDependentReaction ( const reactionType rType, const fallOffFunctionType fofType, - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const scalarList& efficiencies, const scalarList& k0Coeffs, const scalarList& kInfCoeffs, @@ -423,8 +423,8 @@ void Foam::chemkinReader::addPressureDependentReaction void Foam::chemkinReader::addReaction ( - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const scalarList& efficiencies, const reactionType rType, const reactionRateType rrType, @@ -499,9 +499,9 @@ void Foam::chemkinReader::addReaction reactions_.append ( new NonEquilibriumReversibleReaction - <Reaction, gasThermoPhysics, ArrheniusReactionRate> + <Reaction, gasHThermoPhysics, ArrheniusReactionRate> ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), @@ -554,11 +554,11 @@ void Foam::chemkinReader::addReaction new NonEquilibriumReversibleReaction < Reaction, - gasThermoPhysics, + gasHThermoPhysics, thirdBodyArrheniusReactionRate > ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), @@ -661,9 +661,9 @@ void Foam::chemkinReader::addReaction reactions_.append ( new NonEquilibriumReversibleReaction - <Reaction, gasThermoPhysics, LandauTellerReactionRate> + <Reaction, gasHThermoPhysics, LandauTellerReactionRate> ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H index 6e0d4dc5c1af7eec497eb6d7c0ece31f71be1c39..4cd84f59a507b93d2aa3fcc5b3f35dfdc213a881 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,7 +61,7 @@ namespace Foam class chemkinReader : - public chemistryReader<gasThermoPhysics>, + public chemistryReader<gasHThermoPhysics>, public yyFlexLexer { @@ -199,13 +199,13 @@ private: HashTable<phase> speciePhase_; //- Table of the thermodynamic data given in the CHEMKIN file - HashPtrTable<gasThermoPhysics> speciesThermo_; + HashPtrTable<gasHThermoPhysics> speciesThermo_; //- Table of species composition HashTable<List<specieElement> > specieComposition_; //- List of the reactions - ReactionList<gasThermoPhysics> reactions_; + ReactionList<gasHThermoPhysics> reactions_; // Private Member Functions @@ -257,8 +257,8 @@ private: void addReactionType ( const reactionType rType, - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const ReactionRateType& rr ); @@ -267,8 +267,8 @@ private: ( const reactionType rType, const fallOffFunctionType fofType, - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const scalarList& thirdBodyEfficiencies, const scalarList& k0Coeffs, const scalarList& kInfCoeffs, @@ -280,8 +280,8 @@ private: void addReaction ( - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const scalarList& thirdBodyEfficiencies, const reactionType rType, const reactionRateType rrType, @@ -364,7 +364,7 @@ public: } //- Table of the thermodynamic data given in the CHEMKIN file - const HashPtrTable<gasThermoPhysics>& speciesThermo() const + const HashPtrTable<gasHThermoPhysics>& speciesThermo() const { return speciesThermo_; } @@ -376,7 +376,7 @@ public: } //- List of the reactions - const ReactionList<gasThermoPhysics>& reactions() const + const ReactionList<gasHThermoPhysics>& reactions() const { return reactions_; } diff --git a/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C index 4e65f3a24c8dbc5dd3283b6015446cfc2b475e1b..ed1e0abf8144f27e11ba34b661ae9d9b991fa775 100644 --- a/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -179,7 +179,7 @@ makeReactionThermo ); -// Multi-component thermo +// Multi-component thermo for sensible enthalpy makeReactionMixtureThermo ( @@ -187,7 +187,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, multiComponentMixture, - constGasThermoPhysics + constGasHThermoPhysics ); makeReactionMixtureThermo @@ -196,11 +196,62 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, multiComponentMixture, - gasThermoPhysics + gasHThermoPhysics ); -// Multi-component reaction thermo +// Multi-component thermo for internal energy + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + multiComponentMixture, + constGasEThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + multiComponentMixture, + gasEThermoPhysics +); + + +// Multi-component reaction thermo for sensible enthalpy + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + constGasHThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + gasHThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + singleStepReactingMixture, + gasHThermoPhysics +); + + +// Multi-component reaction thermo for internal energy makeReactionMixtureThermo ( @@ -208,7 +259,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, reactingMixture, - constGasThermoPhysics + constGasEThermoPhysics ); makeReactionMixtureThermo @@ -217,7 +268,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, reactingMixture, - gasThermoPhysics + gasEThermoPhysics ); makeReactionMixtureThermo @@ -226,7 +277,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, singleStepReactingMixture, - gasThermoPhysics + gasEThermoPhysics ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C index 6dbf589bce9ecbcc9ee02a9274adb18e4753bb29..a6a880ca764bd63d4853a324abbb9adfffd29c8a 100644 --- a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -213,7 +213,7 @@ makeReactionThermo ); -// Multi-component thermo +// Multi-component thermo for internal energy makeReactionMixtureThermo ( @@ -221,7 +221,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - constGasThermoPhysics + constGasEThermoPhysics ); makeReactionMixtureThermo @@ -230,7 +230,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - gasThermoPhysics + gasEThermoPhysics ); makeReactionMixtureThermo @@ -239,7 +239,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - constIncompressibleGasThermoPhysics + constIncompressibleGasEThermoPhysics ); makeReactionMixtureThermo @@ -248,7 +248,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - incompressibleGasThermoPhysics + incompressibleGasEThermoPhysics ); makeReactionMixtureThermo @@ -257,7 +257,114 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - icoPoly8ThermoPhysics + icoPoly8EThermoPhysics +); + + + // Multi-component reaction thermo + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constGasEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + gasEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constIncompressibleGasEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + incompressibleGasEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + icoPoly8EThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + singleStepReactingMixture, + gasEThermoPhysics +); + + + + +// Multi-component thermo for sensible enthalpy + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constGasHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + gasHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constIncompressibleGasHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + incompressibleGasHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + icoPoly8HThermoPhysics ); @@ -269,7 +376,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - constGasThermoPhysics + constGasHThermoPhysics ); makeReactionMixtureThermo @@ -278,7 +385,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - gasThermoPhysics + gasHThermoPhysics ); makeReactionMixtureThermo @@ -287,7 +394,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics ); makeReactionMixtureThermo @@ -296,7 +403,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - incompressibleGasThermoPhysics + incompressibleGasHThermoPhysics ); makeReactionMixtureThermo @@ -305,7 +412,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - icoPoly8ThermoPhysics + icoPoly8HThermoPhysics ); makeReactionMixtureThermo @@ -314,7 +421,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, singleStepReactingMixture, - gasThermoPhysics + gasHThermoPhysics ); diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C index 104fa11a7d7a5d55c5073a324ee2d72c08c790ed..d51976f196c2c8d74101aabcc844d8f078981463 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ namespace Foam ODESolidChemistryModel, solidChemistryModel, hConstSolidThermoPhysics, - gasThermoPhysics + gasHThermoPhysics ); makeSolidChemistryModel @@ -54,7 +54,7 @@ namespace Foam ODESolidChemistryModel, solidChemistryModel, hExponentialSolidThermoPhysics, - gasThermoPhysics + gasHThermoPhysics ); } diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolvers.C b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolvers.C index 9c8a6df052fbd0e7be6f5efc0ce21c519c2582e7..3b6f13f486398a810b1c9bff714b95d5b095ef72 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolvers.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolvers.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,7 @@ namespace Foam ode, solidChemistryModel, hConstSolidThermoPhysics, - gasThermoPhysics + gasHThermoPhysics ) makeSolidChemistrySolverType @@ -49,7 +49,7 @@ namespace Foam ode, solidChemistryModel, hExponentialSolidThermoPhysics, - gasThermoPhysics + gasHThermoPhysics ) } diff --git a/src/thermophysicalModels/specie/include/reactionTypes.H b/src/thermophysicalModels/specie/include/reactionTypes.H index 8b0a5f20d559f128a46e7624d8a016da46562328..e6af91d8967d473b36fbed027e4211b14f99003c 100644 --- a/src/thermophysicalModels/specie/include/reactionTypes.H +++ b/src/thermophysicalModels/specie/include/reactionTypes.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,16 +43,31 @@ Description namespace Foam { - typedef Reaction<constGasThermoPhysics> constGasReaction; + // sensible enthalpy based reactions + typedef Reaction<constGasHThermoPhysics> constGasHReaction; - typedef Reaction<gasThermoPhysics> gasReaction; + typedef Reaction<gasHThermoPhysics> gasHReaction; - typedef Reaction<constIncompressibleGasThermoPhysics> - constIncompressibleGasReaction; + typedef Reaction<constIncompressibleGasHThermoPhysics> + constIncompressibleGasHReaction; - typedef Reaction<incompressibleGasThermoPhysics> incompressibleGasReaction; + typedef Reaction<incompressibleGasHThermoPhysics> + incompressibleGasHReaction; - typedef Reaction<icoPoly8ThermoPhysics> icoPoly8Reaction; + typedef Reaction<icoPoly8HThermoPhysics> icoPoly8HReaction; + + // internal ennergy based reactions + typedef Reaction<constGasEThermoPhysics> constGasEReaction; + + typedef Reaction<gasEThermoPhysics> gasEReaction; + + typedef Reaction<constIncompressibleGasEThermoPhysics> + constIncompressibleGasEReaction; + + typedef Reaction<incompressibleGasEThermoPhysics> + incompressibleGasEReaction; + + typedef Reaction<icoPoly8EThermoPhysics> icoPoly8EReaction; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H index a3a276b926a44c307671aaeecfcd2a809fa72601..cb17a56a1419b064ece1a1d6d6e613609832b545 100644 --- a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H +++ b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,9 @@ Description #include "incompressiblePerfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" + #include "sensibleEnthalpy.H" +#include "sensibleInternalEnergy.H" #include "thermo.H" #include "sutherlandTransport.H" #include "constTransport.H" @@ -50,6 +52,7 @@ Description namespace Foam { + // thermo physics types based on sensibleEnthalpy typedef constTransport < @@ -61,7 +64,7 @@ namespace Foam >, sensibleEnthalpy > - > constGasThermoPhysics; + > constGasHThermoPhysics; typedef sutherlandTransport @@ -74,7 +77,7 @@ namespace Foam >, sensibleEnthalpy > - > gasThermoPhysics; + > gasHThermoPhysics; typedef constTransport @@ -87,7 +90,7 @@ namespace Foam >, sensibleEnthalpy > - > constIncompressibleGasThermoPhysics; + > constIncompressibleGasHThermoPhysics; typedef sutherlandTransport @@ -100,7 +103,7 @@ namespace Foam >, sensibleEnthalpy > - > incompressibleGasThermoPhysics; + > incompressibleGasHThermoPhysics; typedef polynomialTransport @@ -115,7 +118,76 @@ namespace Foam sensibleEnthalpy >, 8 - > icoPoly8ThermoPhysics; + > icoPoly8HThermoPhysics; + + + // thermo physics types based on sensibleInternalEnergy + typedef + constTransport + < + species::thermo + < + hConstThermo + < + perfectGas<specie> + >, + sensibleInternalEnergy + > + > constGasEThermoPhysics; + + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + perfectGas<specie> + >, + sensibleInternalEnergy + > + > gasEThermoPhysics; + + typedef + constTransport + < + species::thermo + < + hConstThermo + < + incompressiblePerfectGas<specie> + >, + sensibleInternalEnergy + > + > constIncompressibleGasEThermoPhysics; + + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + incompressiblePerfectGas<specie> + >, + sensibleInternalEnergy + > + > incompressibleGasEThermoPhysics; + + typedef + polynomialTransport + < + species::thermo + < + hPolynomialThermo + < + icoPolynomial<specie, 8>, + 8 + >, + sensibleInternalEnergy + >, + 8 + > icoPoly8EThermoPhysics; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C index 6f98a4bc3570eb7b426109b6437138c9aa93f5b8..b5d8c0ad1d1f5ff0addceb56b4895d23d19f63e6 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,8 +31,11 @@ License namespace Foam { - makeIRReactions(gasThermoPhysics, LangmuirHinshelwoodReactionRate) - makeIRReactions(icoPoly8ThermoPhysics, LangmuirHinshelwoodReactionRate) + makeIRReactions(gasHThermoPhysics, LangmuirHinshelwoodReactionRate) + makeIRReactions(icoPoly8HThermoPhysics, LangmuirHinshelwoodReactionRate) + + makeIRReactions(gasEThermoPhysics, LangmuirHinshelwoodReactionRate) + makeIRReactions(icoPoly8EThermoPhysics, LangmuirHinshelwoodReactionRate) } // ************************************************************************* // diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C index ff13e68b69abdadc537f0f84799f620c7e0003d6..4dfd73d6a033d9cfdd17a84d8037125187371604 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -83,15 +83,26 @@ License namespace Foam { - makeReactions(constGasThermoPhysics, constGasReaction) - makeReactions(gasThermoPhysics, gasReaction) + // sensible enthalpy based reactions + makeReactions(constGasHThermoPhysics, constGasHReaction) + makeReactions(gasHThermoPhysics, gasHReaction) makeReactions ( - constIncompressibleGasThermoPhysics, - constIncompressibleGasReaction + constIncompressibleGasHThermoPhysics, + constIncompressibleGasHReaction ) - makeReactions(incompressibleGasThermoPhysics, incompressibleGasReaction) - makeReactions(icoPoly8ThermoPhysics, icoPoly8Reaction) + makeReactions(incompressibleGasHThermoPhysics, incompressibleGasHReaction) + makeReactions(icoPoly8HThermoPhysics, icoPoly8HReaction) + + makeReactions(constGasEThermoPhysics, constGasEReaction) + makeReactions(gasEThermoPhysics, gasEReaction) + makeReactions + ( + constIncompressibleGasEThermoPhysics, + constIncompressibleGasEReaction + ) + makeReactions(incompressibleGasEThermoPhysics, incompressibleGasEReaction) + makeReactions(icoPoly8EThermoPhysics, icoPoly8EReaction) } // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties index 30c31c7471bffc10fc8a57c75bc336190538f89d..643c593447c13d0d44977f4bbd6d06fab50fa0e8 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>; +combustionModel infinitelyFastChemistry<psiThermoCombustion,gasHThermoPhysics>; active true; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties index 1576592b91a3a00fb93f3adfbf53029216dabd7c..51e80f82d64f8071b585d60ff043dd8742ab02b5 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties @@ -15,9 +15,8 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -//combustionModel noCombustion<psiThermoCombustion>; -combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>; -//combustionModel FSD<psiThermoCombustion,gasThermoPhysics>; +combustionModel infinitelyFastChemistry<psiThermoCombustion,gasHThermoPhysics>; +//combustionModel FSD<psiThermoCombustion,gasHThermoPhysics>; active true; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties index 689dc54c6295bdc4da1324124adb9fe69fb1e281..cedf34b4115448cd5a88c36120d5b7949fa97e8f 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties @@ -16,7 +16,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>; +combustionModel infinitelyFastChemistry<psiThermoCombustion,gasHThermoPhysics>; active on;