# pyMRST
Python wrappers to run simple reservoir simulations from MATLAB Reservoir Simulation Toolbox (MRST). Still in development.
<div>
<img src="https://user-images.githubusercontent.com/51282928/109408566-7d209800-79bd-11eb-89b3-294343680217.png" width="500"/>
</div>
MATLAB Reservoir Simulation Toolbox (MRST) is a free open-source software for reservoir modelling and simulation, developed primarily by the Computational Geosciences group in the Department of Mathematics and Cybernetics at SINTEF Digital.
While pyMRST is a wrapper that allows users to run simulations from MRST in a Python environment. Currently, it has single-phase reservoir simulations for water, oil, gas, polymer, and thermal effect; and two-phase oil-water.
|Simulations|Python notebook|
|:--:|:--:|
|1-phase water|[Notebook](https://github.com/yohanesnuwara/pyMRST/blob/main/notebooks/pyMRST_water_incomp.ipynb)|
|1-phase oil *)|[Notebook](https://github.com/yohanesnuwara/pyMRST/blob/main/notebooks/pyMRST_oil_slightly_comp.ipynb)|
|1-phase gas *)|[Notebook](https://github.com/yohanesnuwara/pyMRST/blob/main/notebooks/pyMRST_gas_comp.ipynb)|
|1-phase polymer *)|Notebook|
|1-phase compressible with thermal effect|Notebook|
|2-phase oil-water|[Notebook](https://github.com/yohanesnuwara/pyMRST/blob/main/notebooks/pyMRST_oilwaterflooding.ipynb)|
*) No flow boundary condition and constant BHP well assumption
<!--
## Single-phase Fluid
### Water
Example inputs:
* mu = 1 cp
* rho = 1000 kg/m3
Formula:
* mu, rho = constant
```
FLUID1
water
1,1000
```
### Oil
Example inputs:
* mu = 1 cp
* rho_r = 850 kg/m3 (Reference rho @ reference pressure)
* pr = 200 bar (Reference pressure)
* c = 1e-3 1/bar (Fluid compressibility)
Formula:
* mu = constant
* rho(p) = rho_r * exp(c * (p - p_r))
```
FLUID1
oil
1,850,200,0.001
```
Example inputs for gas:
* mu0 = 5 cp (Viscosity at zero)
* rho_r = 850 kg/m3
* pr = 200 bar
* c = 1e-3 1/bar
* c_mu = 2e-3 1/bar (Viscosity coefficient)
Formula:
* mu(p) = mu0* (1 + c_mu * (p - p_r))
* rho(p) = rho_r * exp(c * (p - p_r))
```
FLUID1
gas
5,850,200,0.001,0.002
```
<!--
Experimentations of MATLAB Reservoir Simulation Toolbox in Google Colab to port it with Python and utilize free GPUs for faster computation
<p align="center">
<img src="https://user-images.githubusercontent.com/51282928/100498951-68ebb580-3198-11eb-95c7-87ed7c1e6e9c.png" width="700" />
</p>
<!--
Experimentations of MATLAB Reservoir Simulation Toolbox in Google Colab to port it with Python and utilize free GPUs for faster computation
### Successful:
Phase 1. Full codes and documentations are preserved in [Zenodo]()
* Use Google Colab to run a MATLAB (Octave) script of MRST simulation of five-spot waterflooding in SPE10 model.
* Optimizing the well placement by coupling the simulation with a Python optimizer, such as Bayesian optimization.
### On experimentation:
* Modifying the MRST script to use `gpuArray` so that the simulation can use the free GPU in Colab and speed up simulation.
* Using `Tensorflow Probability` to improve optimizations, powered by free GPU in Colab.
* Experimenting with various optimizers (`Scipy`, `Optuna`, `Platypus`, etc.) and multi-objective optimizers (`Pymoo`).
### Future:
* Well placement optimization for different scenarios (CO2, surfactant, and polymer injection)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! matlab算法,工具源码,适合毕业设计、课程设计作业,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随
资源推荐
资源详情
资源评论
收起资源包目录
毕业设计&课设-在Python中运行MATLAB油藏模拟工具箱(MRST)的包装器.zip (80个子文件)
matlab_code
gas_1phase.m 4KB
water_1phase.m 921B
modules
additionals
deval.m 226B
getSPE10rock.m 4KB
getWellSol.m 804B
utils
units
barrel.m 91B
incomp
treatLegacyForceOptions.m 2KB
fluid
incompressible
initSimpleFluid.m 4KB
README 51B
initSimpleFluidPc.m 4KB
initCoreyFluid.m 4KB
initSimpleFluidJfunc.m 4KB
initSingleFluid.m 3KB
Contents.m 1KB
README 71B
fluid_structure.m 5KB
utils
getIncompProps.m 2KB
getIncompCapillaryPressure.m 2KB
interpRelPermTable.m 3KB
constantProperties.m 2KB
tabulatedSatFunc.m 6KB
Contents.m 1KB
Contents.m 917B
checkDrivingForcesIncomp.m 4KB
examples
1ph
incompExampleSAIGUP1ph.m 7KB
incompTutorialSRCandBC.m 4KB
README 26B
incompTutorialTOF.m 3KB
incompTutorialWells.m 6KB
incompIntro.m 6KB
incompTutorialMillionCell.m 4KB
incompExampleNorne1ph.m 6KB
incompTutorialCornerPoint.m 5KB
Contents.m 1KB
2ph
incompTutorialGravCol2ph.m 4KB
README 26B
incompExampleSAIGUP2ph.m 9KB
incompTutorialCapPres.m 8KB
incompExampleNorne2ph.m 8KB
incompExampleWithADFluids.m 5KB
incompTutorialWells2ph.m 8KB
Contents.m 1KB
computeIncompWellPressureDrop.m 4KB
computeFacePressure.m 4KB
capPressureRHS.m 2KB
incompTPFA.m 16KB
transport
explicitTransport.m 11KB
README 53B
implicitTransport.m 10KB
private
initFaceMob.m 3KB
twophaseJacobian.m 19KB
assembleTransportSource.m 4KB
computeTransportSourceTerm.m 8KB
twophaseUpwBE.m 10KB
twophaseUpwBEGrav.m 20KB
initTransport.m 12KB
newtonRaphson2ph.m 8KB
twophaseUpwFEGrav.m 14KB
twophaseUpwFE.m 6KB
Contents.m 2KB
Contents.m 1KB
computePressureRHS.m 7KB
Contents.m 1KB
diagnostics
computeLorenz.m 1KB
computeFandPhi.m 3KB
computeTOFandTracer.m 8KB
addpaths.m 16KB
pymrst_units.py 1KB
Phase1
SPE10_waterflooding1.m 1B
.gitignore 2KB
oil_1phase.m 4KB
oilwater_2phase.m 3KB
README.md 3KB
notebooks
pyMRST_water_incomp.ipynb 59KB
pyMRST_oil_slightly_comp.ipynb 90KB
pyMRST_gas_comp.ipynb 66KB
pyMRST.ipynb 156KB
pyMRST_oilwaterflooding.ipynb 688KB
complete_two_phase_utils.py 53KB
pymrst.py 23KB
共 80 条
- 1
资源评论
白话机器学习
- 粉丝: 9297
- 资源: 7681
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功