initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / lagrangian / dieselSpray / parcel / boundaryTreatment.H
blob19dea2eec018e97bfafd59191938210412587242
1 if (isType<wallPolyPatch>(pbMesh[patch(face())]))
3     keepParcel = sDB.wall().wallTreatment(*this, face());
5     if (sDB.twoD())
6     {
7         scalar vs = U() & sDB.axisOfSymmetry();
8         vector Us = U() - (vs * sDB.axisOfSymmetry());
9         scalar magUs = mag(Us);
10         scalar v1 = Us & n();
11         scalar magV1 = mag(v1);
12         U() = (magUs/magV1)*v1*n() + vs*sDB.axisOfSymmetry();
13     }
15 else if (isType<wedgePolyPatch>(pbMesh[patch(face())]))
17     // check if parcel is trying to move out of the domain
18     label patchi = patch(face());
19     label patchFacei = patchFace(patchi, face());
20     const polyPatch& patch = mesh.boundaryMesh()[patchi];
21     vector nf = patch.faceAreas()[patchFacei];
23     scalar Un = U() & nf;
24     if (Un > 0)
25     {
26         scalar Un2 = U() & n(); 
27         U() -= 2.0*Un2*n();
28     }
30 else if (isType<symmetryPolyPatch>(pbMesh[patch(face())]))
32     // check if parcel is trying to move out of the domain
33     label patchi = patch(face());
34     label patchFacei = patchFace(patchi, face());
35     const polyPatch& patch = mesh.boundaryMesh()[patchi];
36     vector nf = patch.faceAreas()[patchFacei];
38     scalar Un = U() & nf;
39     if (Un > 0)
40     {
41         if (sDB.twoD())
42         {
43             U() -= 2.0*(U() & n())*n();
44         }
45         else
46         {
47             nf /= mag(nf);
48             U() -= 2.0*(U() & nf)*nf;
49         }
50     }
52 else if (isType<polyPatch>(pbMesh[patch(face())]))
54     // Parcel has hit an inlet or outlet or some such so throw it away
55     keepParcel = false;