diff --git a/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.C b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.C new file mode 100644 index 0000000000000000000000000000000000000000..80f1dcaaf7063eb8b7899cd284c268f518a8bfe8 --- /dev/null +++ b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.C @@ -0,0 +1,72 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "ParticleTrackingData.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<class ParcelType> +Foam::label Foam::ParticleTrackingData<ParcelType>::PARTICLE_COUNT = 0; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ParcelType> +Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData +( + const Cloud<ParcelType>& cloud +) +: + cloud_(cloud), + origProc_(Pstream::myProcNo()), + id_(PARTICLE_COUNT++) +{} + + +template<class ParcelType> +Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData +( + const ParticleTrackingData& ptd +) +: + cloud_(ptd.cloud_), + origProc_(ptd.origProc_), + id_(ptd.id_) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class ParcelType> +Foam::ParticleTrackingData<ParcelType>::~ParticleTrackingData() +{} + + +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +#include "ParticleTrackingDataIO.C" + +// ************************************************************************* // diff --git a/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.H b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.H new file mode 100644 index 0000000000000000000000000000000000000000..c752c2ec366ab52dad64f49b6081f01d93e2c2e6 --- /dev/null +++ b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingData.H @@ -0,0 +1,166 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Class + Foam::ParticleTrackingData + +Description + Class to provide additional properties to allow construction of + particle tracks + +SourceFiles + ParticleTrackingData.C + ParticleTrackingDataIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ParticleTrackingData_H +#define ParticleTrackingData_H + +#include "Cloud.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of classes and friend functions +template<class ParcelType> +class ParticleTrackingData; + + +template<class ParcelType> +Ostream& operator<< +( + Ostream&, + const ParticleTrackingData<ParcelType>& +); + + +/*---------------------------------------------------------------------------*\ + Class ParticleTrackingData Declaration +\*---------------------------------------------------------------------------*/ + +template<class ParcelType> +class ParticleTrackingData +{ + // Private data + + //- Reference to the cloud + const Cloud<ParcelType>& cloud_; + + //- Originating processor id + label origProc_; + + //- Local particle id + label id_; + + //- Cumulative particle count used for particle id + static label PARTICLE_COUNT; + + + // Private member functions + + //- Write properties - particle count + static void writeProperties(const Cloud<ParcelType>& cloud); + + //- Read properties - particle count + static void readProperties(const Cloud<ParcelType>& cloud); + + +public: + + // Constructors + + //- Construct from cloud + ParticleTrackingData(const Cloud<ParcelType>& cloud); + + //- Construct copy + ParticleTrackingData(const ParticleTrackingData& ptd); + + //- Construct from Istream and mesh + ParticleTrackingData + ( + const Cloud<ParcelType>& cloud, + Istream& is, + bool readFields + ); + + + //- Destructor + ~ParticleTrackingData(); + + + // Member functions + + // Access + + //- Return const access to the cloud + inline const Cloud<ParcelType>& cloud() const; + + //- Return const access to the originating processor id + inline label origProc() const; + + //- Return const access to the local particle id + inline label id() const; + + + // I-O + + //- Read fields + static void readFields(Cloud<ParcelType>& c); + + //- Write fields + static void writeFields(const Cloud<ParcelType>& c); + + + // Ostream Operator + + friend Ostream& operator<< <ParcelType> + ( + Ostream&, + const ParticleTrackingData<ParcelType>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "ParticleTrackingDataI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "ParticleTrackingData.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataI.H b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataI.H new file mode 100644 index 0000000000000000000000000000000000000000..da195d56274e4ac02cd87bd051539c1f1de517eb --- /dev/null +++ b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataI.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +\*---------------------------------------------------------------------------*/ + +template<class ParcelType> +inline const Foam::Cloud<ParcelType>& +Foam::ParticleTrackingData<ParcelType>::cloud() const +{ + return cloud_; +} + + +template<class ParcelType> +inline Foam::label Foam::ParticleTrackingData<ParcelType>::origProc() const +{ + return origProc_; +} + + +template<class ParcelType> +inline Foam::label Foam::ParticleTrackingData<ParcelType>::id() const +{ + return id_; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataIO.C b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataIO.C new file mode 100644 index 0000000000000000000000000000000000000000..e575426eea793be664dea0c84b216c8d5252e2e3 --- /dev/null +++ b/src/lagrangian/basic/ParticleTrackingData/ParticleTrackingDataIO.C @@ -0,0 +1,233 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "ParticleTrackingData.H" + +// * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * * // + +template<class ParcelType> +void Foam::ParticleTrackingData<ParcelType>::readProperties +( + const Cloud<ParcelType>& cloud +) +{ + IOobject propsDictHeader + ( + "particleTrackingProperties", + cloud.db().time().timeName(), + "uniform/Lagrangian"/cloud.name(), + cloud.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ); + + if (propsDictHeader.headerOk()) + { + const IOdictionary propsDict(propsDictHeader); + + word procName("processor" + name(Pstream::myProcNo())); + if (propsDict.found(procName)) + { + propsDict.subDict(procName).lookup("particleCount") >> + PARTICLE_COUNT; + } + } +} + + +template<class ParcelType> +void Foam::ParticleTrackingData<ParcelType>::writeProperties +( + const Cloud<ParcelType>& cloud +) +{ + if (cloud.db().time().outputTime()) + { + IOdictionary propsDict + ( + IOobject + ( + "particleTrackingProperties", + cloud.db().time().timeName(), + "uniform/Lagrangian"/cloud.name(), + cloud.db(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ) + ); + + word procName("processor" + name(Pstream::myProcNo())); + propsDict.add(procName, dictionary()); + propsDict.subDict(procName).add("particleCount", PARTICLE_COUNT); + + propsDict.regIOobject::write(); + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class ParcelType> +Foam::ParticleTrackingData<ParcelType>::ParticleTrackingData +( + const Cloud<ParcelType>& cloud, + Istream& is, + bool readFields +) +: + cloud_(cloud), + origProc_(-1), + id_(-1) +{ + if (readFields) + { + if (is.format() == IOstream::ASCII) + { + is >> origProc_ >> id_; + } + else + { + is.read + ( + reinterpret_cast<char*>(&origProc_), + sizeof(origProc_) + sizeof(id_) + ); + } + } + + // Check state of Istream + is.check + ( + "ParticleTrackingData<ParcelType>::ParticleTrackingData" + "(" + "Istream&, " + "bool" + ")" + ); +} + + +template<class ParcelType> +void Foam::ParticleTrackingData<ParcelType>::readFields +( + Cloud<ParcelType>& c +) +{ + if (!c.size()) + { + return; + } + + readProperties(c); + + IOField<label> origProc(c.fieldIOobject("origProc", IOobject::MUST_READ)); + c.checkFieldIOobject(c, origProc); + + IOField<label> id(c.fieldIOobject("id", IOobject::MUST_READ)); + c.checkFieldIOobject(c, id); + + label i = 0; + forAllIter(typename Cloud<ParcelType>, c, iter) + { + ParcelType& p = iter(); + p.origProc_ = origProc[i]; + p.id_ = id[i]; + i++; + } +} + + +template<class ParcelType> +void Foam::ParticleTrackingData<ParcelType>::writeFields +( + const Cloud<ParcelType>& c +) +{ + writeProperties(c); + + const label np = c.size(); + + IOField<label> origProc + ( + c.fieldIOobject("origProc", IOobject::NO_READ), + np + ); + IOField<label> id(c.fieldIOobject("id", IOobject::NO_READ), np); + + label i = 0; + forAllConstIter(typename Cloud<ParcelType>, c, iter) + { + const ParcelType& p = iter(); + + origProc[i] = p.origProc(); + id[i] = p.id(); + i++; + } + + origProc.write(); + id.write(); +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class ParcelType> +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const ParticleTrackingData<ParcelType>& p +) +{ + if (os.format() == IOstream::ASCII) + { + os << p.origProc_ << token::SPACE << p.id_ << token::SPACE; + } + else + { + os.write + ( + reinterpret_cast<const char*>(&p.origProc_), + sizeof(p.origProc_) + sizeof(p.id_) + ); + } + + // Check state of Ostream + os.check + ( + "Ostream& operator<<" + "(" + "Ostream&, " + "const ParticleTrackingData<ParcelType>&" + ")" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/trackedReactingCloud/trackedReactingCloud.C b/src/lagrangian/intermediate/clouds/derived/trackedReactingCloud/trackedReactingCloud.C new file mode 100644 index 0000000000000000000000000000000000000000..1b6378d0ceb9d3497cdb3912bdd117f51e16bdfe --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/trackedReactingCloud/trackedReactingCloud.C @@ -0,0 +1,77 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingCloud.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(trackedReactingCloud, 0); +}; + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::trackedReactingCloud::trackedReactingCloud +( + const word& cloudType, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo, + PtrList<specieReactingProperties>& gases +) +: + ReactingCloud<trackedReactingParcel> + ( + cloudType, + rho, + U, + g, + thermo, + gases + ) +{ + trackedReactingParcel::readFields(*this); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::trackedReactingCloud::~trackedReactingCloud() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::trackedReactingCloud::writeFields() const +{ + trackedReactingParcel::writeFields(*this); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/trackedReactingCloud/trackedReactingCloud.H b/src/lagrangian/intermediate/clouds/derived/trackedReactingCloud/trackedReactingCloud.H new file mode 100644 index 0000000000000000000000000000000000000000..be9f01aa8b40cdfad65d848368fe9afaf5094e1e --- /dev/null +++ b/src/lagrangian/intermediate/clouds/derived/trackedReactingCloud/trackedReactingCloud.H @@ -0,0 +1,103 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Class + Foam::trackedReactingCloud + +Description + Reacting cloud templated on the reacting parcel + +SourceFiles + trackedReactingCloud.C + +\*---------------------------------------------------------------------------*/ + +#ifndef trackedReactingCloud_H +#define trackedReactingCloud_H + +#include "ReactingCloud.H" +#include "trackedReactingParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class trackedReactingCloud Declaration +\*---------------------------------------------------------------------------*/ + +class trackedReactingCloud +: + public ReactingCloud<trackedReactingParcel> +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + trackedReactingCloud(const trackedReactingCloud&); + + //- Disallow default bitwise assignment + void operator=(const trackedReactingCloud&); + + +public: + + //- Runtime type information + TypeName("trackedReactingCloud"); + + + // Constructors + + //- Construct given carrier gas fields + trackedReactingCloud + ( + const word& cloudType, + const volScalarField& rho, + const volVectorField& U, + const dimensionedVector& g, + hCombustionThermo& thermo, + PtrList<specieReactingProperties>& gases + ); + + + //- Destructor + ~trackedReactingCloud(); + + + // Member Functions + + //- Write fields + void writeFields() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..229be00d500250c199929befbf8ae91722ddc6c4 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.C @@ -0,0 +1,47 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "TrackedReactingParcel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel +( + const TrackedReactingParcel<ParcelType>& p +) +: + ReactingParcel<ParcelType>(p), + ParticleTrackingData<ParcelType>(p) +{} + + +// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * // + +#include "TrackedReactingParcelIO.C" + +// ************************************************************************* // + diff --git a/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.H new file mode 100644 index 0000000000000000000000000000000000000000..57649e5b66932e351565009157c3a0e910bb401a --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcel.H @@ -0,0 +1,160 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Class + Foam::TrackedReactingParcel + +Description + Adds tracking to ReactingParcel + +SourceFiles + TrackedReactingParcelI.H + TrackedReactingParcel.C + TrackedReactingParcelIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef TrackedReactingParcel_H +#define TrackedReactingParcel_H + +#include "ReactingParcel.H" +#include "ParticleTrackingData.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class ParcelType> +class TrackedReactingParcel; + +// Forward declaration of friend functions + +template<class ParcelType> +Ostream& operator<< +( + Ostream&, + const TrackedReactingParcel<ParcelType>& +); + +/*---------------------------------------------------------------------------*\ + Class TrackedReactingParcel Declaration +\*---------------------------------------------------------------------------*/ + +template<class ParcelType> +class TrackedReactingParcel +: + public ReactingParcel<ParcelType>, + public ParticleTrackingData<ParcelType> +{ +public: + + typedef typename ReactingParcel<ParcelType>::constantProperties + constantProperties; + + // Static data + + //- Runtime type information + TypeName("TrackedReactingParcel"); + + + // Constructors + + //- Construct from components + inline TrackedReactingParcel + ( + ReactingCloud<ParcelType>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const constantProperties& constProps + ); + + //- Construct from Istream + TrackedReactingParcel + ( + const Cloud<ParcelType>& c, + Istream& is, + bool readFields = true + ); + + //- Construct as a copy + TrackedReactingParcel(const TrackedReactingParcel& p); + + //- Construct and return a clone + autoPtr<TrackedReactingParcel> clone() const + { + return + autoPtr<TrackedReactingParcel> + ( + new TrackedReactingParcel(*this) + ); + } + + + // Member Functions + + // I-O + + //- Read + static void readFields(ReactingCloud<ParcelType>& c); + + //- Write + static void writeFields(const ReactingCloud<ParcelType>& c); + + + // Ostream Operator + + friend Ostream& operator<< <ParcelType> + ( + Ostream&, + const TrackedReactingParcel<ParcelType>& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "TrackedReactingParcelI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "TrackedReactingParcel.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // + diff --git a/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelI.H new file mode 100644 index 0000000000000000000000000000000000000000..241e0defced2063f6fe51462c84f64fec2c2c08d --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelI.H @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class ParcelType> +inline Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel +( + ReactingCloud<ParcelType>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const constantProperties& constProps +) +: + ReactingParcel<ParcelType> + ( + owner, + position, + cellI, + typeId, + nParticle0, + d0, + U0, + Y0, + constProps + ), + ParticleTrackingData<ParcelType>(owner) +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelIO.C new file mode 100644 index 0000000000000000000000000000000000000000..ae347c0ea6232209225d84078524126d6f10c09e --- /dev/null +++ b/src/lagrangian/intermediate/parcels/Templates/TrackedReactingParcel/TrackedReactingParcelIO.C @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "TrackedReactingParcel.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template <class ParcelType> +Foam::TrackedReactingParcel<ParcelType>::TrackedReactingParcel +( + const Cloud<ParcelType>& cloud, + Istream& is, + bool readFields +) +: + ReactingParcel<ParcelType>(cloud, is, readFields), + ParticleTrackingData<ParcelType>(cloud, is, readFields) +{} + + +template<class ParcelType> +void Foam::TrackedReactingParcel<ParcelType>::readFields +( + ReactingCloud<ParcelType>& c +) +{ + if (!c.size()) + { + return; + } + + ReactingParcel<ParcelType>::readFields(c); + ParticleTrackingData<ParcelType>::readFields(c); +} + + +template<class ParcelType> +void Foam::TrackedReactingParcel<ParcelType>::writeFields +( + const ReactingCloud<ParcelType>& c +) +{ + ReactingParcel<ParcelType>::writeFields(c); + ParticleTrackingData<ParcelType>::writeFields(c); +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class ParcelType> +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const TrackedReactingParcel<ParcelType>& p +) +{ + if (os.format() == IOstream::ASCII) + { + os << static_cast<const ReactingParcel<ParcelType>&>(p) + << static_cast<const ParticleTrackingData<ParcelType>&>(p); + } + else + { + os << static_cast<const ReactingParcel<ParcelType>&>(p) + << static_cast<const ParticleTrackingData<ParcelType>&>(p); + } + + // Check state of Ostream + os.check + ( + "Ostream& operator<<" + "(" + "Ostream&, " + "const TrackedReactingParcel<ParcelType>&" + ")" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/defineTrackedReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/defineTrackedReactingParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..0d050351efcbb7ce39887ad242e4f584ae8e3515 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/defineTrackedReactingParcel.C @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "ReactingCloud.H" + +namespace Foam +{ + defineTemplateTypeNameAndDebug(Cloud<trackedReactingParcel>, 0); + + defineParcelTypeNameAndDebug(KinematicParcel<trackedReactingParcel>, 0); +// defineTemplateTypeNameAndDebug(KinematicParcel<trackedReactingParcel>, 0); + defineParcelTypeNameAndDebug(ThermoParcel<trackedReactingParcel>, 0); + defineTemplateTypeNameAndDebug(ThermoParcel<trackedReactingParcel>, 0); + defineParcelTypeNameAndDebug(ReactingParcel<trackedReactingParcel>, 0); + defineTemplateTypeNameAndDebug(ReactingParcel<trackedReactingParcel>, 0); + defineTemplateTypeNameAndDebug + ( + TrackedReactingParcel<trackedReactingParcel>, + 0 + ); + + defineParcelTypeNameAndDebug(KinematicCloud<trackedReactingParcel>, 0); +// defineTemplateTypeNameAndDebug(KinematicCloud<trackedReactingParcel>, 0); + + defineParcelTypeNameAndDebug(ThermoCloud<trackedReactingParcel>, 0); +// defineTemplateTypeNameAndDebug(ThermoCloud<trackedReactingParcel>, 0); + + defineParcelTypeNameAndDebug(ReactingCloud<trackedReactingParcel>, 0); +// defineTemplateTypeNameAndDebug(ReactingCloud<trackedReactingParcel>, 0); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelCompositionModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelCompositionModels.C new file mode 100644 index 0000000000000000000000000000000000000000..342c3b6db57ef3690d9d07acd928a7a18849af1d --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelCompositionModels.C @@ -0,0 +1,48 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "ReactingCloud.H" + +#include "SinglePhaseMixture.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeCompositionModel(ReactingCloud<trackedReactingParcel>); + + // Add instances of composition model to the table + makeCompositionModelType + ( + SinglePhaseMixture, + ReactingCloud, + trackedReactingParcel + ); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelDispersionModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelDispersionModels.C new file mode 100644 index 0000000000000000000000000000000000000000..ce1a1dd90dc999e36887f52447212663273ba181 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelDispersionModels.C @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "KinematicCloud.H" + +#include "NoDispersion.H" +#include "GradientDispersionRAS.H" +#include "StochasticDispersionRAS.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeDispersionModel(KinematicCloud<trackedReactingParcel>); + + defineNamedTemplateTypeNameAndDebug + ( + DispersionRASModel<KinematicCloud<trackedReactingParcel> >, + 0 + ); + + // Add instances of dispersion model to the table + makeDispersionModelType + ( + NoDispersion, + KinematicCloud, + trackedReactingParcel + ); + makeDispersionModelType + ( + GradientDispersionRAS, + KinematicCloud, + trackedReactingParcel + ); + makeDispersionModelType + ( + StochasticDispersionRAS, + KinematicCloud, + trackedReactingParcel + ); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelDragModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelDragModels.C new file mode 100644 index 0000000000000000000000000000000000000000..a148878048183ac745ff436477cc2657294929ae --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelDragModels.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "KinematicCloud.H" + +#include "NoDrag.H" +#include "SphereDrag.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeDragModel(KinematicCloud<trackedReactingParcel>); + + // Add instances of drag model to the table + makeDragModelType(NoDrag, KinematicCloud, trackedReactingParcel); + makeDragModelType(SphereDrag, KinematicCloud, trackedReactingParcel); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelHeatTransferModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelHeatTransferModels.C new file mode 100644 index 0000000000000000000000000000000000000000..56843b48621942fdfb22c5beab1ddacbf4e5ef5b --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelHeatTransferModels.C @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "ThermoCloud.H" + +#include "NoHeatTransfer.H" +#include "RanzMarshall.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeHeatTransferModel(ThermoCloud<trackedReactingParcel>); + + // Add instances of heat transfer model to the table + makeHeatTransferModelType + ( + NoHeatTransfer, + ThermoCloud, + trackedReactingParcel + ); + makeHeatTransferModelType + ( + RanzMarshall, + ThermoCloud, + trackedReactingParcel + ); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelInjectionModels.C new file mode 100644 index 0000000000000000000000000000000000000000..8db5ab7df940914c5ac0001d6c460513161c43f4 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelInjectionModels.C @@ -0,0 +1,69 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "ReactingCloud.H" + +#include "ConeInjection.H" +#include "FieldActivatedInjection.H" +#include "ManualInjection.H" +#include "NoInjection.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeInjectionModel(KinematicCloud<trackedReactingParcel>); + + // Add instances of injection model to the table + makeInjectionModelType + ( + ConeInjection, + KinematicCloud, + trackedReactingParcel + ); + makeInjectionModelType + ( + FieldActivatedInjection, + KinematicCloud, + trackedReactingParcel + ); + makeInjectionModelType + ( + ManualInjection, + KinematicCloud, + trackedReactingParcel + ); + makeInjectionModelType + ( + NoInjection, + KinematicCloud, + trackedReactingParcel + ); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelPhaseChangeModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelPhaseChangeModels.C new file mode 100644 index 0000000000000000000000000000000000000000..2c5d08bd9422fe59717fb00e4521827d5c3e00c3 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelPhaseChangeModels.C @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "ReactingCloud.H" + +#include "NoPhaseChange.H" +#include "LiquidEvaporation.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePhaseChangeModel(ReactingCloud<trackedReactingParcel>); + + // Add instances of phase change model to the table + makePhaseChangeModelType + ( + NoPhaseChange, + ReactingCloud, + trackedReactingParcel + ); + makePhaseChangeModelType + ( + LiquidEvaporation, + ReactingCloud, + trackedReactingParcel + ); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelPostProcessingModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelPostProcessingModels.C new file mode 100644 index 0000000000000000000000000000000000000000..b4e25f1beae40a094569d50d357cf8afc8d54ed8 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelPostProcessingModels.C @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "KinematicCloud.H" + +#include "NoPostProcessing.H" +#include "StandardPostProcessing.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePostProcessingModel(KinematicCloud<trackedReactingParcel>); + + // Add instances of post-processing model to the table + makePostProcessingModelType + ( + NoPostProcessing, + KinematicCloud, + trackedReactingParcel + ); + makePostProcessingModelType + ( + StandardPostProcessing, + KinematicCloud, + trackedReactingParcel + ); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelTrackingModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelTrackingModels.C new file mode 100644 index 0000000000000000000000000000000000000000..4ef9a7c6dadb69377dbc0e0626e4ce2a94e0f01b --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelTrackingModels.C @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "Cloud.H" + +#include "NoTracking.H" +#include "StandardTracking.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeTrackingModel(Cloud<trackedReactingParcel>); + + // Add instances of post-processing model to the table + makeTrackingModelType + ( + NoTracking, + Cloud, + trackedReactingParcel + ); + makeTrackingModelType + ( + StandardTracking, + Cloud, + trackedReactingParcel + ); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelWallInteractionModels.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelWallInteractionModels.C new file mode 100644 index 0000000000000000000000000000000000000000..7bd64b55796bd6060552d433d5ec805c4c2e044e --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/submodels/makeTrackedReactingParcelWallInteractionModels.C @@ -0,0 +1,55 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" +#include "KinematicCloud.H" + +#include "Rebound.H" +#include "StandardWallInteraction.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makeWallInteractionModel(KinematicCloud<trackedReactingParcel>); + + // Add instances of wall interaction model to the table + makeWallInteractionModelType + ( + Rebound, + KinematicCloud, + trackedReactingParcel + ); + makeWallInteractionModelType + ( + StandardWallInteraction, + KinematicCloud, + trackedReactingParcel + ); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/trackedReactingParcel.C b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/trackedReactingParcel.C new file mode 100644 index 0000000000000000000000000000000000000000..932add74a95199528931ac33e6f3a6e44db4ffb6 --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/trackedReactingParcel.C @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 "trackedReactingParcel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(trackedReactingParcel, 0); + defineParticleTypeNameAndDebug(trackedReactingParcel, 0); + defineParcelTypeNameAndDebug(trackedReactingParcel, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::trackedReactingParcel::trackedReactingParcel +( + ReactingCloud<trackedReactingParcel>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const constantProperties& constProps +) +: + TrackedReactingParcel<trackedReactingParcel> + ( + owner, + position, + cellI, + typeId, + nParticle0, + d0, + U0, + Y0, + constProps + ) +{} + + +Foam::trackedReactingParcel::trackedReactingParcel +( + const Cloud<trackedReactingParcel>& cloud, + Istream& is, + bool readFields +) +: + TrackedReactingParcel<trackedReactingParcel>(cloud, is, readFields) +{} + + +Foam::trackedReactingParcel::trackedReactingParcel +( + const trackedReactingParcel& p +) +: + TrackedReactingParcel<trackedReactingParcel>(p) +{} + + +// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // + +Foam::trackedReactingParcel::~trackedReactingParcel() +{} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/trackedReactingParcel.H b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/trackedReactingParcel.H new file mode 100644 index 0000000000000000000000000000000000000000..570f779a054b9161ae3ea528630cecfe1bc2157f --- /dev/null +++ b/src/lagrangian/intermediate/parcels/derived/trackedReactingParcel/trackedReactingParcel.H @@ -0,0 +1,119 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 + +Class + Foam::trackedReactingParcel + +Description + + +SourceFiles + trackedReactingParcel.C + trackedReactingParcelIO.C + +\*---------------------------------------------------------------------------*/ + +#ifndef trackedReactingParcel_H +#define trackedReactingParcel_H + +#include "TrackedReactingParcel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class trackedReactingParcel Declaration +\*---------------------------------------------------------------------------*/ + +class trackedReactingParcel +: + public TrackedReactingParcel<trackedReactingParcel> +{ + +public: + + //- Run-time type information + TypeName("trackedReactingParcel"); + + // Constructors + + //- Construct from components + trackedReactingParcel + ( + ReactingCloud<trackedReactingParcel>& owner, + const vector& position, + const label cellI, + const label typeId, + const scalar nParticle0, + const scalar d0, + const vector& U0, + const scalarField& Y0, + const constantProperties& constProps + ); + + //- Construct from Istream + trackedReactingParcel + ( + const Cloud<trackedReactingParcel>& c, + Istream& is, + bool readFields = true + ); + + //- Construct as a copy + trackedReactingParcel(const trackedReactingParcel& p); + + //- Construct and return a clone + autoPtr<trackedReactingParcel> clone() const + { + return + autoPtr<trackedReactingParcel> + ( + new trackedReactingParcel(*this) + ); + } + + + //- Destructor + virtual ~trackedReactingParcel(); +}; + + +template<> +inline bool contiguous<trackedReactingParcel>() +{ + return false; // Now have scalar lists/fields (mass fractions) +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //