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

# initialization parameters
Fr_geometry = Geometry('radial', radius=0.1)
init_param = InitializationParameters(Fr_geometry, regime='M')

# 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
controller.run()
                           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
simulProp.set_outputFolder(
    "./Data/MtoMt_FO")  # the disk address where the files are saved
simulProp.plotVar = ['w', 'regime']

# initializing fracture
Fr_geometry = Geometry('radial')
init_param = InitializationParameters(Fr_geometry, regime='M', time=50)

# 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
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
simulProp.timeStepLimit = 5000  # time step limit
simulProp.plotVar = ['w',
                     'v']  # plot fracture width and fracture front velocity
simulProp.set_mesh_extension_direction(
    ['top', 'horizontal'])  # allow the fracture to extend in positive y and x
simulProp.set_mesh_extension_factor(1.2)  # set the extension factor to 1.4
simulProp.useBlockToeplizCompression = True  # use the Toepliz elasticity matrix to save memory

# initializing a static fracture
C = load_isotropic_elasticity_matrix_toepliz(Mesh, Solid.Eprime)
Fr_geometry = Geometry('radial', radius=300)