Commit 1a9204c1 authored by mattijs's avatar mattijs
Browse files

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

parents 9c86fec6 b82e21a8
......@@ -38,7 +38,6 @@ Description
#include "CoalCloud.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "thermoPhysicsTypes.H"
#include "timeActivatedExplicitCellSource.H"
#include "radiationModel.H"
......
Info<< "\nConstructing coal cloud" << endl;
CoalCloud<gasThermoPhysics> coalParcels
thermoCoalCloud coalParcels
(
"coalCloud1",
rho,
......
Info<< "\nConstructing reacting cloud" << endl;
BasicReactingCloud<icoPoly8ThermoPhysics> parcels
icoPoly8ThermoReactingCloud parcels
(
"reactingCloud1",
rho,
......
......@@ -46,7 +46,6 @@ Description
#include "BasicReactingCloud.H"
#include "rhoChemistryModel.H"
#include "chemistrySolver.H"
#include "thermoPhysicsTypes.H"
#include "radiationModel.H"
#include "porousZones.H"
#include "timeActivatedExplicitMulticomponentPointSource.H"
......
Info<< "\nConstructing reacting cloud" << endl;
BasicReactingCloud<gasThermoPhysics> parcels
thermoReactingCloud parcels
(
"reactingCloud1",
rho,
......
......@@ -37,7 +37,6 @@ Description
#include "BasicReactingCloud.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "thermoPhysicsTypes.H"
#include "radiationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -139,7 +139,13 @@ void Foam::Cloud<ParticleType>::readFields()
template<class ParticleType>
void Foam::Cloud<ParticleType>::writeFields() const
{}
{
if (this->size())
{
const ParticleType& p = *this->first();
ParticleType::writeFields(p.cloud());
}
}
template<class ParticleType>
......
......@@ -47,7 +47,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class indexedParticle Declaration
Class indexedParticle Declaration
\*---------------------------------------------------------------------------*/
class indexedParticle
......
......@@ -45,20 +45,17 @@ defineTemplateTypeNameAndDebug(Cloud<indexedParticle>, 0);
Foam::indexedParticleCloud::indexedParticleCloud
(
const polyMesh& mesh,
const word& cloudName
const word& cloudName,
bool readFields
)
:
Cloud<indexedParticle>(mesh, cloudName, false)
{
indexedParticle::readFields(*this);
if (readFields)
{
indexedParticle::readFields(*this);
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::indexedParticleCloud::writeFields() const
{
indexedParticle::writeFields(*this);
}
// ************************************************************************* //
......@@ -45,7 +45,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class indexedParticleCloud Declaration
Class indexedParticleCloud Declaration
\*---------------------------------------------------------------------------*/
class indexedParticleCloud
......@@ -69,14 +69,9 @@ public:
indexedParticleCloud
(
const polyMesh&,
const word& cloudName = "defaultCloud"
const word& cloudName = "defaultCloud",
bool readFields = true
);
// Member Functions
//- Write fields
virtual void writeFields() const;
};
......
......@@ -43,12 +43,16 @@ defineTemplateTypeNameAndDebug(Cloud<passiveParticle>, 0);
Foam::passiveParticleCloud::passiveParticleCloud
(
const polyMesh& mesh,
const word& cloudName
const word& cloudName,
bool readFields
)
:
Cloud<passiveParticle>(mesh, cloudName, false)
{
readFields();
if (readFields)
{
passiveParticle::readFields(*this);
}
}
......@@ -63,18 +67,4 @@ Foam::passiveParticleCloud::passiveParticleCloud
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::passiveParticleCloud::readFields()
{
passiveParticle::readFields(*this);
}
void Foam::passiveParticleCloud::writeFields() const
{
passiveParticle::writeFields(*this);
}
// ************************************************************************* //
......@@ -45,7 +45,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class passiveParticleCloud Declaration
Class passiveParticleCloud Declaration
\*---------------------------------------------------------------------------*/
class passiveParticleCloud
......@@ -72,7 +72,8 @@ public:
passiveParticleCloud
(
const polyMesh&,
const word& cloudName = "defaultCloud"
const word& cloudName = "defaultCloud",
bool readFields = true
);
//- Construct from mesh, cloud name, and a list of particles
......@@ -82,15 +83,6 @@ public:
const word& cloudName,
const IDLList<passiveParticle>& particles
);
// Member Functions
//- Read fields
virtual void readFields();
//- Write fields
virtual void writeFields() const;
};
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-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 "CoalCloud.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::CoalCloud<ThermoType>::CoalCloud
(
const word& cloudName,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
basicThermo& thermo
)
:
ReactingMultiphaseCloud<CoalParcel<ThermoType> >
(
cloudName,
rho,
U,
g,
thermo
)
{
CoalParcel<ThermoType>::readFields(*this);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::CoalCloud<ThermoType>::~CoalCloud()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class ThermoType>
void Foam::CoalCloud<ThermoType>::writeFields() const
{
CoalParcel<ThermoType>::writeFields(*this);
}
// ************************************************************************* //
......@@ -26,9 +26,7 @@ Class
CoalCloud
Description
SourceFiles
CoalCloud.C
Coal cloud templated on the type of carrier phase thermodynamics
\*---------------------------------------------------------------------------*/
......@@ -37,69 +35,21 @@ SourceFiles
#include "ReactingMultiphaseCloud.H"
#include "CoalParcel.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef ReactingMultiphaseCloud<CoalParcel<constGasThermoPhysics> >
constThermoCoalCloud;
/*---------------------------------------------------------------------------*\
Class CoalCloud Declaration
\*---------------------------------------------------------------------------*/
template<class ThermoType>
class CoalCloud
:
public ReactingMultiphaseCloud<CoalParcel<ThermoType> >
{
// Private Member Functions
//- Disallow default bitwise copy construct
CoalCloud(const CoalCloud&);
//- Disallow default bitwise assignment
void operator=(const CoalCloud&);
public:
//-Runtime type information
TypeName("CoalCloud");
// Constructors
//- Construct given carrier gas fields
CoalCloud
(
const word& cloudName,
const volScalarField& rho,
const volVectorField& U,
const dimensionedVector& g,
basicThermo& thermo
);
typedef ReactingMultiphaseCloud<CoalParcel<gasThermoPhysics> >
thermoCoalCloud;
//- Destructor
~CoalCloud();
// Member Functions
//- Write fields
virtual void writeFields() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "CoalCloud.C"
#endif
typedef ReactingMultiphaseCloud<CoalParcel<icoPoly8ThermoPhysics> >
icoPoly8ThermoCoalCloud;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-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 "createReactingCloudTypes.H"
#include "CoalCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
createReactingCloudType(CoalCloud);
};
// ************************************************************************* //
/* Coal cloud */
CoalCloud/defineCoalCloud.C
/* Coal parcel and sub-models */
CoalParcel/defineCoalParcel.C
CoalParcel/makeCoalParcelSubmodels.C
......
......@@ -92,8 +92,7 @@ License
( \
ReactingMultiphaseCloud<ParcelType##ThermoType>, \
0 \
); \
defineParcelTypeNameAndDebug(CoalCloud<ParcelType##ThermoType>, 0);
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -96,10 +96,7 @@ Foam::parcel::parcel
}
void Foam::parcel::readFields
(
Cloud<parcel>& c
)
void Foam::parcel::readFields(Cloud<parcel>& c)
{
if (!c.size())
{
......@@ -195,10 +192,7 @@ void Foam::parcel::readFields
}
void Foam::parcel::writeFields
(
const Cloud<parcel>& c
)
void Foam::parcel::writeFields(const Cloud<parcel>& c)
{
Particle<parcel>::writeFields(c);
......
......@@ -59,7 +59,8 @@ Foam::spray::spray
const basicMultiComponentMixture& composition,
const PtrList<gasThermoPhysics>& gasProperties,
const dictionary&,
const dimensionedVector& g
const dimensionedVector& g,
bool readFields
)
:
Cloud<parcel>(U.mesh(), false), // suppress className checking on positions
......@@ -345,7 +346,10 @@ Foam::spray::spray
}
}
parcel::readFields(*this);
if (readFields)
{
parcel::readFields(*this);
}
}
......@@ -355,12 +359,4 @@ Foam::spray::~spray()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::spray::writeFields() const
{
parcel::writeFields(*this);
}
// ************************************************************************* //
......@@ -194,7 +194,8 @@ public:
const basicMultiComponentMixture& composition,
const PtrList<gasThermoPhysics>& gasProperties,
const dictionary& thermophysicalProperties,
const dimensionedVector& g
const dimensionedVector& g,
bool readFields = true
);
......@@ -339,12 +340,6 @@ public:
//- Return Ambient Temperature
void calculateAmbientTemperature();
// I/O
//- Write fields
virtual void writeFields() const;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment