Beispiel #1
0
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,
                       tip_distances=surv_cells_dist,
                       inner_cells=inner_cells)

from elasticity import load_isotropic_elasticity_matrix
C = load_isotropic_elasticity_matrix(Mesh, Eprime)
init_param = InitializationParameters(Fr_geometry,
# 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/radial_PL")          # the disk address where the files are saved
simulProp.set_simulation_name('PLF_n0.6')               # setting simulation name
simulProp.tolFractFront = 0.003                         # increase the tolerance for faster run
simulProp.plotTSJump = 5                                # plot after every five time steps
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=',')         # loading dimensionless width profile for n = 0.5
t = 0.00005
n = Fluid.n
gamma = 0.7155
Mprime = 2**(n + 1) * (2 * n + 1)**n / n**n * Fluid.k
Vel = 2 * (n + 1) / (n + 2) / 3 * gamma * (Eprime * Q0 ** (n + 2) / Mprime
        ) ** (1 / (3 * n + 6)) / t ** ((n + 4) / (3 * n + 6))
eps = (Mprime / Eprime / t**n) ** (1 / (n + 2))
L = (Eprime * Q0**(n + 2) * t**(2 * n + 2) / Mprime) ** (1 / (3 * n + 6))

# interpolating width on cell centers
                           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
Fr_geometry = Geometry('radial', radius=20)
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)
# 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
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)
# fluid properties
Fluid = FluidProperties(viscosity=0)

# simulation properties
simulProp = SimulationProperties()
simulProp.finalTime = 1e2  # the time at which the simulation stops
simulProp.set_tipAsymptote(
    'K'
)  # the tip asymptote is evaluated with the toughness dominated assumption
simulProp.set_volumeControl(
    True
)  # use the inviscid fluid solver(toughness dominated), imposing volume balance
simulProp.set_outputFolder(
    "./Data/K_radial_symmetric")  # the disk address where the files are saved
simulProp.symmetric = True  # assume fracture geometry to be symmetric (only available for volume control)
simulProp.plotTSJump = 10  # plotting every 10 time steps

# initializing fracture
Fr_geometry = Geometry('radial', radius=0.15)
init_param = InitializationParameters(Fr_geometry, regime='K')

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

####################