Exemplo n.º 1
0
    def run_radial_simul(self, my_front_reconstruction, my_front_advancement,
                         my_vertex_or_path, my_param):
        # setting up the verbosity level of the log at console
        # setup_logging_to_console(verbosity_level='error')

        outputfolder = "./Temp_Data/" + my_vertex_or_path + "_radial_" + my_front_advancement + "_" + my_front_reconstruction
        self.remove(outputfolder)

        # creating mesh
        Mesh = CartesianMesh(my_param['Lx'], my_param['Ly'], my_param['Nx'],
                             my_param['Ny'])

        # solid properties
        nu = my_param['nu']  # Poisson's ratio
        youngs_mod = my_param['youngs_mod']  # Young's modulus
        Eprime = youngs_mod / (1 - nu**2)  # plain strain modulus
        K_Ic = my_param['K_Ic']  # fracture toughness
        Cl = my_param['Cl']  # Carter's leak off coefficient

        # material properties
        Solid = MaterialProperties(Mesh, Eprime, K_Ic, Carters_coef=Cl)

        # injection parameters
        Q0 = my_param['Q0']  # injection rate
        Injection = InjectionProperties(Q0, Mesh)

        # fluid properties
        Fluid = FluidProperties(viscosity=my_param['viscosity'])

        # simulation properties
        simulProp = SimulationProperties()
        simulProp.finalTime = my_param[
            'finalTime']  # the time at which the simulation stops
        simulProp.set_tipAsymptote(
            my_vertex_or_path
        )  # tip asymptote is evaluated with the viscosity dominated assumption
        simulProp.frontAdvancing = my_front_advancement  # to set explicit front tracking
        simulProp.plotFigure = False
        simulProp.set_solTimeSeries(np.asarray([2, 200, 5000, 30000, 100000]))
        simulProp.saveTSJump, simulProp.plotTSJump = 5, 5  # save and plot after every five time steps
        simulProp.set_outputFolder(outputfolder)
        simulProp.projMethod = my_front_reconstruction
        simulProp.log2file = False

        # initialization parameters
        Fr_geometry = Geometry('radial', radius=my_param['initialR'])
        init_param = InitializationParameters(Fr_geometry,
                                              regime=my_vertex_or_path)

        # creating fracture object
        Fr = Fracture(Mesh, init_param, Solid, Fluid, Injection, simulProp)

        # create a Controller
        controller = Controller(Fr, Solid, Fluid, Injection, simulProp)

        # run the simulation
        exitcode = controller.run()
        return exitcode, outputfolder
Exemplo n.º 2
0
from fracture_initialization import Geometry, InitializationParameters
from utility import setup_logging_to_console

# setting up the verbosity level of the log at console
setup_logging_to_console(verbosity_level='info')

# creating mesh
Mesh = CartesianMesh(6, 6, 41, 41)

# solid properties
nu = 0.4  # Poisson's ratio
youngs_mod = 3.3e10  # Young's modulus
Eprime = youngs_mod / (1 - nu**2)  # plain strain modulus
K_Ic = 1e7  # fracture toughness

Solid = MaterialProperties(Mesh, Eprime, K_Ic, minimum_width=1e-9)

# injection parameters
Q0 = 0.001  # injection rate
Injection = InjectionProperties(Q0, Mesh)

# fluid properties
viscosity = 1.1e-3
Fluid = FluidProperties(viscosity=viscosity)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 50  # the time at which the simulation stops
simulProp.set_outputFolder("./Data/star")  # the address of the output folder
simulProp.plotTSJump = 4
Exemplo n.º 3
0
# setting up the verbosity level of the log at console
setup_logging_to_console(verbosity_level='info')

# creating mesh
Mesh = CartesianMesh(0.2, 0.2, 41, 41)

# solid properties
nu = 0.4                            # Poisson's ratio
youngs_mod = 3.3e10                 # Young's modulus
Eprime = youngs_mod / (1 - nu**2)   # plain strain modulus
K1c = 5e5 / (32 / np.pi)**0.5       # K' = 5e5
Cl = 0.5e-6                         # Carter's leak off coefficient

# material properties
Solid = MaterialProperties(Mesh,
                           Eprime,
                           K1c,
                           Carters_coef=Cl)

# injection parameters
Q0 = 0.01  # injection rate
Injection = InjectionProperties(Q0, Mesh)

# fluid properties
Fluid = FluidProperties(rheology='PLF', n=0.6, k=0.001 / 12)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 1e7                               # the time at which the simulation stops
simulProp.set_outputFolder("./Data/MtoK_leakoff")       # the disk address where the files are saved
simulProp.set_simulation_name('PLF_MtoKtilde_n0.6')
simulProp.tolFractFront = 0.003                         # increase the tolerance for faster run
setup_logging_to_console(verbosity_level='info')

# creating mesh
Mesh = CartesianMesh(.75, .75, 41, 41)

