A METHOD FOR MODELING AN ARBITRARY WELL PATH IN A HYDROCARBON RESERVOIR USING ADAPTIVE MESHING

Abstract: Methods and systems for adapting an unstructured mesh to a modeled space. In one embodiment, a surface is defined in the modeled space, intersections of the surface with the elements of the mesh are determined, and new elements within the intersected elements are defined such that one or more of the faces of the new elements are substantially coincident with the surface. For each element which is intersected by the surface, a plurality of points at which the edges of the element are intersected is determined. For each point of intersection, a new node is located at that point and two new elements which incorporate the new node are created. This process is performed for each of the points of intersection so that the intersected element is subdivided into an new elements which include faces that lie substantially on the moduled surface.

Description: A METHOD FOR MODELING AN ARBITRARY WELL PATH IN A HYDROCARBON RESERVOIR USING ADAPTIVE MESHING TECHNICAL FIELD OF THE INVENTION [1] This invention relates generally to methods and systems for modeling physical systems using finite element analysis and, more specifically, to methods and systems for adapting a finite element mesh to an arbitrary surface such as an arbitrary well path trajectory in a hydrocarbon reservoir. BACKGROUND OF THE INVENTION [2] Physical systems can be modeled mathematically to simulate their behavior under certain conditions. There are a wide variety of means to model these systems, ranging from the very simplistic to the extremely complicated. One of the more complicated means to model physical systems is through the use of finite element analysis. As the name implies, finite element analysis involves the representation of individual, finite elements of the physical system in a mathematical model and the solution of this model in the presence of a predetermined set of boundary conditions. [3] In finite element modeling, the region that is to be analyzed is broken up into sub-regions called elements. This process of dividing the region into sub-regions may be referred to as discretization or mesh generation. The region is represented by functions that are defined over each element. This generates a number of local functions that are much simpler than those which would be required to represent the entire region. The next step in the process is to analyze the response for each element. This is accomplished by building a matrix that defines the properties of the various elements within the region and a vector that defines the forces acting on each element in the structure. Once all the element matrices and vectors have been created, they are combined into a matrix equation. This equation relates nodal responses for the entire structure to nodal forces. After applying boundary conditions, the matrix equation can be solved to obtain unknown nodal responses. Intra-element responses can be interpolated from nodal values using the functions which were defined over each element . [4] As indicated above, finite element modeling involves the creation of a mesh of finite elements. The elements are defined by nodes within the problem space . The nodes are simply points in space. The lines between the nodes are referred to as "edges." The mesh is typically a structured mesh. In other words, the mesh is defined in three dimensions so that the elements within the problem space are hexahedrons. For example, they may be cubes or rectangular prisms. (Equivalently, in two dimensional problems, the elements would be rectangles - see FIGURE 1 for an illustration of these elements.) The edges of the hexahedrons are coincident with the edges between the nodes of the mesh. In a simple model, the nodes of the mesh may be regularly spaced to define cubic elements. It is not necessary, however, for the nodes to be evenly spaced in all finite element models. A variety of different sizes and shapes of hexahedral elements can be defined within a single mesh. [5] One of the problems with meshes which use hexahedral elements is that they do not lend themselves well to complex geometries which may need to be modeled. In other words, it may be difficult to place nodes sufficiently close to irregular surfaces to accurately determine the solution to the problem along those surfaces . Viewed another way, it is difficult to fill an irregularly shaped object with regularly shaped boxes. This situation is further complicated by limitations on the minimum distance between nodes in a structured mesh. Even when additional nodes elements can be defined in the mesh to improve the accuracy of the model, the inclusion of these additional elements causes the resources needed to solve the resulting model to increase. If increased accuracy is desired, an increased number of elements, as well as greater computing power, is required. [6] One way to reduce the cost associated with increasing the accuracy of a finite element model is to use an unstructured mesh. In an unstructured mesh, the elements which comprise the mesh are not constrained to fit within a predetermined structural scheme. For example, the elements are not required to be selected from a finite set of predefined element shapes (e.g., hexahedra) or sizes (e.g., fractions of an initial size.) More particularly, it may be convenient to employ a mesh that comprises simplex elements which have no predefined constraints. Because the faces of the simplex elements need not be parallel to predetermined planes (e.g., the X-Y, Y-Z or X-Z planes,) they can be oriented to follow the contours of a surface that is being modeled and may therefore achieve accuracy that is on par with a structured mesh. As a result, an unstructured mesh that conforms to the geometry is simpler to create. [7] Although unstructured meshes may be capable of more accurately modeling irregular surfaces than structured meshes, it may nevertheless be difficult to construct an unstructured mesh in such a way that the irregular surfaces are properly modeled. If the surfaces are not essentially coincident with the faces of the elements in the mesh (or more particularly some of the element faces,) then this advantage is minimized or lost. It would therefore be useful to develop a method for defining the elements of the unstructured mesh so that the surface is accurately defined by one or more faces of the elements of the mesh. SUMMARY OF THE INVENTION [8] One or more of the problems outlined above may be solved by the various embodiments of the invention. Broadly speaking, the invention comprises a method for adapting an unstructured finite element mesh to accurately model a surface in the region to be modeled. This method may provide a number of advantages over prior art methods, including increasing the accuracy of the model, simplifying the model, eliminating the need to use special functions to approximate the behavior of features such as well bores, and reducing the computing resources needed to solve the model . [9] In one embodiment, the method comprises constructing an unstructured mesh corresponding to the modeled space, defining a surface in the modeled space, determining the intersections of the surface with the elements of the mesh, and defining new elements within the intersected elements such that one or more of the faces of the new elements are substantially coincident with the surface (that is, they lie approximately on the surface.) More specifically, for each element which is intersected by the surface, a plurality of points at which the edges of the element are intersected is determined. (If the element is only intersected at a single point, it need not be subdivided into two or more new elements.) For each point of intersection, a new node is located at that point and two new elements which incorporate the new node is created. This process is performed for each of the points of intersection so that the intersected element is subdivided into an appropriate number of new elements, some of which include faces that lie substantially on the modeled surface. [10] Various alternative embodiments are also possible. These may include software or firmware applications which embody methods such as are described above, as well as computer-readable media containing such applications and computers or other data processing systems which are configured to perform the described methods. BRIEF DESCRIPTION OF THE DRAWINGS [11] Other objects and advantages of the invention may become apparent upon reading the following detailed description and upon reference to the accompanying drawings in which: [12] FIGURE 1 is an illustration of the rectangular and hexahedral elements which comprise structured finite element meshes in the prior art; [13] FIGURE 2 is a flow diagram illustrating the basic steps of one embodiment of the present method; [14] FIGURES 3A-3B are illustrations of a curve in two- dimensional space and an initial unstructured mesh that could be used as the basis for modeling the curve; [15] FIGURES 4A-4C are a set of diagrams illustrating the manner in which an element of the unstructured mesh of FIGURE 3B is subdivided into sub-elements which can more accurately model the curve which intersects the original element; [16] FIGURE 5 is an illustration of a refined mesh which is adapted to model the curve shown in FIGURES 3A and 3B; [17] FIGURE 6 is a diagram illustrating a three-dimensional simplex in comparison with a two-dimensional simplex; [18] FIGURE 7A-7D are a set of diagrams illustrating the possible types of intersections between an approximately planar surface and a three-dimensional simplex; [19] FIGURES 8A-8C are a set of diagrams illustrating the manner in which an the three-dimensional simplex of FIGURE 7B is subdivided into sub-elements based upon its intersection by an approximately planar surface at one node and two edges; [20] FIGURES 9A-9D are a set of diagrams illustrating the manner in which an the three-dimensional simplex of FIGURE 7C is subdivided into sub-elements based upon its intersection by an approximately planar surface at three edges; [21] FIGURES 10A-10C are a set of diagrams illustrating the manner in which the three-dimensional simplex of FIGURE 7C is subdivided into two sub-elements based upon its intersection by an approximately planar surface at four edges; [22] FIGURES 11A-11C are a set of diagrams illustrating the manner in which the first of the sub-elements of FIGURE IOC is further subdivided into sub-elements; [23] FIGURES 12A-12C are a set of diagrams illustrating the manner in which the second of the sub-elements of FIGURE IOC is further subdivided into sub-elements; and [24] FIGURE 13 is a diagram illustrating a well bore trajectory and the well bore surface defined by the trajectory. [25] While the invention is subject to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and the accompanying detailed description. It should be understood, however, that the drawings and detailed description are not intended to limit the invention to the particular embodiment which is described. This disclosure is instead intended to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims . DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT [26] A preferred embodiment of the invention is described below. It should be noted that this and any other embodiments described below are exemplary and are intended to be illustrative of the invention rather than limiting. [27] The present method and system are directed generally to constructing and solving finite element models. More particularly, they are directed to the construction of finite element meshes and the refinement of these meshes so that the faces of some of the elements are coincident with identified surfaces in the modeled space. [28] Broadly speaking, the present method comprises constructing an initial unstructured mesh of simplex elements, identifying intersections between the elements of the mesh and a surface to be modeled, then redefining the intersected elements to include faces coincident with the surface. More particularly, new nodes are located at the points of intersection and are used as the basis for subdividing the initial elements into new elements. The number of new elements which are created from a particular element depends upon the manner in which the surface intersects that element . The new elements are created in such a way that they are simplices in the modeled space. The present method is employed in the generation of multi-dimensional finite element models. It should be noted that, while the examples described below include only two- and three-dimensional meshes, the method is generally applicable in n dimensions. [29] It may be helpful before describing the present method in detail to define a few terms relating to finite element meshes . [30] A node is a point in space. In finite element modeling, nodes form the vertices of the elements which are modeled. The nodes also form part of a mesh of nodes and edges which define the boundaries between elements in the modeled space. [31] An edge is a line between two nodes which form vertices of an element . The edges form part of the mesh which defines the boundaries between elements in the modeled space . [32] A simplex is a spatial configuration of n dimensions determined by n + 1 points in a space of dimension equal to or greater than n. In other words, a simplex is a geometric spatial element having the minimum number of boundary points necessary to enclose a space in a given number of dimensions. For example, in two dimensions, a simplex comprises a triangle, together with the interior area bounded by the triangle (see FIGURE 6.) Two points are insufficient to form a simplex in two-dimensional space because no area is bounded by the points (and the lines which interconnect them.) While four points may be sufficient to bound a two-dimensional area, they do not comprise the minimum number of boundary points by which the two-dimensional area can be bounded. In three dimensions, a simplex comprises a tetrahedron, together with the interior volume bounded by the tetrahedron. It is defined by four vertices (see FIGURE 6.) In four dimensions, a simplex is a hypertetrahedron (sometimes referred to as a hypertet) , along with the four- dimensional volume inside the hypertetrahedron, and has five vertices. [33] A face is an n-1-dimensional surface of an n-dimensional element. For example, in a two-dimensional element, each of the lines which bounds the area of the element is a face of that element. In a three-dimensional element, each of the triangles which bounds the volume of the element is a face of that element. Preferably, the faces of the elements in a finite element model are located so that they are coincident with surfaces or boundaries within the modeled space. [34] A mesh is a collection of elements that fill a modeled space. These elements are representative of a system which resides in that space. Because each element can be defined by a plurality of nodes and/or the edges between those nodes, a mesh may alternatively be considered a collection of nodes and/or the edges between them. At various points in this disclosure, "mesh" will be used to alternately refer to collections of elements or nodes/edges, depending upon the context in which the term is used. The mesh may also be referred to herein as a finite element model or simply a model . [35] Referring to FIGURE 2, a flow diagram illustrating the basic steps of one embodiment of the present method is shown. Generally speaking, the method comprises constructing an unstructured mesh corresponding to a space which is being modeled, then identifying a surface in the modeled space and determining the intersections of the surface with the elements of the mesh, and finally defining new elements within the intersected elements so that one or more of the faces of the new elements are substantially coincident with the surface. ("Substantially coincident" is used herein to refer to element edges or faces for which the corresponding nodes lie on a curve or surface.) These faces approximate the modeled surface. [36] Each element in the mesh has a corresponding set of nodes which comprise the vertices of the element. Likewise, each element has a corresponding set of edges which connect the vertices. In the present method, the intersection of a surface with an element is characterized by the points at which the surface intersects with the nodes and/or edges of the element. Consequently, identifying the intersection of a surface with the element comprises determining the points at which the surface intersects the nodes and/or edges. These points of intersection are then used as nodes for two or more newly defined elements. The new elements effectively include the intersecting portion of the surface as one of the faces of the new elements. [37] A two-dimensional example is illustrated in FIGURES 3-4. FIGURE 3A shows a curve 11 which represents a surface in two-dimensional space. FIGURE 3B shows a two-dimensional mesh which is constructed to model the space containing curve 11. The mesh comprises a series of triangular elements which are simplices in two-dimensional space. One of the elements, identified by reference number 12, is highlighted -- this element will be referred to in the following description of the manner in which the elements are subdivided. Although the elements in this initial mesh are regular, it should be noted that the mesh is unstructured, and the elements may have any suitable size or shape (keeping in mind that they must be simplices.) Curve 11 is also shown in this figure. [38] It can be seen that the elements of the initial mesh do not follow the curve. In other words, the curve does not lie substantially along the edges of the elements. Instead, the curve intersects a number of the elements, traversing some path across the space bounded by these elements. Because it is desired to construct a mesh in which the faces of the elements coincide with the curve, it is necessary to modify or refine the mesh. In the present method, this is accomplished by effectively adding edges that lie on the curve (subdividing the existing elements into new elements which include the added edges . ) [39] Referring to FIGURES 4A-4C, element 12 is shown apart from the mesh. A portion of curve 11 which intersects element 12 is also shown in this figure. Element 12 is defined by the three points (21, 22, 23) which form its vertices . The area within element 12 is bounded by the edges (31, 32, 33) which connect the vertices. As indicated above, it is necessary to identify the intersections between curve 11 and edges 31, 32 and 33. It is a relatively straightforward matter to calculate the intersections between the curves and the edges based upon the mathematical representation of each. It can be seen from FIGURE 4A that curve 11 intersects edge 31 at point 24. Likewise, curve 11 intersects edge 32 at point 25. [40] An edge connecting points 24 and 25 would be substantially coincident with curve 11 in the space covered by element 12. That is, an edge connecting points 24 and 25 would closely approximate the portion of curve 11 which traverses element 12. Creation of an edge between points 24 and 25, however, would not, by itself, be a sufficient refinement of the mesh because this would divide element 12 into a triangular area and a second area bounded by an irregular quadrilateral, which is not a simplex in two-dimensional space. The space covered by the quadrilateral must therefore be subdivided into simplices (triangular elements.) [41] Referring to FIGURES 4B and 4C, the manner in which element 12 is subdivided into a plurality of new simplex elements is illustrated. Once the locations of points 24 and 25 are identified, element 12 is subdivided as follows: first, a node is placed at point 24 and an edge is created between this node and the opposite vertex of element 12 (point 23.) ("Opposite," as used here, refers to the vertex which is opposite the edge (31) on which the new node is located.) This creates new elements 13 and 14. Element 13 is defined by vertices at points 21, 23 and 24, while element 14 is defined by vertices at points 22, 23 and 24. Then, a node is placed at point 25 and an edge is created between this node and the node at point 24 (the opposite vertex of element 14.) This edge forms a segment of the modeled curve. As shown in FIGURE 4C, the addition of this edge results in the creation of new elements 15 and 16. Element 15 is defined by vertices at points 23, 24 and 25, while element 16 is defined by vertices at points 22, 24 and 25. [42] Now, instead of having a single simplex element 12 which is intersected by curve 11 (and does not have a face which is coincident with the curve,) there are three new elements (13, 15 and 16,) each of which is still a simplex in two-dimensional space, and two of which share a face that lies on curve 11. This same process can be repeated with each of the original mesh elements so that an edge is created wherever curve 11 traverses one of the elements . The result is an unstructured mesh of simplex elements which have edges that closely approximate the path of curve 11 and consequently enable the accurate modeling of the surface represented by the curve. [43] Referring to FIGURE 5, the refined mesh generated by applying the foregoing method to each of the intersected elements of FIGURE 3B is shown. The edges of the new simplices which are substantially coincident with curve 11 are shown in heavy lines so they can be easily seen. It is apparent from the figure that the new edges provide a close approximation of the original curve. The curve may be matched even more closely if the mesh is refined to use smaller elements before the present method is applied, since smaller edges do a better job of approximating curved surfaces. [44] While each of the elements of the mesh illustrated in FIGURE 3B were intersected by curve 11 from one edge to another, it should be noted that the elements could also have been intersected at a node and an edge. That is, for a particular element, curve 11 could have traversed the element between one of its nodes and the opposite edge. In this case, it would only be necessary to make a single subdivision of the element by creating a new node where the curve intersects the edge, and then defining each of the new elements to include the intersected node, the new node, and one of the remaining nodes. For example, in the example of FIGURES 4A and 4B, if the curve had traversed the element from point 24 to point 23, a new edge between these points (and resulting elements 13 and 14) would have been sufficient. [45] There are actually two other cases which may be encountered. In one case, the surface may intersect only a single node of the simplex element . Because this node lies on the surface, there is no need to refine the element further. The surface may also intersect the element at two nodes. In this instance, the edge of the element already lies on the surface to be modeled, so no refinement of the element is necessary. (It should be noted that the identification of the type of intersection between the element and the surface may be regarded as a separate step of the method.) [46] The foregoing example is a very simple illustration of one embodiment of the present method in the context of a two-dimensional mesh. The more complex case of a three- dimensional mesh is illustrated below. [47] Meshes of three and four dimensions are of particular interest in modeling physical systems over time. Because of the difficulty of illustrating four-dimensional systems, only the three-dimensional case will be described in detail below. The description of the three- dimensional case illustrates the manner in which the method can be extended to additional dimensions. [48] Referring to FIGURE 6, a three-dimensional simplex 41 is shown in comparison to a two-dimensional simplex 40. three-dimensional simplex 41 is defined by four vertices 42-45 and is bounded by the edges and faces between them. The application of the present method is, of course, somewhat more complicated in the three-dimensional case than in the two-dimensional case. One added complexity arises from the need to calculate the intersection of a three-dimensional surface with a three-dimensional edge. While this requires additional computing power with respect to the two-dimensional case, it is still relatively straightforward. Another complexity is that the intersection of a surface and a simplex may involve four different cases which could necessitate the subdividing of the simplex: intersecting one node and two edges; intersecting two nodes and one edge; intersecting three edges; or intersecting four edges. Each of these cases is handled differently. (Remember that a curve in two dimensions could also intersect a simplex at one, two or three nodes, although no subdivision of the simplex would be required in these instances . ) [49] Although more complex, the method applied to three- dimensional meshes is generally the same as in the two- dimensional case - an initial mesh is constructed, a surface is identified, the intersections between the surface and the edges of the elements are identified, and the elements are subdivided using the intersections as nodes in the new elements. The three-dimensional method differs in that the step of subdividing the element is handled a bit differently for each of the four different types of intersections. (It should be noted that the present methods can be extended to four or more dimensions, but such cases will not be described here because of the difficulty of illustrating them clearly.) [50] The four different types of intersections in three dimensions are illustrated in FIGURES 7A-7D. Each figure depicts the three-dimensional simplex element of FIGURE 6 intersected by a surface having a different orientation. The shaded portion of the figure represents the portion of the surface that intersects the element. FIGURE 7A shows the intersection of the element at two nodes (44 and 45) and one edge (51.) FIGURE 7B shows the intersection of the element at one node (43) and two edges (52 and 53.) FIGURE 7C shows the intersection of the element at three edges (54 - 56.) Finally, FIGURE 7D shows the intersection of the element at four edges (57- 60.) [51] (It should be noted that the surface may also intersect the three-dimensional element at one, two or three nodes. In the first two of these cases, the surface does not traverse the element and no subdivision of the element is necessary. In the third case, the face of the element already lies on the surface and no further action needs to be taken.) [52] Referring to the intersection depicted in FIGURE 7A, where the surface intersects the element at two nodes and one edge, the element is subdivided by creating a face between the two nodes (44 and 45) and the point of intersection on the edge (51) . This results in the creation of two tetrahedra with the vertices {43, 44, 45, 51} and {42, 44, 45, 51} . Newly created face {44, 45, 51} is a facet of the surface which is being modeled. [53] Referring to the intersection depicted in FIGURE 7B, the surface intersects the element at one node and two edges. This figure is repeated as FIGURE 8A for the convenience of the reader. The points of intersection with the edges of element 41 are indicated by reference numerals 71 and 72. The first step in subdividing the element is to select one of the points of intersection and to locate a node at that point. In this example, point 71 is selected. As shown in FIGURE 8C, two new simplex elements, indicated by reference numbers 75 and 76, can be created using this new node. The first new element, 75, has vertices at {42, 43, 45, 71} and the second, 76, has vertices at {43, 44, 45, 71} . The next step is to place a node at the remaining point of intersection (72) . This node is used as the basis for subdividing element 75 into new elements 77 and 78 (see FIGURE 8C.) Element 77 has vertices at {42, 43, 71, 72} and element 78 has vertices at {43, 45, 71, 72}. Thus, the subdivision of element 41 in this case results in the creation of new elements 76, 77 and 78. The face which separates elements 77 and 78 forms a facet which is substantially coincident with the modeled surface. [54] Referring to the intersection depicted in FIGURE 7C, the surface intersects three edges of element 41. This figure is repeated as FIGURE 9A for the convenience of the reader. The points of intersection between the surface and element 41 are indicated by reference numerals 81, 82 and 83. The process of subdividing element 41 in this case is very similar to the previous case -- nodes are sequentially located at the points of intersection and new elements are created based on the addition of each node. For example, as shown in FIGURE 9B, a first node is located at point 81, creating elements 84 and 85. Element 84 has vertices at {43, 44, 45, 81} and element 85 has vertices at {42, 44, 45, 81} . Then, a node is placed at the next point of intersection (82) . This node is used to subdivide element 85, creating new elements 86 and 87. Element 86 has vertices at {44, 45, 81, 82} and element 87 has vertices at {42, 44, 81, 82}. Finally, a node is placed at the last point of intersection (83) . Using this node, element 87 is subdivided into new elements 88 and 89. Element 88 has vertices at {44, 81, 82, 83} and element 89 has vertices at {42, 81, 82, 83}. Thus, in this case, element 41 is subdivided into four new elements -- 84, 86, 88 and 89. The face which separates elements 88 and 89 forms a facet of the intersecting surface and is substantially coincident with the surface. [55] Referring to the intersection depicted in FIGURE 7D, the surface intersects four edges of element 41. This figure is repeated as FIGURE 10A for the convenience of the reader. The points of intersection between the surface and element 41 are indicated by reference numerals 91, 92 93 and 94. The subdivision of element 41 is illustrated in FIGURES 10A-10C, 11A-11C and 12A-12C. It should be noted that the first step in subdividing element 41 creates two new elements, 95 and 96, each of which is intersected by the surface at one node and two edges . This is illustrated in FIGURES lOB-lOC. Each of these new elements can then be subdivided in the manner illustrated in FIGURES 7B-7C. The subdivision of elements 95 and 96 is shown in FIGURES 11A-11C and 12A- 12C. [56] Referring to FIGURES 11A-11C, the subdivision of element 95 is illustrated. First, a node is placed at point 92, and two new elements incorporating this node are created. These are elements 97 and 98. The vertices of element 97 are at {42, 43, 91, 92} and the vertices of element 98 are at {42, 45, 91, 92}. Then, a node is placed at point 93. Based on this new node, element 98 is broken down into two new elements, 99 and 100. Element 99 has vertices at {42, 91, 92, 93} and element 100 has vertices at {45, 91, 92, 93}. The face of elements 99 and 100 which is formed between points 91, 92 and 93 forms a facet of the modeled surface. [57] Referring to FIGURES 12A-12C, the subdivision of element 96 is illustrated. The first step is to place a node at point 93. Based on this node, two new elements are created. These elements are indicated by the reference numerals 101 and 102. The vertices of element 101 are at {42, 44, 91, 93} and the vertices of element 102 are at {44, 45, 91, 93}. Next, a node is placed at point 94. Using this new node, element 101 is broken down into two new elements, 103 and 104. Element 103 has vertices at {42, 91, 93, 94} and element 104 has vertices at {44, 91, 93, 94}. The common face of elements 103 and 104 which lies between points 91, 92 and 93 forms another facet of the modeled surface. [58] One application of the adaptive meshing methods described above involves the modeling of a well bore that follows an arbitrary path through a reservoir. In prior art systems, well bores were typically assumed to be aligned with the structured mesh which was used to model the reservoir. Then,- functions approximating the behavior of the reservoir in the vicinity of the well bore were used for the elements containing the well bore when the model was solved. Generally speaking, these functions do not model the well bore as accurately as if the well bore surface were represented by the faces of the mesh elements, and were not at all well suited to modeling well bores having arbitrary paths. [59] Using the present method, a well bore in a reservoir can be accurately modeled by refining the elements of the finite element mesh to define element faces which are substantially coincident with the well bore surface. This is true even if the well bore follows an arbitrary path through the reservoir. The well bore surface is simply defined mathematically, and then the mesh is refined as described above . [60] In one embodiment, the well bore is defined by a trajectory and a radius. The trajectory is the path which is followed by the well bore and consists of a set of points that are ordered by their respective measured depths within the well bore. The radius is the actual radius of the well bore. The well bore can therefore be characterized mathematically by a function F(x,y,z)- r(z)=0, where F(x,y, z) is the distance from a point in the reservoir to the trajectory of the well bore and r is the radius of the well bore. For each of the edges in the finite element mesh (or a portion of the edges that are within the vicinity of the well bore) intersections with the defined well bore surface are identified. The points at which the edges are intersected by the well bore surface are marked for refinement. The elements containing the marked edges are then refined as described above. It should be noted that the elements for which four edges are intersected are refined first . In order to maintain surface preservation, no adjacent elements having four intersected edges are refined in a single pass. If such adjacent elements are identified, one is identified for deferral to a subsequent refinement pass. It may therefore take several passes to complete the refinement of these elements. Once the elements having four intersected edges are refined, the remainder of the intersected elements can be refined in a single pass. [61] Because the path of the well bore through the reservoir is arbitrary, it is necessary to define a coordinate system which is convenient for both defining the well bore and identifying the intersection of the well bore with the elements of the mesh. In one embodiment, a coordinate system which tracks the path of the well bore is used. This coordinate system identifies points around the well bore using the measured depth in the well, an angular distance from a normal vector and a radial distance from the center of the well bore. [62] The well path is assumed to comprise a series of segments, each of which is essentially straight. Adjacent segments are joined at joints to form a continuous well path. Because adjacent segments are not coaxial , the coordinate system must account for the fact that some points near the joints may not be well defined. (That is, the coordinate system defined with respect to adjacent segments may overlap on one side of the joint and may not cover all points on the opposite side of the joint.) Consequently, a region corresponding to each segment is defined so that the region extends to a bisecting plane between that segment and an adjacent segment. This eliminates overlapped or undefined areas. (It should be noted that, for a segment at the end of the well bore, the end of the segment region near to an adjacent segment is bounded by the bisecting plane between the segments, but the other end of the segment region is bounded by a plane normal to the trajectory of the segment . ) [63] As indicated above, the coordinate system for each segment includes a measured depth, an angular distance from a normal vector and a radial distance from the path of the well bore. The measured depth of points on the trajectory itself are well-defined. The measured depth of points which are on the inside or outside of curves in the trajectory, however, are not so well-defined. Consequently, the following method for determining the measured depth of these points is imposed on the system. [64] Referring to FIGURE 13, a diagram illustrating a well bore trajectory 110 and the well bore surface 111 defined by the trajectory is shown. A segment trajectory 114 has a beginning depth D b and an ending depth D e . For a given point P in the well bore, the point is first projected onto the bisecting (or terminating) planes 116, 117 at the ends of the segment. The projection at the beginning of the segment can be indicated by Pj, and the projection at the end of the segment can be indicated by P e . The distance between these two projections of the point is then mapped onto the distance between the beginning and ending depths of the trajectory. In other words, the measured depth at point P (D p ) can be calculated as D p = D b + (P-Pb) x (D e -D b ) / (P e -P b ) ■ Thus, effectively, the depth along the well bore trajectory is "stretched" along the outside of curves in the trajectory and "compressed" along the inside of curves in the trajectory. [65] It should also be noted that the normal vector for a segment may become ill-defined if it is not translated from one segment to another. For example, the trajectory of the well bore may curve so that the trajectory is parallel to the original normal vector. Consequently, the normal vector for each segment of the trajectory is defined as follows. First, at the beginning of the well bore, a normal vector 120 is defined. This vector extends in an arbitrary direction from the well bore trajectory. The normal vector is then projected onto the bisecting plane 117 at the end of the initial segment of the well bore. The projected vector 121 is then carried through to the next segment of the trajectory and made normal to the trajectory in that segment. This process is repeated from segment to segment throughout the well bore . The angular coordinate A of a point in any of the segments can then be measured from the normal vector in the respective segment. [66] The radial distance from the well bore path is calculated in a straightforward manner -- it is simply the closest distance from the trajectory of the segment. [67] In one embodiment, each node near the well bore is converted to the well bore coordinate system, and the converted coordinates are stored with the node. Thus, the coordinate transformation is performed only once, and the coordinates of each node are available in the original and transformed coordinate systems . [68] In the foregoing manner, a well bore having an arbitrary path defined by the trajectory F(x,y,z) and radius r can be characterized in a convenient mathematical form. The nodes of the finite element mesh in the vicinity of the well bore can also be characterized using this same local coordinate system. This facilitates identification of the intersections between the well bore surface and the elements of the mesh. Once the points of intersection between the elements' edges and the well bore surface are identified, the elements are refined as described above. In this manner, an arbitrary-path well bore can be accurately modeled in an unstructured finite element mesh. [69] Another application of the adaptive meshing methods described above involves the refinement of a finite element mesh to increase the accuracy of a solution for the mesh. In this application, the mesh may not be intersected by a particular plane which defines the points at which the finite element mesh needs to be refined. Instead, a general area in which refinement is required may be identified, and elements within this area may be appropriately subdivided. [70] One embodiment of this application comprises a method wherein a finite element mesh made up of simplex elements is constructed, and a solution is calculated for the mesh. Portions of the mesh for which the solution has large gradients (i.e., those for which the solution changes rapidly) are then identified. Simplices in the high-gradient portions of the mesh are marked for refinement. This marking may comprise the identification of simplex edges, defining new nodes on these edges (typically around the midpoint of each edge,) and subdividing the corresponding simplex elements as though the elements were intersected at the point of the new node and the opposite edge. After the elements are subdivided (i.e. the mesh is refined,) a new solution is calculated for the finite element mesh. This process may be repeated as necessary to obtain the desired level of accuracy (number of data points) in the high-gradient areas. The addition of simplices only in the high- gradient areas increases the accuracy of the solution without unreasonably increasing the computational requirements of the mesh (as would be the case if the entire mesh were made more fine.) [71] It should be noted that, just as the simplex elements of the mesh can be refined to include additional nodes in high-gradient areas, the mesh can be modified to remove unnecessary nodes in low-gradient areas. The simplex elements which are associated with the removed nodes are collapsed into a smaller number of elements. This reduces the processing power required to generate a solution for the mesh. The computational requirements of the application can also be reduced by implementing table-driven algorithms to collapse the simplices into a smaller number of elements. (The use of table-driven algorithms also reduces the computational complexity in the case of refining a simplex into a plurality of elements.) The refinement or coarsening of simplices may be limited to preselected regions of the mesh, if it can be determined that certain areas need not be modified (e.g., they are not of particular interest.) [72] In an application which is configured to collapse simplices within the mesh, it may be desirable to employ a mechanism to prevent certain nodes from being eliminated. For example, certain nodes may correspond to the features of the topology of the modeled system (e.g., known geological surface features within an oil reservoir.) In order to maintain the topology of the modeled system, the corresponding nodes may be designated as invariant, so that they will not be removed or "optimized away." [73] While the present invention has been described with reference to particular embodiments, it should be understood that the embodiments are illustrative and that the scope of the invention is not limited to these embodiments. Many variations, modifications, additions and improvements to the embodiments described above are possible. Particularly, these variations may include computer readable media (such as floppy disks, CD-ROMs, DVD-ROMs, etc.,) storage devices, computer memories and the like which contain software, firmware or other programming embodying the foregoing methods. It is contemplated that these variations, modifications, additions and improvements fall within the scope of the invention as detailed within the following claims.

