fvModelFunctionObject.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2023 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::functionObjects::fvModel
26 
27 Description
28  functionObject to instantiate and execute an fvModel
29 
30  With this \c functionObject it is possible to use the \c clouds \c fvModel
31  to track particles without introducing sources into the continuous phase
32  transport equations, i.e. one-way coupling. When executed from the \c
33  functions solver module the particles are tracked without evolving the
34  continuous phase and without drag or other transfer terms there is no
35  coupling, i.e. a pure Lagrangian simulation.
36 
37  Example of function object specification:
38  \verbatim
39  clouds
40  {
41  type fvModel;
42 
43  executeAtStart false;
44 
45  fvModel
46  {
47  type clouds;
48  libs ("liblagrangianParcel.so");
49  }
50  }
51  \endverbatim
52 
53 See also
54  Foam::functionObject
55  Foam::functionObjects::fvMeshFunctionObject
56 
57 SourceFiles
58  fvModelFunctionObject.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef fvModelFunctionObject_H
63 #define fvModelFunctionObject_H
64 
65 #include "fvMeshFunctionObject.H"
66 #include "fvModel.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 namespace functionObjects
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class fvModel Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class fvModel
80 :
82 {
83  // Private member data
84 
85  //- Pointer to the fvModel
86  autoPtr<Foam::fvModel> fvModelPtr_;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("fvModel");
93 
94 
95  // Constructors
96 
97  //- Construct from Time and dictionary
98  fvModel
99  (
100  const word& name,
101  const Time& runTime,
102  const dictionary& dict
103  );
104 
105  //- Disallow default bitwise copy construction
106  fvModel(const fvModel&) = delete;
107 
108 
109  //- Destructor
110  virtual ~fvModel();
111 
112 
113  // Member Functions
114 
115  //- Return the list of fields required
116  virtual wordList fields() const
117  {
118  return wordList::null();
119  }
120 
121  //- Execute the fvModel
122  virtual bool execute();
123 
124  //- Do nothing
125  virtual bool write();
126 
127 
128  // Member Operators
129 
130  //- Disallow default bitwise assignment
131  void operator=(const fvModel&) = delete;
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace functionObjects
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
static const List< word > & null()
Return a null List.
Definition: ListI.H:118
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
const word & name() const
Return the name of this functionObject.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
functionObject to instantiate and execute an fvModel
void operator=(const fvModel &)=delete
Disallow default bitwise assignment.
TypeName("fvModel")
Runtime type information.
virtual wordList fields() const
Return the list of fields required.
fvModel(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool execute()
Execute the fvModel.
virtual bool write()
Do nothing.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict