Imagine, you are an expert in PyFrac softaware (by Lecampion and Zia). You have very low value of fluid viscosity 1e-3 Pa*s and small domain of fracture propagation (98mm). You have pumping velocity profile represented by exponenta. How to initialize fracture to obtain the pressure net lie on a plato at each time step. You have to decide where is to take these values (each cells) to coincide real fracking experiment in laboratory, where wellbore radius is 6.5mm. In real experiment only one value of pressure each moment of time you have. In was suggested for this rate profile that pumping was processed from already prepared well, so pressure already should be on plato.
IMPORTANT: all values of pressure should be equaly the same.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
PyFrac Initialization for Plateau Pressure Profile
To achieve equal pressure values (plateau) across your fracture in PyFrac with your experimental parameters, here's how to set up your simulation:
Initial Fracture Configuration
Create a pre-existing fracture rather than starting from zero:
python
# Initialize with a pre-existing fracture matching wellbore radius
from PyFrac import *
# Define radius matching your wellbore
r_wellbore = 6.5e-3 # 6.5mm in meters
# Initial fracture slightly larger than wellbore
r_initial = 1.2 * r_wellbore
# Create radial mesh with refinement near wellbore
mesh = CartesianMesh(0.098, 0.098, 41, 41) # 98mm domain
# Initialize fracture as small circle around injection point
init_fracture = get_radial_fracture(r_initial, mesh)
# Use uniform pressure as initial condition
init_pressure = np.ones(init_fracture.shape) * confining_stress
Simulation Parameters
Set these key parameters to ensure pressure plateau formation:
python
# Define fluid with your low viscosity
fluid = Fluid(viscosity=1e-3, # 1e-3 Pa*s
compressibility=1e-10) # Nearly incompressible
# Exponential injection rate (replace with your specific function)
def injection_rate(t):
return Q0 * np.exp(alpha * t)
# Important: Set small tolerance for pressure convergence
simulProp = SimulationProperties()
simulProp.toleranceFractureVolume = 1e-5
simulProp.toleranceEtaC = 1e-4
# Enable uniform pressure distribution option
simulProp.enableUniformPressure = True
Cell Selection for Pressure Output
To match your laboratory experiment that measures only one pressure value:
python
# Create a function to extract pressure at wellbore location
def get_wellbore_pressure(fracture, mesh):
# Find cells within wellbore radius
wellbore_cells = mesh.locate_element(
np.where((mesh.CenterCoor[:, 0]**2 + mesh.CenterCoor[:, 1]**2) <= r_wellbore**2)[0])
# Average pressure in these cells
return np.mean(fracture.p[wellbore_cells])
The key to achieving your plateau pressure is enabling the uniform pressure distribution option and starting with a pre-existing fracture that's already initialized at a consistent pressure. The extremely low viscosity helps maintain this plateau as fluid flows with minimal resistance throughout the fracture.
Would you like me to explain or break down any part of this code in more detail?