Thermodynamics: Further rationalization of the selection mechanism

This commit is contained in:
Henry
2012-09-27 21:57:21 +01:00
parent 5e59b510e6
commit 27deb733aa
11 changed files with 72 additions and 82 deletions

View File

@ -9,7 +9,6 @@ psiReactionThermo/psiReactionThermo/psiReactionThermoNew.C
psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C psiReactionThermo/hePsiReactionThermo/hePsiReactionThermos.C
psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C psiReactionThermo/psiuReactionThermo/psiuReactionThermo.C
psiReactionThermo/psiuReactionThermo/psiuReactionThermoNew.C
psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C psiReactionThermo/heheuReactionThermo/heheuReactionThermos.C
rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C rhoReactionThermo/rhoReactionThermo/rhoReactionThermo.C

View File

@ -42,6 +42,17 @@ Foam::psiReactionThermo::psiReactionThermo(const fvMesh& mesh)
{} {}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::psiReactionThermo> Foam::psiReactionThermo::New
(
const fvMesh& mesh
)
{
return basicThermo::New<psiReactionThermo>(mesh);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::psiReactionThermo::~psiReactionThermo() Foam::psiReactionThermo::~psiReactionThermo()

View File

@ -26,8 +26,7 @@ License
#include "psiReactionThermo.H" #include "psiReactionThermo.H"
#include "fvMesh.H" #include "fvMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // /*
Foam::autoPtr<Foam::psiReactionThermo> Foam::psiReactionThermo::New Foam::autoPtr<Foam::psiReactionThermo> Foam::psiReactionThermo::New
( (
const fvMesh& mesh const fvMesh& mesh
@ -68,7 +67,7 @@ Foam::autoPtr<Foam::psiReactionThermo> Foam::psiReactionThermo::New
return autoPtr<psiReactionThermo>(cstrIter()(mesh)); return autoPtr<psiReactionThermo>(cstrIter()(mesh));
} }
*/
Foam::autoPtr<Foam::psiReactionThermo> Foam::psiReactionThermo::NewType Foam::autoPtr<Foam::psiReactionThermo> Foam::psiReactionThermo::NewType
( (

View File

@ -106,6 +106,17 @@ psiuReactionThermo::psiuReactionThermo(const fvMesh& mesh)
{} {}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::psiuReactionThermo> Foam::psiuReactionThermo::New
(
const fvMesh& mesh
)
{
return basicThermo::New<psiuReactionThermo>(mesh);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
psiuReactionThermo::~psiuReactionThermo() psiuReactionThermo::~psiuReactionThermo()

View File

@ -1,73 +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 "psiuReactionThermo.H"
#include "fvMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::psiuReactionThermo> Foam::psiuReactionThermo::New
(
const fvMesh& mesh
)
{
// get model name, but do not register the dictionary
// otherwise it is registered in the database twice
const word modelType
(
IOdictionary
(
IOobject
(
"thermophysicalProperties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
).lookup("thermoType")
);
Info<< "Selecting thermodynamics package " << modelType << endl;
fvMeshConstructorTable::iterator cstrIter =
fvMeshConstructorTablePtr_->find(modelType);
if (cstrIter == fvMeshConstructorTablePtr_->end())
{
FatalErrorIn("psiuReactionThermo::New(const fvMesh&)")
<< "Unknown psiuReactionThermo type "
<< modelType << nl << nl
<< "Valid psiuReactionThermo types are :" << endl
<< fvMeshConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<psiuReactionThermo>(cstrIter()(mesh));
}
// ************************************************************************* //

View File

@ -42,6 +42,17 @@ Foam::rhoReactionThermo::rhoReactionThermo(const fvMesh& mesh)
{} {}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::rhoReactionThermo> Foam::rhoReactionThermo::New
(
const fvMesh& mesh
)
{
return basicThermo::New<rhoReactionThermo>(mesh);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::rhoReactionThermo::~rhoReactionThermo() Foam::rhoReactionThermo::~rhoReactionThermo()

View File

@ -26,8 +26,7 @@ License
#include "rhoReactionThermo.H" #include "rhoReactionThermo.H"
#include "fvMesh.H" #include "fvMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // /*
Foam::autoPtr<Foam::rhoReactionThermo> Foam::rhoReactionThermo::New Foam::autoPtr<Foam::rhoReactionThermo> Foam::rhoReactionThermo::New
( (
const fvMesh& mesh const fvMesh& mesh
@ -68,6 +67,7 @@ Foam::autoPtr<Foam::rhoReactionThermo> Foam::rhoReactionThermo::New
return autoPtr<rhoReactionThermo>(cstrIter()(mesh)); return autoPtr<rhoReactionThermo>(cstrIter()(mesh));
} }
*/
Foam::autoPtr<Foam::rhoReactionThermo> Foam::rhoReactionThermo::NewType Foam::autoPtr<Foam::rhoReactionThermo> Foam::rhoReactionThermo::NewType

View File

@ -15,7 +15,16 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType heheuReactionThermo<inhomogeneousMixture<sutherlandTransport<janafThermo<perfectGas<specie>>,absoluteEnthalpy>>>; thermoType
{
type heheuReactionThermo;
mixture inhomogeneousMixture;
transport sutherlandTransport;
thermo janafThermo;
equationOfState perfectGas;
specie specie;
energy absoluteEnthalpy;
}
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.5776; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.5776;

View File

@ -20,30 +20,35 @@ FoamFile
left left
{ {
type symmetryPlane; type symmetryPlane;
inGroups 1(symmetryPlane);
nFaces 35; nFaces 35;
startFace 4795; startFace 4795;
} }
right right
{ {
type symmetryPlane; type symmetryPlane;
inGroups 1(symmetryPlane);
nFaces 35; nFaces 35;
startFace 4830; startFace 4830;
} }
top top
{ {
type symmetryPlane; type symmetryPlane;
inGroups 1(symmetryPlane);
nFaces 70; nFaces 70;
startFace 4865; startFace 4865;
} }
bottom bottom
{ {
type symmetryPlane; type symmetryPlane;
inGroups 1(symmetryPlane);
nFaces 70; nFaces 70;
startFace 4935; startFace 4935;
} }
frontAndBack frontAndBack
{ {
type empty; type empty;
inGroups 1(empty);
nFaces 4900; nFaces 4900;
startFace 5005; startFace 5005;
} }

View File

@ -15,7 +15,16 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType heheuReactionThermo<homogeneousMixture<sutherlandTransport<janafThermo<perfectGas<specie>>,absoluteEnthalpy>>>; thermoType
{
type heheuReactionThermo;
mixture homogeneousMixture;
transport sutherlandTransport;
thermo janafThermo;
equationOfState perfectGas;
specie specie;
energy absoluteEnthalpy;
}
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675;

View File

@ -15,7 +15,16 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType heheuReactionThermo<inhomogeneousMixture<sutherlandTransport<janafThermo<perfectGas<specie>>,absoluteEnthalpy>>>; thermoType
{
type heheuReactionThermo;
mixture inhomogeneousMixture;
transport sutherlandTransport;
thermo janafThermo;
equationOfState perfectGas;
specie specie;
energy absoluteEnthalpy;
}
stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.0336; stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.0336;