fracture_initialization module

This file is part of PyFrac.

Created by Haseeb Zia on Wed Aug 09 16:22:33 2016. Copyright (c) ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, Geo-Energy Laboratory, 2016-2020. All rights reserved. See the LICENSE.TXT file for more details.

fracture_initialization.Distance_ellipse(a, b, x0, y0)[source]

This function calculates the smallest distance of a point from the given ellipse.

Parameters
  • a (float) – – the length of the major axis of the ellipse.

  • b (float) – – the length of the minor axis of the ellipse.

  • x0 (float) – – the x coordinate of the point from which the distance is to be found

  • y0 (float) – – the y coordinate of the point from which the distance is to be found

Returns

– the shortest distance of the point from the ellipse.

Return type

D (float)

fracture_initialization.Distance_square(lx, ly, x, y)[source]

The shortest distance of a point from a square

class fracture_initialization.Geometry(shape=None, radius=None, fracture_length=None, fracture_height=None, minor_axis=None, gamma=None, survey_cells=None, tip_distances=None, inner_cells=None, center=None)[source]

Bases: object

This class defines the geometry of the fracture to be initialized.

Parameters
  • shape (string) –

    – string giving the geometrical shape of the fracture. Possible options are:

    • ’radial’

    • ’height contained’

    • ’elliptical’

    • ’level set’

  • radius (float) – – the radius of the radial fracture.

  • fracture_length (float) – – the half length of the fracture.

  • fracture_height (float) – – the height of the height contained fracture.

  • minor_axis (float) – – length of minor axis for elliptical fracture shape.

  • gamma (float) – – ratio of the length of the major axis to the minor axis. It should be more than one.

  • survey_cells (ndarray) – – the cells from which the distances to the fracture tip are provided.

  • tip_distances (ndarray) – – the minimum distances of the corresponding cells provided in the survey_cells to the tip of the fracture.

  • inner_cells (ndarray) – – the cells enclosed by the cells given in the survey_cells (inclusive). In other words, the cells inside the fracture.

  • center (ndarray) – – location of the center of the geometry.

get_center()[source]
get_length_dimension()[source]
set_length_dimension(length)[source]
class fracture_initialization.InitializationParameters(geometry=None, regime='M', time=None, width=None, net_pressure=None, fracture_volume=None, tip_velocity=None, elasticity_matrix=None)[source]

Bases: object

This class store the initialization parameters.

Parameters
  • geometry (Geometry) – – Geometry class object describing the geometry of the fracture.

  • regime (str) –

    – the propagation regime of the fracture. Possible options are the following:

    • ’M’ – radial fracture in viscosity dominated regime.

    • ’Mt’ – radial fracture in viscosity dominated regime with leak-off.

    • ’K’ – radial fracture in toughness dominated regime.

    • ’Kt’ – radial fracture in toughness dominated regime with leak-off.

    • ’PKN’ – PKN fracture.

    • ’E_K’ – elliptical fracture propagating in toughness dominated regime. The solution is equivalent to a particular anisotropic toughness case described in Zia and Lecampion, 2018.

    • ’E_E’ – the elliptical solution with transverse isotropic material properties (see Moukhtari and Lecampion, 2019).

    • ’MDR’ – viscosity dominated solution for turbulent flow. The friction factor is calculated using MDR asymptote (see Zia and Lecampion 2019).

  • time (float) – – the time since the start of injection.

  • width (ndarray) – – the initial width of the fracture. The size should be equal to the number of elements in the mesh.

  • net_pressure (float/ndarray) – – the initial net pressure of the fracture. It can be either uniform for the static fracture or an ndarray.

  • fracture_volume (float) – – total initial volume of the fracture.

  • tip_velocity (float/ndarray) – – the velocity of the tip. It can be a float for radial fractures propagating with steady velocity or an ndarray equal to the size of tip elements list giving velocity of the corresponding tip elements.

  • elasticity_matrix (ndarray) – – the BEM elasticity matrix. See Zia & Lecampion 2019.

check_consistency()[source]

This function checks if the given parameters are consistent with each other.

fracture_initialization.g(a, b, x0, y0, la)[source]
fracture_initialization.generate_footprint(mesh, surv_cells, inner_region, dist_surv_cells, projMethod)[source]

This function takes the survey cells and their distances from the front and generate the footprint of a fracture using the fast marching method.

Parameters
  • mesh (CartesianMesh) – – a CartesianMesh class object describing the grid.

  • surv_cells (ndarray) – – list of survey cells from which the distances from front are provided

  • inner_region (ndarray) – – list of cells enclosed by the survey cells

  • dist_surv_cells (ndarray) – – distances of the provided survey cells from the front

