controller module¶
This file is part of PyFrac.
Created by Haseeb Zia on 11.05.17. Copyright (c) ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, Geo-Energy Laboratory, 2016-2020. All rights reserved. See the LICENSE.TXT file for more details.
-
class
controller.
Controller
(Fracture, Solid_prop, Fluid_prop, Injection_prop, Sim_prop, Load_prop=None, C=None)[source]¶ Bases:
object
This class describes the controller which takes the given material, fluid, injection and loading properties and advances a given fracture according to the provided simulation properties.
-
advance_time_step
(Frac, C, timeStep, perfNode=None)[source]¶ This function advances the fracture by the given time step. In case of failure, reattempts are made with smaller time steps.
- Parameters
Frac (Fracture object) – – fracture object from the last time step
C (ndarray-float) – – the elasticity matrix
timeStep (float) – – time step to be attempted
perfNode (IterationProperties) –
- Returns
exitstatus (int) – see documentation for possible values.
Fr (Fracture) – fracture after advancing time step.
-
errorMessages
= ['Propagation not attempted!', 'Time step successful!', 'Evaluated level set is not valid!', 'Front is not tracked correctly!', 'Evaluated tip volume is not valid!', 'Solution obtained from the elastohydrodynamic solver is not valid!', 'Did not converge after max iterations!', 'Tip inversion is not correct!', 'Ribbon element not found in the enclosure of the tip cell!', 'Filling fraction not correct!', 'Toughness iteration did not converge!', 'projection could not be found!', 'Reached end of grid!', "Leak off can't be evaluated!", 'fracture fully closed', 'iterating more is not leading the iterations on the front position to converge!', 'maximum number of elements in the crack reached!']¶
-
extend_isotropic_elasticity_matrix
(new_mesh, direction=None)[source]¶ In the case of extension of the mesh we don’t need to recalculate the entire elasticity matrix. All we need to do is to map all the elements to their new index and calculate what lasts
- Parameters
new_mesh (object CartesianMesh) – – a mesh object describing the domain.
-
get_time_step
()[source]¶ This function calculates the appropriate time step. It takes minimum of the time steps evaluated according to the following:
time step evaluated with the current front velocity to limit the increase in length compared to a cell length
time step evaluated with the current front velocity to limit the increase in length compared to the current fracture length
time step evaluated with the injection rate in the coming time step
time step evaluated to limit the change in total volume of the fracture
In addition, the limit on the time step and the times at which the solution is required are also taken in account to get the appropriate time step.
- Returns
time_step (float) – the appropriate time step.
-
output
(Fr_advanced)[source]¶ This function plot the fracture footprint and/or save file to disk according to the parameters set in the simulation properties. See documentation of SimulationProperties class to get the details of parameters which determines when and how the output is made.
- Parameters
Fr_advanced (Fracture object) – – fracture after time step is advanced.
-
run
()[source]¶ This function runs the simulation according to the parameters given in the properties classes. See especially the documentation of the
properties.SimulationProperties
class to get details of the parameters controlling the simulation run.
-