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