MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / patchData

Function patchData

src/lagrangian/basic/particle/particle.C:937–975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

935
936
937void 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
978void Foam::particle::transformProperties(const tensor&)

Callers 7

correctFunction · 0.85
wallDistData.CFile · 0.85
KinematicCloud.CFile · 0.85
structuredDecomp.CFile · 0.85
correctFunction · 0.85

Calls 11

movingTetGeometryFunction · 0.85
stationaryTetGeometryFunction · 0.85
movingMethod · 0.80
deltaTValueMethod · 0.80
timeMethod · 0.80
exitFunction · 0.50
magClass · 0.50
normalMethod · 0.45
bMethod · 0.45
cMethod · 0.45
dMethod · 0.45

Tested by

no test coverage detected