# solid properties
nu = 0.15  # Poisson's ratio
youngs_mod = 3e10  # Young's modulus
Eprime = youngs_mod / (1 - nu**2)  # plain strain modulus
K_Ic = 2e6  # fracture toughness
sigma0 = 15e6  # confining stress

# material properties
Solid = MaterialProperties(Mesh,
                           Eprime,
                           K_Ic,
                           Carters_coef=1e-6,
                           confining_stress=sigma0,
                           minimum_width=1e-5)


def sink_location(x, y):
    """ This function is used to evaluate if a point is a sink."""
    return abs(y) >= .6 and abs(y) <= 1. and abs(x) < 0.01


def sink_vel(x, y):
    """ This function gives the sink velocity of point."""
    return 6e-4


def source_location(x, y):
Exemplo n.º 5
0
youngs_mod = 3.3e10  # Young's modulus
Eprime = youngs_mod / (1 - nu**2)  # plain strain modulus
K_Ic = 0.5  # fracture toughness


def sigmaO_func(x, y):
    """ This function provides the confining stress over the domain"""

    # only dependant on the depth
    density = 2000
    return -(y - 400) * density * 9.8


# material properties
Solid = MaterialProperties(Mesh,
                           Eprime,
                           K_Ic,
                           confining_stress_func=sigmaO_func)


def source_location(x, y):
    """ This function is used to evaluate if a point is included in source, i.e. the fluid is injected at the given
        point.
    """
    tolerance = 2.
    # the condition
    return abs(x) < 75 and (y >= -75. - tolerance and y <= -75. + tolerance)


# injection parameters
Q0 = 0.001  # injection rate
Injection = InjectionProperties(Q0, Mesh, source_loc_func=source_location)
youngs_mod = 3.3e10  # Young's modulus
Eprime = youngs_mod / (1 - nu**2)  # plain strain modulus


# the function below will make the fracture propagate in the form of an ellipse (see Zia and Lecampion 2018)
def K1c_func(alpha):
    K1c_1 = 1.e6  # fracture toughness along x-axis
    K1c_2 = 1.414e6  # fracture toughness along y-axis

    beta = np.arctan((K1c_1 / K1c_2)**2 * np.tan(alpha))
    return 4 * (2 / np.pi)**0.5 * K1c_2 * (
        np.sin(beta)**2 + (K1c_1 / K1c_2)**4 * np.cos(beta)**2)**0.25


Solid = MaterialProperties(Mesh,
                           Eprime,
                           anisotropic_K1c=True,
                           K1c_func=K1c_func)

# injection parameters
Q0 = 0.001  # injection rate
Injection = InjectionProperties(Q0, Mesh)

# fluid properties
Fluid = FluidProperties(viscosity=1.1e-5)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 500  # the time at which the simulation stops
simulProp.set_volumeControl(
    True)  # to set up the solver in volume control mode (inviscid fluid)
simulProp.tolFractFront = 4e-3  # increase tolerance for the anisotropic case
from properties import MaterialProperties, FluidProperties, InjectionProperties, SimulationProperties
from fracture import Fracture
from controller import Controller
from fracture_initialization import Geometry, InitializationParameters

# creating mesh
Mesh = CartesianMesh(0.3, 0.3, 41, 41)

# solid properties
nu = 0.4  # Poisson's ratio
youngs_mod = 3.3e10  # Young's modulus
Eprime = youngs_mod / (1 - nu**2)  # plain strain modulus
K_Ic = 0.5  # fracture toughness

# material properties
Solid = MaterialProperties(Mesh, Eprime, K_Ic)

# injection parameters
Q0 = 0.001  # injection rate
Injection = InjectionProperties(Q0, Mesh)

# fluid properties
Fluid = FluidProperties(viscosity=1.1e-3)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 1e5  # the time at which the simulation stops
simulProp.frontAdvancing = 'explicit'  # to set explicit front tracking
simulProp.saveTSJump, simulProp.plotTSJump = 5, 5  # save and plot after every five time steps
simulProp.set_outputFolder(
    "./Data/M_radial_explicit")  # the disk address where the files are saved
Exemplo n.º 8
0
setup_logging_to_console(verbosity_level='info')

# creating mesh
Mesh = CartesianMesh(50, 50, 41, 41)

# solid properties
nu = 0.4  # Poisson's ratio
youngs_mod = 3.3e10  # Young's modulus
Eprime = youngs_mod / (1 - nu**2)  # plain strain modulus
K1c = 0  # zero toughness case
Cl = 0.5e-6  # Carter's leak off coefficient

# material properties
Solid = MaterialProperties(Mesh,
                           Eprime,
                           K1c,
                           Carters_coef=Cl,
                           minimum_width=1e-12)

# injection parameters
Q0 = 0.01  # injection rate
Injection = InjectionProperties(Q0, Mesh)

# fluid properties
viscosity = 0.001 / 12  # mu' =0.001
Fluid = FluidProperties(viscosity=viscosity)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 3e7  # the time at which the simulation stops
simulProp.saveTSJump, simulProp.plotTSJump = 3, 5  # save and plot after every 5 time steps
nu = 0.4  # Poisson's ratio
youngs_mod = 3.3e10  # Young's modulus
Eprime = youngs_mod / (1 - nu**2)  # plain strain modulus
K_Ic1 = 5.6e6  # fracture toughness


