2 surfaceScalarField alphaf = fvc::interpolate(alpha);
3 surfaceScalarField betaf = scalar(1) - alphaf;
5 volScalarField rUaA = 1.0/UaEqn.A();
6 volScalarField rUbA = 1.0/UbEqn.A();
8 surfaceScalarField rUaAf = fvc::interpolate(rUaA);
9 surfaceScalarField rUbAf = fvc::interpolate(rUbA);
14 surfaceScalarField phiDraga =
15 fvc::interpolate(beta/rhoa*dragCoef*rUaA)*phib + rUaAf*(g & mesh.Sf());
16 surfaceScalarField phiDragb =
17 fvc::interpolate(alpha/rhob*dragCoef*rUbA)*phia + rUbAf*(g & mesh.Sf());
19 forAll(p.boundaryField(), patchi)
21 if (isA<zeroGradientFvPatchScalarField>(p.boundaryField()[patchi]))
23 phiDraga.boundaryField()[patchi] = 0.0;
24 phiDragb.boundaryField()[patchi] = 0.0;
28 phia = (fvc::interpolate(Ua) & mesh.Sf()) + fvc::ddtPhiCorr(rUaA, Ua, phia)
30 phib = (fvc::interpolate(Ub) & mesh.Sf()) + fvc::ddtPhiCorr(rUbA, Ub, phib)
33 phi = alphaf*phia + betaf*phib;
38 alphaf*rUaAf/rhoa + betaf*rUbAf/rhob
41 for(int nonOrth = 0; nonOrth <= nNonOrthCorr; nonOrth++)
45 fvm::laplacian(Dp, p) == fvc::div(phi)
48 pEqn.setReference(pRefCell, pRefValue);
51 if (nonOrth == nNonOrthCorr)
53 surfaceScalarField SfGradp = pEqn.flux()/Dp;
55 phia -= rUaAf*SfGradp/rhoa;
56 phib -= rUbAf*SfGradp/rhob;
57 phi = alphaf*phia + betaf*phib;
60 SfGradp = pEqn.flux()/Dp;
62 Ua += (fvc::reconstruct(phiDraga - rUaAf*SfGradp/rhoa));
63 //Ua += rUaA*(fvc::reconstruct(phiDraga/rUaAf - SfGradp/rhoa));
64 Ua.correctBoundaryConditions();
66 Ub += (fvc::reconstruct(phiDragb - rUbAf*SfGradp/rhob));
67 //Ub += rUbA*(fvc::reconstruct(phiDragb/rUbAf - SfGradp/rhob));
68 Ub.correctBoundaryConditions();
70 U = alpha*Ua + beta*Ub;
75 #include "continuityErrs.H"