FreeStream.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::FreeStream
28 
29 Description
30  Inserting new particles across the faces of a all patched of type
31  "patch" for a free stream. Uniform values number density, temperature
32  and velocity sourced face-by-face from the boundaryT and boundaryU fields
33  of the cloud.
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef FreeStream_H
38 #define FreeStream_H
39 
40 #include "InflowBoundaryModel.H"
41 #include "polyMesh.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 /*---------------------------------------------------------------------------*\
48  Class FreeStream Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 template<class CloudType>
52 class FreeStream
53 :
54  public InflowBoundaryModel<CloudType>
55 {
56  // Private data
57 
58  //- The indices of patches to introduce molecules across
59  labelList patches_;
60 
61  //- The molecule types to be introduced
62  List<label> moleculeTypeIds_;
63 
64  //- The number density of the species in the inflow
65  Field<scalar> numberDensities_;
66 
67  //- A List of Lists of Fields specifying carry-over of mass flux from
68  // one timestep to the next
69  // + Outer List - one inner List for each patch
70  // + Inner List - one Field for every species to be introduced
71  // + Each field entry corresponding to a face to be injected across
72  // with a particular species
73  List<List<Field<scalar>>> particleFluxAccumulators_;
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("FreeStream");
80 
81 
82  // Constructors
83 
84  //- Construct from dictionary
86  (
87  const dictionary& dict,
89  );
90 
91 
92  //- Destructor
93  virtual ~FreeStream();
94 
95 
96  // Member Functions
97 
98  // Mapping
99 
100  //- Remap the particles to the correct cells following mesh change
101  virtual void autoMap(const mapPolyMesh&);
102 
103  //- Introduce particles
104  virtual void inflow();
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #ifdef NoRepository
115  #include "FreeStream.C"
116 #endif
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
Foam::FreeStream
Inserting new particles across the faces of a all patched of type "patch" for a free stream....
Definition: FreeStream.H:51
Foam::InflowBoundaryModel::dict
const dictionary & dict() const
Return the owner cloud dictionary.
Definition: InflowBoundaryModel.C:79
Foam::FreeStream::~FreeStream
virtual ~FreeStream()
Destructor.
Definition: FreeStream.C:113
polyMesh.H
FreeStream.C
Foam::FreeStream::autoMap
virtual void autoMap(const mapPolyMesh &)
Remap the particles to the correct cells following mesh change.
Definition: FreeStream.C:120
Foam::FreeStream::inflow
virtual void inflow()
Introduce particles.
Definition: FreeStream.C:141
Foam::Field< scalar >
Foam::FreeStream::TypeName
TypeName("FreeStream")
Runtime type information.
Foam::FreeStream::FreeStream
FreeStream(const dictionary &dict, CloudType &cloud)
Construct from dictionary.
Definition: FreeStream.C:39
InflowBoundaryModel.H
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::cloud
A cloud is a registry collection of lagrangian particles.
Definition: cloud.H:57
Foam::List< label >
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161
Foam::InflowBoundaryModel
Templated inflow boundary model class.
Definition: DSMCCloud.H:64