From 0515ecd2d2d2434ce4eefaf6c1e5db8d32dcb237 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Wed, 4 Nov 2015 11:59:51 +0100 Subject: [PATCH] Handling tracer particles in recurrence CFDEM. --- .../tracerPointSource/tracerPointSource.C | 192 ++++++++++++++++++ .../tracerPointSource/tracerPointSource.H | 112 ++++++++++ 2 files changed, 304 insertions(+) create mode 100644 src/lagrangian/cfdemParticle/subModels/forceModelRec/tracerPointSource/tracerPointSource.C create mode 100644 src/lagrangian/cfdemParticle/subModels/forceModelRec/tracerPointSource/tracerPointSource.H diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelRec/tracerPointSource/tracerPointSource.C b/src/lagrangian/cfdemParticle/subModels/forceModelRec/tracerPointSource/tracerPointSource.C new file mode 100644 index 00000000..55ffdf45 --- /dev/null +++ b/src/lagrangian/cfdemParticle/subModels/forceModelRec/tracerPointSource/tracerPointSource.C @@ -0,0 +1,192 @@ +/*---------------------------------------------------------------------------*\ + CFDEMcoupling academic - Open Source CFD-DEM coupling + + Contributing authors: + Thomas Lichtenegger, Gerhard Holzinger + Copyright (C) 2015- Johannes Kepler University, Linz +------------------------------------------------------------------------------- +License + This file is part of CFDEMcoupling academic. + + CFDEMcoupling academic 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 3 of the License, or + (at your option) any later version. + + CFDEMcoupling academic 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 CFDEMcoupling academic. If not, see . +\*---------------------------------------------------------------------------*/ + +#include "error.H" + +#include "tracerPointSource.H" +#include "addToRunTimeSelectionTable.H" +#include "dataExchangeModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(tracerPointSource, 0); + +addToRunTimeSelectionTable +( + forceModelRec, + tracerPointSource, + dictionary +); + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// Construct from components +tracerPointSource::tracerPointSource +( + const dictionary& dict, + cfdemCloudRec& sm +) +: + forceModelRec(dict,sm), + propsDict_(dict.subDict(typeName + "Props")), + tracerConcentrationField_ + ( IOobject + ( + "tracerConcentration", + sm.mesh().time().timeName(), + sm.mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sm.mesh(), + dimensionedScalar("zero", dimensionSet(0,0,0,0,0), 0.0) + ), + tracerConcentrationPart_(NULL), + sourcePosition_(propsDict_.lookup("sourcePosition")), + sourceStrength_(readScalar(propsDict_.lookup("sourceStrength"))), + beginTime_(propsDict_.lookupOrDefault("beginTime",0.0)), + endTime_(propsDict_.lookupOrDefault("endTime",GREAT)), + numReceiverPart_(propsDict_.lookupOrDefault