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
applications
solvers
incompressible
porousSimpleFoam
createFields.H
Go to the documentation of this file.
1
Info
<<
"Reading field p\n"
<<
endl
;
2
volScalarField
p
3
(
4
IOobject
5
(
6
"p"
,
7
runTime.timeName(),
8
mesh
,
9
IOobject::MUST_READ,
10
IOobject::AUTO_WRITE
11
),
12
mesh
13
);
14
15
Info
<<
"Reading field U\n"
<<
endl
;
16
volVectorField
U
17
(
18
IOobject
19
(
20
"U"
,
21
runTime.timeName(),
22
mesh
,
23
IOobject::MUST_READ,
24
IOobject::AUTO_WRITE
25
),
26
mesh
27
);
28
29
# include <
finiteVolume/createPhi.H
>
30
31
32
label
pRefCell
= 0;
33
scalar
pRefValue
= 0.0;
34
setRefCell
(
p
,
mesh
.solutionDict().subDict(
"SIMPLE"
),
pRefCell
,
pRefValue
);
35
36
37
singlePhaseTransportModel
laminarTransport
(
U
,
phi
);
38
39
autoPtr<incompressible::RASModel>
turbulence
40
(
41
incompressible::RASModel::New(
U
,
phi
,
laminarTransport
)
42
);
43
44
45
porousZones
pZones
(
mesh
);
46
Switch
pressureImplicitPorosity
(
false
);
47
48
int
nUCorr
= 0;
49
if
(
pZones
.size())
50
{
51
// nUCorrectors for pressureImplicitPorosity
52
if
(
mesh
.solutionDict().subDict(
"SIMPLE"
).found(
"nUCorrectors"
))
53
{
54
nUCorr =
readInt
55
(
56
mesh
.solutionDict().subDict(
"SIMPLE"
).lookup(
"nUCorrectors"
)
57
);
58
}
59
60
if
(nUCorr > 0)
61
{
62
pressureImplicitPorosity
=
true
;
63
}
64
}