bXiTimedIgnition.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) 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::bXiTimedIgnition
26 
27 Description
28  Abstract base-class for timed ignition models
29  for the Weller b-Xi combustion models
30 
31 SourceFiles
32  bXiTimedIgnition.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef bXiTimedIgnition_H
37 #define bXiTimedIgnition_H
38 
39 #include "bXiIgnition.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace fv
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class bXiTimedIgnition Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class bXiTimedIgnition
53 :
54  public bXiIgnition
55 {
56 protected:
57 
58  // Protected Data
59 
60  //- Ignition start time
62 
63  //- Ignition duration
65 
66  //- Ignition repeat period
68 
69  //- Combustion duration
70  // after which ignited is set false and the composition reset
72 
73  //- Set true when the composition is reset
74  // at the end of the combustion duration
75  // and reset false at the beginning of ignition
76  mutable bool reset_;
77 
78  //- Return the time relative to the ignition time
79  // for the current period
80  scalar ignRelTime(const scalar t) const;
81 
82 
83 private:
84 
85  // Private Member Functions
86 
87  //- Non-virtual read
88  void readCoeffs(const dictionary& dict);
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("bXiTimedIgnition");
95 
96 
97  // Constructors
98 
99  //- Construct from explicit source name and mesh
101  (
102  const word& name,
103  const word& modelType,
104  const fvMesh& mesh,
105  const dictionary& dict
106  );
107 
108  //- Disallow default bitwise copy construction
110  (
111  const bXiTimedIgnition&
112  ) = delete;
113 
114 
115  // Member Functions
116 
117  // Checks
118 
119  //- Return the list of fields for which the option adds source term
120  // to the transport equation
121  virtual wordList addSupFields() const;
122 
123  //- Return true during the specified ignition duration
124  virtual bool igniting(const dimensionedScalar duration) const;
125 
126  //- Return true during the ignition duration
127  virtual bool igniting() const;
128 
129  //- Return true during the combustion duration
130  virtual bool ignited() const;
131 
132 
133  // IO
134 
135  //- Read source dictionary
136  virtual bool read(const dictionary& dict);
137 
138 
139  // Member Operators
140 
141  //- Disallow default bitwise assignment
142  void operator=(const bXiTimedIgnition&) = delete;
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace fv
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
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:98
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
Abstract base-class for ignition models for the Weller b-Xi combustion models.
Definition: bXiIgnition.H:55
Abstract base-class for timed ignition models for the Weller b-Xi combustion models.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
dimensionedScalar combustionDuration_
Combustion duration.
dimensionedScalar duration_
Ignition duration.
void operator=(const bXiTimedIgnition &)=delete
Disallow default bitwise assignment.
scalar ignRelTime(const scalar t) const
Return the time relative to the ignition time.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual bool ignited() const
Return true during the combustion duration.
bool reset_
Set true when the composition is reset.
dimensionedScalar start_
Ignition start time.
dimensionedScalar period_
Ignition repeat period.
bXiTimedIgnition(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
TypeName("bXiTimedIgnition")
Runtime type information.
virtual bool igniting() const
Return true during the ignition duration.
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
labelList fv(nPoints)
dictionary dict