ignition.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 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::ignition
29 
30 Description
31  Foam::ignition
32 
33 SourceFiles
34  ignition.C
35  ignitionIO.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef ignition_H
40 #define ignition_H
41 
42 #include "ignitionSite.H"
43 #include "Switch.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 class fvMesh;
51 
52 /*---------------------------------------------------------------------------*\
53  Class ignition Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class ignition
57 {
58  // Private data
59 
60  const fvMesh& mesh_;
61 
62  bool ignite_;
63 
64  PtrList<ignitionSite> ignSites_;
65 
66 
67  // Private Member Functions
68 
69  //- No copy construct
70  ignition(const ignition&) = delete;
71 
72  //- No copy assignment
73  void operator=(const ignition&) = delete;
74 
75 
76 public:
77 
78  // Constructors
79 
80  //- Construct from Istream and database
81  ignition(const dictionary&, const Time&, const fvMesh&);
82 
83  //- Construct from Istream and engineTime
84  ignition(const dictionary&, const engineTime&, const fvMesh&);
85 
86 
87  // Member Functions
88 
89  //- Return the set of ignition sites
91  {
92  return ignSites_;
93  }
94 
95 
96  // Check
97 
98  bool ignite() const
99  {
100  return ignite_;
101  }
102 
103  //- Are any of the ignition site currently igniting
104  bool igniting() const;
105 
106  //- Has the mixture been ignited?
107  bool ignited() const;
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::ignition::ignited
bool ignited() const
Has the mixture been ignited?
Definition: ignition.C:55
ignitionSite.H
Foam::ignition::ignite
bool ignite() const
Definition: ignition.H:97
Switch.H
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:62
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::engineTime
An abstract class for the time description of the piston motion.
Definition: engineTime.H:54
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::ignition
Foam::ignition.
Definition: ignition.H:55
Foam::ignition::sites
const PtrList< ignitionSite > & sites()
Return the set of ignition sites.
Definition: ignition.H:89
Foam::ignition::igniting
bool igniting() const
Are any of the ignition site currently igniting.
Definition: ignition.C:34