diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelRec/forceModelRec/forceModelRec.C b/src/lagrangian/cfdemParticle/subModels/forceModelRec/forceModelRec/forceModelRec.C deleted file mode 100644 index 6ceba836..00000000 --- a/src/lagrangian/cfdemParticle/subModels/forceModelRec/forceModelRec/forceModelRec.C +++ /dev/null @@ -1,88 +0,0 @@ -/*---------------------------------------------------------------------------*\ - 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 "forceModelRec.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(forceModelRec, 0); - -defineRunTimeSelectionTable(forceModelRec, dictionary); - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// Construct from components -forceModelRec::forceModelRec -( - const dictionary& dict, - cfdemCloudRec& sm -) -: - dict_(dict), - particleCloud_(sm) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -forceModelRec::~forceModelRec() -{} - -// * * * * * * * * * * * * * * * * Member Fct * * * * * * * * * * * * * * * // -void forceModelRec::partToArray -( - label& index, - const vector& dragTot -) const -{ - for(int j=0;j<3;j++) - DEMForces()[index][j] += dragTot[j]; -} - -void forceModelRec::partToArrayU -( - label& index, - const vector& U -) const -{ - for(int j=0;j<3;j++) - fluidVel()[index][j] += U[j]; -} - -void forceModelRec::coupleRecForce() -{ - particleCloud_.coupleRecForce_=true; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelRec/forceModelRec/forceModelRec.H b/src/lagrangian/cfdemParticle/subModels/forceModelRec/forceModelRec/forceModelRec.H deleted file mode 100644 index edb2ef25..00000000 --- a/src/lagrangian/cfdemParticle/subModels/forceModelRec/forceModelRec/forceModelRec.H +++ /dev/null @@ -1,119 +0,0 @@ -/*---------------------------------------------------------------------------*\ - 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 . -\*---------------------------------------------------------------------------*/ - -#ifndef forceModelRec_H -#define forceModelRec_H - -#include "cfdemCloudRec.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class forceModelRec Declaration -\*---------------------------------------------------------------------------*/ - -class forceModelRec -{ - -protected: - - // Protected data - const dictionary& dict_; - - cfdemCloudRec& particleCloud_; - - void coupleRecForce(); -public: - - //- Runtime type information - TypeName("forceModelRec"); - - // Declare runtime constructor selection table - - declareRunTimeSelectionTable - ( - autoPtr, - forceModelRec, - dictionary, - ( - const dictionary& dict, - cfdemCloudRec& sm - ), - (dict,sm) - ); - - - // Constructors - - //- Construct from components - forceModelRec - ( - const dictionary& dict, - cfdemCloudRec& sm - ); - - - // Destructor - - virtual ~forceModelRec(); - - - // Selector - - static autoPtr New - ( - const dictionary& dict, - cfdemCloudRec& sm, - word forceType - ); - - - // Member Functions - virtual void setForce() const = 0; - - - // Access - inline double ** DEMForces() const { return particleCloud_.DEMForces_; } - - inline double ** fluidVel() const { return particleCloud_.fluidVel_; } - - inline double ** particleVel() const { return particleCloud_.velocities_; } - - void partToArray(label&, const vector&) const; - - void partToArrayU(label&, const vector&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelRec/forceModelRec/newForceModelRec.C b/src/lagrangian/cfdemParticle/subModels/forceModelRec/forceModelRec/newForceModelRec.C deleted file mode 100644 index 65a9baa6..00000000 --- a/src/lagrangian/cfdemParticle/subModels/forceModelRec/forceModelRec/newForceModelRec.C +++ /dev/null @@ -1,70 +0,0 @@ -/*---------------------------------------------------------------------------*\ - 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 "forceModelRec.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -autoPtr forceModelRec::New -( - const dictionary& dict, - cfdemCloudRec& sm, - word forceType -) -{ - Info<< "Selecting forceModelRec " - << forceType << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(forceType); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalError - << "forceModelRec::New(const dictionary&, const spray&) : " - << endl - << " unknown forceModelRecType type " - << forceType - << ", constructor not in hash table" << endl << endl - << " Valid forceModelRec types are :" - << endl; - Info<< dictionaryConstructorTablePtr_->toc() - << abort(FatalError); - } - - return autoPtr(cstrIter()(dict,sm)); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelRec/gradConcentration/gradConcentration.C b/src/lagrangian/cfdemParticle/subModels/forceModelRec/gradConcentration/gradConcentration.C deleted file mode 100644 index fe850dcf..00000000 --- a/src/lagrangian/cfdemParticle/subModels/forceModelRec/gradConcentration/gradConcentration.C +++ /dev/null @@ -1,138 +0,0 @@ -/*---------------------------------------------------------------------------*\ - CFDEMcoupling academic - Open Source CFD-DEM coupling - - Contributing authors: - Thomas Lichtenegger - 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 "gradConcentration.H" -#include "recModel.H" -#include "addToRunTimeSelectionTable.H" -#include "fvcSmooth.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(gradConcentration, 0); - -addToRunTimeSelectionTable -( - forceModelRec, - gradConcentration, - dictionary -); - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// Construct from components -gradConcentration::gradConcentration -( - const dictionary& dict, - cfdemCloudRec& sm -) -: - forceModelRec(dict,sm), - propsDict_(dict.subDict(typeName + "Props")), - interpolate_(propsDict_.lookupOrDefault("interpolation", false)), - scalingFactor_(propsDict_.lookupOrDefault("scalingFactor", 1.0)), - voidfractionRecFieldName_(propsDict_.lookupOrDefault("voidfractionRecFieldName","voidfractionRec")), - voidfractionRec_(sm.mesh().lookupObject (voidfractionRecFieldName_)), - voidfractionFieldName_(propsDict_.lookupOrDefault("voidfractionFieldName","voidfraction")), - voidfraction_(sm.mesh().lookupObject (voidfractionFieldName_)), - deltaVoidfraction_ - ( IOobject - ( - "deltaVoidfraction", - sm.mesh().time().timeName(), - sm.mesh(), - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - voidfractionRec_ - ) -{ - coupleRecForce(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -gradConcentration::~gradConcentration() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void gradConcentration::setForce() const -{ - deltaVoidfraction_ = voidfraction_-voidfractionRec_; - volVectorField gradDeltaVoidfraction_ = fvc::grad(deltaVoidfraction_); - vector position(0,0,0); - vector force(0,0,0); - label cellI=0; - scalar scalDConc=0.0; - interpolationCellPoint dConcInterpolator_(deltaVoidfraction_); - interpolationCellPoint gradConcInterpolator_(gradDeltaVoidfraction_); - - for(int index = 0;index < particleCloud_.numberOfParticles(); ++index) - { - cellI = particleCloud_.cellIDs()[index][0]; - force =vector(0,0,0); - if (cellI > -1) // particle Found - { - - if( interpolate_ ) - { - position = particleCloud_.position(index); - scalDConc=dConcInterpolator_.interpolate(position,cellI); - if(scalDConc<0) - force = gradConcInterpolator_.interpolate(position,cellI); - } - else - { - if(deltaVoidfraction_[cellI]<0) - force = gradDeltaVoidfraction_[cellI]; - } - // need a prefactor to relate concentration gradient to force - force*= scalingFactor_; - - // write particle based data to global array - partToArray(index,force); - } - } -} - -void gradConcentration::smoothField(volScalarField& field) -{ - -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelRec/gradConcentration/gradConcentration.H b/src/lagrangian/cfdemParticle/subModels/forceModelRec/gradConcentration/gradConcentration.H deleted file mode 100644 index 7095cb79..00000000 --- a/src/lagrangian/cfdemParticle/subModels/forceModelRec/gradConcentration/gradConcentration.H +++ /dev/null @@ -1,96 +0,0 @@ -/*---------------------------------------------------------------------------*\ - CFDEMcoupling academic - Open Source CFD-DEM coupling - - Contributing authors: - Thomas Lichtenegger - 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 . -\*---------------------------------------------------------------------------*/ - -#ifndef gradConcentration_H -#define gradConcentration_H - -#include "forceModelRec.H" -#include "interpolationCellPoint.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class gradConcentration Declaration -\*---------------------------------------------------------------------------*/ - -class gradConcentration -: - public forceModelRec -{ -private: - dictionary propsDict_; - - bool interpolate_; - - scalar scalingFactor_; - - word voidfractionRecFieldName_; - - const volScalarField& voidfractionRec_; - - word voidfractionFieldName_; - - const volScalarField& voidfraction_; - - mutable volScalarField deltaVoidfraction_; - - void smoothField(volScalarField&); - -public: - - //- Runtime type information - TypeName("gradConcentration"); - - - // Constructors - - //- Construct from components - gradConcentration - ( - const dictionary& dict, - cfdemCloudRec& sm - ); - - // Destructor - - ~gradConcentration(); - - - // Member Functions - void setForce() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/subModels/forceModelRec/tracerPointSource/tracerPointSource.C b/src/lagrangian/cfdemParticle/subModels/forceModelRec/tracerPointSource/tracerPointSource.C deleted file mode 100644 index a4f51703..00000000 --- a/src/lagrangian/cfdemParticle/subModels/forceModelRec/tracerPointSource/tracerPointSource.C +++ /dev/null @@ -1,191 +0,0 @@ -/*---------------------------------------------------------------------------*\ - 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