ftemp: PyFEHM template models

class ftemp.wellbore_model(xL, zL, wellbore_radius, wellbore_xdiv, pipe_width, pipe_xdiv, casing_width, casing_xdiv, reservoir_xdiv, zdiv, zprop, injection_temperature, injection_flow_rate, initial_temperature, simulation_time, inputfilename='', gridfilename='', work_dir=None, pipe_density=2500.0, pipe_specific_heat=1000.0, pipe_conductivity=2.0, casing_density=2500.0, casing_specific_heat=1000.0, casing_conductivity=0.5, reservoir_density=2500.0, reservoir_specific_heat=1000.0, reservoir_conductivity=1.0, reservoir_porosity=0.1, reservoir_permeability=1e-15, wellbore_permeability=0.0001, surface_pressure=0.1, surface_temperature=25.0)

Create a simple 2D radial well bore model. Returns an fdata object corresponding to the model.

User inputs dimensions of the wellbore, steel pipe, casing and reservoir, their material properties and permeability, information about initial reservoir conditions and the injection operation. The model grid is generated on initialisation but this can be replaced with a more complex mesh by calling read_grid() - zones will be automatically reassigned.

The simulation is executed by calling the run() method.

Output data are visualised by calling plot() or summarise() methods.

Parameters:
  • xL (fl64) – Horizontal dimension of model.
  • zL (fl64) – Vertical dimension of model.
  • wellbore_radius (fl64) – Well-bore radius.
  • wellbore_xdiv (int) – Horizontal grid divisions in wellbore.
  • pipe_width (fl64) – Steel pipe width.
  • pipe_xdiv (int) – Horizontal grid divisions in steel pipe.
  • casing_width (fl64) – Casing width.
  • casing_xdiv (int) – Horizontal grid divisions in casing.
  • reservoir_xdiv (int) – Horizontal grid divisions in reservoir.
  • zdiv (lst[int]) – Number of vertical divisions for the grid (not including the feedzone).
  • zprop (lst[fl64]) – Proportioning of vertical dimension for gridding.
  • injection_temperature (fl64) – Temperature of fluid injected at the wellhead.
  • injection_flow_rate (fl64) – Flow rate of fluid injected at the wellhead.
  • initial_temperature (fl64, str) – Specifies initial temperature conditions in the reservoir. If positive, initial temperature is interpreted as isotropic. If negative, initial temperature is interpreted as a vertical gradient. If a string, initial temperature corresponds to a text file containing a temperature-depth profile and applies this as the initial reservoir temperatures.
  • simulation_time (fl64) – Length of simulation in days.
  • inputfilename (str) – Name of input file.
  • gridfilename (str) – Name of grid file.
  • pipe_density (fl64) – Density of steel pipe.
  • pipe_specific_heat (fl64) – Specific heat of steel pipe.
  • casing_density (fl64) – Density of casing.
  • casing_specific_heat (fl64) – Specific heat of casing.
  • reservoir_density (fl64) – Density of reservoir.
  • reservoir_specific_heat (fl64) – Specific heat of reservoir.
  • reservoir_permeability (fl64, lst[fl64]) – Reservoir permeability, specified as either isotropic k0 or anisotropic [kx,ky,kz].
  • wellbore_permeability (fl64, lst[fl64]) – Wellbore permeability, surrogate representing rapid transport down well. Set to high value.
plot(temperature_lims=[], pdf='', combineString='gswin64', Tslice=True, Tslice_xlims=[], Tslice_ylims=[], Tslice_divisions=[100, 100], Tslice_method='nearest', Pslice=True, Pslice_xlims=[], Pslice_ylims=[], Pslice_divisions=[100, 100], Pslice_method='nearest', Ttime=True, Ttime_xlims=[], Ttime_ylims=[], Twell=True, Twell_times=[], Twell_xlims=[], Twell_ylims=[], Twell_initial=True, Twell_profiles=None, Twell_output=False, Pcorrection=True, Pcorrection_xlims=[], Pcorrection_ylims=[], imperial_units=False, write_out=False)

Generate plots of wellbore simulation.

Parameters:
  • temperature_lims (lst[fl64,fl64]) – Limits on temperature axis of temperature vs. time plot.
  • pdf (str) – Name of pdf file to combine all output plots. If not specified, pdf will not be created.
  • combineString (str) – Name of ghostscript executable.
pipe_density

(fl64) Density of pipe.

pipe_specific_heat

(fl64) Specific heat of pipe.

casing_density

(fl64) Density of casing.

casing_specific_heat

(fl64) Specific heat of casing

reservoir_density

(fl64) Density of reservoir.

reservoir_specific_heat

(fl64) Specific heat of reservoir

reservoir_porosity

(fl64) Porosity of reservoir.

reservoir_permeability

(fl64) Permeability of reservoir. If three element list, tuple or ndarray is passed, this is assumed to correspond to [kx,ky,kz].

wellbore_permeability

(fl64) Permeability in the wellbore. This should be set to a high number, representing free-flowing water.

pipe_conductivity

(fl64) Thermal conductivity of the steel pipe.

casing_conductivity

(fl64) Thermal conductivity of the casing.

reservoir_conductivity

(fl64) Thermal conductivity of the reservoir.

surface_pressure

(**) Pressure at top surface of model, default is atmospheric.

surface_temperature

(**) Temperature at top surface of model, default is 25degC.

injection_temperature

(fl64) Temperature of the fluid injected at the wellhead.

injection_flow_rate

(fl64) Flow rate of fluid injected at the wellhead.

simulation_time

(fl64) Length of simulation in days

initial_temperature

(fl64, str) Specifies initial temperature conditions in the reservoir. If positive, initial temperature is interpreted as isotropic. If negative, initial temperature is interpreted as a vertical gradient. If a string, initial temperature corresponds to a text file containing a temperature-depth profile and applies this as the initial reservoir temperatures.

This Page