From d67d23278ef35e988b78f0e57ea04f1de4b45359 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 6 Sep 2010 17:27:12 +0100 Subject: [PATCH] ENH: Removed cloud injection surface film model --- .../injection/cloudInjection/cloudInjection.C | 118 --------------- .../injection/cloudInjection/cloudInjection.H | 142 ------------------ .../cloudInjection/cloudInjectionI.H | 44 ------ 3 files changed, 304 deletions(-) delete mode 100644 src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.C delete mode 100644 src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.H delete mode 100644 src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjectionI.H diff --git a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.C b/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.C deleted file mode 100644 index 8f41c43758..0000000000 --- a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.C +++ /dev/null @@ -1,118 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 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 3 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, see . - -\*---------------------------------------------------------------------------*/ - -#include "cloudInjection.H" -#include "addToRunTimeSelectionTable.H" -#include "fvMesh.H" -#include "Time.H" -#include "mathematicalConstants.H" -#include "Random.H" -#include "volFields.H" - -using namespace Foam::constant; - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - namespace surfaceFilmModels - { - defineTypeNameAndDebug(cloudInjection, 0); - addToRunTimeSelectionTable(injectionModel, cloudInjection, dictionary); - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::surfaceFilmModels::cloudInjection::cloudInjection -( - const surfaceFilmModel& owner, - const dictionary& dict -) -: - injectionModel(type(), owner, dict), - cloudName_(coeffs_.lookup("cloudName")), - cloud_ - ( - const_cast - ( - owner.mesh().lookupObject(cloudName_) - ) - ), - particlesPerParcel_(readScalar(coeffs_.lookup("particlesPerParcel"))), - rndGen_(label(0)), - parcelPDF_(pdfs::pdf::New(coeffs_.subDict("parcelPDF"), rndGen_)), - diameter_(owner.film().nCells(), 0.0) -{ - forAll(diameter_, faceI) - { - diameter_[faceI] = parcelPDF_->sample(); - } -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::surfaceFilmModels::cloudInjection::~cloudInjection() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -void Foam::surfaceFilmModels::cloudInjection::correct -( - scalarField& massToInject, - scalarField& diameterToInject -) -{ - const scalarField& rhoFilm = owner().rho(); - - // Collect the data to be transferred - forAll(massToInject, cellI) - { - scalar rho = rhoFilm[cellI]; - scalar diam = diameter_[cellI]; - scalar minMass = particlesPerParcel_*rho*mathematical::pi/6*pow3(diam); - - if (massToInject[cellI] > minMass) - { - // All mass can be injected - set particle diameter - diameterToInject[cellI] = diameter_[cellI]; - - // Retrieve new particle diameter sample - diameter_[cellI] = parcelPDF_->sample(); - } - else - { - // Mass below minimum threshold - cannot be injected - massToInject[cellI] = 0.0; - diameterToInject[cellI] = -1.0; - } - } -} - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.H b/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.H deleted file mode 100644 index ec9d544e16..0000000000 --- a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjection.H +++ /dev/null @@ -1,142 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 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 3 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, see . - -Class - Foam::cloudInjection - -Description - Cloud injection model - -SourceFiles - cloudInjection.C - -\*---------------------------------------------------------------------------*/ - -#ifndef cloudInjection_H -#define cloudInjection_H - -#include "injectionModel.H" -#include "kinematicCloud.H" -#include "pdf.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace surfaceFilmModels -{ - -/*---------------------------------------------------------------------------*\ - Class cloudInjection Declaration -\*---------------------------------------------------------------------------*/ - -class cloudInjection -: - public injectionModel -{ -private: - - // Private member functions - - //- Disallow default bitwise copy construct - cloudInjection(const cloudInjection&); - - //- Disallow default bitwise assignment - void operator=(const cloudInjection&); - - -protected: - - // Protected data - - //- Name of the cloud owner for newly ejected parcels - word cloudName_; - - //- Reference to the cloud - kinematicCloud& cloud_; - - //- Number of particles per parcel - scalar particlesPerParcel_; - - //- Random number generator - Random rndGen_; - - //- Parcel size PDF model - const autoPtr parcelPDF_; - - //- Diameters of particles to inject into the cloud - scalarList diameter_; - - -public: - - //- Runtime type information - TypeName("cloudInjection"); - - - // Constructors - - //- Construct from surface film model - cloudInjection(const surfaceFilmModel& owner, const dictionary& dict); - - - //- Destructor - virtual ~cloudInjection(); - - - // Member Functions - - // Access - - //- Return the cloud name - inline const word& cloudName() const; - - //- Return a reference to the cloud - inline const kinematicCloud& cloud() const; - - - // Evolution - - //- Correct - virtual void correct - ( - scalarField& massToInject, - scalarField& diameterToInject - ); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace surfaceFilmModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "cloudInjectionI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjectionI.H b/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjectionI.H deleted file mode 100644 index 4c85267e6a..0000000000 --- a/src/lagrangian/intermediate/submodels/addOns/surfaceFilmModel/injection/cloudInjection/cloudInjectionI.H +++ /dev/null @@ -1,44 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 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 3 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, see . - -\*---------------------------------------------------------------------------*/ - -#include "cloudInjection.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -inline const Foam::word& -Foam::surfaceFilmModels::cloudInjection::cloudName() const -{ - return cloudName_; -} - - -inline const Foam::kinematicCloud& -Foam::surfaceFilmModels::cloudInjection::cloud() const -{ - return cloud_; -} - - -// ************************************************************************* //