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
# 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

# initializing fracture
from fracture_initialization import get_radial_survey_cells
initRad = np.pi
surv_cells, _, inner_cells = get_radial_survey_cells(Mesh, initRad)
surv_cells_dist = np.cos(Mesh.CenterCoor[surv_cells, 0]) + 2.5 - abs(
    Mesh.CenterCoor[surv_cells, 1])
Fr_geometry = Geometry(shape='level set',
                       survey_cells=surv_cells,
Exemplo n.º 3
0
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
simulProp.projMethod = 'LS_continousfront'              # using the continuous front algorithm
simulProp.set_tipAsymptote('PLF')                       # setting the tip asymptote to power-law fluid

# initializing the fracture width with the solution provided by  Madyarova & Detournay 2004 for power-law fluids. 
w = np.zeros(Mesh.NumberOfElts)
xw = np.genfromtxt('width_n_05.csv', delimiter=',')
t = 0.00005
n = Fluid.n
    Mesh,
    source_loc_func=source_location,
    sink_loc_func=sink_location,
    sink_vel_func=sink_vel,
    model_inj_line=True,
    il_compressibility=1e-9,
    il_volume=1e-3,
    perforation_friction=0,
    initial_pressure=np.nan
)  # the initial pressure in injection line is set below

# fluid properties
Fluid = FluidProperties(
    viscosity=0.617,
    rheology='HBF',  # set fluid rheology to Herschel-Bulkley
    compressibility=1e-11,
    n=0.617,
    k=0.22,
    T0=2.3)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 86  # the time at which the simulation stops
simulProp.set_outputFolder(
    "./Data/HB")  # the disk address where the files are saved
simulProp.set_simulation_name(
    'HB_injection_line_sink')  # setting simulation name
simulProp.saveG = True  # enable saving the coefficient G
simulProp.plotVar = ['ir', 'w']  # plot width of fracture
simulProp.saveEffVisc = True  # enable saving of the effective viscosity
simulProp.relaxation_factor = 0.3  # relax Anderson iteration
Exemplo n.º 5
0
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)

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

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 1.1e4  # the time at which the simulation stops
simulProp.set_outputFolder(
    "./Data/buoyant_line_source")  # the disk address where the files are saved
simulProp.gravity = True  # take the effect of gravity into account
simulProp.set_mesh_extension_direction(['top'])
simulProp.plotVar = ['w', 'regime']
simulProp.toleranceEHL = 1e-3

# initializing fracture
surv_cells, _, inner_cells = get_eliptical_survey_cells(Mesh,
                                                        80,
                                                        20,
    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
simulProp.remeshFactor = 1.5  # the factor by which the mesh will be compressed.
simulProp.set_outputFolder(
    "./Data/ellipse")  # the disk address where the files are saved
simulProp.set_simulation_name('anisotropic_toughness_benchmark')
simulProp.symmetric = True  # solving with faster solver that assumes fracture is symmetric

# initializing fracture
gamma = (K1c_func(np.pi / 2) / K1c_func(0))**2  # gamma = (Kc1/Kc3)**2
    j = 3 * np.pi / 20
    f = 1 / (1 + np.e**(-2 * 5 * (alpha - j)))
    return K1c_1 + (K1c_2 - K1c_1) * f


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

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

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

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 4000  # 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
simulProp.set_outputFolder(
    "./Data/toughness_jump")  # the disk address where the files are saved
simulProp.set_simulation_name('anisotropic_toughness_jump')
simulProp.symmetric = True  # set the fracture to symmetric

# initializing fracture
gamma = (K1c_func(np.pi / 2) / K1c_func(0))**2  # gamma = (Kc1/Kc3)**2
Fr_geometry = Geometry('elliptical', minor_axis=15., gamma=gamma)
                                                           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
simulProp.gravity = True  # set up the gravity flag
simulProp.tolFractFront = 3e-3  # increase the tolerance for fracture
# front iteration
simulProp.plotTSJump = 4  # plot every fourth time step
simulProp.saveTSJump = 2  # save every second time step
simulProp.maxSolverItrs = 200  # increase the Anderson iteration limit for the
# elastohydrodynamic solver
simulProp.tmStpPrefactor = np.asarray([[0, 80000], [0.5, 0.1]
                                       ])  # set up the time step prefactor
Exemplo n.º 9
0
        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
simulProp.bckColor = 'confining stress'  # setting the parameter for the mesh color coding
simulProp.plotTSJump = 4  # set to plot every four time steps
simulProp.plotVar = ['w', 'lk', 'footprint'
                     ]  # setting the parameters that will be plotted
simulProp.tmStpPrefactor = np.asarray(
    [[0, 6000], [0.8, 0.4]])  # decreasing the time step pre-factor after 6000s
simulProp.maxSolverItrs = 120  # increase maximum iterations for the elastohydrodynamic solver

# initialization parameters
Exemplo n.º 10
0
    return (Ly - y) * density_high * 9.8


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

# injection parameters
Q0 = np.asarray([[0.0, 50], [50, 0]])  # injection rate
Injection = InjectionProperties(Q0, Mesh, source_coordinates=[0, -1000])

# fluid properties
Fluid = FluidProperties(viscosity=50, density=2650)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 56000000000
#simulProp.frontAdvancing = 'implicit'  # the time at which the simulation stops
simulProp.set_outputFolder(
    "./Data/neutral_buoyancy")  # the disk address where the files are saved
simulProp.gravity = True  # set up the gravity flag
simulProp.tolFractFront = 3e-3  # increase the tolerance for fracture front iteration
simulProp.plotTSJump = 5  # plot every fourth time step
simulProp.saveTSJump = 2  # save every second time step
simulProp.maxSolverItrs = 500  # increase the Picard iteration limit for the elastohydrodynamic solver
#simulProp.tmStpPrefactor = np.asarray([[0, 80000], [0.3, 0.1]]) # set up the time step prefactor
#simulProp.timeStepLimit = 500             # time step limit
simulProp.plotVar = ['w']  # plot fracture width and fracture front velocity
Exemplo n.º 11
0
# solid properties
Eprime = 10e9                           # plain strain modulus
Kprime = 3.19e6
K_Ic = Kprime / (4 * np.sqrt(2 / np.pi))                              # fracture toughness

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

Q0 = 0.005
Injection = InjectionProperties(Q0, Mesh)

# fluid properties
Fluid = FluidProperties(viscosity=0.75,
                        rheology='HBF',
                        compressibility=0,
                        n=0.6, k=0.75, T0=10.)


# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 38000                             # the time at which the simulation stops
simulProp.set_outputFolder("./Data/HB")                 # the disk address where the files are saved
simulProp.set_simulation_name('HB_Gauss_Chebyshev_comparison')  # setting simulation name
simulProp.saveG = True                                  # enable saving the coefficient G
simulProp.plotVar = ['w', 'G']                          # plot width of fracture
simulProp.saveEffVisc = True                            # enable saving of the effective viscosity
simulProp.relaxation_factor = 0.3                       # relax Anderson iteration
simulProp.maxSolverItrs = 200                           # set maximum number of Anderson iterations to 200
simulProp.collectPerfData = True                        # enable collect performance data
simulProp.tolFractFront = 3e-3                          # increasing fracture front iteration tolerance