stopAtEmptyClouds.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) 2022-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::stopAtEmptyClouds
26 
27 Description
28  Stops the run when all parcel clouds are empty.
29 
30  The following actions are supported:
31  - noWriteNow
32  - writeNow
33  - nextWrite (default)
34 
35  Example of function object specification:
36  \verbatim
37  stop
38  {
39  type stopAtEmptyClouds;
40  libs ("liblagrangianFunctionObjects.so");
41 
42  executeControl timeStep; // <-- Likely only to be needed if injection
43  startTime 0.500001; // starts after time zero. In which case the
44  // startTime should be slightly after the
45  // injection start time.
46 
47  action nextWrite;
48  }
49  \endverbatim
50 
51 Usage
52  \table
53  Property | Description | Required | Default value
54  type | type name: stopAtEmptyClouds | yes |
55  action | Action executed | no | nextWrite
56  \endtable
57 
58 SourceFiles
59  stopAtEmptyClouds.C
60 
61 \*---------------------------------------------------------------------------*/
62 
63 #ifndef stopAtEmptyClouds_H
64 #define stopAtEmptyClouds_H
65 
66 #include "stopAt.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 namespace functionObjects
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class stopAtEmptyClouds Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class stopAtEmptyClouds
80 :
81  public stopAt
82 {
83  // Private Member Functions
84 
85  //- Return true when the stop condition is achieved
86  virtual bool condition() const;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("stopAtEmptyClouds");
93 
94 
95  // Constructors
96 
97  //- Construct from Time and dictionary
99  (
100  const word& name,
101  const Time& runTime,
102  const dictionary& dict
103  );
104 
105 
106  //- Destructor
107  virtual ~stopAtEmptyClouds();
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace functionObjects
114 } // End namespace Foam
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #endif
119 
120 // ************************************************************************* //
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.
stopAtEmptyClouds(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
TypeName("stopAtEmptyClouds")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict