-
Notifications
You must be signed in to change notification settings - Fork 9
/
updateFlux.H
48 lines (41 loc) · 1.16 KB
/
updateFlux.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
word alphaScheme("div(phi,alpha)");
word alpharScheme("div(phirb,alpha)");
// Standard face-flux compression coefficient
surfaceScalarField phic(mixture.cAlpha()*mag(phi/mesh.magSf()));
//surfaceScalarField phic(mag(phi/mesh.magSf()));
// Add the optional isotropic compression contribution
if (icAlpha > 0)
{
phic *= (1.0 - icAlpha);
phic += (mixture.cAlpha()*icAlpha)*fvc::interpolate(mag(U));
}
// Do not compress interface at non-coupled boundary faces
// (inlets, outlets etc.)
forAll(phic.boundaryField(), patchi)
{
fvsPatchScalarField& phicp = phic.boundaryField()[patchi];
if (!phicp.coupled())
{
phicp == 0;
}
}
surfaceScalarField phir(phic*nVecf);
surfaceScalarField phiAlpha
(
fvc::flux
(
phi,
alpha1,
alphaScheme
)
+ fvc::flux
(
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
alpha1,
alpharScheme
)
);
MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
}