250 likes | 462 Views
Forming a Triangulated Grid of a 3D Fracture Network. Dr Michael Robins UWA CWR Sept 04. 3-Phase NAPL Transport Model. Ref: D.Reynolds and B.Kueper 2001. Two dimensions. Fracture Networks. Three dimensions. Ref: Reynolds & Kueper 2003. Cross section of 3D Fracture Network.
E N D
Forming a Triangulated Grid of a 3D Fracture Network Dr Michael Robins UWA CWR Sept 04
3-Phase NAPL Transport Model Ref: D.Reynolds and B.Kueper 2001
Two dimensions Fracture Networks Three dimensions Ref: Reynolds & Kueper 2003
Representation of fractures as discs • position (x,y,z) • radius r • orientation (u,v,w) • aperture a a (u,v,w) z r y x
Delaunay Triangulation • No vertices within circumcircle of triangles • Many algorithms: • Incremental refinement • Sweep line • Divide and conquer • Good for numerical models • Constrained by Planar Straight Line Graphs • Conform to angle or area restrictions
Triangulation of Discs Delaunay Triangulation Conforming Delaunay angle and area limits
Triangulation of intersecting discs Constrained & conforming Delaunay triangulation • Planar Straight Line Graph • Intersections must be included • Steiner points may be added along line segments • Added points must exist in both intersected discs
a b c Triangle data structures • Vertex • position • Triangle • vertices • neighbours • adjacent edges • Edge • colinear neighbours • adjacent triangles • Triangles and Edges • handled or grasped relative to several orientations Ref: J. R. Shewchuk, 2002
The Intersecting disc problem • For a huge collection of seemingly randomly oriented, sized and positioned discs • Form a triangulated network of vertices that lie on the disks and intersections • Solution must suit parallel computation • Novelty lies in the requirement that inserted vertices along the intersection (Steiner points) must be present at corresponding places in both discs
2½ Dimension Triangulation • A disc is a 12 sided polygon not a circle • Triangulation problem is 2 dimensional • Discs are flat therefore intersections are striaght • Various overlaps but all intersect the boundary of one disc or the other • Difficulty lies in identifying shared points of intersecting discs • Work in 2D as much as possible
Robust Arithmetic • Calculations performed using floating point • Limited numerical precision of the computer • The solution must be unambiguous • Problems are inconsistencies of data structures and triangles, eg negative areas etc. • Shewchuk’s robust math routines perform calculations to increasing precision until result is unambiguous
Discus – program to triangulate intersecting discs • Represent each disc as 2D vertices • Shared vertices along intersections • Represented as both 3D locations • And corresponding points calculated in frame of reference of each disc • Shared vertices are tagged with the same id. • By using separate 2D representations, all the triangulation difficulties are already dealt with by Shewchuk’s algorithms
How to calculate the intersections foreach disc: determine a bounding box sort all discs by: Lowest, Closest, Leftmost bounding point Repeat with the first_disc remaining in the sorted list: read discs while: disc.LowestClosestLeft > first_disc.HighestFarthestRight foreach disc read: compare bounding boxes of disc with first_disc * foreach intersecting boxes: check if the discs actually intersect write out first_disc and its intersections until all discs have been examined * Avoid excessinve comparisions by keeping lists of previously considered pairings
Check if and where two specific discs intersect calculate the line of intersection of the discs’ planes: from orientation norms and centre points translate the line into the frame of reference of each disc see if the line intersects and boundary segments of the disc: this yields 4 points (2 or 3 in degenerate cases) determine the overlap and the two shared vertices or no intersection create the Planar Straight Line Graph for each disc
Additional considerations • Three discs intersect at a point • Additional shared vertex needs to be inserted into the PSLG of each disc • Three discs intersect along a line and intersecting intersections may form acute angles • Want to merge some shared vertices and realign structures slightly • Tangential intersections • Can be considered as no connection • Boundary of the domain • Post processing step to cut the triangulation
z z’ θ y’ y x’ x Frame of reference for a disc • Arbitrarily formed by: • Shifting the disc to the origin • Rotating about the line z=0 • Lie the disc flat in the xy plane • Transform is unique for each disc • Disc then formed in xy coordinates • 12 vertices in 2D
Forming a 3D unstructured grid of a fracture network • Transforming the private vertices of the discs into 3D • Restore their connectivity • Connect all the shared vertices (already in 3D) to respective nodes • Note how the shared vertices provide the entire linkage of discs to each other
Triangulation with shared vertices:ongoing work • Delaunay Triangulation requires insertion of Steiner points along intersections. • Any such insertion must be shared. • The Delaunay and Constrained Delaunay algorithms tend to work by successive refinement • Postulate that insertion of shared vertices can be coordinated between separate triangulation processes • The algorithm would seem to suit parallel implementation • natural and reasonably minimal communication patterns
Tools • C language – triangle.c, robust.c and mytriangle.c • Python – a handy scripting language • Generating or manipulating data files • Prototype algorithm development • Mayavi – Python based visualization tool • Vtk – visualization toolkit • Open source, used by Mayavi
Conclusion • Have determined the algorithm and equations • Partially implemented transforms and triangulation • Data structures lead to difficulties debugging • Visualization tools are proving useful
Bibliography • David A. Reynolds and Bernard H. Kueper, Multiphase flow and transport in fractured clay / sand sequences, J. Contaminant Hydrology 51(2001) pp. 41-62, 2001 • David A. Reynolds and Bernard H. Kueper, Effective constitutive properties for dense nonaqueous phase liquid (DNAPL) migration in large fracture networks: A computational study, Water Resources Research, 39(9), 2003 • Jonathan Richard Shewchuk, Delaunay Refinement Algorithms for Triangular Mesh Generation, Computational Geometry: Theory and Applications 22(1-3):21-74, May 2002. • Marshall Bern and David Eppstein, Mesh Generation and Optimal Triangulation, pp. 23-90 of Computing in Euclidean Geometry, Ding-Zhu Du and Frank Hwang (editors), World Scientific, Singapore, 1992. • Jim Ruppert, A Delaunay Refinement Algorithm for Quality 2-Dimensional Mesh Generation, Journal of Algorithms 18(3):548-585, May 1995. • L. Paul Chew, Guaranteed-Quality Mesh Generation for Curved Surfaces, Proceedings of the Ninth Annual Symposium on Computational Geometry (San Diego, California), pages 274-280, Association for Computing Machinery, May 1993. • Marshall Bern, David Eppstein, and John R. Gilbert, Provably Good Mesh Generation, Journal of Computer and System Sciences 48(3):384-409, June 1994. • Jonathan Richard Shewchuk, Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates, Discrete & Computational Geometry 18:305-363, 1997.