OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

resetPhiPatches.H

Go to the documentation of this file.
00001 fvsPatchScalarFieldField& phiPatches = phi.boundaryField();
00002 const fvPatchScalarFieldField& rhoPatches = rho.boundaryField();
00003 const fvPatchVectorFieldField& Upatches = U.boundaryField();
00004 const fvsPatchVectorFieldField& SfPatches = mesh.Sf().boundaryField();
00005 
00006 forAll(phiPatches, patchI)
00007 {
00008     if (phi.boundaryField().types()[patchI] == "calculated")
00009     {
00010         calculatedFvsPatchScalarField& phiPatch =
00011             refCast<calculatedFvsPatchScalarField>(phiPatches[patchI]);
00012 
00013         phiPatch == ((rhoPatches[patchI]*Upatches[patchI]) & SfPatches[patchI]);
00014     }
00015 }
Copyright © 2000-2009 OpenCFD Ltd