The following description relates to simulating the flow of well system fluid based on a pressure drop boundary condition.
Flow models have been used to simulate fluid flow in hydraulic fracture treatments and other environments. During a conventional fracture treatment of a subterranean reservoir, pressurized fluid is communicated from a wellbore into the reservoir at high pressure, and the pressurized fluid propagates fractures within the reservoir rock. Flow models can be used to simulate the flow of fluid, for example, within the fractures. Some conventional software packages model fluid flow in a fracture as a Darcy flow or a slot flow.
Like reference symbols in the various drawings indicate like elements.
Fluid flow models can be used to analyze fluid flow, for example, in a well system environment (e.g., in a wellbore, a fracture network, within the reservoir rock matrix, in a well system tool, etc.) or other environments. In some environments, the fluid flow is unsteady and multi-dimensional (e.g., three-dimensional or at least two-dimensional). For example, in some types of fractures, the dominant flow is two-dimensional, and includes transient behaviors. In some instances, two- or three-dimensional flow can be described by a one-dimensional flow model, for example, by integrating the governing flow equations over the cross-section of the two- or three-dimensional flow path. In some cases, the resulting equations can be highly nonlinear partial differential equations that can be solved using finite difference, finite volume, or finite element methods. In some cases, the use of one-dimensional flow models can reduce computational costs, and allow for faster or more computationally efficient simulations. In some instances, a flow model can be used to perform numerical simulations in real time, for example, during a fracture treatment or during another well system activity.
In some implementations, a flow model is used to simulate fluid flow based on limited information about the physical fluid system. For example, some flow models include governing equations (e.g., Equations 1 and 2 below, etc.) that describe flow in terms of flow velocity, and solutions to the governing equations can be found based on an appropriate combination of initial conditions and boundary conditions for the flow velocity. For fluid systems where a full set of boundary conditions for the flow velocity are not available, other types of boundary conditions can be used. For example, fluid pressures in an injection treatment system can often be measured or calculated based on measurements from the injection treatment system, while measurements of fluid velocity are not as readily available in some scenarios. For these and other types of scenarios, the pressure data can be used as a boundary condition, for example, even if some or all of the governing equations are not necessarily cast in terms of pressure variables (e.g., Equation 1 below does not include a pressure or pressure gradient term). For example, some flow models can be solved based on a pressure drop boundary condition. In some contexts, such flow models can provide fast convergence, accurate results, and greater robustness and flexibility.
Some implementations of the subject matter described here can provide advantages or benefits. For example, in some instances, a fluid flow model can provide an efficient, accurate prediction of the fluid pressure and fluid velocity distribution inside a fracture or another type of flow passage. Flow models can be implemented using codes and algorithms that are fast and robust, and compatible with diverse program interfaces. Incompressible fluid flow in a fracture can be simulated using the finite difference framework while accounting for inlet velocity and pressure drop boundary conditions. The simulations can use other numerical discretization techniques, such as, for example, finite difference, finite volume or finite element techniques. In some cases, Newton's method can provide fast convergence in obtaining a solution, for example, that satisfies the pressure drop boundary condition. The implicit Crank-Nicolson technique can be used for time marching, and the central differencing technique can be used for spatial derivatives. These and other numerical techniques can provide a solution that is accurate to second order (or higher) in space and time, that is unconditionally stable irrespective of material properties (e.g., Reynolds number) of the fluid, that is unconditionally stable irrespective of the numerical discretization (e.g., time step and number of grid points), or a combination of these.
In some cases, a fluid flow model models the flow of fluid in a fracture, for example, during a hydraulic fracturing treatment or another type of injection treatment. Hydraulic fracturing can improve the conductivity of a hydrocarbon reservoir, and modeling the hydraulic fracturing treatment can help to efficiently design, analyze, or optimize the treatment. In some cases, a hydraulic fracturing model combines simulations of fracture propagation, rock deformation, fluid flow, proppant transport, and other phenomena. The fluid flow models used in these and other types of simulations can account for the complex physical environments and conditions associated with some hydraulic fracturing activities. For example, in cases where the fluid pressure in the fractures and the rock deformation are implicitly coupled, the flow models can interact such that the solution of one model affects the other. As another example, some subterranean formations include low-permeability, naturally-fracture rock media, and the flow models can model a discrete or complex fracture network where the induced fractures interact with natural fractures. Other types of environments and conditions can be modeled.
The computing subsystem 110 can include one or more computing devices or systems located at the wellbore 102 or other locations. The computing subsystem 110 or any of its components can be located apart from the other components shown in
The example subterranean region 104 may include a reservoir that contains hydrocarbon resources, such as oil, natural gas, or others. For example, the subterranean region 104 may include all or part of a rock formation (e.g., shale, coal, sandstone, granite, or others) that contain natural gas. The subterranean region 104 may include naturally fractured rock or natural rock formations that are not fractured to any significant degree. The subterranean region 104 may include tight gas formations that include low permeability rock (e.g., shale, coal, or others).
The example well system 100 shown in
The example injection system 108 can inject treatment fluid into the subterranean region 104 from the wellbore 102. For example, a fracture treatment can be applied at a single fluid injection location or at multiple fluid injection locations in a subterranean zone, and the fluid may be injected over a single time period or over multiple different time periods. In some instances, a fracture treatment can use multiple different fluid injection locations in a single wellbore, multiple fluid injection locations in multiple different wellbores, or any suitable combination. Moreover, the fracture treatment can inject fluid through any suitable type of wellbore, such as, for example, vertical wellbores, slant wellbores, horizontal wellbores, curved wellbores, or combinations of these and others.
The example injection system 108 includes instrument trucks 114, pump trucks 116, and an injection treatment control subsystem 111. The example injection system 108 may include other features not shown in the figures. The injection system 108 may apply injection treatments that include, for example, a multi-stage fracturing treatment, a single-stage fracture treatment, a mini-fracture test treatment, a follow-on fracture treatment, a re-fracture treatment, a final fracture treatment, other types of fracture treatments, or a combination of these.
The pump trucks 116 can include mobile vehicles, immobile installations, skids, hoses, tubes, fluid tanks, fluid reservoirs, pumps, valves, mixers, or other types of structures and equipment. The example pump trucks 116 shown in
The instrument trucks 114 can include mobile vehicles, immobile installations, or other suitable structures. The example instrument trucks 114 shown in
The injection system 108 may also include surface and down-hole sensors to measure pressure, rate, temperature or other parameters of treatment or production. For example, the injection system 108 may include pressure meters or other equipment that measure the pressure of fluids in the wellbore 102 at or near the ground surface 106 level or at other locations. The injection system 108 may include pump controls or other types of controls for starting, stopping, increasing, decreasing or otherwise controlling pumping as well as controls for selecting or otherwise controlling fluids pumped during the injection treatment. The injection treatment control subsystem 111 may communicate with such equipment to monitor and control the injection treatment.
The injection system 108 may inject fluid into the formation above, at or below a fracture initiation pressure for the formation; above, at or below a fracture closure pressure for the formation; or at another fluid pressure. Fracture initiation pressure may refer to a minimum fluid injection pressure that can initiate or propagate fractures in the subterranean formation. Fracture closure pressure may refer to a minimum fluid injection pressure that can dilate existing fractures in the subterranean formation. In some instances, the facture closure pressure is related to the minimum principle stress acting on the formation.
The example injection treatment control subsystem 111 shown in
In the example shown in
In some implementations, the computing subsystem 110 can simulate fluid flow in the well system 100. For example, the computing subsystem 110 can include flow models for simulating fluid flow in or between various locations of fluid flow in the well system, such as, for example, the wellbore 102, the perforations 120, the conduit 112 or components thereof, the dominant fractures 132, the natural fracture networks 130, the rock media in the subterranean region 104, or a combination of these and others. The flow models can model the flow of incompressible fluids (e.g., liquids), compressible fluids (e.g., gases), or a combination multiple fluid phases. In some instances, the flow models can model flow in one, two, or three spatial dimensions. The flow models can include nonlinear systems of differential or partial differential equations. The computing subsystem 110 can use the flow models to predict, describe, or otherwise analyze the dynamic behavior of fluid in the well system 100.
The computing subsystem 110 can perform simulations before, during, or after the injection treatment. In some implementations, the injection treatment control subsystem 111 controls the injection treatment based on simulations performed by the computing subsystem 110. For example, a pumping schedule or other aspects of a fracture treatment plan can be generated in advance based on simulations performed by the computing subsystem 110. As another example, the injection treatment control subsystem 111 can modify, update, or generate a fracture treatment plan based on simulations performed by the computing subsystem 110 in real time during the injection system.
In some cases, the simulations are based on data obtained from the well system 100. For example, pressure meters, flow monitors, microseismic equipment, tiltmeters, or other equipment can perform measurements before, during, or after an injection treatment; and the computing subsystem 110 can simulate fluid flow based on the measured data. In some cases, the injection treatment control subsystem 111 can select or modify (e.g., increase or decrease) fluid pressures, fluid densities, fluid compositions, and other control parameters based on data provided by the simulations. In some instances, data provided by the simulations can be displayed in real time during the injection treatment, for example, to an engineer or other operator of the well system 100.
Some of the techniques and operations described herein may be implemented by a one or more computing systems configured to provide the functionality described. In various instances, a computing system may include any of various types of devices, including, but not limited to, personal computer systems, desktop computers, laptops, notebooks, mainframe computer systems, handheld computers, workstations, tablets, application servers, computer clusters, storage devices, or any type of computing or electronic device.
The communication link 280 can include any type of communication channel, connector, data communication network, or other link. For example, the communication link 280 can include a wireless or a wired network, a Local Area Network (LAN), a Wide Area Network (WAN), a private network, a public network (such as the Internet), a WiFi network, a network that includes a satellite link, or another type of data communication network.
The memory 250 can store instructions (e.g., computer code) associated with an operating system, computer applications, and other resources. The memory 250 can also store application data and data objects that can be interpreted by one or more applications or virtual machines running on the computing system 200. As shown in
In some instances, the data 254 include treatment data relating to fracture treatment plans. For example the treatment data can indicate a pumping schedule, parameters of a previous injection treatment, parameters of a future injection treatment, or parameters of a proposed injection treatment. Such parameters may include information on flow rates, flow volumes, slurry concentrations, fluid compositions, injection locations, injection times, or other parameters.
In some instances, the data 254 include geological data relating to geological properties of a subterranean region. For example, the geological data may include information on wellbores, completions, or information on other attributes of the subterranean region. In some cases, the geological data includes information on the lithology, fluid content, stress profile (e.g., stress anisotropy, maximum and minimum horizontal stresses), pressure profile, spatial extent, or other attributes of one or more rock formations in the subterranean zone. The geological data can include information collected from well logs, rock samples, outcroppings, microseismic imaging, or other data sources.
In some instances, the data 254 include fracture data relating to fractures in the subterranean region. The fracture data may identify the locations, sizes, shapes, and other properties of fractures in a model of a subterranean zone. The fracture data can include information on natural fractures, hydraulically-induced fractures, or any other type of discontinuity in the subterranean region. The fracture data can include fracture planes calculated from microseismic data or other information. For each fracture plane, the fracture data can include information (e.g., strike angle, dip angle, etc.) identifying an orientation of the fracture, information identifying a shape (e.g., curvature, aperture, etc.) of the fracture, information identifying boundaries of the fracture, or any other suitable information.
In some instances, the data 254 include fluid data relating to well system fluids. The fluid data may identify types of fluids, fluid properties, thermodynamic conditions, and other information related to well system fluids. The fluid data can include flow models for compressible or incompressible fluid flow. For example, the fluid data can include systems of governing equations (e.g., Navier-Stokes equation, continuity equation, etc.) that represent fluid flow generally or fluid flow under certain types of conditions. In some cases, the governing flow equations define a nonlinear system of equations. The fluid data can include data related to native fluids that naturally reside in a subterranean region, treatment fluids to be injected into the subterranean region, hydraulic fluids that operate well system tools, or other fluids that may or may not be related to a well system.
The applications 258 can include software applications, scripts, programs, functions, executables, or other modules that are interpreted or executed by the processor 260. For example, the applications 258 can include a fluid flow simulation module, a hydraulic fracture simulation module, a reservoir simulation module, or another other type of simulator. The applications 258 may include machine-readable instructions for performing one or more of the operations related to
The processor 260 can execute instructions, for example, to generate output data based on data inputs. For example, the processor 260 can run the applications 258 by executing or interpreting the software, scripts, programs, functions, executables, or other modules contained in the applications 258. The processor 260 may perform one or more of the operations related to
The example architecture 300 shown in
The example fluid system 310 can include any physical system where fluid flow or other fluid phenomena occur. The fluid system 310 can represent a well system (e.g., the well system 100 shown in
The data acquisition system 320 can include any systems or hardware that obtains fluid data from the fluid system 310. For example, the data acquisition system 320 can include flow sensors, pressure sensors, temperature sensors, and other types of measurement devices. The data acquisition system 320 can include communication and data storage systems that store, transfer, manipulate, or otherwise manage the information obtained from the fluid system. In some examples, the data acquisition system 320 obtains fluid pressure data for one or more points on a flow path.
The fluid flow simulation system 330 can be one or more computer systems or computer-implemented programs that simulate fluid flow. The fluid flow simulation system 330 can receive information related to the fluid system 310 and simulate fluid flow and other fluid phenomena that occur in the fluid system 310. For example, the fluid flow simulation system 330 can calculate flow velocities or other aspects of fluid flow based on pressure data or other information obtained by the data acquisition system 320.
The example fluid flow simulation system 330 includes fluid system data 332, flow models 334, a time marching module 340, a solver 342, and a minimization module 344. The fluid flow simulation system can include additional or different features, and the features of a fluid flow simulation system 330 can be configured to operate in another manner. The modules of the fluid flow simulation system 330 can include hardware modules, software modules, or other types of modules. In some cases, the modules can be integrated with each other or with other system components. In some example implementations, the fluid flow simulation system 330 can be implemented as software running on a computing system, and the modules of the fluid flow simulation system 330 can be implemented as software functions or routines that are executed by the computing system.
The fluid system data 332 can include any information related to the fluid system 310 or another fluid system. For example, the fluid system data 332 can indicate physical properties (e.g., geometry, surface properties, etc.) of one or more flow paths in the fluid system 310, material properties (e.g., density, viscosity, Reynolds number, etc.) of one or more fluids in the fluid system 310, thermodynamic data (e.g., fluid pressures, fluid temperatures, fluid flow rates, etc.) measured at one or more locations in the fluid system 310, and other types of information. The fluid system data 332 can include information received from the data acquisition system 320 and other sources.
The flow models 334 can include any information or modules that can be used to simulate fluid flow. The flow models 334 can include governing equations, spatial and temporal discretization data, or other information. In some examples, the flow models 334 include governing flow equations, such as, for example, the Navier-Stokes equation or related approximations of the Navier-Stokes equation, continuity equations, or other types of flow equations.
The flow models 334 can include spatial discretization data, such as, for example, discrete nodes that represent locations of fluid flow along a flow path in the fluid system 310. The spatial discretization can be implemented by any suitable algorithm. For example, the system can be discretized according to a finite difference model, a finite volume model, finite element model, or another technique. The system can be discretized in a manner that permits spatial derivatives or partial spatial derivatives to be solved in the discretized spatial domain using numerical methods. In some implementations, the conventional central difference method can be used to find solutions in the spatial domain. In certain contexts, the central difference method can provide solutions that are accurate to second (or higher) order. In some instances, the central difference method is stable regardless of the number and spacing of nodes in the discretized spatial domain.
In some implementations, the flow models 334 can include boundary condition data indicating a type of boundary condition to be used in modeling fluid flow. For example, the flow models can include a boundary-condition-computation module that computes a boundary condition based on fluid system data, simulation data, or other types of data. A pressure drop boundary condition or other types of boundary conditions can be computed based on fluid pressure data obtained from the fluid system 310.
The time marching module 340 can include any information or modules that can be used to perform calculations in a discretized time domain. For example, the governing flow equations often include derivatives or partial derivatives in the time domain, and the time marching module 340 can calculate such quantities based on a time marching algorithm. An example time marching algorithm is the Crank-Nicolson method. The Crank-Nicolson method is a conventional time marching algorithm that is analogous to the central-difference technique for handling spatial derivatives. In some implementations, the Crank-Nicolson method can find numerical solutions for partial differential equations, and provide solutions that are accurate to second (or higher) order. In certain contexts, the Crank-Nicolson is stable regardless of the number and size of time steps in the discretized time domain. Other types of time marching algorithms can be used.
The solver 342 can include any information or modules that can be used to solve a system of equations. For example, the solver 342 can be a direct solver or another type of solver. In some implementations, the solver 342 receives inputs from the other components of the fluid flow simulation system 330 and generates a numerical solution for one or more variables of interest based on the inputs. The solution can be generated for each node in a discretized spatial domain. For example, the solver 342 may calculate values of fluid velocity, fluid pressure, or another variable over a spatial domain; the values can be calculated for an individual time step. In some cases, the solver 342 can be expressed as solving a matrix equation Ak=b, where k is the variable of interest that is computed by the solver 342, and elements of A and b are provided, for example, based on information from the flow models 334, the fluid system data 332, the minimization module 344, and other sources. In some examples, the variable of interest is the flow velocity u or another flow variable.
The minimization module 344 can include any information or modules that can be used to calculate or iteratively find a minimal value or root of an equation. The minimization module 344 can compare a numerical solution against a boundary condition or other information, and determine whether the numerical solution satisfies the boundary condition or other convergence criteria. When the numerical solution is not accepted, the minimization module 344 can use a minimization algorithm to calculate an improved partial solution or other information, which can be used to generate a full numerical solution that better matches the convergence criteria. An example of a minimization algorithm is Newton's method, which is an iterative technique for finding roots of a minimization function. In some cases, the minimization module 344 obtains an output that is within a predetermined range of a minimum or a root of an equation.
The analysis system 360 can include any systems, components, or modules that analyze, process, use, or access the simulation data generated by the fluid flow simulation system 330. For example, the analysis system 360 can be a real time analysis system that displays or otherwise presents fluid data (e.g., to a field engineer, etc.) during an injection treatment. In some cases, the analysis system 360 includes other simulators or a simulation manager that use the fluid simulation data to simulate other aspects of a well system. For example, the analysis system 360 can be a fracture simulation suite that simulates fracture propagation based on the simulated fluid flow data generated by the fluid flow simulation system 330. As another example, the analysis system 360 can be a reservoir simulation suite that simulates fluid migration in a reservoir based on the simulated fluid flow data generated by the fluid flow simulation system 330.
The example architecture 300 can be used to analyze non-compressible, two-dimensional flow in any type of physical system. In some implementations, the architecture 300 efficiently provides an accurate solution for one-dimensional (1D) incompressible flow equations in a fracture using a pressure drop boundary condition. The architecture 300 can also be used to analyze other types of flow in other environments.
In some examples, the architecture 300 uses a set of governing flow equations that includes the continuity and Navier-Stokes equations in 1D, which can be expressed, respectively, as:
u
x
=R
1(x,t) (1)
u
t
+uu
x
−μu
xx
+ψ=R
2(x,t) (2)
where u represents the flow velocity variable, ut represents a time-derivative of the flow velocity variable u, ux represents a first-order spatial derivative of the flow velocity variable u, uxx represents a second-order spatial derivative of the flow velocity variable u, ψ represents the pressure gradient variable, μ represents viscosity of the well bore fluid, R1(x,t) represents a source term, and R2(x,t) represents another source term. The pressure gradient ψ can also be represented as ψ=px, a spatial derivative of a pressure variable p.
The source terms (R1(x,t), R2(x,t)) can incorporate any other internal or external systems, forces, or phenomena that influence the flow of fluid. For example, in some cases one or more of the source terms can account for the effects of gravity, an inflow or outflow of fluid, or other effects. The source terms can vary over time, space, or both; or they can be constant over time, space, or both.
In this example, the computational domain spans xε(0,1), where x is the spatial variable representing locations on the flow path. The example governing equations above (i.e., Equations 1 and 2) can be numerically solved, for example, based on initial conditions (e.g., u(x,t=0)=U0(x) and ψ(x,t=0)=Ψ0(x)) and a boundary condition for the spatial variable x. In some cases, to obtain the numerical solution, the fluid flow simulation system 330 can combine the finite difference framework solved implicitly using the Crank-Nicolson scheme for time-marching and the central difference scheme for spatial derivatives.
The boundary condition for the spatial variable x can include an inlet flow velocity u0=u(x=0,t), a pressure drop G(t)=p(x=1,t)−p(x=0,t)) between the ends of the fracture, or another type of boundary condition. An iterative technique (e.g., Newton's iteration algorithm, or another type of iterative technique) can be used to solve the governing flow equations for a given time point, for example, in scenarios where the pressure drop boundary condition is available. In some contexts (e.g., in some types of fracture simulation systems and in other systems), the pressures at the ends of the fracture are readily available as a boundary condition, and the inlet boundary condition u0 is not readily available as a boundary condition. The pressure drop boundary condition can be used in other contexts as well.
When the pressure drop boundary condition is used, an iterative numerical technique can include generating an initial estimate for u0 and obtaining a numerical solution for the pressure gradient ψ(x) based on initial estimate for u0. For example, the numerical solution for the pressure gradient ψ(x) can be obtained based on Equation 2 above, or based on another governing flow equation. The pressure gradient can then be used to calculate a pressure difference Z(u0) between boundaries of the flow path, and the calculated pressure difference Z(u0) can be compared to the pressure drop boundary condition G(t). The difference between the calculated pressure difference Z(u0) and the pressure drop boundary condition G(t) can be used to generate an improved estimate for u0.
In some cases, the fluid flow simulation system 330 includes a pressure-drop-computation module that is operable to receive the pressure gradient values, or calculate them based on an approximation of the flow velocity at an end of the flow path. In some cases, the pressure-drop-computation module receives the pressure gradient values from another module of the fluid flow simulation system 300, or from an external source. The pressure-drop-computation module can compute the pressure drop between the opposite ends of the one-dimensional flow path based on the pressure gradient values. The solver 342 module can receive the computed pressure drop and calculate the improved approximation of the flow velocity for the end of the flow path based on a difference between the computed pressure drop and a pressure drop boundary condition.
The initial estimate for u0 at a given time point can be a random guess, a solution from previous time-step, or another type of estimate. On each iteration, an improved estimate of the inlet flow velocity u0 can be obtained, for example, according to a Newton's-method-based algorithm, until the solution meets a convergence criterion. For example, if the calculated pressure difference (based on the numerical solution for the pressure gradient ψ(x)) does not match the pressure drop boundary condition G(t), then an improved estimate for u0 can be obtained based on Newton's method. The minimization algorithm can find roots or minima of a minimization function, such as, for example, ƒ(u0)=Z(u0)−G(t) or another type of minimization function. If the calculated pressure difference matches the pressure drop boundary condition (e.g., within a threshold amount), the current numerical solution (including the current estimate of u0) can be accepted as having satisfied the convergence criterion.
In some implementations, the improved estimate of the inlet flow velocity u0 can be generated based on information provided by the example minimization module 344. For example, the minimization module can provide parameters of a minimization function ƒ(u0) for finding an improved estimate of the inlet flow velocity u0. In some instances, given an estimate of the inlet flow velocity (u0i) for the ith iteration, Newton's method can generate parameters of an improved estimate of the inlet flow velocity (u0i+1) for the i+1th iteration, based on the following iterative expression:
where ƒ′(u0i) represents the derivative of ƒ(u0)=Z(u0)−G(t) with respect to the inlet flow velocity u0. The derivative ƒ′ (u0i) can be obtained, for example, by taking the derivatives of the governing flow equations (e.g., Equations 1 and 2 above) with respect to the inlet flow velocity u0.
As such, in the example outlined above, Equations 1, 2, 3 and possibly other equations can be used to generate inputs for the solver 342. Additional or different information may be used in generating inputs for the solver 342. For example, in some cases, derivatives of one or more of the governing flow equations are used. In the example above, elements of Equation 3 above (e.g., in the denominator) can be obtained based on solving two other equations:
which are the derivatives of Equations 1 and 2 with respect to the inlet flow velocity u0. As such, Equations 1, 2, 3, 1′, and 2′ can be used to generate inputs for the solver 342. Based on these equations and other information, the solver 342 can generate flow velocity values u for each node on the discretized flow path model, and the value for the inlet flow velocity u0 generated by the solver can be used as an improved estimate u0i+1 for the next iteration. In some cases, Equations 1 and 2 can be solved independent of Equations 1′ and 2′. For example, the two sets of equations can be solved in parallel.
The example flow model 400 shown in
In some implementations, the computational domain (e.g., for solving the governing flow equations) includes both the staggered nodes and the regular nodes, and the solution variables (e.g., velocity (u) and pressure gradient (ψ)) are defined on the regular nodes. A continuity equation (e.g., Equation 1 above) can be discretized at the staggered nodes 404a, 404b, 404c, 404d, 404e, and a momentum equation (e.g., Equation 2 above) can be discretized at the regular nodes 402a, 402b, 402c, 402d, 402e, 402f. The equations can be discretized, for example, using the central difference technique for both the convection term (e.g., uux in Equation 2) and the diffusion term (e.g., μuxx in Equation 2). Nonlinearities can be resolved, for example, using a quasi-linearization scheme. The resulting system of linear algebraic equations can be solved iteratively, for example, using a block-pentadiagonal solver or another type of solver.
The variables 420 also include examples of dynamic variables for each of the nodes. As shown in
In some cases, the values of the pressure variables at the end points provide a boundary condition for finding values of the other variables (e.g., u and ψ). For example, the pressure variables can be based on measurements, estimates, simulations, or other information from a physical fluid system that is being simulated, and the pressure difference boundary condition can be used to ensure that the simulation provides an output that is consistent with data obtained from the physical system. In some cases, the pressure at the end points of the flow path can be derived from measurements by pressure sensors in a well system, or from other types of information. Given values for the pressure variables p0 and pN at a particular time point t0, the pressure drop boundary condition for the particular time point can be expressed G=PN−p0. A pressure drop boundary condition can be computed based on other information or obtained in another manner.
In some cases, the pressure gradient values ψ1, ψ2, . . . ψN-1 are computed by solving a governing flow equation based on an estimated flow velocity for one of the nodes (e.g., an estimated flow velocity for one of the end points u0 or uN, or for one of the intermediate points u1 . . . uN-1). For example, Equation 2 can be used to numerically solve for each pressure gradient value ψi based on an estimated value for the flow velocity u0. In some cases, the pressure gradient values ψi are computed based on a difference between pressures at the staggered nodes. For example, the pressure gradient value ψ1 at the regular node 402b can be calculated based on pressure drop between the neighboring staggered nodes 404a and 404b.
The computed pressure gradient values ψi can be used to compute a pressure difference between end points of the flow path 410. For example, the pressure drop across the flow path 410 can be computed as
Z(u0)=hΣi=2N-1ψi, (4)
where h is the grid spacing. An iterative minimization algorithm (e.g., Newton's method) can then be used to iteratively solve for a value of uo that reduces or minimizes a minimization function
ƒ(u0)=Z(u0)−G. (5)
Each iteration can calculate an improved value for the flow velocity uo, for example, by generating a solution to the governing flow equations that better approximates the pressure drop boundary condition.
The iterative minimization algorithm can be configured to terminate upon finding a solution that satisfies a convergence criterion or another condition. For example, when the pressure drop generated from a numerical solution matches the pressure drop boundary condition (e.g., within a predefined threshold), that numerical solution can be accepted and the iterative algorithm for that particular time point can be terminated. The numerical solution for that time point can be used as an initial estimate for the next time point.
In some implementations, the overall fluid flow simulation involves at least two high-level iterative loops. For example, an outer iterative loop can be used for nonlinearity convergence, and an inner iterative loop can be used for convergence of the pressure-drop boundary condition. Newton's method or another type of algorithm can be used for the inner iterative loop, within each outer iteration for nonlinear convergence.
The example process 500 can be used to simulate incompressible flow in a variety of physical systems. In some implementations, the process 500 is used to simulate flow in a fluid injection or production system (e.g., in a wellbore, in a flow control device or flow conduit installed in a wellbore, etc.), within a subterranean formation (e.g., from a wellbore into reservoir media, through a rock matrix in the reservoir media, through fractures or discontinuities in the reservoir media, etc.), or combinations thereof. The process 500 may also be used to simulate flow in other environments, for example, outside the context of a well system.
The example process 500 can be used to simulate the flow of various fluids. In some cases, the process 500 is used to simulate one or more well system fluids. Here, the term “well system fluid” is used broadly to encompass a wide variety of fluids that may be found in or near, or may be used in connection with, a well system. Well system fluids can include one or more native fluids that reside in a subterranean region (e.g., brine, oil, natural gas, etc.), one or more fluids that have been or will be injected into a subterranean region (e.g., fracturing fluids, treatment fluids, etc.), one or more fluids that have been or will be communicated within a wellbore or within one or more tools installed in the well bore (e.g., drilling fluids, hydraulic fluids, etc.), and other types of fluids.
The example process 500 can simulate fluid flow based on a one-dimensional fluid flow model. The flow model can include nodes of a discretized one-dimensional flow path. In some instances, two of the nodes represent end points of the flow path, and the other nodes represent a series of locations along the flow path between the end points. For example, the process 500 can use the example flow model 400 shown in
In some implementations, the one-dimensional flow model is configured to model the flow of well system fluid in a fracture in a subterranean region, where the nodes of the flow model represent a sequence of locations at which fluid can flow through the fracture. The ends of the flow path can correspond to intermediate points within a fracture. One or both of the ends of the flow path can correspond to an open or closed end of the fracture. For example, one or both ends of the fracture can be open to another fracture, a wellbore, a perforation in a wellbore casing, a flow control device in a wellbore, etc. In some cases, one or both ends of the fracture are closed, for example, where the fracture terminates in the subterranean region.
At 502, pressure drop boundary condition data for a time point t0 are obtained. The pressure drop boundary condition data can be obtained, for example, by computing a pressure drop from pressures at the flow path end points, by receiving previously-computed pressure drop boundary condition data from memory, or by another technique. As an example, in some cases, the pressure drop boundary condition can be computed as G(t0)=pN−p0, where p0 represents the fluid pressure at one of the flow path end points, and pN represents the fluid pressure at the other flow path end point.
At 504, an initial approximation for the end point velocity u0 is obtained. Here, u0 represents an approximation of the fluid flow velocity at the location x0 at the end of the flow path, at time t0. The initial approximation can be obtained from a solution for a prior time point, or the initial approximation can be a predetermined value, a random guess, or another approximation. After obtaining the initial approximation for the end point velocity u0, the process 500 performs an iterative procedure that is represented in
At 506, the current approximation for the end point velocity u0 is used to obtain a numerical solution for the pressure gradient ψi, for each location i=1 . . . N−1. Any suitable technique can be used to obtain the numerical solution. For example, a direct solver can be used to solve the governing fluid flow equations.
In the example shown in
At 508, the pressure drop between the end points is calculated based on the numerical solution for the pressure gradient. The pressure drop can be computed, for example, based on the pressure gradient values ψi computed at 506 and other information. In some examples, the pressure drop is computed as shown in Equation 4 above, or in another manner. If the pressure drop computed at 508 satisfies a convergence criterion, the minimization loop can be terminated. For example, if the difference Z(u0)−G(t0) is less than a predetermined threshold value, then the iterative loop 506, 508, 510, 512 can be terminated. In some instances, the difference Z(u0)−G(t0) does not meet the convergence criterion, and the iterative loop 506, 508, 510, 512 continues.
At 510, an improved approximation of the end point velocity u0 can be calculated based on a difference between the pressure drop computed at 508 and the pressure drop boundary condition obtained at 502. The improved approximation can be computed according to an algorithm configured to produce a solution that matches or converges with the pressure drop boundary condition obtained at 502. For example, Newton's method can be used to minimize the function ƒ(u0)=Z(u0)−G(t0) or another minimization function. At 512, the iterative loop 506, 508, 510, 512 can continue until the convergence criterion is satisfied. The iterative loop can terminate upon satisfying a convergence criterion, upon reaching a specified number of iterations, or upon another condition.
After the inner iterative loop 506, 508, 510, 512 terminates, the process 500 progresses to 514, where the time variable is incremented to t0+Δt. The process 500 can then return to 502 and compute the pressure drop boundary condition for the next time point, G(t0+Δt)=PN−p0, using pressure values pN, p0 for the next time point. If the pressure drop boundary condition has changed, the process 500 can proceed to find a solution for the next time point. If the pressure drop boundary condition has not changed, the process 500 can proceed to a subsequent time point, terminate, or proceed in another manner.
In the example shown in
In the example shown in
The values plotted in
In the example shown in
In some implementations, the techniques described here can provide a fluid simulation that is robust over a wide range of simulation and fluid parameters. The values plotted in
The plot 800 shown in
The plot 900 shown in
Some embodiments of subject matter and operations described in this specification can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Some embodiments of subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions, encoded on computer storage medium for execution by, or to control the operation of, data processing apparatus. A computer storage medium can be, or can be included in, a computer-readable storage device, a computer-readable storage substrate, a random or serial access memory array or device, or a combination of one or more of them. Moreover, while a computer storage medium is not a propagated signal, a computer storage medium can be a source or destination of computer program instructions encoded in an artificially generated propagated signal. The computer storage medium can also be, or be included in, one or more separate physical components or media (e.g., multiple CDs, disks, or other storage devices).
The term “data processing apparatus” encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, a system on a chip, or multiple ones, or combinations, of the foregoing. The apparatus can include special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). The apparatus can also include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or a combination of one or more of them. The apparatus and execution environment can realize various different computing model infrastructures, such as web services, distributed computing and grid computing infrastructures.
A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages. A computer program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.
Some of the processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform actions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random access memory or both. A computer includes a processor for performing actions in accordance with instructions and one or more memory devices for storing instructions and data. A computer may also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Devices suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices (e.g., EPROM, EEPROM, flash memory devices, and others), magnetic disks (e.g., internal hard disks, removable disks, and others), magneto optical disks, and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
To provide for interaction with a user, operations can be implemented on a computer having a display device (e.g., a monitor, or another type of display device) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse, a trackball, a tablet, a touch sensitive screen, or another type of pointing device) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to and receiving documents from a device that is used by the user; for example, by sending web pages to a web browser on a user's client device in response to requests received from the web browser.
A client and server are generally remote from each other and typically interact through a communication network. Examples of communication networks include a local area network (“LAN”) and a wide area network (“WAN”), an inter-network (e.g., the Internet), a network comprising a satellite link, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks). The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
In some aspects, pressure gradient values for respective nodes of a one-dimensional flow model are computed. The nodes represent locations of fluid flow along a flow path, and the pressure gradient values are based on an approximation of the flow velocity at a point the flow path (e.g., an end of the flow path or an intermediate location between the ends of the flow path). A pressure drop between the two opposite ends of the flow path is calculated based on the pressure gradient values. An improved approximation of the flow velocity for the point on the flow path is calculated based on a difference between the computed pressure drop and a pressure drop boundary condition.
Implementations of these and other aspects may include one or more of the following features. The one-dimensional flow model includes a plurality of governing flow equations, and the pressure gradient values are computed according to one or more of the governing flow equations. The governing flow equations define a nonlinear system of equations. The improved approximation is computed based on the governing flow equations and a minimization equation. The minimization equation includes the difference between the computed pressure drop and the pressure drop boundary condition. The pressure drop boundary condition represents a pressure difference between the open and closed ends of a fracture according to pressure data obtained from an injection treatment of the subterranean region.
Additionally or alternatively, these and other implementations may include one or more of the following features. An iterative technique is used to find a flow velocity that leads to a solution that satisfies a convergence criterion for an individual time step. In the iterative technique, an improved approximation of the flow velocity is calculated on each iteration. The improved approximation is calculated on each iteration according to a Newton's-method-based algorithm. The Newton's-method-based algorithm is configured to find a flow velocity that leads to a solution that minimizes the difference between the computed pressure drop and the pressure drop boundary condition. The convergence criterion includes a threshold value for the difference.
Additionally or alternatively, these and other implementations may include one or more of the following features. After finding a flow velocity that leads to a solution that satisfies a convergence criterion for an individual time step, a time variable is incremented to a subsequent time step. An iterative technique is used to find a flow velocity that leads to a solution that satisfies a convergence criterion for the subsequent time step. Flow velocities for each respective node are computed for each time step according to an algorithm that is configured to generate the flow velocities with second-order accuracy in space and time. Flow velocities for each respective node are computed for each time step according to an algorithm that is stable irrespective of the size of the time steps and the quantity of the nodes. Flow velocities for each respective node are computed for each time step according to an algorithm that is stable irrespective of the Reynolds number of the fluid.
While this specification contains many details, these should not be construed as limitations on the scope of what may be claimed, but rather as descriptions of features specific to particular examples. Certain features that are described in this specification in the context of separate implementations can also be combined. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple embodiments separately or in any suitable subcombination.
A number of embodiments have been described. Nevertheless, it will be understood that various modifications can be made. Accordingly, other embodiments are within the scope of the following claims.