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
thermophysicalModels
reactionThermo
mixtures
homogeneousMixture
homogeneousMixture.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::homogeneousMixture
26
27
Description
28
Foam::homogeneousMixture
29
30
SourceFiles
31
homogeneousMixture.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef homogeneousMixture_H
36
#define homogeneousMixture_H
37
38
#include <
reactionThermophysicalModels/basicMultiComponentMixture.H
>
39
40
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42
namespace
Foam
43
{
44
45
/*---------------------------------------------------------------------------*\
46
Class homogeneousMixture Declaration
47
\*---------------------------------------------------------------------------*/
48
49
template
<
class
ThermoType>
50
class
homogeneousMixture
51
:
52
public
basicMultiComponentMixture
53
{
54
// Private data
55
56
static
const
int
nSpecies_ = 1;
57
static
const
char
* specieNames_[1];
58
59
ThermoType
reactants_;
60
ThermoType
products_;
61
62
mutable
ThermoType
mixture_;
63
64
//- Construct as copy (not implemented)
65
homogeneousMixture
(
const
homogeneousMixture<ThermoType>
&);
66
67
//- Regress variable
68
volScalarField
& b_;
69
70
71
public
:
72
73
//- The type of thermodynamics this mixture is instantiated for
74
typedef
ThermoType
thermoType
;
75
76
77
// Constructors
78
79
//- Construct from dictionary and mesh
80
homogeneousMixture
(
const
dictionary
&,
const
fvMesh
&);
81
82
83
//- Destructor
84
virtual
~homogeneousMixture
()
85
{}
86
87
88
// Member functions
89
90
const
ThermoType
&
mixture
(
const
scalar)
const
;
91
92
const
ThermoType
&
cellMixture
(
const
label celli)
const
93
{
94
return
mixture
(b_[celli]);
95
}
96
97
const
ThermoType
&
patchFaceMixture
98
(
99
const
label
patchi
,
100
const
label facei
101
)
const
102
{
103
return
mixture
(b_.
boundaryField
()[
patchi
][facei]);
104
}
105
106
const
ThermoType
&
cellReactants
(
const
label)
const
107
{
108
return
reactants_;
109
}
110
111
const
ThermoType
&
patchFaceReactants
(
const
label,
const
label)
const
112
{
113
return
reactants_;
114
}
115
116
const
ThermoType
&
cellProducts
(
const
label)
const
117
{
118
return
products_;
119
}
120
121
const
ThermoType
&
patchFaceProducts
(
const
label,
const
label)
const
122
{
123
return
products_;
124
}
125
126
//- Read dictionary
127
void
read
(
const
dictionary
&);
128
};
129
130
131
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133
}
// End namespace Foam
134
135
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
136
137
#ifdef NoRepository
138
# include <
reactionThermophysicalModels/homogeneousMixture.C
>
139
#endif
140
141
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142
143
#endif
144
145
// ************************ vim: set sw=4 sts=4 et: ************************ //