|
|
|
pEqn.HGo to the documentation of this file.00001 { 00002 volScalarField rUA = 1.0/UEqn.A(); 00003 surfaceScalarField rUAf = fvc::interpolate(rUA); 00004 00005 U = rUA*UEqn.H(); 00006 00007 surfaceScalarField phiU 00008 ( 00009 "phiU", 00010 (fvc::interpolate(U) & mesh.Sf()) 00011 + fvc::ddtPhiCorr(rUA, rho, U, phi) 00012 ); 00013 00014 adjustPhi(phiU, U, p); 00015 00016 phi = phiU + 00017 ( 00018 fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf() 00019 + fvc::interpolate(rho)*(g & mesh.Sf()) 00020 )*rUAf; 00021 00022 Pair<tmp<volScalarField> > vDotP = twoPhaseProperties->vDotP(); 00023 const volScalarField& vDotcP = vDotP[0](); 00024 const volScalarField& vDotvP = vDotP[1](); 00025 00026 for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) 00027 { 00028 fvScalarMatrix pEqn 00029 ( 00030 fvc::div(phi) - fvm::laplacian(rUAf, p) 00031 - (vDotvP - vDotcP)*pSat + fvm::Sp(vDotvP - vDotcP, p) 00032 ); 00033 00034 pEqn.setReference(pRefCell, pRefValue); 00035 00036 if (corr == nCorr-1 && nonOrth == nNonOrthCorr) 00037 { 00038 pEqn.solve(mesh.solver(p.name() + "Final")); 00039 } 00040 else 00041 { 00042 pEqn.solve(mesh.solver(p.name())); 00043 } 00044 00045 if (nonOrth == nNonOrthCorr) 00046 { 00047 phi += pEqn.flux(); 00048 } 00049 } 00050 00051 U += rUA*fvc::reconstruct((phi - phiU)/rUAf); 00052 U.correctBoundaryConditions(); 00053 } |