dsmcFields.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 | Copyright (C) 2011-2014 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::dsmcFields
26 
27 Group
28  grpUtilitiesFunctionObjects
29 
30 Description
31  This function object calculates and outputs the intensive fields:
32  - UMean
33  - translationalT
34  - internalT
35  - overallT
36  from averaged extensive fields from a DSMC calculation.
37 
38 
39  Example of function object specification to calculate DSMC fields:
40  \verbatim
41  dsmcFields1
42  {
43  type dsmcFields;
44  functionObjectLibs ("libutilityFunctionObjects.so");
45  ...
46  }
47  \endverbatim
48 
49  \heading Function object usage
50  \table
51  Property | Description | Required | Default value
52  type | Type name: dsmcFields | yes |
53  log | Log to standard output | no | yes
54  \endtable
55 
56 
57 SourceFiles
58  dsmcFields.C
59  IOdsmcFields.H
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef dsmcFields_H
64 #define dsmcFields_H
65 
66 #include "typeInfo.H"
67 #include "Switch.H"
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 
74 // Forward declaration of classes
75 class objectRegistry;
76 class dictionary;
77 class polyMesh;
78 class mapPolyMesh;
79 
80 /*---------------------------------------------------------------------------*\
81  Class dsmcFields Declaration
82 \*---------------------------------------------------------------------------*/
83 
84 class dsmcFields
85 {
86  // Private data
87 
88  //- Name of this set of dsmcFields objects
89  word name_;
90 
91  const objectRegistry& obr_;
92 
93  //- on/off switch
94  bool active_;
95 
96  //- Switch to send output to Info as well as to file
97  Switch log_;
98 
99 
100  // Private Member Functions
101 
102  //- Disallow default bitwise copy construct
104 
105  //- Disallow default bitwise assignment
106  void operator=(const dsmcFields&);
107 
108 
109 public:
110 
111  //- Runtime type information
112  TypeName("dsmcFields");
113 
114 
115  // Constructors
116 
117  //- Construct for given objectRegistry and dictionary.
118  // Allow the possibility to load fields from files
119  dsmcFields
120  (
121  const word& name,
122  const objectRegistry&,
123  const dictionary&,
124  const bool loadFromFiles = false
125  );
126 
127 
128  //- Destructor
129  virtual ~dsmcFields();
130 
131 
132  // Member Functions
133 
134  //- Return name of the set of dsmcFields
135  virtual const word& name() const
136  {
137  return name_;
138  }
139 
140  //- Read the dsmcFields data
141  virtual void read(const dictionary&);
142 
143  //- Execute, currently does nothing
144  virtual void execute();
145 
146  //- Execute at the final time-loop, currently does nothing
147  virtual void end();
148 
149  //- Called when time was set at the end of the Time::operator++
150  virtual void timeSet();
151 
152  //- Calculate the dsmcFields and write
153  virtual void write();
154 
155  //- Update for changes of mesh
156  virtual void updateMesh(const mapPolyMesh&)
157  {}
158 
159  //- Update for changes of mesh
160  virtual void movePoints(const polyMesh&)
161  {}
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:60
Foam::dsmcFields::end
virtual void end()
Execute at the final time-loop, currently does nothing.
Definition: dsmcFields.C:94
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
typeInfo.H
Foam::dsmcFields::obr_
const objectRegistry & obr_
Definition: dsmcFields.H:105
Foam::dsmcFields::log_
Switch log_
Switch to send output to Info as well as to file.
Definition: dsmcFields.H:111
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::dsmcFields::movePoints
virtual void movePoints(const polyMesh &)
Update for changes of mesh.
Definition: dsmcFields.H:174
Foam::dsmcFields::active_
bool active_
on/off switch
Definition: dsmcFields.H:108
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:50
Foam::dsmcFields::updateMesh
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh.
Definition: dsmcFields.H:170
Foam::dsmcFields::read
virtual void read(const dictionary &)
Read the dsmcFields data.
Definition: dsmcFields.C:79
Foam::dsmcFields::~dsmcFields
virtual ~dsmcFields()
Destructor.
Definition: dsmcFields.C:73
Foam::dsmcFields::dsmcFields
dsmcFields(const dsmcFields &)
Disallow default bitwise copy construct.
Switch.H
Foam::dsmcFields::execute
virtual void execute()
Execute, currently does nothing.
Definition: dsmcFields.C:88
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::dsmcFields::name_
word name_
Name of this set of dsmcFields objects.
Definition: dsmcFields.H:103
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::dsmcFields::timeSet
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
Definition: dsmcFields.C:100
Foam::dsmcFields
This function object calculates and outputs the intensive fields:
Definition: dsmcFields.H:98
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Foam::dsmcFields::write
virtual void write()
Calculate the dsmcFields and write.
Definition: dsmcFields.C:106
Foam::dsmcFields::operator=
void operator=(const dsmcFields &)
Disallow default bitwise assignment.
Foam::dsmcFields::TypeName
TypeName("dsmcFields")
Runtime type information.
Foam::dsmcFields::name
virtual const word & name() const
Return name of the set of dsmcFields.
Definition: dsmcFields.H:149