Commit 49fb39e8 authored by mattijs's avatar mattijs
Browse files

Merge commit 'origin/master' into splitCyclic

Conflicts:
	applications/utilities/parallelProcessing/decomposePar/decomposePar.C
	applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C
	applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H
	applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C
	src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C
	src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C
	src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.H
	src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C
	src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C
	src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.H
	src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C
parents 5ece14ec 5c9aa7f4
......@@ -18,6 +18,8 @@ OK - non-parallel finite volume : channelFoam
OK - parallel finite volume with processorCyclic: channelFoam
unitTestCases/channel395-splitCyclic vs. channel395-dev
OK - preProcessing/foamUpgradeCyclics
- amg
- test createPatch pointSync
- pointFields on cyclics. volPointInterpolation.
......@@ -35,7 +37,6 @@ separation.
- regionSplit
- scotchDecomp
- isoSurface.C
- preProcessing/foamUpgradeCyclics
- referredCellList.C
- renumberMesh
- work out scheduled communication?
......
......@@ -10,7 +10,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
set -x
wmake all solvers
wmake all utilities
wmake all solvers
# ----------------------------------------------------------------- end-of-file
......@@ -15,8 +15,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lengine \
......
......@@ -6,7 +6,7 @@ autoPtr<psiChemistryModel> pChemistry
);
psiChemistryModel& chemistry = pChemistry();
hCombustionThermo& thermo = chemistry.thermo();
hsCombustionThermo& thermo = chemistry.thermo();
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
......@@ -50,7 +50,7 @@ volVectorField U
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
volScalarField& h = thermo.h();
volScalarField& hs = thermo.hs();
#include "compressibleCreatePhi.H"
......@@ -92,4 +92,18 @@ forAll(Y, i)
{
fields.add(Y[i]);
}
fields.add(h);
fields.add(hs);
DimensionedField<scalar, volMesh> chemistrySh
(
IOobject
(
"chemistry::Sh",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
);
......@@ -23,7 +23,7 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Application
dieselFoam
dieselEngineFoam
Description
Solver for diesel engine spray and combustion.
......@@ -103,13 +103,15 @@ int main(int argc, char *argv[])
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}
chemistrySh = kappa*chemistry.Sh()();
#include "rhoEqn.H"
#include "UEqn.H"
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
{
#include "YEqn.H"
#include "hEqn.H"
#include "hsEqn.H"
// --- PISO loop
for (int corr=1; corr<=nCorr; corr++)
......
{
solve
(
fvm::ddt(rho, h)
+ mvConvection->fvmDiv(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
DpDt
+ dieselSpray.heatTransferSource()
);
thermo.correct();
}
{
solve
(
fvm::ddt(rho, hs)
+ mvConvection->fvmDiv(phi, hs)
- fvm::laplacian(turbulence->alphaEff(), hs)
==
DpDt
+ dieselSpray.heatTransferSource()().dimensionedInternalField()
+ chemistrySh
);
thermo.correct();
}
......@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
for (label ocorr=1; ocorr <= nOuterCorr; ocorr++)
{
#include "YEqn.H"
#include "hEqn.H"
#include "hsEqn.H"
// --- PISO loop
for (int corr=1; corr<=nCorr; corr++)
......
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso combustionModels
wclean
# ----------------------------------------------------------------- end-of-file
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
wmake libso combustionModels
wmake
# ----------------------------------------------------------------- end-of-file
fireFoam.C
EXE = $(FOAM_APPBIN)/fireFoam
EXE_INC = \
-I./combustionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude
EXE_LIBS = \
-lcombustionModels \
-lspecie \
-lreactionThermophysicalModels \
-lbasicThermophysicalModels \
-lfiniteVolume \
-lcompressibleLESModels \
-lcompressibleRASModels \
-lradiation
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
);
UEqn.relax();
if (oCorr == nOuterCorr - 1)
{
solve
(
UEqn
==
fvc::reconstruct
(
fvc::interpolate(rho)*(g & mesh.Sf())
- fvc::snGrad(p)*mesh.magSf()
),
mesh.solver("UFinal")
);
}
else
{
solve
(
UEqn
==
fvc::reconstruct
(
fvc::interpolate(rho)*(g & mesh.Sf())
- fvc::snGrad(p)*mesh.magSf()
)
);
}
combustionModel/combustionModel.C
combustionModel/newCombustionModel.C
infinitelyFastChemistry/infinitelyFastChemistry.C
noCombustion/noCombustion.C
LIB = $(FOAM_LIBBIN)/libcombustionModels
EXE_INC = \
-I../sensibleEnthalpyCombustionThermophysicalModels/basic/lnInclude \
-I../sensibleEnthalpyCombustionThermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(FOAM_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(FOAM_SRC)/finiteVolume/lnInclude
LIB_LIBS = \
-lfiniteVolume
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "combustionModel.H"
#include "fvm.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(combustionModel, 0);
defineRunTimeSelectionTable(combustionModel, dictionary);
};
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::combustionModel::combustionModel
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
)
:
combustionModelCoeffs_
(
combustionProperties.subDict
(
word(combustionProperties.lookup("combustionModel")) + "Coeffs"
)
),
thermo_(thermo),
turbulence_(turbulence),
mesh_(phi.mesh()),
phi_(phi),
rho_(rho),
stoicRatio_(thermo.lookup("stoichiometricAirFuelMassRatio")),
s_(thermo.lookup("stoichiometricOxygenFuelMassRatio")),
qFuel_(thermo_.lookup("qFuel")),
composition_(thermo.composition())
{}
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * //
Foam::combustionModel::~combustionModel()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::fvScalarMatrix>
Foam::combustionModel::combustionModel::R(volScalarField& fu) const
{
const basicMultiComponentMixture& composition = thermo_.composition();
const volScalarField& ft = composition.Y("ft");
volScalarField fres = composition.fres(ft, stoicRatio_.value());
volScalarField wFuelNorm = this->wFuelNorm()*pos(fu - fres);
return wFuelNorm*fres - fvm::Sp(wFuelNorm, fu);
}
Foam::tmp<Foam::volScalarField> Foam::combustionModel::combustionModel::dQ
(
const fvScalarMatrix& Rfu
) const
{
const basicMultiComponentMixture& composition = thermo_.composition();
const volScalarField& fu = composition.Y("fu");
return (-qFuel_)*(Rfu & fu);
}
bool Foam::combustionModel::read(const dictionary& combustionProperties)
{
combustionModelCoeffs_ = combustionProperties.subDict(type() + "Coeffs");
return true;
}
// ************************************************************************* //
......@@ -23,23 +23,24 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::globalPointPatch
Foam::combustionModel
Description
Foam::globalPointPatch
Base class for all non-premixed combustion models.
SourceFiles
globalPointPatch.C
combustionModel.C
\*---------------------------------------------------------------------------*/
#ifndef globalPointPatch_H
#define globalPointPatch_H
#ifndef combustionModel_H
#define combustionModel_H
#include "pointPatch.H"
#include "coupledPointPatch.H"
#include "globalMeshData.H"
#include "pointMesh.H"
#include "IOdictionary.H"
#include "hsCombustionThermo.H"
#include "turbulenceModel.H"
#include "multivariateSurfaceInterpolationScheme.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -47,154 +48,154 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class globalPointPatch Declaration
Class combustionModel Declaration
\*---------------------------------------------------------------------------*/
class globalPointPatch
:
public pointPatch,
public coupledPointPatch
class combustionModel
{
// Private data
// //- Reference to the basic globalMeshData
// const globalMeshData& globalMeshData_;
protected:
//- Index in the boundary mesh
label index_;
// Protected data
//- Dictionary of coefficients for the particular model
dictionary combustionModelCoeffs_;
// Protected Member Functions
//- Reference to the thermodynamic
const hsCombustionThermo& thermo_;
//- Initialise the calculation of the patch geometry
virtual void initGeometry(PstreamBuffers&)
{}
//- Reference to the turbulence model
const compressible::turbulenceModel& turbulence_;
//- Calculate the patch geometry
virtual void calcGeometry(PstreamBuffers&)
{}
//- Reference to the mesh database
const fvMesh& mesh_;
//- Initialise the patches for moving points
virtual void initMovePoints(PstreamBuffers&, const pointField&)
{}
//- Reference to mass-flux field
const surfaceScalarField& phi_;
//- Correct patches after moving points
virtual void movePoints(PstreamBuffers&, const pointField&)
{}
//- Reference to the density field
const volScalarField& rho_;
//- Initialise the update of the patch topology
virtual void initUpdateMesh(PstreamBuffers&)
{}
//- Stoichiometric air-fuel mass ratio
dimensionedScalar stoicRatio_;
//- Update of the patch topology
virtual void updateMesh(PstreamBuffers&)
{}
//- Stoichiometric oxygen-fuel mass ratio
dimensionedScalar s_;
//- Heat of combustion (J/Kg)
dimensionedScalar qFuel_;
private:
// Private Member Functions
//- Disallow default construct as copy
globalPointPatch
(
const globalPointPatch&
);
//- Disallow copy construct
combustionModel(const combustionModel&);
//- Disallow default assignment
void operator=(const globalPointPatch&);
//- Disallow default bitwise assignment
void operator=(const combustionModel&);
const basicMultiComponentMixture& composition_;
public:
//- Runtime type information
TypeName("global");
TypeName("combustionModel");
// Declare run-time constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
combustionModel,
dictionary,
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
),
(
combustionProperties,
thermo,
turbulence,
phi,
rho
)
);
// Selectors
//- Return a reference to the selected combustion model
static autoPtr<combustionModel> New
(
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
);
// Constructors
//- Construct from components
globalPointPatch
combustionModel
(
const pointBoundaryMesh&,
const label index
const dictionary& combustionProperties,
const hsCombustionThermo& thermo,
const compressible::turbulenceModel& turbulence,
const surfaceScalarField& phi,
const volScalarField& rho
);
// Destructor
//- Destructor
virtual ~combustionModel();
virtual ~globalPointPatch();
// Member Functions
// Member functions
// Access functions
//- Return name
virtual const word& name() const
{
// There can only be a single patch of this type - therefore
// its name is hard-coded.
return type();
}
//- Return size
virtual label size() const
{
return meshPoints().size();
}
//- Access composition
const basicMultiComponentMixture& composition() const
{
return composition_;
}
//- Return true if running parallel
virtual bool coupled() const
{
if (Pstream::parRun())
//- Access combustion dictionary
const dictionary combustionModelCoeffs() const
{
return true;
return combustionModelCoeffs_;
}
else
//- Access heat of combustion
const dimensionedScalar qFuel() const
{
return false;
return qFuel_;
}
}
//- Return number of faces
virtual label nFaces() const
{
return 0;