FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

NoInjection.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::NoInjection
00026 
00027 Description
00028     Place holder for 'none' option
00029 
00030 SourceFiles
00031     NoInjection.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef NoInjection_H
00036 #define NoInjection_H
00037 
00038 #include <lagrangianIntermediate/InjectionModel.H>
00039 
00040 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00041 
00042 namespace Foam
00043 {
00044 
00045 /*---------------------------------------------------------------------------*\
00046                        Class NoInjection Declaration
00047 \*---------------------------------------------------------------------------*/
00048 
00049 template<class CloudType>
00050 class NoInjection
00051 :
00052     public InjectionModel<CloudType>
00053 {
00054 protected:
00055 
00056     // Protected member functions
00057 
00058         //- Number of parcels to introduce over the time step relative to SOI
00059         label parcelsToInject
00060         (
00061             const scalar,
00062             const scalar
00063         ) const;
00064 
00065         //- Volume of parcels to introduce over the time step relative to SOI
00066         scalar volumeToInject
00067         (
00068             const scalar,
00069             const scalar
00070         ) const;
00071 
00072 
00073 public:
00074 
00075     //- Runtime type information
00076     TypeName("none");
00077 
00078 
00079     // Constructors
00080 
00081         //- Construct from components
00082         NoInjection
00083         (
00084             const dictionary&,
00085             CloudType&
00086         );
00087 
00088 
00089     //- Destructor
00090     virtual ~NoInjection();
00091 
00092 
00093     // Member Functions
00094 
00095         //- Flag to indicate whether model activates injection model
00096         bool active() const;
00097 
00098         //- Return the end-of-injection time
00099         scalar timeEnd() const;
00100 
00101 
00102         // Injection geometry
00103 
00104             //- Set the injection position and owner cell
00105             virtual void setPositionAndCell
00106             (
00107                 const label parcelI,
00108                 const label nParcels,
00109                 const scalar time,
00110                 vector& position,
00111                 label& cellOwner
00112             );
00113 
00114             virtual void setProperties
00115             (
00116                 const label parcelI,
00117                 const label nParcels,
00118                 const scalar time,
00119                 typename CloudType::parcelType& parcel
00120             );
00121 
00122             //- Flag to identify whether model fully describes the parcel
00123             virtual bool fullyDescribed() const;
00124 
00125             //- Return flag to identify whether or not injection of parcelI is
00126             //  permitted
00127             virtual bool validInjection(const label parcelI);
00128 };
00129 
00130 
00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00132 
00133 } // End namespace Foam
00134 
00135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00136 
00137 #ifdef NoRepository
00138 #   include <lagrangianIntermediate/NoInjection.C>
00139 #endif
00140 
00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00142 
00143 #endif
00144 
00145 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines