mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
updates
This commit is contained in:
@ -1,44 +1,65 @@
|
||||
PARCELS=parcels
|
||||
DERIVEDPARCELS=$(PARCELS)/derived
|
||||
|
||||
/* Parcels */
|
||||
parcels/derived/basicKinematicParcel/basicKinematicParcel.C
|
||||
parcels/derived/basicThermoParcel/basicThermoParcel.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C
|
||||
$(DERIVEDPARCELS)/basicKinematicParcel/basicKinematicParcel.C
|
||||
$(DERIVEDPARCELS)/basicThermoParcel/basicThermoParcel.C
|
||||
$(DERIVEDPARCELS)/basicReactingParcel/basicReactingParcel.C
|
||||
$(DERIVEDPARCELS)/basicReactingMultiphaseParcel/basicReactingMultiphaseParcel.C
|
||||
|
||||
/* Cloud base classes */
|
||||
clouds/baseClasses/kinematicCloud/kinematicCloud.C
|
||||
clouds/baseClasses/thermoCloud/thermoCloud.C
|
||||
clouds/baseClasses/reactingCloud/reactingCloud.C
|
||||
clouds/baseClasses/reactingMultiphaseCloud/reactingMultiphaseCloud.C
|
||||
|
||||
/* Injection mechanisms */
|
||||
/* Cloud container/injection mechanisms */
|
||||
clouds/derived/basicKinematicCloud/basicKinematicCloud.C
|
||||
clouds/derived/basicThermoCloud/basicThermoCloud.C
|
||||
clouds/derived/basicReactingCloud/basicReactingCloud.C
|
||||
clouds/derived/basicReactingMultiphaseCloud/basicReactingMultiphaseCloud.C
|
||||
|
||||
/* kinematic parcel sub-models */
|
||||
parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.C
|
||||
parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDispersionModels.C
|
||||
parcels/derived/basicKinematicParcel/makeBasicKinematicParcelDragModels.C
|
||||
parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C
|
||||
parcels/derived/basicKinematicParcel/makeBasicKinematicParcelHeatTransferModels.C
|
||||
parcels/derived/basicKinematicParcel/makeBasicKinematicParcelWallInteractionModels.C
|
||||
KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel
|
||||
$(KINEMATICPARCEL)/defineBasicKinematicParcel.C
|
||||
$(KINEMATICPARCEL)/makeBasicKinematicParcelDispersionModels.C
|
||||
$(KINEMATICPARCEL)/makeBasicKinematicParcelDragModels.C
|
||||
$(KINEMATICPARCEL)/makeBasicKinematicParcelInjectionModels.C
|
||||
$(KINEMATICPARCEL)/makeBasicKinematicParcelWallInteractionModels.C
|
||||
|
||||
/* thermo parcel sub-models */
|
||||
parcels/derived/basicThermoParcel/defineBasicThermoParcel.C
|
||||
parcels/derived/basicThermoParcel/makeBasicThermoParcelDispersionModels.C
|
||||
parcels/derived/basicThermoParcel/makeBasicThermoParcelDragModels.C
|
||||
parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C
|
||||
parcels/derived/basicThermoParcel/makeBasicThermoParcelHeatTransferModels.C
|
||||
parcels/derived/basicThermoParcel/makeBasicThermoParcelWallInteractionModels.C
|
||||
THERMOPARCEL=$(DERIVEDPARCELS)/basicThermoParcel
|
||||
$(THERMOPARCEL)/defineBasicThermoParcel.C
|
||||
$(THERMOPARCEL)/makeBasicThermoParcelDispersionModels.C
|
||||
$(THERMOPARCEL)/makeBasicThermoParcelDragModels.C
|
||||
$(THERMOPARCEL)/makeBasicThermoParcelHeatTransferModels.C
|
||||
$(THERMOPARCEL)/makeBasicThermoParcelInjectionModels.C
|
||||
$(THERMOPARCEL)/makeBasicThermoParcelWallInteractionModels.C
|
||||
|
||||
/* reacting parcel sub-models */
|
||||
parcels/derived/basicReactingMultiphaseParcel/defineBasicReactingMultiphaseParcel.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelCompositionModels.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDragModels.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDispersionModels.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelInjectionModels.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelHeatTransferModels.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelDevolatilisationModels.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C
|
||||
parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelWallInteractionModels.C
|
||||
REACTINGPARCEL=$(DERIVEDPARCELS)/basicReactingParcel
|
||||
$(REACTINGPARCEL)/defineBasicReactingParcel.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelCompositionModels.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelDispersionModels.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelDragModels.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelHeatTransferModels.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelInjectionModels.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelPhaseChangeModels.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelSurfaceReactionModels.C
|
||||
$(REACTINGPARCEL)/makeBasicReactingParcelWallInteractionModels.C
|
||||
|
||||
/* reacting multiphase parcel sub-models */
|
||||
REACTINGMPPARCEL=$(DERIVEDPARCELS)/basicReactingMultiphaseParcel
|
||||
$(REACTINGMPPARCEL)/defineBasicReactingMultiphaseParcel.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelCompositionModels.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelDevolatilisationModels.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelDispersionModels.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelDragModels.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelHeatTransferModels.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelInjectionModels.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelPhaseChangeModels.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelSurfaceReactionModels.C
|
||||
$(REACTINGMPPARCEL)/makeBasicReactingMultiphaseParcelWallInteractionModels.C
|
||||
|
||||
/* bolt-on models */
|
||||
submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C
|
||||
|
||||
@ -25,12 +25,13 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "KinematicCloud.H"
|
||||
#include "IntegrationScheme.H"
|
||||
#include "interpolation.H"
|
||||
|
||||
#include "DispersionModel.H"
|
||||
#include "DragModel.H"
|
||||
#include "InjectionModel.H"
|
||||
#include "WallInteractionModel.H"
|
||||
#include "IntegrationScheme.H"
|
||||
#include "interpolation.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||
|
||||
@ -84,9 +84,6 @@ class KinematicCloud
|
||||
public Cloud<ParcelType>,
|
||||
public kinematicCloud
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Cloud type - used to set the name of the parcel properties
|
||||
|
||||
@ -25,8 +25,9 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "CompositionModel.H"
|
||||
#include "DevolatilisationModel.H"
|
||||
#include "PhaseChangeModel.H"
|
||||
#include "SurfaceReactionModel.H"
|
||||
|
||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||
@ -91,9 +92,9 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud
|
||||
*this
|
||||
)
|
||||
),
|
||||
devolatilisationModel_
|
||||
phaseChangeModel_
|
||||
(
|
||||
DevolatilisationModel<ReactingCloud<ParcelType> >::New
|
||||
PhaseChangeModel<ReactingCloud<ParcelType> >::New
|
||||
(
|
||||
this->particleProperties(),
|
||||
*this
|
||||
@ -161,37 +162,37 @@ void Foam::ReactingCloud<ParcelType>::evolve()
|
||||
const volScalarField cp = carrierThermo_.Cp();
|
||||
const volScalarField& p = carrierThermo_.p();
|
||||
|
||||
autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New
|
||||
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
this->rho()
|
||||
);
|
||||
|
||||
autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New
|
||||
autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
this->U()
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New
|
||||
autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
this->mu()
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New
|
||||
autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
T
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New
|
||||
autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
cp
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > pInterpolator = interpolation<scalar>::New
|
||||
autoPtr<interpolation<scalar> > pInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
p
|
||||
@ -201,12 +202,12 @@ void Foam::ReactingCloud<ParcelType>::evolve()
|
||||
(
|
||||
*this,
|
||||
constProps_,
|
||||
rhoInterpolator(),
|
||||
UInterpolator(),
|
||||
muInterpolator(),
|
||||
TInterpolator(),
|
||||
cpInterpolator(),
|
||||
pInterpolator(),
|
||||
rhoInterp(),
|
||||
UInterp(),
|
||||
muInterp(),
|
||||
TInterp(),
|
||||
cpInterp(),
|
||||
pInterp(),
|
||||
this->g().value()
|
||||
);
|
||||
|
||||
|
||||
@ -26,9 +26,11 @@ Class
|
||||
Foam::ReactingCloud
|
||||
|
||||
Description
|
||||
Templated base class for reactive cloud
|
||||
- Adds to kinematic cloud
|
||||
- Heat transfer
|
||||
Templated base class for reacting cloud
|
||||
- Adds to thermodynamic cloud
|
||||
- Variable composition (single phase)
|
||||
- Phase change
|
||||
- Surface reactions
|
||||
|
||||
SourceFiles
|
||||
ReactingCloudI.H
|
||||
@ -58,13 +60,13 @@ template<class CloudType>
|
||||
class CompositionModel;
|
||||
|
||||
template<class CloudType>
|
||||
class DevolatilisationModel;
|
||||
class PhaseChangeModel;
|
||||
|
||||
template<class CloudType>
|
||||
class SurfaceReactionModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class ReactingCloud Declaration
|
||||
Class ReactingCloud Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
@ -73,7 +75,6 @@ class ReactingCloud
|
||||
public ThermoCloud<ParcelType>,
|
||||
public reactingCloud
|
||||
{
|
||||
|
||||
// Private data
|
||||
|
||||
//- Parcel constant properties
|
||||
@ -85,23 +86,28 @@ class ReactingCloud
|
||||
//- Gas phase properties
|
||||
PtrList<specieReactingProperties>& gases_;
|
||||
|
||||
|
||||
// References to the cloud sub-models
|
||||
|
||||
//- Reacting composition model
|
||||
autoPtr<CompositionModel<ReactingCloud<ParcelType> > >
|
||||
compositionModel_;
|
||||
|
||||
//- Devolatilisation model
|
||||
autoPtr<DevolatilisationModel<ReactingCloud<ParcelType> > >
|
||||
devolatilisationModel_;
|
||||
//- Reacting phase change model
|
||||
autoPtr<PhaseChangeModel<ReactingCloud<ParcelType> > >
|
||||
phaseChangeModel_;
|
||||
|
||||
//- Reacting surface reaction model
|
||||
autoPtr
|
||||
<
|
||||
SurfaceReactionModel<ReactingCloud<ParcelType> >
|
||||
>
|
||||
surfaceReactionModel_;
|
||||
|
||||
//- Surface reaction model
|
||||
autoPtr<SurfaceReactionModel<ReactingCloud<ParcelType> > >
|
||||
surfaceReactionModel_;
|
||||
|
||||
// Sources
|
||||
|
||||
//- Devolatilisation fields - one per carrier phase specie
|
||||
//- Mass transfer fields - one per carrier phase specie
|
||||
PtrList<DimensionedField<scalar, volMesh> > rhoTrans_;
|
||||
|
||||
|
||||
@ -116,10 +122,6 @@ class ReactingCloud
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
// TypeName("ReactingCloud");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
@ -134,9 +136,8 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~ReactingCloud();
|
||||
//- Destructor
|
||||
virtual ~ReactingCloud();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -159,11 +160,11 @@ public:
|
||||
inline const CompositionModel<ReactingCloud<ParcelType> >&
|
||||
composition() const;
|
||||
|
||||
//- Return reference to devolatilisation model
|
||||
inline const DevolatilisationModel<ReactingCloud<ParcelType> >&
|
||||
devolatilisation() const;
|
||||
//- Return reference to reacting phase change model
|
||||
inline const PhaseChangeModel<ReactingCloud<ParcelType> >&
|
||||
phaseChange() const;
|
||||
|
||||
//- Return reference to surface reaction model
|
||||
//- Return reference to reacting surface reaction model
|
||||
inline const SurfaceReactionModel<ReactingCloud<ParcelType> >&
|
||||
surfaceReaction() const;
|
||||
|
||||
|
||||
@ -59,10 +59,10 @@ Foam::ReactingCloud<ParcelType>::composition() const
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::DevolatilisationModel<Foam::ReactingCloud<ParcelType> >&
|
||||
Foam::ReactingCloud<ParcelType>::devolatilisation() const
|
||||
inline const Foam::PhaseChangeModel<Foam::ReactingCloud<ParcelType> >&
|
||||
Foam::ReactingCloud<ParcelType>::phaseChange() const
|
||||
{
|
||||
return devolatilisationModel_;
|
||||
return phaseChangeModel_;
|
||||
}
|
||||
|
||||
|
||||
@ -129,4 +129,5 @@ Foam::ReactingCloud<ParcelType>::Srho1() const
|
||||
return trhoTrans/(this->db().time().deltaT()*this->mesh().V());
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,184 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "ReactingMultiphaseCloud.H"
|
||||
|
||||
#include "CompositionModel.H"
|
||||
#include "DevolatilisationModel.H"
|
||||
#include "SurfaceReactionModel.H"
|
||||
|
||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::addNewParcel
|
||||
(
|
||||
const vector& position,
|
||||
const label cellId,
|
||||
const scalar d,
|
||||
const vector& U,
|
||||
const scalar nParticles,
|
||||
const scalar lagrangianDt
|
||||
)
|
||||
{
|
||||
ParcelType* pPtr = new ParcelType
|
||||
(
|
||||
*this,
|
||||
this->parcelTypeId(),
|
||||
position,
|
||||
cellId,
|
||||
d,
|
||||
U,
|
||||
nParticles,
|
||||
this->composition().YGas0(),
|
||||
this->composition().YLiquid0(),
|
||||
this->composition().YSolid0(),
|
||||
this->composition().YMixture0(),
|
||||
constProps_
|
||||
);
|
||||
|
||||
scalar continuousDt = this->db().time().deltaT().value();
|
||||
pPtr->stepFraction() = (continuousDt - lagrangianDt)/continuousDt;
|
||||
|
||||
addParticle(pPtr);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud
|
||||
(
|
||||
const word& cloudType,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
)
|
||||
:
|
||||
ReactingCloud<ParcelType>(cloudType, rho, U, g, thermo, gases),
|
||||
reactingMultiphaseCloud(),
|
||||
constProps_(this->particleProperties()),
|
||||
devolatilisationModel_
|
||||
(
|
||||
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >::New
|
||||
(
|
||||
this->particleProperties(),
|
||||
*this
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::~ReactingMultiphaseCloud()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::resetSourceTerms()
|
||||
{
|
||||
ReactingCloud<ParcelType>::resetSourceTerms();
|
||||
}
|
||||
|
||||
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::evolve()
|
||||
{
|
||||
const volScalarField& T = carrierThermo_.T();
|
||||
const volScalarField cp = carrierThermo_.Cp();
|
||||
const volScalarField& p = carrierThermo_.p();
|
||||
|
||||
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
this->rho()
|
||||
);
|
||||
|
||||
autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
this->U()
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
this->mu()
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
T
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
cp
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > pInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
p
|
||||
);
|
||||
|
||||
typename ParcelType::trackData td
|
||||
(
|
||||
*this,
|
||||
constProps_,
|
||||
rhoInterp(),
|
||||
UInterp(),
|
||||
muInterp(),
|
||||
TInterp(),
|
||||
cpInterp(),
|
||||
pInterp(),
|
||||
this->g().value()
|
||||
);
|
||||
|
||||
this->injection().inject(td);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
this->dumpParticlePositions();
|
||||
}
|
||||
|
||||
if (this->coupled())
|
||||
{
|
||||
resetSourceTerms();
|
||||
}
|
||||
|
||||
Cloud<ParcelType>::move(td);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,210 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::ReactingMultiphaseCloud
|
||||
|
||||
Description
|
||||
Templated base class for multiphase reacting cloud
|
||||
- Adds to reacting cloud
|
||||
- Devolatilisatsion
|
||||
- multiphase composition
|
||||
|
||||
SourceFiles
|
||||
ReactingMultiphaseCloudI.H
|
||||
ReactingMultiphaseCloud.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef ReactingMultiphaseCloud_H
|
||||
#define ReactingMultiphaseCloud_H
|
||||
|
||||
#include "ReactingCloud.H"
|
||||
#include "reactingMultiphaseCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
|
||||
template<class CloudType>
|
||||
class DevolatilisationModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class ReactingMultiphaseCloud Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class ParcelType>
|
||||
class ReactingMultiphaseCloud
|
||||
:
|
||||
public ReactingCloud<ParcelType>,
|
||||
public reactingMultiphaseCloud
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Parcel constant properties
|
||||
typename ParcelType::constantProperties constProps_;
|
||||
|
||||
//- Thermodynamics package (combustion)
|
||||
hCombustionThermo& carrierThermo_;
|
||||
|
||||
//- Gas phase properties
|
||||
PtrList<specieReactingProperties>& gases_;
|
||||
|
||||
|
||||
// References to the cloud sub-models
|
||||
|
||||
//- Devolatilisation model
|
||||
autoPtr
|
||||
<
|
||||
DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >
|
||||
>
|
||||
devolatilisationModel_;
|
||||
|
||||
|
||||
|
||||
// Sources
|
||||
|
||||
//- Mass transfer fields - one per carrier phase specie
|
||||
PtrList<DimensionedField<scalar, volMesh> > rhoTrans_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
ReactingMultiphaseCloud(const ReactingMultiphaseCloud&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const ReactingMultiphaseCloud&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
ReactingMultiphaseCloud
|
||||
(
|
||||
const word& cloudType,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const dimensionedVector& g,
|
||||
hCombustionThermo& thermo,
|
||||
PtrList<specieReactingProperties>& gases
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~ReactingMultiphaseCloud();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return const access to carrier phase thermo package
|
||||
inline const hCombustionThermo& carrierThermo() const;
|
||||
|
||||
//- Return access to carrier phase thermo package
|
||||
inline hCombustionThermo& carrierThermo();
|
||||
|
||||
//- Gas phase properties
|
||||
inline const PtrList<specieReactingProperties>& gases() const;
|
||||
|
||||
|
||||
// Sub-models
|
||||
|
||||
//- Return reference to devolatilisation model
|
||||
inline const DevolatilisationModel
|
||||
<
|
||||
ReactingMultiphaseCloud<ParcelType>
|
||||
>&
|
||||
devolatilisation() const;
|
||||
|
||||
|
||||
// Sources
|
||||
|
||||
//- Mass
|
||||
|
||||
//- Return reference to mass source for field i
|
||||
inline DimensionedField<scalar, volMesh>&
|
||||
rhoTrans(const label i);
|
||||
|
||||
//- Return reference to mass source fields
|
||||
inline PtrList<DimensionedField<scalar, volMesh> >&
|
||||
rhoTrans();
|
||||
|
||||
//- Return tmp mass source for field i
|
||||
// Fully explicit
|
||||
inline tmp<DimensionedField<scalar, volMesh> >
|
||||
Srho1(const label i) const;
|
||||
|
||||
//- Return tmp total mass source for carrier phase
|
||||
// Fully explicit
|
||||
inline tmp<DimensionedField<scalar, volMesh> >
|
||||
Srho1() const;
|
||||
|
||||
|
||||
// Cloud evolution functions
|
||||
|
||||
//- Add new parcel
|
||||
void addNewParcel
|
||||
(
|
||||
const vector& position,
|
||||
const label cellId,
|
||||
const scalar d,
|
||||
const vector& U,
|
||||
const scalar nParticles,
|
||||
const scalar lagrangianDt
|
||||
);
|
||||
|
||||
//- Reset the spray source terms
|
||||
void resetSourceTerms();
|
||||
|
||||
//- Evolve the spray (inject, move)
|
||||
void evolve();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "ReactingMultiphaseCloudI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "ReactingMultiphaseCloud.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,40 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
inline const Foam::DevolatilisationModel
|
||||
<
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>
|
||||
>&
|
||||
Foam::ReactingMultiphaseCloud<ParcelType>::devolatilisation() const
|
||||
{
|
||||
return devolatilisationModel_;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,65 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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
|
||||
|
||||
Typedefs
|
||||
Foam::cloudThermoTypes
|
||||
|
||||
Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef ReactingCloudThermoTypes_H
|
||||
#define ReactingCloudThermoTypes_H
|
||||
|
||||
#include "sutherlandTransport.H"
|
||||
#include "multiComponentMixture.H"
|
||||
#include "specie.H"
|
||||
#include "constTransport.H"
|
||||
#include "specieThermo.H"
|
||||
#include "hConstThermo.H"
|
||||
#include "janafThermo.H"
|
||||
#include "perfectGas.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
// typedef multiComponentMixture<constTransport<specieThermo<hConstThermo<perfectGas> > > > specieProperties;
|
||||
// typedef hConstThermo<perfectGas> specieProperties;
|
||||
|
||||
// typedef sutherlandTransport<specieThermo<janafThermo<perfectGas> > >
|
||||
// specieProperties;
|
||||
|
||||
typedef sutherlandTransport<specieThermo<janafThermo<perfectGas> > >
|
||||
specieReactingProperties;
|
||||
|
||||
typedef constTransport<specieThermo<hConstThermo<perfectGas> > >
|
||||
specieConstProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -25,11 +25,11 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "ThermoCloud.H"
|
||||
#include "HeatTransferModel.H"
|
||||
|
||||
#include "interpolationCellPoint.H"
|
||||
#include "ThermoParcel.H"
|
||||
|
||||
#include "HeatTransferModel.H"
|
||||
|
||||
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class ParcelType>
|
||||
@ -157,31 +157,31 @@ void Foam::ThermoCloud<ParcelType>::evolve()
|
||||
const volScalarField& T = carrierThermo_.T();
|
||||
const volScalarField cp = carrierThermo_.Cp();
|
||||
|
||||
autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New
|
||||
autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
this->rho()
|
||||
);
|
||||
|
||||
autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New
|
||||
autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
this->U()
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New
|
||||
autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
this->mu()
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New
|
||||
autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
T
|
||||
);
|
||||
|
||||
autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New
|
||||
autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->interpolationSchemes(),
|
||||
cp
|
||||
@ -191,11 +191,11 @@ void Foam::ThermoCloud<ParcelType>::evolve()
|
||||
(
|
||||
*this,
|
||||
constProps_,
|
||||
rhoInterpolator(),
|
||||
UInterpolator(),
|
||||
muInterpolator(),
|
||||
TInterpolator(),
|
||||
cpInterpolator(),
|
||||
rhoInterp(),
|
||||
UInterp(),
|
||||
muInterp(),
|
||||
TInterp(),
|
||||
cpInterp(),
|
||||
this->g().value()
|
||||
);
|
||||
|
||||
|
||||
@ -66,7 +66,6 @@ class ThermoCloud
|
||||
public KinematicCloud<ParcelType>,
|
||||
public thermoCloud
|
||||
{
|
||||
|
||||
// Private data
|
||||
|
||||
//- Thermo parcel constant properties
|
||||
@ -118,10 +117,6 @@ class ThermoCloud
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
// TypeName("ThermoCloud");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
@ -135,9 +130,8 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~ThermoCloud();
|
||||
//- Destructor
|
||||
virtual ~ThermoCloud();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -48,7 +48,6 @@ namespace Foam
|
||||
|
||||
class kinematicCloud
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
|
||||
@ -48,7 +48,6 @@ namespace Foam
|
||||
|
||||
class reactingCloud
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
|
||||
@ -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
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "reactingMultiphaseCloud.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(reactingMultiphaseCloud, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::reactingMultiphaseCloud::reactingMultiphaseCloud()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::reactingMultiphaseCloud::~reactingMultiphaseCloud()
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,84 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::reactingMultiphaseCloud
|
||||
|
||||
Description
|
||||
Virtual abstract base class for templated reactingMultiphaseCloud
|
||||
|
||||
SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef reactingMultiphaseCloud_H
|
||||
#define reactingMultiphaseCloud_H
|
||||
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class reactingMultiphaseCloud Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class reactingMultiphaseCloud
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
reactingMultiphaseCloud(const reactingMultiphaseCloud&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const reactingMultiphaseCloud&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("reactingMultiphaseCloud");
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Null constructor
|
||||
reactingMultiphaseCloud();
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~reactingMultiphaseCloud();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -48,7 +48,6 @@ namespace Foam
|
||||
|
||||
class thermoCloud
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
|
||||
@ -52,7 +52,6 @@ class basicKinematicCloud
|
||||
:
|
||||
public KinematicCloud<basicKinematicParcel>
|
||||
{
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
@ -82,8 +81,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
~basicKinematicCloud();
|
||||
~basicKinematicCloud();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
@ -51,7 +51,6 @@ class basicReactingCloud
|
||||
:
|
||||
public ReactingCloud<basicReactingParcel>
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
@ -82,8 +81,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
~basicReactingCloud();
|
||||
~basicReactingCloud();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -52,7 +52,6 @@ class basicReactingMultiphaseCloud
|
||||
:
|
||||
public ReactingCloud<basicReactingMultiphaseParcel>
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
|
||||
@ -51,7 +51,6 @@ class basicThermoCloud
|
||||
:
|
||||
public ThermoCloud<basicThermoParcel>
|
||||
{
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
@ -84,8 +83,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
|
||||
~basicThermoCloud();
|
||||
~basicThermoCloud();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
@ -79,7 +79,6 @@ class KinematicParcel
|
||||
:
|
||||
public Particle<ParcelType>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Class to hold kinematic particle constant properties
|
||||
@ -183,7 +182,7 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
// Protected member data
|
||||
// Protected data
|
||||
|
||||
// Parcel properties
|
||||
|
||||
@ -447,8 +446,10 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Read
|
||||
static void readFields(KinematicCloud<ParcelType>& c);
|
||||
|
||||
//- write
|
||||
static void writeFields(const KinematicCloud<ParcelType>& c);
|
||||
|
||||
|
||||
|
||||
@ -93,6 +93,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcCoupled
|
||||
scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate phase change
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcPhaseChange(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate Devolatilisation
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -253,6 +259,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcUncoupled
|
||||
scalar T1 = calcHeatTransfer(td, dt, celli, htc, dhTrans);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate phase change
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcPhaseChange(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate Devolatilisation
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -294,8 +294,8 @@ public:
|
||||
//- Read
|
||||
static void readFields(ReactingCloud<ParcelType>& c);
|
||||
|
||||
//- Write
|
||||
static void writeFields(const ReactingCloud<ParcelType>& c);
|
||||
//- Write
|
||||
static void writeFields(const ReactingCloud<ParcelType>& c);
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
@ -100,12 +100,6 @@ void Foam::ReactingParcel<ParcelType>::calcCoupled
|
||||
calcPhaseChange(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate devolatilisation
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcDevolatilisation(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate surface reactions
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -238,12 +232,6 @@ void Foam::ReactingParcel<ParcelType>::calcUncoupled
|
||||
calcPhaseChange(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate devolatilisation
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
calcDevolatilisation(td, dt, T0, T1, dMassMT);
|
||||
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Calculate surface reactions
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -71,7 +71,6 @@ class ReactingParcel
|
||||
:
|
||||
public ThermoParcel<ParcelType>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Class to hold reacting particle constant properties
|
||||
|
||||
@ -72,7 +72,6 @@ class ThermoParcel
|
||||
:
|
||||
public KinematicParcel<ParcelType>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Class to hold thermo particle constant properties
|
||||
@ -306,8 +305,10 @@ public:
|
||||
|
||||
// I-O
|
||||
|
||||
//- Read
|
||||
static void readFields(ThermoCloud<ParcelType>& c);
|
||||
|
||||
//- Write
|
||||
static void writeFields(const ThermoCloud<ParcelType>& c);
|
||||
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicKinematicParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoDispersion.H"
|
||||
#include "GradientDispersionRAS.H"
|
||||
#include "StochasticDispersionRAS.H"
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicKinematicParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoDrag.H"
|
||||
#include "SphereDrag.H"
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicKinematicParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "ConeInjection.H"
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicKinematicParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "Rebound.H"
|
||||
#include "StandardWallInteraction.H"
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "ReactingMultiphaseCloud.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
@ -69,8 +69,8 @@ namespace Foam
|
||||
);
|
||||
// defineTemplateTypeNameAndDebug
|
||||
// (
|
||||
// KinematicCloud<basicReactingMultiphaseParcel>,
|
||||
// 0
|
||||
// KinematicCloud<basicReactingMultiphaseParcel>,
|
||||
// 0
|
||||
// );
|
||||
|
||||
defineParcelTypeNameAndDebug
|
||||
@ -93,6 +93,17 @@ namespace Foam
|
||||
// (
|
||||
// ReactingCloud<basicReactingMultiphaseParcel>,
|
||||
// 0
|
||||
// );
|
||||
|
||||
defineParcelTypeNameAndDebug
|
||||
(
|
||||
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>,
|
||||
0
|
||||
);
|
||||
// defineTemplateTypeNameAndDebug
|
||||
// (
|
||||
// ReactingMultiphaseCloud<basicReactingMultiphaseParcel>,
|
||||
// 0
|
||||
// );
|
||||
|
||||
};
|
||||
|
||||
@ -26,11 +26,15 @@ License
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "SingleMixtureFraction.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeCompositionModel(ReactingCloud<basicReactingMultiphaseParcel>);
|
||||
makeCompositionModel
|
||||
(
|
||||
ReactingCloud<basicReactingMultiphaseParcel>
|
||||
);
|
||||
|
||||
// Add instances of composition model to the table
|
||||
makeCompositionModelType
|
||||
|
||||
@ -25,32 +25,36 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "ReactingMultiphaseCloud.H"
|
||||
|
||||
#include "NoDevolatilisation.H"
|
||||
#include "ConstantRateDevolatilisation.H"
|
||||
#include "SingleKineticRateDevolatilisation.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeDevolatilisationModel(ReactingCloud<basicReactingMultiphaseParcel>);
|
||||
makeDevolatilisationModel
|
||||
(
|
||||
ReactingMultiphaseCloud<basicReactingMultiphaseParcel>
|
||||
);
|
||||
|
||||
// Add instances of mass transfer model to the table
|
||||
// Add instances of devolatilisation model to the table
|
||||
makeDevolatilisationModelType
|
||||
(
|
||||
NoDevolatilisation,
|
||||
ReactingCloud,
|
||||
ReactingMultiphaseCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeDevolatilisationModelType
|
||||
(
|
||||
ConstantRateDevolatilisation,
|
||||
ReactingCloud,
|
||||
ReactingMultiphaseCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
makeDevolatilisationModelType
|
||||
(
|
||||
SingleKineticRateDevolatilisation,
|
||||
ReactingCloud,
|
||||
ReactingMultiphaseCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoDispersion.H"
|
||||
#include "GradientDispersionRAS.H"
|
||||
#include "StochasticDispersionRAS.H"
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoDrag.H"
|
||||
#include "SphereDrag.H"
|
||||
|
||||
@ -35,7 +36,12 @@ namespace Foam
|
||||
|
||||
// Add instances of drag model to the table
|
||||
makeDragModelType(NoDrag, KinematicCloud, basicReactingMultiphaseParcel);
|
||||
makeDragModelType(SphereDrag, KinematicCloud, basicReactingMultiphaseParcel);
|
||||
makeDragModelType
|
||||
(
|
||||
SphereDrag,
|
||||
KinematicCloud,
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "ThermoCloud.H"
|
||||
|
||||
#include "NoHeatTransfer.H"
|
||||
#include "RanzMarshall.H"
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "NoInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "ConeInjection.H"
|
||||
|
||||
@ -24,34 +24,24 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
#include "NoDevolatilisation.H"
|
||||
#include "ConstantRateDevolatilisation.H"
|
||||
#include "SingleKineticRateDevolatilisation.H"
|
||||
|
||||
#include "NoPhaseChange.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeDevolatilisationModel(ReactingCloud<basicReactingParcel>);
|
||||
makePhaseChangeModel
|
||||
(
|
||||
ReactingCloud<basicReactingMultiphaseParcel>
|
||||
);
|
||||
|
||||
// Add instances of mass transfer model to the table
|
||||
makeDevolatilisationModelType
|
||||
// Add instances of phase change model to the table
|
||||
makePhaseChangeModelType
|
||||
(
|
||||
NoDevolatilisation,
|
||||
NoPhaseChange,
|
||||
ReactingCloud,
|
||||
basicReactingParcel
|
||||
);
|
||||
makeDevolatilisationModelType
|
||||
(
|
||||
ConstantRateDevolatilisation,
|
||||
ReactingCloud,
|
||||
basicReactingParcel
|
||||
);
|
||||
makeDevolatilisationModelType
|
||||
(
|
||||
SingleKineticRateDevolatilisation,
|
||||
ReactingCloud,
|
||||
basicReactingParcel
|
||||
basicReactingMultiphaseParcel
|
||||
);
|
||||
};
|
||||
|
||||
@ -26,11 +26,15 @@ License
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "NoSurfaceReaction.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeSurfaceReactionModel(ReactingCloud<basicReactingMultiphaseParcel>);
|
||||
makeSurfaceReactionModel
|
||||
(
|
||||
ReactingCloud<basicReactingMultiphaseParcel>
|
||||
);
|
||||
|
||||
// Add instances of surface reaction model to the table
|
||||
makeSurfaceReactionModelType
|
||||
|
||||
@ -26,13 +26,13 @@ License
|
||||
|
||||
#include "basicReactingMultiphaseParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "Rebound.H"
|
||||
#include "StandardWallInteraction.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeWallInteractionModel(KinematicCloud<basicReactingMultiphaseParcel>);
|
||||
// makeWallInteractionModel(ReactingCloud<basicReactingMultiphaseParcel>);
|
||||
|
||||
// Add instances of wall interaction model to the table
|
||||
makeWallInteractionModelType
|
||||
|
||||
@ -47,9 +47,6 @@ Foam::basicReactingParcel::basicReactingParcel
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const scalar nParticle0,
|
||||
const scalarField& YGas0,
|
||||
const scalarField& YLiquid0,
|
||||
const scalarField& YSolid0,
|
||||
const scalarField& YMixture0,
|
||||
const constantProperties& constProps
|
||||
)
|
||||
@ -63,9 +60,6 @@ Foam::basicReactingParcel::basicReactingParcel
|
||||
d0,
|
||||
U0,
|
||||
nParticle0,
|
||||
YGas0,
|
||||
YLiquid0,
|
||||
YSolid0,
|
||||
YMixture0,
|
||||
constProps
|
||||
)
|
||||
|
||||
@ -45,7 +45,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class basicReactingParcel Declaration
|
||||
Class basicReactingParcel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class basicReactingParcel
|
||||
@ -63,18 +63,15 @@ public:
|
||||
//- Construct from components
|
||||
basicReactingParcel
|
||||
(
|
||||
ReactingCloud<basicReactingParcel>& owner,
|
||||
const label typeId,
|
||||
const vector& position,
|
||||
const label celli,
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const scalar nParticle0,
|
||||
const scalarField& YGas0,
|
||||
const scalarField& YLiquid0,
|
||||
const scalarField& YSolid0,
|
||||
const scalarField& YMixture0,
|
||||
const constantProperties& constProps
|
||||
ReactingCloud<basicReactingParcel>& owner,
|
||||
const label typeId,
|
||||
const vector& position,
|
||||
const label celli,
|
||||
const scalar d0,
|
||||
const vector& U0,
|
||||
const scalar nParticle0,
|
||||
const scalarField& YMixture0,
|
||||
const constantProperties& constProps
|
||||
);
|
||||
|
||||
//- Construct from Istream
|
||||
@ -88,14 +85,12 @@ public:
|
||||
//- Construct and return a clone
|
||||
autoPtr<basicReactingParcel> clone() const
|
||||
{
|
||||
return autoPtr<basicReactingParcel>
|
||||
(new basicReactingParcel(*this));
|
||||
return autoPtr<basicReactingParcel>(new basicReactingParcel(*this));
|
||||
}
|
||||
|
||||
|
||||
// Destructors
|
||||
|
||||
virtual ~basicReactingParcel();
|
||||
//- Destructor
|
||||
virtual ~basicReactingParcel();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "SingleMixtureFraction.H"
|
||||
|
||||
namespace Foam
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoDispersion.H"
|
||||
#include "GradientDispersionRAS.H"
|
||||
#include "StochasticDispersionRAS.H"
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "NoDrag.H"
|
||||
#include "SphereDrag.H"
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "ThermoCloud.H"
|
||||
|
||||
#include "NoHeatTransfer.H"
|
||||
#include "RanzMarshall.H"
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "NoInjection.H"
|
||||
#include "ManualInjection.H"
|
||||
#include "ConeInjection.H"
|
||||
|
||||
@ -24,20 +24,21 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "basicKinematicParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
#include "NoHeatTransfer.H"
|
||||
#include "basicReactingParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "NoPhaseChange.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeHeatTransferModel(KinematicCloud<basicKinematicParcel>);
|
||||
makePhaseChangeModel(ReactingCloud<basicReactingParcel>);
|
||||
|
||||
// Add instances of heat transfer model to the table
|
||||
makeHeatTransferModelType
|
||||
// Add instances of phase change model to the table
|
||||
makePhaseChangeModelType
|
||||
(
|
||||
NoHeatTransfer,
|
||||
KinematicCloud,
|
||||
basicKinematicParcel
|
||||
NoPhaseChange,
|
||||
ReactingCloud,
|
||||
basicReactingParcel
|
||||
);
|
||||
};
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "ReactingCloud.H"
|
||||
|
||||
#include "NoSurfaceReaction.H"
|
||||
|
||||
namespace Foam
|
||||
|
||||
@ -26,13 +26,13 @@ License
|
||||
|
||||
#include "basicReactingParcel.H"
|
||||
#include "KinematicCloud.H"
|
||||
|
||||
#include "Rebound.H"
|
||||
#include "StandardWallInteraction.H"
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makeWallInteractionModel(KinematicCloud<basicReactingParcel>);
|
||||
// makeWallInteractionModel(ReactingCloud<basicReactingParcel>);
|
||||
|
||||
// Add instances of wall interaction model to the table
|
||||
makeWallInteractionModelType
|
||||
|
||||
@ -130,10 +130,10 @@ template<class CloudType>
|
||||
Foam::scalar Foam::InjectionModel<CloudType>::setNumberOfParticles
|
||||
(
|
||||
const label parcels,
|
||||
const scalar volume
|
||||
const scalar volume,
|
||||
const scalar volumeFraction,
|
||||
const scalar diameter,
|
||||
const scalar rho,
|
||||
const scalar rho
|
||||
)
|
||||
{
|
||||
scalar nP = 0.0;
|
||||
@ -330,8 +330,9 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
||||
else
|
||||
{
|
||||
WarningIn("Foam::InjectionModel<CloudType>::inject(TrackData& td)")
|
||||
<< "Failed to inject new parcel:" <<
|
||||
<< " id = " << iParcel << ", position = " pos << nl << endl;
|
||||
<< "Failed to inject new parcel:" << nl
|
||||
<< " id = " << iParcel << ", position = " << pos
|
||||
<< nl << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -160,11 +160,7 @@ protected:
|
||||
//- Find the cell that contains the supplied position
|
||||
// Will modify position slightly towards the owner cell centroid to
|
||||
// ensure that it lies in a cell and not edge/face
|
||||
virtual void findCellAtPosition
|
||||
(
|
||||
label& cellI,
|
||||
vector& position
|
||||
);
|
||||
virtual void findCellAtPosition(label& cellI, vector& position);
|
||||
|
||||
//- Set number of particles to inject given parcel properties
|
||||
scalar setNumberOfParticles
|
||||
|
||||
@ -0,0 +1,71 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "NoPhaseChange.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template <class CloudType>
|
||||
Foam::NoPhaseChange<CloudType>::NoPhaseChange
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& cloud
|
||||
)
|
||||
:
|
||||
PhaseChangeModel<CloudType>(dict, cloud, typeName)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template <class CloudType>
|
||||
Foam::NoPhaseChange<CloudType>::~NoPhaseChange()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
bool Foam::NoPhaseChange<CloudType>::active() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::NoPhaseChange<CloudType>::calculate
|
||||
(
|
||||
const scalar,
|
||||
const scalarField&,
|
||||
const scalar
|
||||
) const
|
||||
{
|
||||
// Nothing to do...
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,101 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::NoPhaseChange
|
||||
|
||||
Description
|
||||
Dummy devolatilisation model for 'no phase change'
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef NoPhaseChange_H
|
||||
#define NoPhaseChange_H
|
||||
|
||||
#include "PhaseChangeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class NoPhaseChange Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
class NoPhaseChange
|
||||
:
|
||||
public PhaseChangeModel<CloudType>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("NoPhaseChange");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary
|
||||
NoPhaseChange
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& cloud
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~NoPhaseChange();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates phase change model
|
||||
bool active() const;
|
||||
|
||||
//- Update model
|
||||
scalar calculate
|
||||
(
|
||||
const scalar,
|
||||
const scalarField&,
|
||||
const scalar
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "NoPhaseChange.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,67 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "PhaseChangeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::autoPtr<Foam::PhaseChangeModel<CloudType> >
|
||||
Foam::PhaseChangeModel<CloudType>::New
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
)
|
||||
{
|
||||
word PhaseChangeModelType(dict.lookup("PhaseChangeModel"));
|
||||
|
||||
Info<< "Selecting PhaseChangeModel " << PhaseChangeModelType << endl;
|
||||
|
||||
typename dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(PhaseChangeModelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"PhaseChangeModel<CloudType>::New\n"
|
||||
"(\n"
|
||||
" const dictionary&,\n"
|
||||
" CloudType&\n"
|
||||
")"
|
||||
)
|
||||
<< "Unknown PhaseChangeModelType type "
|
||||
<< PhaseChangeModelType
|
||||
<< ", constructor not in hash table" << nl << nl
|
||||
<< " Valid PhaseChangeModel types are :" << nl
|
||||
<< dictionaryConstructorTablePtr_->toc() << exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<PhaseChangeModel<CloudType> >(cstrIter()(dict, owner));
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,78 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "PhaseChangeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::PhaseChangeModel<CloudType>::PhaseChangeModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
)
|
||||
: dict_(dict),
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class CloudType>
|
||||
Foam::PhaseChangeModel<CloudType>::~PhaseChangeModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
template<class CloudType>
|
||||
const CloudType& Foam::PhaseChangeModel<CloudType>::owner() const
|
||||
{
|
||||
return owner_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::dictionary& Foam::PhaseChangeModel<CloudType>::dict() const
|
||||
{
|
||||
return dict_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::dictionary& Foam::PhaseChangeModel<CloudType>::coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "NewPhaseChangeModel.C"
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,176 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::PhaseChangeModel
|
||||
|
||||
Description
|
||||
Templated phase change model class
|
||||
|
||||
SourceFiles
|
||||
PhaseChangeModel.C
|
||||
NewPhaseChangeModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef PhaseChangeModel_H
|
||||
#define PhaseChangeModel_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "autoPtr.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class PhaseChangeModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class CloudType>
|
||||
class PhaseChangeModel
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- The cloud dictionary
|
||||
const dictionary& dict_;
|
||||
|
||||
//- Reference to the owner cloud class
|
||||
CloudType& owner_;
|
||||
|
||||
//- The coefficient dictionary
|
||||
const dictionary coeffDict_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("PhaseChangeModel");
|
||||
|
||||
//- Declare runtime constructor selection table
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
PhaseChangeModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
),
|
||||
(dict, owner)
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from dictionary
|
||||
PhaseChangeModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner,
|
||||
const word& type
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~PhaseChangeModel();
|
||||
|
||||
|
||||
//- Selector
|
||||
static autoPtr<PhaseChangeModel<CloudType> > New
|
||||
(
|
||||
const dictionary& dict,
|
||||
CloudType& owner
|
||||
);
|
||||
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the owner cloud object
|
||||
const CloudType& owner() const;
|
||||
|
||||
//- Return the cloud dictionary
|
||||
const dictionary& dict() const;
|
||||
|
||||
//- Return the coefficient dictionary
|
||||
const dictionary& coeffDict() const;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Flag to indicate whether model activates phase change model
|
||||
virtual bool active() const = 0;
|
||||
|
||||
//- Update model
|
||||
virtual scalar calculate
|
||||
(
|
||||
const scalar dt,
|
||||
const scalarField& YMixture,
|
||||
const scalar T
|
||||
) const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#define makePhaseChangeModel(CloudType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(PhaseChangeModel<CloudType>, 0); \
|
||||
\
|
||||
defineTemplateRunTimeSelectionTable \
|
||||
( \
|
||||
PhaseChangeModel<CloudType>, \
|
||||
dictionary \
|
||||
);
|
||||
|
||||
|
||||
#define makePhaseChangeModelType(SS, CloudType, ParcelType) \
|
||||
\
|
||||
defineNamedTemplateTypeNameAndDebug(SS<CloudType<ParcelType> >, 0); \
|
||||
\
|
||||
PhaseChangeModel<CloudType<ParcelType> >:: \
|
||||
adddictionaryConstructorToTable<SS<CloudType<ParcelType> > > \
|
||||
add##SS##CloudType##ParcelType##ConstructorToTable_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "PhaseChangeModel.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user