Claims: WHAT IS CLAIMED IS: 1. A method for modifying the structure of an n-dimensional finite element mesh comprising: constructing a mesh having a plurality of n-dimensional simplices; identifying a subset of the plurality of n-dimensional simplices; and modifying the identified subset of the plurality of n- dimensional simplices to adapt the mesh to a modeled system. 2. The method of claim 1 wherein modifying the identified subset of the plurality of n-dimensional simplices comprises subdividing each of the simplices in the identified subset into a plurality of new simplices. 3. The method of claim 1 wherein modifying the identified subset of the plurality of n-dimensional simplices comprises collapsing each of the simplices in the identified subset . 4. The method of claim 3 wherein each of the simplices has a plurality of nodes and a plurality of edges connecting the nodes, wherein at least one of the nodes is invariant and wherein collapsing each of the simplices in the identified subset comprises removing one or more of the nodes, preventing removal of the invariant nodes, and forming simplices based upon the remaining nodes . 5. The method of claim 1 wherein the modeled system comprises a surface of dimension n-1 and wherein the subset of the plurality of n-dimensional simplices is identified by the intersection of the n-1-dimensional surface with the identified subset of the plurality of n-dimensional simplices. 6. The method of claim 5 wherein the n-1-dimensional surface corresponds to a well bore, and wherein the n-1-dimensional surface is defined by a depth along a well bore trajectory and radius from the well bore trajectory. 7. The method of claim 1 wherein the subset of the plurality of n-dimensional simplices is identified by solving the unmodified mesh, identifying a region having a high gradient, and identifying a plurality of n-dimensional simplices in the region having the high gradient . 8. The method of claim 7 wherein the subset of the plurality of n-dimensional simplices is selected from a predetermined region within the mesh. 9. The method of claim 7 wherein the steps of solving the mesh, identifying the region having a high gradient, and identifying the plurality of n-dimensional simplices in the region having the high gradient are repeated one or more times . 10. The method of claim 1 wherein n=3. 11. The method of claim 10 wherein each of the n-dimensional simplices in the identified subset of the plurality of n- dimensional simplices is intersected by a 2-dimensional surface. 12. The method of claim 11 wherein the two-dimensional surface intersects at least one edge of each of the n- dimensional simplices in the identified subset of the plurality of n-dimensional simplices. 13. The method of claim 1 wherein n=4. 14. The method of claim 13 wherein the four dimensions of the mesh correspond to three spatial dimensions and one temporal dimension. 15. The method of claim 1 wherein each of the simplices has a plurality of nodes and a plurality of edges connecting the nodes and wherein the method further comprises providing a definition of a surface within a region modeled by the mesh, identifying intersections between the edges of the simplices and the surface, defining a new node at each of the identified intersections, and defining at least two new simplices incorporating the new nodes. 16. A method for modifying the structure of an n-dimensional finite element mesh comprising: constructing a mesh having a plurality of n-dimensional simplices corresponding to a modeled system; identifying a subset of the plurality of n-dimensional simplices which are intersected by a well bore surface contained in the modeled system; and refining the identified subset of the plurality of n- dimensional simplices to cause the well bore surface to be substantially coincident with the a plurality of faces of the identified subset of the plurality of n-dimensional simplices. 17. The method of claim 16 wherein refining the identified subset of the plurality of n-dimensional simplices comprises subdividing each of the simplices in the identified subset into a plurality of new simplices. 18. The method of claim 16 wherein the well bore surface is defined by a depth along a well bore trajectory and radius from the well bore trajectory. 19. A computer-readable medium containing a plurality of instructions embodying the method comprising: constructing a mesh having a plurality of n-dimensional simplices; identifying a subset of the plurality of n-dimensional simplices; and modifying the identified subset of the plurality of n- dimensional simplices to adapt the mesh to a modeled system. 20. The computer-readable medium of claim 19 wherein modifying the identified subset of the plurality of n- dimensional simplices comprises subdividing each of the simplices in the identified subset into a plurality of new simplices . 21. The computer-readable medium of claim 19 wherein modifying the identified subset of the plurality of n- dimensional simplices comprises collapsing each of the simplices in the identified subset . 22. The computer-readable medium of claim 21 wherein a portion of the mesh is held invariant during the collapsing of the simplices in the identified subset. 23. The computer-readable medium of claim 19 wherein the modeled system comprises a surface of dimension n-1 and wherein the subset of the plurality of n-dimensional simplices is identified by the intersection of the n-1-dimensional surface with the identified subset of the plurality of n- dimensional simplices. 24. The computer-readable medium of claim 23 wherein the n-1- dimensional surface corresponds to a well bore, and wherein the n-1-dimensional surface is defined by a depth along a well bore trajectory and radius from the well bore trajectory. 25. The computer-readable medium of claim 19 wherein the subset of the plurality of n-dimensional simplices is identified by solving the unmodified mesh, identifying a region having a high gradient, and identifying a plurality of n-dimensional simplices in the region having the high gradient . 26. The computer-readable medium of claim 25 wherein the subset of the plurality of n-dimensional simplices is selected from a predetermined region within the mesh. 27. The computer-readable medium of claim 25 wherein the steps of solving the mesh, identifying the region having a high gradient, and identifying the plurality of n-dimensional simplices in the region having the high gradient are repeated one or more times. 28. The computer-readable medium of claim 19 wherein n=3. 29. The computer-readable medium of claim 28 wherein each of the n-dimensional simplices in the identified subset of the plurality of n-dimensional simplices is intersected by a 2- dimensional surface. 30. The computer-readable medium of claim 19 wherein n=4.

Inventors: KENNON STEPHEN R, WARD STEVEN B, KENNON, STEPHEN, R., WARD, STEVEN, B.
Applicants: KENNON STEPHEN R, OBJECT RESERVOIR INC, WARD STEVEN B, KENNON, STEPHEN, R., OBJECT RESERVOIR, INC., WARD, STEVEN, B.
Application year: 2001
Main classification: G06F17
IPC codes: E21B44, G01V11, G06F17, G06F19, G06T17