2 for (label valveI = 0; valveI < nValves(); valveI++)
7 faceSet detachFaces(*this, valves_[valveI].detachFacesName());
9 boolList flipDetach(detachFaces.size(), false);
11 const polyPatch& bottomPatch =
12 boundaryMesh()[valves()[valveI].bottomPatchID().index()];
14 vector bottomPatchCenter = sum(mag(bottomPatch.faceAreas()) *
15 bottomPatch.faceCentres())/sum(mag(bottomPatch.faceAreas()));
17 forAll(detachFaces.toc(), i)
19 vector radius = faceCentres()[detachFaces.toc()[i]] - bottomPatchCenter;
23 if(((faceAreas()[detachFaces.toc()[i]]) & (radius) / mag(faceAreas()[detachFaces.toc()[i]])) < 0)
25 // flipDetach[i] = true;
31 Info << "valve n. " << valveI << " found " << nFlipDetach << " flipped faces for detach" << endl;
37 "detachFaceZoneV" + Foam::name(valveI + 1),
48 Info << "Added attach/detach faces zones for valves" << endl;