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
compressible
rhoPisoFoam
pEqn.H
Go to the documentation of this file.
1
rho
=
thermo
.rho();
2
3
volScalarField
rUA
= 1.0/
UEqn
.A();
4
U
= rUA*
UEqn
.H();
5
6
if
(
transonic
)
7
{
8
surfaceScalarField
phid
9
(
10
"phid"
,
11
fvc::interpolate
(
psi
)
12
*(
13
(
fvc::interpolate
(
U
) &
mesh
.Sf())
14
+
fvc::ddtPhiCorr
(rUA,
rho
,
U
,
phi
)
15
)
16
);
17
18
for
(
int
nonOrth=0; nonOrth<=
nNonOrthCorr
; nonOrth++)
19
{
20
fvScalarMatrix
pEqn
21
(
22
fvm::ddt
(
psi
,
p
)
23
+
fvm::div
(phid,
p
)
24
-
fvm::laplacian
(
rho
*rUA,
p
)
25
);
26
27
pEqn.solve();
28
29
if
(nonOrth ==
nNonOrthCorr
)
30
{
31
phi
== pEqn.flux();
32
}
33
}
34
}
35
else
36
{
37
phi
=
38
fvc::interpolate
(
rho
)*
39
(
40
(
fvc::interpolate
(
U
) &
mesh
.Sf())
41
+
fvc::ddtPhiCorr
(rUA,
rho
,
U
,
phi
)
42
);
43
44
for
(
int
nonOrth=0; nonOrth<=
nNonOrthCorr
; nonOrth++)
45
{
46
fvScalarMatrix
pEqn
47
(
48
fvm::ddt
(
psi
,
p
)
49
+
fvc::div
(
phi
)
50
-
fvm::laplacian
(
rho
*rUA,
p
)
51
);
52
53
pEqn.solve();
54
55
if
(nonOrth ==
nNonOrthCorr
)
56
{
57
phi
+= pEqn.flux();
58
}
59
}
60
}
61
62
#include <
finiteVolume/rhoEqn.H
>
63
#include <
finiteVolume/compressibleContinuityErrs.H
>
64
65
U
-= rUA*
fvc::grad
(
p
);
66
U
.correctBoundaryConditions();
67
68
DpDt
=
fvc::DDt
(
surfaceScalarField
(
"phiU"
,
phi
/
fvc::interpolate
(
rho
)),
p
);