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
finiteVolume
d2dt2Schemes
steadyStateD2dt2Scheme
steadyStateD2dt2Scheme.C
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
\*---------------------------------------------------------------------------*/
25
26
#include "
steadyStateD2dt2Scheme.H
"
27
#include <
finiteVolume/fvcDiv.H
>
28
#include <
finiteVolume/fvMatrices.H
>
29
30
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31
32
namespace
Foam
33
{
34
35
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36
37
namespace
fv
38
{
39
40
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42
template
<
class
Type>
43
tmp<GeometricField<Type, fvPatchField, volMesh> >
44
steadyStateD2dt2Scheme<Type>::fvcD2dt2
45
(
46
const
GeometricField<Type, fvPatchField, volMesh>
& vf
47
)
48
{
49
return
tmp<GeometricField<Type, fvPatchField, volMesh>
>
50
(
51
new
GeometricField<Type, fvPatchField, volMesh>
52
(
53
IOobject
54
(
55
"d2dt2("
+vf.
name
()+
')'
,
56
mesh
().time().timeName(),
57
mesh
(),
58
IOobject::NO_READ
,
59
IOobject::NO_WRITE
60
),
61
mesh
(),
62
dimensioned<Type>
63
(
64
"0"
,
65
vf.
dimensions
()/
dimTime
/
dimTime
,
66
pTraits<Type>::zero
67
)
68
)
69
);
70
}
71
72
73
template
<
class
Type>
74
tmp<GeometricField<Type, fvPatchField, volMesh>
>
75
steadyStateD2dt2Scheme<Type>::fvcD2dt2
76
(
77
const
volScalarField
&
rho
,
78
const
GeometricField<Type, fvPatchField, volMesh>
& vf
79
)
80
{
81
return
tmp<GeometricField<Type, fvPatchField, volMesh>
>
82
(
83
new
GeometricField<Type, fvPatchField, volMesh>
84
(
85
IOobject
86
(
87
"d2dt2("
+rho.
name
()+
','
+vf.
name
()+
')'
,
88
mesh
().time().timeName(),
89
mesh
(),
90
IOobject::NO_READ
,
91
IOobject::NO_WRITE
92
),
93
mesh
(),
94
dimensioned<Type>
95
(
96
"0"
,
97
rho.
dimensions
()*vf.
dimensions
()/
dimTime
/
dimTime
,
98
pTraits<Type>::zero
99
)
100
)
101
);
102
}
103
104
105
template
<
class
Type>
106
tmp<fvMatrix<Type>
>
107
steadyStateD2dt2Scheme<Type>::fvmD2dt2
108
(
109
GeometricField<Type, fvPatchField, volMesh>
& vf
110
)
111
{
112
tmp<fvMatrix<Type>
> tfvm
113
(
114
new
fvMatrix<Type>
115
(
116
vf,
117
vf.
dimensions
()*
dimVol
/
dimTime
/
dimTime
118
)
119
);
120
121
return
tfvm;
122
}
123
124
125
template
<
class
Type>
126
tmp<fvMatrix<Type>
>
127
steadyStateD2dt2Scheme<Type>::fvmD2dt2
128
(
129
const
dimensionedScalar
& rho,
130
GeometricField<Type, fvPatchField, volMesh>
& vf
131
)
132
{
133
tmp<fvMatrix<Type>
> tfvm
134
(
135
new
fvMatrix<Type>
136
(
137
vf,
138
rho.
dimensions
()*vf.
dimensions
()*
dimVol
/
dimTime
/
dimTime
139
)
140
);
141
142
return
tfvm;
143
}
144
145
146
template
<
class
Type>
147
tmp<fvMatrix<Type>
>
148
steadyStateD2dt2Scheme<Type>::fvmD2dt2
149
(
150
const
volScalarField
& rho,
151
GeometricField<Type, fvPatchField, volMesh>
& vf
152
)
153
{
154
tmp<fvMatrix<Type>
> tfvm
155
(
156
new
fvMatrix<Type>
157
(
158
vf,
159
rho.
dimensions
()*vf.
dimensions
()*
dimVol
/
dimTime
/
dimTime
160
)
161
);
162
163
return
tfvm;
164
}
165
166
167
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168
169
}
// End namespace fv
170
171
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173
}
// End namespace Foam
174
175
// ************************ vim: set sw=4 sts=4 et: ************************ //