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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::functionObjects::dsmcFields
29 
30 Group
31  grpLagrangianFunctionObjects
32 
33 Description
34  This function object calculates and outputs the intensive fields:
35  - UMean
36  - translationalT
37  - internalT
38  - overallT
39  from averaged extensive fields from a DSMC calculation.
40 
41 Usage
42  Example of function object specification to calculate DSMC fields:
43  \verbatim
44  dsmcFields1
45  {
46  type dsmcFields;
47  libs (lagrangianFunctionObjects);
48  ...
49  }
50  \endverbatim
51 
52  Where the entries comprise:
53  \table
54  Property | Description | Required | Default value
55  type | Type name: dsmcFields | yes |
56  log | Log to standard output | no | yes
57  \endtable
58 
59 
60 SourceFiles
61  dsmcFields.C
62 
63 \*---------------------------------------------------------------------------*/
64 
65 #ifndef functionObjects_dsmcFields_H
66 #define functionObjects_dsmcFields_H
67 
68 #include "fvMeshFunctionObject.H"
69 #include "Switch.H"
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 namespace Foam
74 {
75 namespace functionObjects
76 {
77 
78 /*---------------------------------------------------------------------------*\
79  Class dsmcFields Declaration
80 \*---------------------------------------------------------------------------*/
81 
82 class dsmcFields
83 :
84  public fvMeshFunctionObject
85 {
86 
87  //- Switch to send output to Info as well as to file
88  Switch log_;
89  // Private Member Functions
90 
91  //- No copy construct
92  dsmcFields(const dsmcFields&) = delete;
93 
94  //- No copy assignment
95  void operator=(const dsmcFields&) = delete;
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("dsmcFields");
102 
103 
104  // Constructors
105 
106  //- Construct from Time and dictionary
107  dsmcFields
108  (
109  const word& name,
110  const Time& runTime,
111  const dictionary& dict
112  );
113 
114 
115  //- Destructor
116  virtual ~dsmcFields();
117 
118 
119  // Member Functions
120 
121  //- Read the dsmcFields data
122  virtual bool read(const dictionary&);
123 
124  //- Do nothing
125  virtual bool execute();
126 
127  //- Calculate and write the DSMC fields
128  virtual bool write();
129 };
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace functionObjects
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:76
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::functionObjects::dsmcFields::execute
virtual bool execute()
Do nothing.
Definition: dsmcFields.C:86
fvMeshFunctionObject.H
Foam::functionObjects::dsmcFields::write
virtual bool write()
Calculate and write the DSMC fields.
Definition: dsmcFields.C:92
Foam::functionObjects::dsmcFields::TypeName
TypeName("dsmcFields")
Runtime type information.
Foam::functionObjects::fvMeshFunctionObject
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Definition: fvMeshFunctionObject.H:64
Foam::functionObjects::dsmcFields::read
virtual bool read(const dictionary &)
Read the dsmcFields data.
Definition: dsmcFields.C:79
Switch.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::functionObject::name
const word & name() const
Return the name of this functionObject.
Definition: functionObject.C:131
Foam::functionObjects::dsmcFields
This function object calculates and outputs the intensive fields:
Definition: dsmcFields.H:96
Foam::functionObjects::dsmcFields::~dsmcFields
virtual ~dsmcFields()
Destructor.
Definition: dsmcFields.C:73