Name | woffl JSON |
Version |
1.0.20
JSON |
| download |
home_page | None |
Summary | Water Optimization For Fluid Lift. Numerical solver for liquid powered jet pumps with multiphase flow |
upload_time | 2024-12-21 02:53:08 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2023 Kaelin Ellis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
jet pump
solver
numerical
multiphase
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|

Woffl /ˈwɑː.fəl/ is a Python library for numerical modeling of subsurface jet pump oil wells.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install woffl.
```bash
pip install woffl
```
## Usage
Defining an oil well in woffl is broken up into different classes that are combined together in an assembly that creates the model. The classes are organized into PVT, Geometry, Flow and Assembly.
### PVT - Fluid Properties
The PVT module is used to define the reservoir mixture properties. The classes are BlackOil, FormGas, FormWater and ResMix. BlackOil, FormGas and FormWat are the individual components in a reservoir stream and are fed into a ResMix where the formation gas oil ratio (FGOR) and watercut (WC) are defined.
```python
from woffl.pvt import BlackOil, FormGas, FormWater, ResMix
foil = BlackOil(oil_api=22, bubblepoint=1750, gas_sg=0.55)
fwat = FormWater(wat_sg=1)
fgas = FormGas(gas_sg=0.55)
fmix = ResMix(wc=0.355, fgor=800, oil=foil, wat=fwat, gas=fgas)
```
A condition of pressure and temperature can be set on individual components or on the ResMix which cascades it to the different components. Different properties can then be calculated. For example with ResMix the streams mass fractions, volumetric fractions, mixture density, component viscosities and mixture speed of sound can be estimated.
```python
fmix = fmix.condition(press=1500, temp=80)
xoil, xwat, xgas = fmix.mass_fract()
yoil, ywat, ygas = fmix.volm_fract()
dens_mix = fmix.rho_mix()
uoil, uwat, ugas = fmix.visc_comp()
snd_mix = fmix.cmix()
```
If the reader wants to calculate the insitu volumetric flowrates, an oil rate needs to be passed after a condition. The method will calculate the insitu volumetric flowrate for the different components in cubic feet per second. For this method to be accurate, the watercut fraction defined should be to at least three decimal points. EG: 0.355 for 35.5%.
```python
qoil, qwat, qgas = fmix.insitu_volm_flow(qoil_std=100)
```
### Inflow Performance Relationship (IPR)
The inflow class is used to define the IPR of the oil well. Either a Vogel or straight line productivity index can be used for predicting the oil rate at a specific wellbore pressure. The inflow class is defined using a known oil rate, flowing bottom hole pressure and reservoir pressure. Oil rate is used instead of a liquid rate. The predicted oil rate can be used in conjuction with a ResMix to predict the flowing water and gas rates.
```python
from woffl.flow import InFlow
ipr = InFlow(qwf=246, pwf=1049, pres=1400)
qoil_std = ipr.oil_flow(pnew=800, method="vogel")
```
### WellProfile
The WellProfile class defines the subsurface geometry of the drillout of the well. To define a WellProfile requires a survey of the measured depth, a survey of the vertical depth, and the jetpump measured depth. The WellProfile will then calculate the horizontal step out of the well as well as filtering the profile into a simplified profile.
```python
from woffl.geometry import WellProfile
md_examp = [0, 50, 150,...]
vd_examp = [0, 49.99, 149.99,...]
wprof = WellProfile(md_list=md_examp, vd_list=vd_examp, jetpump_md=6693)
```
Basic operations can be conducted on the wellprofile, such as interpolating using the measured depth to return a vertical depth or horizontal stepout.
```python
vd_dpth = wprof.vd_interp(md_dpth=2234)
hd_dist = wprof.hd_interp(md_dpth=2234)
```
The other benefit of the wellprofile is the ability to visual what the wellprofile looks like under the ground. Either the raw data or the filtered data can be plotted for visualization. The commands to use are below.
```python
wprof.plot_raw()
wprof.plot_filter()
```
### JetPump
The jetpump class defines the geometry of the jetpump. Currently only National pump geometries are defined. The pump is defined by passing a nozzle number and area ratio. Friction factors of the pumps nozzle, enterance, throat and diffuser are optional arguements.
```python
from woffl.geometry import JetPump
jpump = JetPump(nozzle_no="12", area_ratio="B")
```
### Pipe and Annulus
The Pipe and Annulus class defines how large the tubing and casing are in the well. Currently only the tubing needs to be defined for solving the jetpump performance. Future work will incorporate the annular geometry to account for annular friction in the well.
```python
from woffl.geometry import Pipe, Annulus
tube = Pipe(out_dia=4.5, thick=0.5)
case = Pipe(out_dia=6.875, thick=0.5)
annul = Annulus(inn_pipe=tube, out_pipe=case)
```
Simple geometries of the Pipe and Annulus can be accessed, such as the hydraulic diameter and cross sectional area.
```python
tube_id = tube.inn_dia
tube_area = tube.inn_area
ann_dhyd = annul.hyd_dia
ann_area = annul.ann_area
```
### Assembly
The assembly module is used to combine the previously defined classes into a system that can be used for solving. The assembly code is still being developed and currently is a mix of classes and a few fuctions. The critical class is the BatchPump class, allowing multiple pumps to be run across a defined system.
```python
from woffl.assembly import BatchPump
nozs = ["8", "9", "10", "11", "12", "13", "14", "15", "16"]
thrs = ["X", "A", "B", "C", "D", "E"]
well_batch = BatchPump(pwh=220, tsu=82, rho_pf=62.4, ppf_surf=2800, wellbore=tube, wellprof=wprof, ipr_su=ipr, prop_su=fmix)
jp_list = BatchPump.jetpump_list(nozs, thrs)
result_dict = well_batch.batch_run(jp_list)
```
The results dictionary can be passed into a Pandas Dataframe and used for results analysis. A few simple functions have been written to easily visualize the results.
```python
import pandas as pd
from woffl.assembly import batch_results_mask, batch_results_plot
df = pd.DataFrame(result_dict)
mask_pump = batch_results_mask(df["qoil_std"], df["total_water"])
batch_results_plot(df["qoil_std"], df["total_water"], df["nozzle"], df["throat"], mask=mask_pump)
```
## Background
If the reader is interested in the physics and numerical modeling that went into woffl they should read the papers that are listed below. The paper by Merrill provies a good introduction to the basic method that is used. Cunningham set much of the foundational equations that are used in the modeling. The authors intend to publish a paper with a more detailed explanation in the future.
### Relevant Papers
- Cunningham, R. G., 1974, “Gas Compression With the Liquid Jet Pump,” ASME J Fluids Eng, 96(3), pp. 203–215.
- Cunningham, R. G., 1995, “Liquid Jet Pumps for Two-Phase Flows,” ASME J Fluids Eng, 117(2), pp. 309–316.
- Merrill, R., Shankar, V., and Chapman, T., 2020, “Three-Phase Numerical Solution for Jet Pumps Applied to a Large Oilfield,” SPE-202928-MS, November 10, 2020.
- Himr, D., Habán, V., Pochylý, F., 2009, "Sound Speed in the Mixture Water - Air," Engineering Mechanics, Svratka, Czech Republic, May 11–14, 2009, Paper 255, pp. 393-401.
Raw data
{
"_id": null,
"home_page": null,
"name": "woffl",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "jet pump, solver, numerical, multiphase",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/97/4b/259f82035b407be8fae8681169029dfd5c285b63f1cda80df2340f4c9297/woffl-1.0.20.tar.gz",
"platform": null,
"description": "\n\nWoffl /\u02c8w\u0251\u02d0.f\u0259l/ is a Python library for numerical modeling of subsurface jet pump oil wells. \n\n## Installation \n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install woffl. \n\n```bash\npip install woffl\n``` \n## Usage \nDefining an oil well in woffl is broken up into different classes that are combined together in an assembly that creates the model. The classes are organized into PVT, Geometry, Flow and Assembly. \n\n### PVT - Fluid Properties \nThe PVT module is used to define the reservoir mixture properties. The classes are BlackOil, FormGas, FormWater and ResMix. BlackOil, FormGas and FormWat are the individual components in a reservoir stream and are fed into a ResMix where the formation gas oil ratio (FGOR) and watercut (WC) are defined. \n\n```python\nfrom woffl.pvt import BlackOil, FormGas, FormWater, ResMix\n\nfoil = BlackOil(oil_api=22, bubblepoint=1750, gas_sg=0.55)\nfwat = FormWater(wat_sg=1)\nfgas = FormGas(gas_sg=0.55)\nfmix = ResMix(wc=0.355, fgor=800, oil=foil, wat=fwat, gas=fgas)\n```\nA condition of pressure and temperature can be set on individual components or on the ResMix which cascades it to the different components. Different properties can then be calculated. For example with ResMix the streams mass fractions, volumetric fractions, mixture density, component viscosities and mixture speed of sound can be estimated. \n\n```python\nfmix = fmix.condition(press=1500, temp=80)\nxoil, xwat, xgas = fmix.mass_fract()\nyoil, ywat, ygas = fmix.volm_fract()\ndens_mix = fmix.rho_mix()\nuoil, uwat, ugas = fmix.visc_comp()\nsnd_mix = fmix.cmix()\n```\nIf the reader wants to calculate the insitu volumetric flowrates, an oil rate needs to be passed after a condition. The method will calculate the insitu volumetric flowrate for the different components in cubic feet per second. For this method to be accurate, the watercut fraction defined should be to at least three decimal points. EG: 0.355 for 35.5%. \n\n```python\nqoil, qwat, qgas = fmix.insitu_volm_flow(qoil_std=100)\n```\n### Inflow Performance Relationship (IPR) \n\nThe inflow class is used to define the IPR of the oil well. Either a Vogel or straight line productivity index can be used for predicting the oil rate at a specific wellbore pressure. The inflow class is defined using a known oil rate, flowing bottom hole pressure and reservoir pressure. Oil rate is used instead of a liquid rate. The predicted oil rate can be used in conjuction with a ResMix to predict the flowing water and gas rates. \n\n```python\nfrom woffl.flow import InFlow\n\nipr = InFlow(qwf=246, pwf=1049, pres=1400)\nqoil_std = ipr.oil_flow(pnew=800, method=\"vogel\")\n```\n### WellProfile \n\nThe WellProfile class defines the subsurface geometry of the drillout of the well. To define a WellProfile requires a survey of the measured depth, a survey of the vertical depth, and the jetpump measured depth. The WellProfile will then calculate the horizontal step out of the well as well as filtering the profile into a simplified profile. \n```python\nfrom woffl.geometry import WellProfile\n\nmd_examp = [0, 50, 150,...]\nvd_examp = [0, 49.99, 149.99,...]\nwprof = WellProfile(md_list=md_examp, vd_list=vd_examp, jetpump_md=6693)\n```\nBasic operations can be conducted on the wellprofile, such as interpolating using the measured depth to return a vertical depth or horizontal stepout. \n\n```python\nvd_dpth = wprof.vd_interp(md_dpth=2234)\nhd_dist = wprof.hd_interp(md_dpth=2234)\n```\nThe other benefit of the wellprofile is the ability to visual what the wellprofile looks like under the ground. Either the raw data or the filtered data can be plotted for visualization. The commands to use are below. \n\n```python\nwprof.plot_raw()\nwprof.plot_filter()\n```\n### JetPump \n\nThe jetpump class defines the geometry of the jetpump. Currently only National pump geometries are defined. The pump is defined by passing a nozzle number and area ratio. Friction factors of the pumps nozzle, enterance, throat and diffuser are optional arguements. \n\n```python\nfrom woffl.geometry import JetPump\n\njpump = JetPump(nozzle_no=\"12\", area_ratio=\"B\")\n```\n### Pipe and Annulus \n\nThe Pipe and Annulus class defines how large the tubing and casing are in the well. Currently only the tubing needs to be defined for solving the jetpump performance. Future work will incorporate the annular geometry to account for annular friction in the well. \n\n```python\nfrom woffl.geometry import Pipe, Annulus\n\ntube = Pipe(out_dia=4.5, thick=0.5)\ncase = Pipe(out_dia=6.875, thick=0.5)\nannul = Annulus(inn_pipe=tube, out_pipe=case)\n```\nSimple geometries of the Pipe and Annulus can be accessed, such as the hydraulic diameter and cross sectional area.\n\n```python\ntube_id = tube.inn_dia\ntube_area = tube.inn_area\n\nann_dhyd = annul.hyd_dia\nann_area = annul.ann_area\n```\n\n### Assembly \n\nThe assembly module is used to combine the previously defined classes into a system that can be used for solving. The assembly code is still being developed and currently is a mix of classes and a few fuctions. The critical class is the BatchPump class, allowing multiple pumps to be run across a defined system. \n\n```python\nfrom woffl.assembly import BatchPump\n\nnozs = [\"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\"]\nthrs = [\"X\", \"A\", \"B\", \"C\", \"D\", \"E\"]\n\nwell_batch = BatchPump(pwh=220, tsu=82, rho_pf=62.4, ppf_surf=2800, wellbore=tube, wellprof=wprof, ipr_su=ipr, prop_su=fmix)\njp_list = BatchPump.jetpump_list(nozs, thrs)\n\nresult_dict = well_batch.batch_run(jp_list)\n```\n\nThe results dictionary can be passed into a Pandas Dataframe and used for results analysis. A few simple functions have been written to easily visualize the results. \n\n```python\nimport pandas as pd\nfrom woffl.assembly import batch_results_mask, batch_results_plot\n\ndf = pd.DataFrame(result_dict)\nmask_pump = batch_results_mask(df[\"qoil_std\"], df[\"total_water\"])\nbatch_results_plot(df[\"qoil_std\"], df[\"total_water\"], df[\"nozzle\"], df[\"throat\"], mask=mask_pump)\n```\n\n## Background\n\nIf the reader is interested in the physics and numerical modeling that went into woffl they should read the papers that are listed below. The paper by Merrill provies a good introduction to the basic method that is used. Cunningham set much of the foundational equations that are used in the modeling. The authors intend to publish a paper with a more detailed explanation in the future.\n\n### Relevant Papers \n- Cunningham, R. G., 1974, \u201cGas Compression With the Liquid Jet Pump,\u201d ASME J Fluids Eng, 96(3), pp. 203\u2013215.\n- Cunningham, R. G., 1995, \u201cLiquid Jet Pumps for Two-Phase Flows,\u201d ASME J Fluids Eng, 117(2), pp. 309\u2013316.\n- Merrill, R., Shankar, V., and Chapman, T., 2020, \u201cThree-Phase Numerical Solution for Jet Pumps Applied to a Large Oilfield,\u201d SPE-202928-MS, November 10, 2020.\n- Himr, D., Hab\u00e1n, V., Pochyl\u00fd, F., 2009, \"Sound Speed in the Mixture Water - Air,\" Engineering Mechanics, Svratka, Czech Republic, May 11\u201314, 2009, Paper 255, pp. 393-401. \n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Kaelin Ellis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Water Optimization For Fluid Lift. Numerical solver for liquid powered jet pumps with multiphase flow",
"version": "1.0.20",
"project_urls": {
"Homepage": "https://github.com/kwellis/woffl"
},
"split_keywords": [
"jet pump",
" solver",
" numerical",
" multiphase"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2c0e9aff9db5704eb243a5327c5dca59c88f7c9c3e9d70d9be48505a9dd99f24",
"md5": "72f5270ef4676c50cd9b7aaa583a21b0",
"sha256": "1b49d4fd86c5fe2c1a268128ba7fc6fc2193e727cec8feb610f5a547223630ee"
},
"downloads": -1,
"filename": "woffl-1.0.20-py3-none-any.whl",
"has_sig": false,
"md5_digest": "72f5270ef4676c50cd9b7aaa583a21b0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 80932,
"upload_time": "2024-12-21T02:53:05",
"upload_time_iso_8601": "2024-12-21T02:53:05.880044Z",
"url": "https://files.pythonhosted.org/packages/2c/0e/9aff9db5704eb243a5327c5dca59c88f7c9c3e9d70d9be48505a9dd99f24/woffl-1.0.20-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "974b259f82035b407be8fae8681169029dfd5c285b63f1cda80df2340f4c9297",
"md5": "9e1a1db102379c72109f8d76ee8d5d2c",
"sha256": "045a741906f3a279125c1f86b7c71d58152580e6b7d5d4883f71c2dde52a40f8"
},
"downloads": -1,
"filename": "woffl-1.0.20.tar.gz",
"has_sig": false,
"md5_digest": "9e1a1db102379c72109f8d76ee8d5d2c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 69336,
"upload_time": "2024-12-21T02:53:08",
"upload_time_iso_8601": "2024-12-21T02:53:08.482277Z",
"url": "https://files.pythonhosted.org/packages/97/4b/259f82035b407be8fae8681169029dfd5c285b63f1cda80df2340f4c9297/woffl-1.0.20.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-21 02:53:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kwellis",
"github_project": "woffl",
"github_not_found": true,
"lcname": "woffl"
}