Returns

  • EltChannel (ndarray-int) – list of cells in the channel region.

  • EltTip (ndarray-int) – list of cells in the Tip region.

  • EltCrack (ndarray-int) – list of cells in the crack region.

  • EltRibbon (ndarray-int) – list of cells in the Ribbon region.

  • ZeroVertex (ndarray-float) – Vertex from which the perpendicular is drawn on the front in a cell(can have value from 0 to 3, where 0 signify bottom left, 1 signifying bottom right, 2 signifying top right and 3 signifying top left vertex).

  • CellStatus (ndarray-int) – specifies which region each element currently belongs to (0 for Crack, 1 for channel, 2 for tip and 3 for ribbon).

  • l (ndarray-float) – length of perpendicular on the fracture front (see Pierce 2015, Computation Methods Appl. Mech).

  • alpha (ndarray-float) – angle prescribed by perpendicular on the fracture front (see Pierce 2015, Computation Methods Appl. Mech)

  • FillF (ndarray-float) – filling fraction of each tip cell.

  • sgndDist (ndarray-float) – signed minimun distance from fracture front of each cell in the domain.

fracture_initialization.get_eliptical_survey_cells(mesh, a, b, center=None)[source]

This function would provide the ribbon of cells on the inside of the perimeter of an ellipse with the given lengths of the major and minor axes. A list of all the cells inside the fracture is also provided.

Parameters
  • mesh (CartesianMesh object) – – a CartesianMesh class object describing the grid.

  • a (float) – – the length of the major axis of the provided ellipse.

  • b (float) – – the length of the minor axis of the provided ellipse.

  • inj_point (list or ndarray) – – the coordinates [x, y] of the injection point.

Returns

  • surv_cells (ndarray) – the list of cells on the inside of the perimeter of the given ellipse.

  • surv_dist (ndarray) – the list of corresponding distances of the surv_cells to the fracture tip.

  • inner_cells (ndarray) – the list of cells inside the given ellipse.

fracture_initialization.get_radial_survey_cells(mesh, r, center=None)[source]

This function would provide the ribbon of cells and their distances to the front on the inside of the perimeter of a circle with the given radius. A list of all the cells inside the fracture is also provided.

Parameters
  • mesh (CartesianMesh object) – – a CartesianMesh class object describing the grid.

  • r (float) – – the radius of the circle.

  • inj_point (list or ndarray) – – the coordinates [x, y] of the injection point.

Returns

  • surv_cells (ndarray) – the list of cells on the inside of the perimeter of the given circle.

  • surv_dist (ndarray) – the list of corresponding distances of the surv_cells to the fracture tip.

  • inner_cells (ndarray) – the list of cells inside the given circle.

fracture_initialization.get_rectangular_survey_cells(mesh, length, height, center=None)[source]

This function would provide the ribbon of cells on the inside of the perimeter of a rectangle with the given lengths and height. A list of all the cells inside the fracture is also provided.

Parameters
  • mesh (CartesianMesh object) – – a CartesianMesh class object describing the grid.

  • length (float) – – the half length of the rectangle.

  • height (float) – – the height of the rectangle.

  • inj_point (list or ndarray) – – the coordinates [x, y] of the injection point.

Returns

  • surv_cells (ndarray) – the list of cells on the inside of the perimeter of the given rectangle.

  • surv_dist (ndarray) – the list of corresponding distances of the surv_cells to the fracture tip.

  • inner_cells (ndarray) – the list of cells inside the given ellipse.

fracture_initialization.get_survey_points(geometry, mesh, source_coord=None)[source]

This function provided the survey cells, corresponding distances to the front and the enclosed cells for the given geometry.

fracture_initialization.get_width_pressure(mesh, EltCrack, EltTip, FillFrac, C, w=None, p=None, volume=None, symmetric=False, useBlockToeplizCompression=False, Eprime=None)[source]

This function calculates the width and pressure depending on the provided data. If only volume is provided, the width is calculated as a static fracture with the given footprint. Else, the pressure or width are calculated according to the given elasticity matrix.

Parameters
  • mesh (CartesianMesh) – – a CartesianMesh class object describing the grid.

  • EltCrack (ndarray) – – list of cells in the crack region.

  • EltTip (ndarray) – – list of cells in the Tip region.

  • FillFrac (ndarray) – – filling fraction of each tip cell. Used for correction.

  • C (ndarray) – – The elasticity matrix.

  • w (ndarray) – – the provided width for each cell, can be None if not available.

  • p (ndarray) – – the provided pressure for each cell, can be None if not available.

  • volume (ndarray) – – the volume of the fracture, can be None if not available.

  • symmetric (bool) – – if True, the fracture will be considered strictly symmetric and only one quadrant will be simulated.

  • Eprime (float) – – the plain strain elastic modulus.

Returns

  • w_calculated (ndarray) – the calculated width.

  • p_calculated (ndarray) – the calculated pressure.