BlackOil#
- class reservoirflow.models.BlackOil(grid: Grid, fluid: Fluid, well=None, pi: int = None, dt: int = 1, start_date: date = None, unit: str = 'field', dtype: str = 'double', verbose: bool = False)#
Bases:
Model
BlackOil model class.
- Returns:
Model object.
- Return type:
Create BlackOil Model.
- Parameters:
grid (Grid) – Grid object.
fluid (Fluid) – Fluid object.
well (Well, optional) – Well object. Wells can be added latter using
set_well()
method.pi (int, optional) – Initial reservoir pressure.
dt (int, optional) – Time step duration.
start_date (date, optional) – Start date of the simulation run. If None, today’s date is used.
unit (str ('field', 'metric', 'lab'), optional) – unit used in input and output. Both units and factors attributes will be updated based on the selected unit and can be accessed directly from this class.
dtype (str or np.dtype, optional) – data type used in all arrays. Numpy dtype such as np.single or np.double can be used.
verbose (bool, optional) – print information for debugging.
Notes
Note
Both attributes units and factors are defined based on unit argument, for more details, check Units & Factors. For definitions, check Glossary.
Attention
deciding sparsity must be at the initialization step and not in
solve()
orrun()
methods because this will require that the ceofficient matrix must be reinitialized each time sparsity is changed which requires tracking this change.Attributes
Returns class factors.
Returns class name.
Returns class unit.
Returns class units.
Methods
Allow full descriptions.
compile
(stype, method[, sparse])Build a solution (equation system) for the model.
copy
()Copy model (under development)
get_cell_trans
([cell_id, cell_coords, boundary])Returns transmissibility (T) at all cell faces.
get_cells_trans
([boundary, sparse, vectorize])_summary_
get_cells_trans_diag
([boundary, diag_n])get_centers
([scale, boundary])get_df
([columns, boundary, units, melt, ...])Returns simulation data as a dataframe.
get_domain
(scale, boundary)Initialization arrays.
get_shape
([boundary])Solution shape.
get_time
([scale])plot
([prop, id, tstep])Show values in a cartesian plot.
plot_grid
([property, tstep])report
([prop, showindex, ifmt])Print class report.
run
(**kwargs)Solve multiple timesteps.
save_gif
([prop, label, boundary, wells, ...])Saves pyvista show as gif
set_all_boundaries
(cond, v)Set the same boundary condition in all boundaries.
set_boundaries
(bdict)Set boundary conditions using a dictionary.
set_boundary
(cell_b_id, cond, v)Set a boundary condition in a cell.
set_comp
(comp)Set model compressibility
set_scalers
(scalers_dict)Set scalers configuration.
set_solution
(name)set_units
([unit])Set object units.
set_well
([well, cell_id, q, pwf, r, s])Set a well in a specific cell
show
([prop, label, boundary, wells, ruler, ...])Show pyvista plotter
solve
(**kwargs)Solve a single timestep.
update_scalers
(boundary)
Comments 💬#
Feel free to make a comment, ask a question, or share your opinion about this specific content. Please keep in mind the Commenting Guidelines ⚖.