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

This commit is contained in:
sergio
2012-06-01 14:41:34 +01:00
52 changed files with 50 additions and 19227 deletions

View File

@ -107,8 +107,8 @@ void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
scalarField alphap =
patch().lookupPatchField<volScalarField, scalar>("alpha1");
alphap = max(alphap, 0.0);
alphap = min(alphap, 1.0);
alphap = max(alphap, scalar(0));
alphap = min(alphap, scalar(1));
// a simpler way of doing this would be nice
scalar avgU = -flowRate_/gSum(patch().magSf()*alphap);

View File

@ -22,22 +22,21 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
InClass
Foam::rhoThermo
Foam::basicThermo
Description
Macros for creating 'basic' density-based thermo packages
\*---------------------------------------------------------------------------*/
#ifndef makeRhoThermo_H
#define makeRhoThermo_H
#ifndef makeThermo_H
#define makeThermo_H
#include "rhoThermo.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeRhoThermo(Cthermo,Mixture,Transport,Type,Thermo,EqnOfState) \
#define makeThermo(BaseThermo,Cthermo,Mixture,Transport,Type,Thermo,EqnOfState)\
\
typedef Cthermo \
< \
@ -77,7 +76,7 @@ defineTemplateTypeNameAndDebugWithName \
\
addToRunTimeSelectionTable \
( \
rhoThermo, \
BaseThermo, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
fvMesh \
); \
@ -90,7 +89,7 @@ addToRunTimeSelectionTable \
);
#define makeRhoPolyThermo(Cthermo,Mixture,Order,Type) \
#define makePolyThermo(BaseThermo,Cthermo,Mixture,Order,Type) \
\
typedef polynomialTransport \
< \
@ -118,7 +117,7 @@ defineTemplateTypeNameAndDebugWithName \
\
addToRunTimeSelectionTable \
( \
rhoThermo, \
BaseThermo, \
Cthermo##Mixture##icoPoly##Order##Type##ThermoPhysics, \
fvMesh \
); \

View File

@ -23,7 +23,8 @@ License
\*---------------------------------------------------------------------------*/
#include "makePsiThermo.H"
#include "psiThermo.H"
#include "makeThermo.H"
#include "perfectGas.H"
@ -47,8 +48,9 @@ namespace Foam
/* * * * * * * * * * * * * * * * * Enthalpy-based * * * * * * * * * * * * * */
makePsiThermo
makeThermo
(
psiThermo,
hePsiThermo,
pureMixture,
constTransport,
@ -57,8 +59,9 @@ makePsiThermo
perfectGas
);
makePsiThermo
makeThermo
(
psiThermo,
hePsiThermo,
pureMixture,
sutherlandTransport,
@ -67,8 +70,9 @@ makePsiThermo
perfectGas
);
makePsiThermo
makeThermo
(
psiThermo,
hePsiThermo,
pureMixture,
sutherlandTransport,
@ -80,8 +84,9 @@ makePsiThermo
/* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */
makePsiThermo
makeThermo
(
psiThermo,
hePsiThermo,
pureMixture,
constTransport,
@ -90,8 +95,9 @@ makePsiThermo
perfectGas
);
makePsiThermo
makeThermo
(
psiThermo,
hePsiThermo,
pureMixture,
sutherlandTransport,
@ -100,8 +106,9 @@ makePsiThermo
perfectGas
);
makePsiThermo
makeThermo
(
psiThermo,
hePsiThermo,
pureMixture,
constTransport,
@ -110,8 +117,9 @@ makePsiThermo
perfectGas
);
makePsiThermo
makeThermo
(
psiThermo,
hePsiThermo,
pureMixture,
sutherlandTransport,
@ -120,8 +128,9 @@ makePsiThermo
perfectGas
);
makePsiThermo
makeThermo
(
psiThermo,
hePsiThermo,
pureMixture,
sutherlandTransport,

View File

@ -1,98 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 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/>.
InClass
Foam::psiThermo
Description
Macros for creating 'basic' compresibility-based thermo packages
\*---------------------------------------------------------------------------*/
#ifndef makePsiThermo_H
#define makePsiThermo_H
#include "psiThermo.H"
#include "addToRunTimeSelectionTable.H"
#include "sensibleEnthalpy.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makePsiThermo(Cthermo,Mixture,Transport,Type,Thermo,EqnOfState) \
\
typedef Cthermo \
< \
Mixture \
< \
Transport \
< \
specieThermo \
< \
Thermo \
< \
EqnOfState \
>, \
Type \
> \
> \
> \
> Cthermo##Mixture##Transport##Type##Thermo##EqnOfState; \
\
defineTemplateTypeNameAndDebugWithName \
( \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
#Cthermo \
"<" \
#Mixture \
"<" \
#Transport \
"<specieThermo<" \
#Thermo \
"<" \
#EqnOfState \
">," \
#Type \
">>>>", \
0 \
); \
\
addToRunTimeSelectionTable \
( \
psiThermo, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
fvMesh \
); \
\
addToRunTimeSelectionTable \
( \
basicThermo, \
Cthermo##Mixture##Transport##Type##Thermo##EqnOfState, \
fvMesh \
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -23,7 +23,8 @@ License
\*---------------------------------------------------------------------------*/
#include "makeRhoThermo.H"
#include "rhoThermo.H"
#include "makeThermo.H"
#include "perfectGas.H"
#include "isobaricPerfectGas.H"
@ -52,8 +53,9 @@ namespace Foam
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
makeRhoThermo
makeThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
constTransport,
@ -62,8 +64,9 @@ makeRhoThermo
perfectGas
);
makeRhoThermo
makeThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
sutherlandTransport,
@ -72,8 +75,9 @@ makeRhoThermo
perfectGas
);
makeRhoThermo
makeThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
sutherlandTransport,
@ -82,8 +86,9 @@ makeRhoThermo
perfectGas
);
makeRhoThermo
makeThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
constTransport,
@ -92,24 +97,27 @@ makeRhoThermo
incompressible
);
makeRhoPolyThermo
makePolyThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
3,
sensibleEnthalpy
);
makeRhoPolyThermo
makePolyThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
8,
sensibleEnthalpy
);
makeRhoThermo
makeThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
constTransport,
@ -118,8 +126,9 @@ makeRhoThermo
isobaricPerfectGas
);
makeRhoThermo
makeThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
sutherlandTransport,
@ -128,8 +137,9 @@ makeRhoThermo
isobaricPerfectGas
);
makeRhoThermo
makeThermo
(
rhoThermo,
heRhoThermo,
pureMixture,
sutherlandTransport,
@ -138,6 +148,7 @@ makeRhoThermo
isobaricPerfectGas
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -160,7 +160,7 @@ Foam::heheuReactionThermo<MixtureType>::heheuReactionThermo(const fvMesh& mesh)
}
}
heuBoundaryCorrection(this->heu_);
this->heuBoundaryCorrection(this->heu_);
calculate();
this->psi_.oldTime(); // Switch on saving old time