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/rasCavitatingFoam/resetPhiPatches.H

16 lines
566 B
C
Raw Normal View History

fvsPatchScalarFieldField& phiPatches = phi.boundaryField();
const fvPatchScalarFieldField& rhoPatches = rho.boundaryField();
const fvPatchVectorFieldField& Upatches = U.boundaryField();
const fvsPatchVectorFieldField& SfPatches = mesh.Sf().boundaryField();
forAll(phiPatches, patchI)
{
if (phi.boundaryField().types()[patchI] == "calculated")
{
calculatedFvsPatchScalarField& phiPatch =
refCast<calculatedFvsPatchScalarField>(phiPatches[patchI]);
phiPatch == ((rhoPatches[patchI]*Upatches[patchI]) & SfPatches[patchI]);
}
}