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
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 # initializing fracture from fracture_initialization import get_radial_survey_cells initRad = np.pi surv_cells, _, inner_cells = get_radial_survey_cells(Mesh, initRad)
def source_location(x, y): """ This function is used to evaluate if a point is a source, i.e. the fluid is injected at the given point. """ # the condition return abs(x) < 0.01 and abs(y) < 0.5 Q0 = 0.001 / 60 Injection = InjectionProperties( Q0, # see documentation of the class for details 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)
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) # 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
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 simulProp.projMethod = 'LS_continousfront' simulProp.frontAdvancing = 'implicit' simulProp.useBlockToeplizCompression = True simulProp.saveToDisk = False simulProp.bckColor = 'K1c'
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 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