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
finiteVolume
fields
fvPatchFields
derived
activeBaffleVelocity
activeBaffleVelocityFvPatchVectorField.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::activeBaffleVelocityFvPatchVectorField
26
27
Description
28
Boundary condition that modifies mesh areas based on velocity.
29
30
SourceFiles
31
activeBaffleVelocityFvPatchVectorField.C
32
33
\*---------------------------------------------------------------------------*/
34
35
#ifndef activeBaffleVelocityFvPatchVectorField_H
36
#define activeBaffleVelocityFvPatchVectorField_H
37
38
#include <
finiteVolume/fvPatchFields.H
>
39
#include <
finiteVolume/fixedValueFvPatchFields.H
>
40
41
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42
43
namespace
Foam
44
{
45
46
/*---------------------------------------------------------------------------*\
47
Class activeBaffleVelocityFvPatch Declaration
48
\*---------------------------------------------------------------------------*/
49
50
class
activeBaffleVelocityFvPatchVectorField
51
:
52
public
fixedValueFvPatchVectorField
53
{
54
// Private data
55
56
//- Name of the pressure field used to calculate the force
57
// on the active baffle
58
word
pName_;
59
60
//- Name of the cyclic patch used when the active baffle is open
61
word
cyclicPatchName_;
62
63
//- Index of the cyclic patch used when the active baffle is open
64
label cyclicPatchLabel_;
65
66
//- Orientation (1 or -1) of the active baffle patch.
67
// Used to change the direction of opening without the need for
68
// reordering the patch faces
69
label orientation_;
70
71
//- Initial wall patch areas
72
vectorField
initWallSf_;
73
74
//- Initial cyclic patch areas
75
vectorField
initCyclicSf_;
76
77
//- Current fraction of the active baffle which is open
78
scalar openFraction_;
79
80
//- Time taken for the active baffle to open
81
scalar openingTime_;
82
83
//- Maximum fractional change to the active baffle openness
84
// per time-step
85
scalar maxOpenFractionDelta_;
86
87
label curTimeIndex_;
88
89
90
public
:
91
92
//- Runtime type information
93
TypeName
(
"activeBaffleVelocity"
);
94
95
96
// Constructors
97
98
//- Construct from patch and internal field
99
activeBaffleVelocityFvPatchVectorField
100
(
101
const
fvPatch
&,
102
const
DimensionedField<vector, volMesh>
&
103
);
104
105
//- Construct from patch, internal field and dictionary
106
activeBaffleVelocityFvPatchVectorField
107
(
108
const
fvPatch
&,
109
const
DimensionedField<vector, volMesh>
&,
110
const
dictionary
&
111
);
112
113
//- Construct by mapping given activeBaffleVelocityFvPatchVectorField
114
// onto a new patch
115
activeBaffleVelocityFvPatchVectorField
116
(
117
const
activeBaffleVelocityFvPatchVectorField
&,
118
const
fvPatch
&,
119
const
DimensionedField<vector, volMesh>
&,
120
const
fvPatchFieldMapper
&
121
);
122
123
//- Construct as copy
124
activeBaffleVelocityFvPatchVectorField
125
(
126
const
activeBaffleVelocityFvPatchVectorField
&
127
);
128
129
//- Construct and return a clone
130
virtual
tmp<fvPatchVectorField>
clone
()
const
131
{
132
return
tmp<fvPatchVectorField>
133
(
134
new
activeBaffleVelocityFvPatchVectorField
(*
this
)
135
);
136
}
137
138
//- Construct as copy setting internal field reference
139
activeBaffleVelocityFvPatchVectorField
140
(
141
const
activeBaffleVelocityFvPatchVectorField
&,
142
const
DimensionedField<vector, volMesh>
&
143
);
144
145
//- Construct and return a clone setting internal field reference
146
virtual
tmp<fvPatchVectorField>
clone
147
(
148
const
DimensionedField<vector, volMesh>
& iF
149
)
const
150
{
151
return
tmp<fvPatchVectorField>
152
(
153
new
activeBaffleVelocityFvPatchVectorField
(*
this
, iF)
154
);
155
}
156
157
158
// Member functions
159
160
// Mapping functions
161
162
//- Map (and resize as needed) from self given a mapping object
163
virtual
void
autoMap
164
(
165
const
fvPatchFieldMapper
&
166
);
167
168
//- Reverse map the given fvPatchField onto this fvPatchField
169
virtual
void
rmap
170
(
171
const
fvPatchVectorField
&,
172
const
labelList
&
173
);
174
175
176
//- Update the coefficients associated with the patch field
177
virtual
void
updateCoeffs
();
178
179
//- Write
180
virtual
void
write
(
Ostream
&)
const
;
181
};
182
183
184
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185
186
}
// End namespace Foam
187
188
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189
190
#endif
191
192
// ************************ vim: set sw=4 sts=4 et: ************************ //