This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/multiphase/settlingFoam/alphaEqn.H

31 lines
677 B
C

{
surfaceScalarField phiAlpha
(
IOobject
(
"phiAlpha",
runTime.timeName(),
mesh
),
phi + rhoc*(mesh.Sf() & fvc::interpolate(Vdj))
);
solve
(
fvm::ddt(rho, Alpha)
+ fvm::div(phiAlpha, Alpha)
- fvm::laplacian(mut, Alpha)
);
Info<< "Solid phase fraction = "
<< Alpha.weightedAverage(mesh.V()).value()
<< " Min(Alpha) = " << min(Alpha).value()
<< " Max(Alpha) = " << max(Alpha).value()
<< endl;
Alpha.min(1.0);
Alpha.max(0.0);
rho == rhoc/(scalar(1) + (rhoc/rhod - 1.0)*Alpha);
alpha == rho*Alpha/rhod;
}