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
multiphase
bubbleFoam
alphaEqn.H
Go to the documentation of this file.
1
{
2
word
scheme
(
"div(phi,alpha)"
);
3
4
surfaceScalarField
phir =
phia
-
phib
;
5
6
Info
<<
"Max Ur Courant Number = "
7
<< (
8
max
9
(
10
mesh
.surfaceInterpolation::deltaCoeffs()*
mag
(phir)
11
/
mesh
.magSf()
12
)*runTime.deltaT()
13
).value()
14
<<
endl
;
15
16
for
(
int
acorr=0; acorr<
nAlphaCorr
; acorr++)
17
{
18
fvScalarMatrix
alphaEqn
19
(
20
fvm::ddt
(alpha)
21
+
fvm::div
(
phi
, alpha,
scheme
)
22
+
fvm::div
(-
fvc::flux
(-phir,
beta
,
scheme
), alpha,
scheme
)
23
);
24
alphaEqn.relax();
25
alphaEqn.solve();
26
27
/*
28
fvScalarMatrix betaEqn
29
(
30
fvm::ddt(beta)
31
+ fvm::div(phi, beta, scheme)
32
+ fvm::div(-fvc::flux(phir, scalar(1) - beta, scheme), beta, scheme)
33
);
34
betaEqn.relax();
35
betaEqn.solve();
36
37
alpha = 0.5*(scalar(1) + sqr(scalar(1) - beta) - sqr(scalar(1) - alpha));
38
*/
39
40
beta
= scalar(1) - alpha;
41
}
42
43
Info
<<
"Dispersed phase volume fraction = "
44
<< alpha.weightedAverage(
mesh
.V()).value()
45
<<
" Min(alpha) = "
<<
min
(alpha).value()
46
<<
" Max(alpha) = "
<<
max
(alpha).value()
47
<<
endl
;
48
}
49
50
rho
= alpha*
rhoa
+
beta
*
rhob
;