FreeFOAM The Cross-Platform CFD Toolkit
alphaEqn.H
Go to the documentation of this file.
1 {
2  word alphaScheme("div(phi,alpha)");
3  word alpharScheme("div(phirb,alpha)");
4 
5  surfaceScalarField phic = mag(phi/mesh.magSf());
6  phic = min(interface.cAlpha()*phic, max(phic));
7  surfaceScalarField phir = phic*interface.nHatf();
8 
9  for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
10  {
11  surfaceScalarField phiAlpha =
12  fvc::flux
13  (
14  phi,
15  alpha1,
16  alphaScheme
17  )
18  + fvc::flux
19  (
20  -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
21  alpha1,
22  alpharScheme
23  );
24 
25  MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
26 
27  rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
28  }
29 
30  Info<< "Liquid phase volume fraction = "
31  << alpha1.weightedAverage(mesh.V()).value()
32  << " Min(alpha1) = " << min(alpha1).value()
33  << " Max(alpha1) = " << max(alpha1).value()
34  << endl;
35 }