multiCycleConstantbXiIgnition.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) 2024-2025 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::fv::multiCycleConstantbXiIgnition
26 
27 Description
28  Simple constant rate ignition model for the Weller b-Xi combustion models
29 
30 Usage
31  Example usage:
32  \verbatim
33  multiCycleConstantbXiIgnition1
34  {
35  type multiCycleConstantbXiIgnition;
36 
37  cellZone ignition;
38 
39  // Timings are defined in crank angles for a multi-cycle engine case
40  start 700;
41  duration 5;
42  combustionDuration 200;
43  period 720;
44 
45  XiCorr
46  {
47  type spherical;
48  cellZone all;
49  }
50  }
51  \endverbatim
52 
53  Where:
54  \table
55  Property | Description | Required | Default value
56  cellZone | Correction cellZone | yes |
57  start | Ignition start time | yes |
58  duration | Ignition duration | yes |
59  combustionDuration| Combustion duration | yes |
60  period | Ignition repeat period | yes |
61  strength | Ignition strength [1/s] | yes |
62  XiCorr | Flame-wrinkling correction | yes |
63  \endtable
64 
65 See also
66  Foam::XiCorrModel
67  Foam::XiCorrModels::planar
68  Foam::XiCorrModels::cylindrical
69  Foam::XiCorrModels::spherical
70 
71 SourceFiles
72  multiCycleConstantbXiIgnition.C
73 
74 \*---------------------------------------------------------------------------*/
75 
76 #ifndef multiCycleConstantbXiIgnition_H
77 #define multiCycleConstantbXiIgnition_H
78 
79 #include "constantbXiIgnition.H"
80 #include "XiCorrModel.H"
81 
82 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
83 
84 namespace Foam
85 {
86 namespace fv
87 {
88 
89 /*---------------------------------------------------------------------------*\
90  Class multiCycleConstantbXiIgnition Declaration
91 \*---------------------------------------------------------------------------*/
92 
93 class multiCycleConstantbXiIgnition
94 :
95  public constantbXiIgnition
96 {
97  // Private Data
98 
99  //- Ignition repeat period
100  dimensionedScalar period_;
101 
102  //- Combustion duration
103  // after which ignited is set false and the composition reset
104  dimensionedScalar combustionDuration_;
105 
106  //- Set true when the composition is reset
107  // at the end of the combustion duration
108  // and reset false at the beginning of ignition
109  mutable bool reset_;
110 
111 
112  // Private Member Functions
113 
114  //- Non-virtual read
115  void readCoeffs(const dictionary& dict);
116 
117  //- Return the time relative to the ignition time
118  // for the current period
119  scalar ignRelTime(const scalar t) const;
120 
121 
122 public:
123 
124  //- Runtime type information
125  TypeName("multiCycleConstantbXiIgnition");
126 
127 
128  // Constructors
129 
130  //- Construct from explicit source name and mesh
132  (
133  const word& name,
134  const word& modelType,
135  const fvMesh& mesh,
136  const dictionary& dict
137  );
138 
139  //- Disallow default bitwise copy construction
141  (
143  ) = delete;
144 
145 
146  // Member Functions
147 
148  // Checks
149 
150  //- Return true during the ignition duration
151  virtual bool igniting() const;
152 
153  //- Return true during the combustion duration
154  virtual bool ignited() const;
155 
156 
157  // IO
158 
159  //- Read source dictionary
160  virtual bool read(const dictionary& dict);
161 
162 
163  // Member Operators
164 
165  //- Disallow default bitwise assignment
166  void operator=(const multiCycleConstantbXiIgnition&) = delete;
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace fv
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:69
const word & name() const
Return const access to the source name.
Definition: fvModelI.H:57
Simple constant rate ignition model for the Weller b-Xi combustion models.
TypeName("multiCycleConstantbXiIgnition")
Runtime type information.
multiCycleConstantbXiIgnition(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual bool ignited() const
Return true during the combustion duration.
void operator=(const multiCycleConstantbXiIgnition &)=delete
Disallow default bitwise assignment.
virtual bool igniting() const
Return true during the ignition duration.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
labelList fv(nPoints)
dictionary dict