FreeFOAM The Cross-Platform CFD Toolkit
resetPhiPatches.H
Go to the documentation of this file.
1 fvsPatchScalarFieldField& phiPatches = phi.boundaryField();
2 const fvPatchScalarFieldField& rhoPatches = rho.boundaryField();
3 const fvPatchVectorFieldField& Upatches = U.boundaryField();
4 const fvsPatchVectorFieldField& SfPatches = mesh.Sf().boundaryField();
5 
6 forAll(phiPatches, patchI)
7 {
8  if (phi.boundaryField().types()[patchI] == "calculated")
9  {
10  calculatedFvsPatchScalarField& phiPatch =
11  refCast<calculatedFvsPatchScalarField>(phiPatches[patchI]);
12 
13  phiPatch == ((rhoPatches[patchI]*Upatches[patchI]) & SfPatches[patchI]);
14  }
15 }