Coldfront API Reference
pyfastwell.wellflow.coldfront.Coldfront
__init__
__init__(wellres: wi_tno, flowrate: float, tres: float, tinj: float, salinity: float, rockdens: float = 2700, rockcap: float = 1000, porosity: float = 0.21, simyears: int = 30, maxlength: float = 20, polwidth: float = 60, gridrange: float = 2000, ncell: int = 200, loadhours: int = 8760, verbose: bool = False)
Simulates the cold front propagation in a reservoir flow grid.
Parameters
wellres : Well and reservoir model.
flowrate : Flow rate in m³/h.
tres : Reservoir temperature in K.
tinj : Injected water temperature in K.
salinity : Salinity of injected water in ppm.
rockdens : Rock density in kg/m³.
rockcap : Rock heat capacity in J/(kg·K).
porosity : Rock porosity (fraction).
simyears : Number of simulation years.
maxlength : Max polygon edge length in m.
polwidth : Polygon width around well in m.
gridrange : Grid range around bounding box of injectors at reservoir level in m.
ncell : Number of grid cells in x and y for flow grid.
loadhours : Annual operating hours.
verbose : Print additional info.
plot_coldfront
Plot the cold front of injected water in the flow grid.
Parameters
filename_noext : If provided, saves the plot to this filename (without extension), otherwise displays it.
title : Title for the plot. If None, a default title is used.
Returns
None
getwellQ
Calculate the total flowrate of the wells in m³/s.
Returns
Total flowrate of the wells in m³/s.
setSources
Generate a list of source points for the reservoir flow model.
Returns
list of tuples, each tuple contains (x, y, strength) for a source point.
get_perforation_lines
Get perforation line segments for injectors or producers.
Parameters
inj : If True, return injector lines; if False, return producer lines.
Returns
list of tuple, Each tuple contains (x0, y0, x1, y1) coordinates for a perforation line.
get_inj_polygons
Generate polygons around injector well segments.
Parameters
polwidth : Width of the polygon around each injector line (default: 60). max_length : Maximum edge length for polygon subdivision (default: 5).
Returns
shapely.geometry.Polygon or MultiPolygon, Unified polygon(s) representing injector regions.