Commit 0e8fdf5b authored by graham's avatar graham
Browse files

Infrastructure for CollisionModel created and make...Submodel files

updated an created.

Included interactionLists from molecule library.  Building with
temporary length squared hard coded.

Selecting collision partnersusing DIL and applying test force to each.
parent 05a88e74
......@@ -19,4 +19,6 @@ EXE_LIBS = \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfiniteVolume \
-lmeshTools
-lmeshTools \
-lmolecule \
-lpotential
......@@ -15,7 +15,8 @@ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
-I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude
-I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
-I$(LIB_SRC)/lagrangian/molecularDynamics/molecule/lnInclude
LIB_LIBS = \
-lfiniteVolume \
......
......@@ -31,6 +31,7 @@ License
#include "DispersionModel.H"
#include "DragModel.H"
#include "InjectionModel.H"
#include "CollisionModel.H"
#include "PatchInteractionModel.H"
#include "PostProcessingModel.H"
......@@ -98,6 +99,14 @@ Foam::InteractingKinematicCloud<ParcelType>::InteractingKinematicCloud
*this
)
),
collisionModel_
(
CollisionModel<InteractingKinematicCloud<ParcelType> >::New
(
particleProperties_,
*this
)
),
patchInteractionModel_
(
PatchInteractionModel<InteractingKinematicCloud<ParcelType> >::New
......@@ -239,6 +248,8 @@ void Foam::InteractingKinematicCloud<ParcelType>::evolve()
resetSourceTerms();
}
this->collision().collide();
Cloud<ParcelType>::move(td);
postEvolve();
......
......@@ -72,6 +72,9 @@ class DragModel;
template<class CloudType>
class InjectionModel;
template<class CloudType>
class CollisionModel;
template<class CloudType>
class PostProcessingModel;
......@@ -165,6 +168,10 @@ protected:
autoPtr<InjectionModel<InteractingKinematicCloud<ParcelType> > >
injectionModel_;
//- Collision model
autoPtr<CollisionModel<InteractingKinematicCloud<ParcelType> > >
collisionModel_;
//- Patch interaction model
autoPtr
<
......@@ -306,6 +313,15 @@ public:
inline InjectionModel<InteractingKinematicCloud<ParcelType> >&
injection();
//- Return const access to the collision model
inline
const CollisionModel<InteractingKinematicCloud<ParcelType> >&
collision() const;
//- Return reference to the collision model
inline CollisionModel<InteractingKinematicCloud<ParcelType> >&
collision();
//- Return const-access to the patch interaction model
inline
const PatchInteractionModel
......
......@@ -174,6 +174,22 @@ Foam::InteractingKinematicCloud<ParcelType>::injection()
}
template<class ParcelType>
inline const Foam::CollisionModel<Foam::InteractingKinematicCloud<ParcelType> >&
Foam::InteractingKinematicCloud<ParcelType>::collision() const
{
return collisionModel_();
}
template<class ParcelType>
inline Foam::CollisionModel<Foam::InteractingKinematicCloud<ParcelType> >&
Foam::InteractingKinematicCloud<ParcelType>::collision()
{
return collisionModel_();
}
template<class ParcelType>
inline Foam::PostProcessingModel<Foam::InteractingKinematicCloud<ParcelType> >&
Foam::InteractingKinematicCloud<ParcelType>::postProcessing()
......
......@@ -106,6 +106,7 @@ void Foam::InteractingKinematicParcel<ParcelType>::calc
// Explicit momentum source for particle
vector Su = vector::zero;
// Momentum transfer from the particle to the carrier phase
vector dUTrans = vector::zero;
......@@ -158,14 +159,14 @@ const Foam::vector Foam::InteractingKinematicParcel<ParcelType>::calcVelocity
mass*td.cloud().forces().calcCoupled(cellI, dt, rhoc_, rho, Uc_, U);
const vector FNonCoupled =
mass*td.cloud().forces().calcNonCoupled(cellI, dt, rhoc_, rho, Uc_, U);
const vector& FCollision = f();
// New particle velocity
//~~~~~~~~~~~~~~~~~~~~~~
// Update velocity - treat as 3-D
const scalar As = this->areaS(d);
const vector ap = Uc_ + (FCoupled + FNonCoupled + Su)/(utc*As);
const vector ap = Uc_ + (FCoupled + FNonCoupled + FCollision + Su)/(utc*As);
const scalar bp = 6.0*utc/(rho*d);
IntegrationScheme<vector>::integrationResult Ures =
......@@ -196,6 +197,7 @@ Foam::InteractingKinematicParcel<ParcelType>::InteractingKinematicParcel
nParticle_(p.nParticle_),
d_(p.d_),
U_(p.U_),
f_(p.f_),
rho_(p.rho_),
tTurb_(p.tTurb_),
UTurb_(p.UTurb_),
......
......@@ -209,6 +209,9 @@ protected:
//- Velocity of Parcel [m/s]
vector U_;
//- Force on particle due to collisions [N]
vector f_;
//- Density [kg/m3]
scalar rho_;
......@@ -324,6 +327,9 @@ public:
//- Return const access to velocity
inline const vector& U() const;
//- Return const access to force
inline const vector& f() const;
//- Return const access to density
inline scalar rho() const;
......@@ -348,6 +354,9 @@ public:
//- Return access to velocity
inline vector& U();
//- Return access to force
inline vector& f();
//- Return access to density
inline scalar& rho();
......
......@@ -77,6 +77,7 @@ inline Foam::InteractingKinematicParcel<ParcelType>::InteractingKinematicParcel
nParticle_(0),
d_(0.0),
U_(vector::zero),
f_(vector::zero),
rho_(0.0),
tTurb_(0.0),
UTurb_(vector::zero),
......@@ -104,6 +105,7 @@ inline Foam::InteractingKinematicParcel<ParcelType>::InteractingKinematicParcel
nParticle_(nParticle0),
d_(d0),
U_(U0),
f_(vector::zero),
rho_(constProps.rho0()),
tTurb_(0.0),
UTurb_(vector::zero),
......@@ -231,6 +233,14 @@ Foam::InteractingKinematicParcel<ParcelType>::U() const
}
template <class ParcelType>
inline const Foam::vector&
Foam::InteractingKinematicParcel<ParcelType>::f() const
{
return f_;
}
template <class ParcelType>
inline Foam::scalar Foam::InteractingKinematicParcel<ParcelType>::rho() const
{
......@@ -281,6 +291,13 @@ inline Foam::vector& Foam::InteractingKinematicParcel<ParcelType>::U()
}
template <class ParcelType>
inline Foam::vector& Foam::InteractingKinematicParcel<ParcelType>::f()
{
return f_;
}
template <class ParcelType>
inline Foam::scalar& Foam::InteractingKinematicParcel<ParcelType>::rho()
{
......
......@@ -30,6 +30,7 @@ License
#include "makeReactingParcelDispersionModels.H"
#include "makeReactingParcelDragModels.H"
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
#include "makeReactingParcelCollisionModels.H"
#include "makeReactingParcelPatchInteractionModels.H"
#include "makeReactingParcelPostProcessingModels.H"
......@@ -52,6 +53,7 @@ namespace Foam
makeReactingDispersionModels(BasicReactingMultiphaseParcel);
makeReactingDragModels(BasicReactingMultiphaseParcel);
makeReactingMultiphaseInjectionModels(BasicReactingMultiphaseParcel);
makeReactingCollisionModels(BasicReactingMultiphaseParcel);
makeReactingPatchInteractionModels(BasicReactingMultiphaseParcel);
makeReactingPostProcessingModels(BasicReactingMultiphaseParcel);
......
......@@ -30,6 +30,7 @@ License
#include "makeReactingParcelDispersionModels.H"
#include "makeReactingParcelDragModels.H"
#include "makeReactingParcelInjectionModels.H"
#include "makeReactingParcelCollisionModels.H"
#include "makeReactingParcelPatchInteractionModels.H"
#include "makeReactingParcelPostProcessingModels.H"
......@@ -48,6 +49,7 @@ namespace Foam
makeReactingDispersionModels(BasicReactingParcel);
makeReactingDragModels(BasicReactingParcel);
makeReactingInjectionModels(BasicReactingParcel);
makeReactingCollisionModels(BasicReactingParcel);
makeReactingPatchInteractionModels(BasicReactingParcel);
makeReactingPostProcessingModels(BasicReactingParcel);
......
......@@ -26,10 +26,11 @@ License
#include "basicInteractingKinematicParcel.H"
// InteractingKinematic
// Kinematic
#include "makeParcelDispersionModels.H"
#include "makeParcelDragModels.H"
#include "makeParcelInjectionModels.H"
#include "makeParcelCollisionModels.H"
#include "makeParcelPatchInteractionModels.H"
#include "makeParcelPostProcessingModels.H"
......@@ -41,6 +42,7 @@ namespace Foam
makeParcelDispersionModels(basicInteractingKinematicParcel);
makeParcelDragModels(basicInteractingKinematicParcel);
makeParcelInjectionModels(basicInteractingKinematicParcel);
makeParcelCollisionModels(basicInteractingKinematicParcel);
makeParcelPatchInteractionModels(basicInteractingKinematicParcel);
makeParcelPostProcessingModels(basicInteractingKinematicParcel);
};
......
......@@ -30,6 +30,7 @@ License
#include "makeParcelDispersionModels.H"
#include "makeParcelDragModels.H"
#include "makeParcelInjectionModels.H"
#include "makeParcelCollisionModels.H"
#include "makeParcelPatchInteractionModels.H"
#include "makeParcelPostProcessingModels.H"
......@@ -44,6 +45,7 @@ namespace Foam
makeParcelDispersionModels(basicThermoParcel);
makeParcelDragModels(basicThermoParcel);
makeParcelInjectionModels(basicThermoParcel);
makeParcelCollisionModels(basicThermoParcel);
makeParcelPatchInteractionModels(basicThermoParcel);
makeParcelPostProcessingModels(basicThermoParcel);
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#ifndef makeParcelCollisionModels_H
#define makeParcelCollisionModels_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "InteractingKinematicCloud.H"
#include "NoCollision.H"
#include "DeterministicPairForce.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeParcelCollisionModels(ParcelType) \
\
makeCollisionModel(InteractingKinematicCloud<ParcelType>); \
\
makeCollisionModelType \
( \
NoCollision, \
InteractingKinematicCloud, \
ParcelType \
); \
\
makeCollisionModelType \
( \
DeterministicPairForce, \
InteractingKinematicCloud, \
ParcelType \
); \
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -38,9 +38,9 @@ License
#define makeParcelDragModels(ParcelType) \
\
makeDragModel(InteractingKinematicCloud<ParcelType>); \
makeDragModel(InteractingKinematicCloud<ParcelType>); \
\
makeDragModelType(NoDrag, InteractingKinematicCloud, ParcelType); \
makeDragModelType(NoDrag, InteractingKinematicCloud, ParcelType); \
makeDragModelType(SphereDrag, InteractingKinematicCloud, ParcelType);
......
......@@ -43,48 +43,48 @@ License
#define makeParcelInjectionModels(ParcelType) \
\
makeInjectionModel(InteractingKinematicCloud<ParcelType>); \
makeInjectionModel(InteractingKinematicCloud<ParcelType>); \
\
makeInjectionModelType \
( \
ConeInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
); \
makeInjectionModelType \
( \
ConeInjectionMP, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
); \
makeInjectionModelType \
( \
FieldActivatedInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
); \
makeInjectionModelType \
( \
KinematicLookupTableInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
); \
makeInjectionModelType \
( \
ManualInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
); \
makeInjectionModelType \
( \
NoInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
); \
makeInjectionModelType \
( \
PatchInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
);
......
......@@ -39,24 +39,24 @@ License
#define makeParcelPatchInteractionModels(ParcelType) \
\
makePatchInteractionModel(InteractingKinematicCloud<ParcelType>); \
makePatchInteractionModel(InteractingKinematicCloud<ParcelType>); \
\
makePatchInteractionModelType \
( \
LocalInteraction, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
); \
makePatchInteractionModelType \
( \
Rebound, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
); \
makePatchInteractionModelType \
( \
StandardWallInteraction, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
);
......
......@@ -38,18 +38,18 @@ License
#define makeParcelPostProcessingModels(ParcelType) \
\
makePostProcessingModel(InteractingKinematicCloud<ParcelType>); \
makePostProcessingModel(InteractingKinematicCloud<ParcelType>); \
\
makePostProcessingModelType \
( \
NoPostProcessing, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
); \
makePostProcessingModelType \
( \
PatchPostProcessing, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType \
);
......
......@@ -64,47 +64,47 @@ License
#define makeReactingMultiphaseInjectionModelThermoType(ParcelType, ThermoType)\
\
makeInjectionModel(InteractingKinematicCloud<ParcelType<ThermoType> >); \
makeInjectionModel(InteractingKinematicCloud<ParcelType<ThermoType> >); \
\
makeInjectionModelThermoType \
( \
ConeInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType, \
ThermoType \
); \
makeInjectionModelThermoType \
( \
ConeInjectionMP, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType, \
ThermoType \
); \
makeInjectionModelThermoType \
( \
FieldActivatedInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType, \
ThermoType \
); \
makeInjectionModelThermoType \
( \
ManualInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType, \
ThermoType \
); \
makeInjectionModelThermoType \
( \
NoInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType, \
ThermoType \
); \
makeInjectionModelThermoType \
( \
PatchInjection, \
InteractingKinematicCloud, \
InteractingKinematicCloud, \
ParcelType, \
ThermoType \
); \
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#ifndef makeReactingParcelCollisionModels_H
#define makeReactingParcelCollisionModels_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "thermoPhysicsTypes.H"
#include "InteractingKinematicCloud.H"
#include "NoCollision.H"
#include "DeterministicPairForce.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeReactingCollisionModels(ParcelType) \
\
makeReactingCollisionModelThermoType \
( \
ParcelType, \
constGasThermoPhysics \
); \
\
makeReactingCollisionModelThermoType \
( \
ParcelType, \
gasThermoPhysics \