00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 2009-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::FreeStream 00026 00027 Description 00028 Inserting new particles across the faces of a all patched of type 00029 "patch" for a free stream. Uniform values number density, temperature 00030 and velocity sourced face-by-face from the boundaryT and boundaryU fields 00031 of the cloud. 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef FreeStream_H 00036 #define FreeStream_H 00037 00038 #include <dsmc/InflowBoundaryModel.H> 00039 #include <OpenFOAM/polyMesh.H> 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 /*---------------------------------------------------------------------------*\ 00046 Class FreeStream Declaration 00047 \*---------------------------------------------------------------------------*/ 00048 00049 template<class CloudType> 00050 class FreeStream 00051 : 00052 public InflowBoundaryModel<CloudType> 00053 { 00054 // Private data 00055 00056 //- The indices of patches to introduce molecules across 00057 labelList patches_; 00058 00059 //- The molecule types to be introduced 00060 List<label> moleculeTypeIds_; 00061 00062 //- The number density of the species in the inflow 00063 Field<scalar> numberDensities_; 00064 00065 //- A List of Lists of Fields specifying carry-over of mass flux from 00066 // one timestep to the next 00067 // + Outer List - one inner List for each patch 00068 // + Inner List - one Field for every species to be introduced 00069 // + Each field entry corresponding to a face to be injected across 00070 // with a particular species 00071 List<List<Field<scalar> > > particleFluxAccumulators_; 00072 00073 00074 public: 00075 00076 //- Runtime type information 00077 TypeName("FreeStream"); 00078 00079 00080 // Constructors 00081 00082 //- Construct from dictionary 00083 FreeStream 00084 ( 00085 const dictionary& dict, 00086 CloudType& cloud 00087 ); 00088 00089 00090 // Destructor 00091 virtual ~FreeStream(); 00092 00093 00094 // Member Functions 00095 00096 //- Introduce particles 00097 virtual void inflow(); 00098 }; 00099 00100 00101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00102 00103 } // End namespace Foam 00104 00105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00106 00107 #ifdef NoRepository 00108 # include "FreeStream.C" 00109 #endif 00110 00111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00112 00113 #endif 00114 00115 // ************************ vim: set sw=4 sts=4 et: ************************ //