def My_KIc_func(x, y):
    """ The function providing the fracture toughness"""
    if x < 0.2:
        return K_Ic1
    else:
        return K_Ic1 * 3.6


Solid = MaterialProperties(Mesh,
                           Eprime,
                           K1c_func=My_KIc_func,
                           minimum_width=1e-8)

# injection parameters
Q0 = 0.05  # injection rate
Injection = InjectionProperties(Q0, Mesh, source_coordinates=[0.1, 0.])

# fluid properties
Fluid = FluidProperties(viscosity=1.1e-3)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 0.0003  # the time at which the simulation stops
myfolder = "./Data/toughness_jump_3p6"
simulProp.set_outputFolder(
    myfolder)  # the disk address where the files are saved
    """ This function provides the confining stress over the domain"""
    density_high = 2700
    density_low = 2300
    layer = 2900
    Ly = 3400
    if y > layer:
        return (Ly - y) * density_low * 9.8

    return (Ly - y) * density_high * 9.8 - (Ly - layer) * (density_high -
                                                           density_low) * 9.8


# material properties
Solid = MaterialProperties(Mesh,
                           Eprime,
                           toughness=6.5e6,
                           confining_stress_func=sigmaO_func,
                           minimum_width=1e-5)

# injection parameters
Q0 = np.asarray([[0.0, 500], [2000, 0]])  # injection rate
Injection = InjectionProperties(Q0, Mesh)

# fluid properties
Fluid = FluidProperties(viscosity=30, density=2400)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 560000  # the time at which the simulation stops
simulProp.set_outputFolder(
    "./Data/neutral_buoyancy")  # the disk address where the files are saved
Exemplo n.º 11
0

def sigmaO_func(x, y):
    """ This function provides the confining stress over the domain"""
    if 0 < y < 7:
        return 5.25e6
    elif y < -50:
        return 5.25e6
    else:
        return 5.e6


# material properties
Solid = MaterialProperties(Mesh,
                           Eprime,
                           toughness=K_Ic,
                           confining_stress_func=sigmaO_func,
                           Carters_coef=1e-6)

# injection parameters
Q0 = np.asarray([[0, 6000], [0.001, 0]])
Injection = InjectionProperties(Q0, Mesh, source_coordinates=[0, -20])

# fluid properties
Fluid = FluidProperties(viscosity=1e-3)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 1.6e4  # the time at which the simulation stops
simulProp.set_outputFolder(
    "./Data/fracture_closure")  # the disk address where the files are saved
Exemplo n.º 12
0
    """ The function providing the confining stress"""
    R=0.05
    x1=0.
    y1=0.2

    if (abs(x)-x1)**2+(abs(y)-y1)**2 < R**2:
       return 60.0e6
    if (abs(x)-y1)**2+(abs(y)-x1)**2 < R**2:
       return 60.0e6
    else:
       return 5.0e6


Solid = MaterialProperties(Mesh,
                           Eprime,
                           K1c_func=My_KIc_func,
                           confining_stress_func=sigmaO_func,
                           minimum_width=1e-8)


# injection parameters
Q0 = 0.001  # injection rate
Injection = InjectionProperties(Q0, Mesh)

# fluid properties
Fluid = FluidProperties(viscosity=1.1e-3)

# simulation properties
simulProp = SimulationProperties()
simulProp.bckColor = 'sigma0'
simulProp.finalTime = 0.28                          # the time at which the simulation stops
Exemplo n.º 13
0
    Eprime_ratio = TI_plain_strain_modulus(
        alpha, Cij) / TI_plain_strain_modulus(np.pi / 2, Cij)
    Eprime_ratio13 = TI_plain_strain_modulus(0, Cij) / TI_plain_strain_modulus(
        np.pi / 2, Cij)
    gamma = (Eprime_ratio13 * K1c_3 / K1c_1)**2  # aspect ratio
    beta = np.arctan(np.tan(alpha) / gamma)

    return K1c_3 * Eprime_ratio * ((np.sin(beta))**2 +
                                   (np.cos(beta) / gamma)**2)**0.25


# materila properties
Solid = MaterialProperties(Mesh,
                           Eprime,
                           anisotropic_K1c=True,
                           toughness=K1c_func(np.pi / 2),
                           K1c_func=K1c_func,
                           TI_elasticity=True,
                           Cij=Cij)

# injection parameters
Q0 = 0.001  # injection rate
Injection = InjectionProperties(Q0, Mesh)

# fluid properties
Fluid = FluidProperties(viscosity=1.1e-4)

# aspect ratio of the elliptical fracture
gamma = (
    K1c_func(np.pi / 2) / K1c_func(0) *
    TI_plain_strain_modulus(  # gamma = (Kc3/Kc1*E1/E3)**2