Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
engine
ignition
ignitionSite.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 | Copyright (C) 1991-2010 OpenCFD Ltd.
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::ignitionSite
26
27
Description
28
Foam::ignitionSite
29
30
SourceFiles
31
ignitionSiteI.H
32
ignitionSite.C
33
ignitionSiteIO.C
34
35
\*---------------------------------------------------------------------------*/
36
37
#ifndef ignitionSite_H
38
#define ignitionSite_H
39
40
#include <
OpenFOAM/vector.H
>
41
#include <
OpenFOAM/labelList.H
>
42
#include <
OpenFOAM/scalarList.H
>
43
#include <
OpenFOAM/autoPtr.H
>
44
#include <
OpenFOAM/dictionary.H
>
45
46
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48
namespace
Foam
49
{
50
51
class
Time;
52
class
engineTime;
53
class
fvMesh;
54
55
/*---------------------------------------------------------------------------*\
56
Class ignitionSite Declaration
57
\*---------------------------------------------------------------------------*/
58
59
class
ignitionSite
60
{
61
// Private data
62
63
const
Time
& db_;
64
const
fvMesh
& mesh_;
65
66
dictionary
ignitionSiteDict_;
67
68
vector
location_;
69
scalar diameter_;
70
scalar time_;
71
scalar duration_;
72
scalar strength_;
73
74
labelList
cells_;
75
scalarList
cellVolumes_;
76
77
//- Current time index.
78
// Used during the update for moving meshes
79
mutable
label timeIndex_;
80
81
82
// Private Member Functions
83
84
void
findIgnitionCells(
const
fvMesh
&);
85
86
87
public
:
88
89
// Public classes
90
91
//- Class used for the read-construction of
92
// PtrLists of ignitionSite
93
class
iNew
94
{
95
const
Time
& db_;
96
const
fvMesh
& mesh_;
97
98
public
:
99
100
iNew
(
const
Time
& db,
const
fvMesh
&
mesh
)
101
:
102
db_(db),
103
mesh_(mesh)
104
{}
105
106
autoPtr<ignitionSite>
operator()
(
Istream
& is)
const
107
{
108
return
autoPtr<ignitionSite>
(
new
ignitionSite
(is, db_, mesh_));
109
}
110
};
111
112
113
// Constructors
114
115
//- Construct from Istream and database
116
ignitionSite
(
Istream
&,
const
Time
&,
const
fvMesh
&);
117
118
//- Construct from Istream and engineTime
119
ignitionSite
(
Istream
&,
const
engineTime
&,
const
fvMesh
&);
120
121
//- Clone
122
autoPtr<ignitionSite>
clone
()
const
123
{
124
return
autoPtr<ignitionSite>
(
new
ignitionSite
(*
this
));
125
}
126
127
128
// Member Functions
129
130
// Access
131
132
const
vector
&
location
()
const
133
{
134
return
location_;
135
}
136
137
scalar
diameter
()
const
138
{
139
return
diameter_;
140
}
141
142
scalar
time
()
const
143
{
144
return
time_;
145
}
146
147
scalar
duration
()
const
148
{
149
return
duration_;
150
}
151
152
scalar
strength
()
const
153
{
154
return
strength_;
155
}
156
157
//- Return the ignition cells updated if the mesh moved
158
const
labelList
&
cells
()
const
;
159
160
const
scalarList
&
cellVolumes
()
const
161
{
162
return
cellVolumes_;
163
}
164
165
166
// Check
167
168
bool
igniting
()
const
;
169
170
bool
ignited
()
const
;
171
172
173
// Member Operators
174
175
void
operator=
(
const
ignitionSite
&);
176
};
177
178
179
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180
181
}
// End namespace Foam
182
183
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184
185
#endif
186
187
// ************************ vim: set sw=4 sts=4 et: ************************ //