2 # include "continuityErrs.H"
4 wordList pcorrTypes(pd.boundaryField().types());
6 for (label i=0; i < pd.boundaryField().size(); i++)
8 if (pd.boundaryField()[i].fixesValue())
10 pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
25 dimensionedScalar("pcorr", pd.dimensions(), 0.0),
29 // Flux predictor: evaluate velocity on moving boundary and assemble new
30 // fluxes. Correct the fluxes to achieve zero divergence.
31 // HJ, experimental 21/Mar/2011
32 U.correctBoundaryConditions();
34 phi = fvc::interpolate(U) & mesh.Sf();
36 for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
38 fvScalarMatrix pcorrEqn
40 fvm::laplacian(rAU/rho, pcorr) == fvc::div(phi)
43 pcorrEqn.setReference(pRefCell, pRefValue);
44 pcorrEqn.solve(mesh.solver(pd.name()));
46 if (nonOrth == nNonOrthCorr)
48 phi -= pcorrEqn.flux();
51 // Fluxes are corrected to absolute velocity and further corrected
52 // later. HJ, 6/Feb/2009
55 # include "continuityErrs.H"