| 935 | |
| 936 | |
| 937 | void Foam::particle::patchData(vector& n, vector& U) const |
| 938 | { |
| 939 | if (!onBoundaryFace()) |
| 940 | { |
| 941 | FatalErrorInFunction |
| 942 | << "Patch data was requested for a particle that isn't on a patch" |
| 943 | << exit(FatalError); |
| 944 | } |
| 945 | |
| 946 | if (mesh_.moving()) |
| 947 | { |
| 948 | Pair<vector> centre, base, vertex1, vertex2; |
| 949 | movingTetGeometry(1, centre, base, vertex1, vertex2); |
| 950 | |
| 951 | n = triPointRef(base[0], vertex1[0], vertex2[0]).normal(); |
| 952 | n /= mag(n); |
| 953 | |
| 954 | // Interpolate the motion of the three face vertices to the current |
| 955 | // coordinates |
| 956 | U = |
| 957 | coordinates_.b()*base[1] |
| 958 | + coordinates_.c()*vertex1[1] |
| 959 | + coordinates_.d()*vertex2[1]; |
| 960 | |
| 961 | // The movingTetGeometry method gives the motion as a displacement |
| 962 | // across the time-step, so we divide by the time-step to get velocity |
| 963 | U /= mesh_.time().deltaTValue(); |
| 964 | } |
| 965 | else |
| 966 | { |
| 967 | vector centre, base, vertex1, vertex2; |
| 968 | stationaryTetGeometry(centre, base, vertex1, vertex2); |
| 969 | |
| 970 | n = triPointRef(base, vertex1, vertex2).normal(); |
| 971 | n /= mag(n); |
| 972 | |
| 973 | U = Zero; |
| 974 | } |
| 975 | } |
| 976 | |
| 977 | |
| 978 | void Foam::particle::transformProperties(const tensor&) |
no test coverage detected