# rough_surfaces
A Python3 module for the analysis, elastic contact and fluid flow simulation of rock fractures.
Platform | CI Status | Coverage
---------|-------------|-------------:
Linux, Python 3.6 | [![Build Status](https://travis-ci.org/plang85/rough_surfaces.svg?branch=master)](https://travis-ci.org/plang85/rough_surfaces) | [![codecov](https://codecov.io/gh/plang85/rough_surfaces/branch/master/graph/badge.svg)](https://codecov.io/gh/plang85/rough_surfaces)
## Install/Contribute
Clone the repo and cd into it using a virtual environment
```
git clone https://github.com/plang85/rough_surfaces.git
cd rough_surfaces
python3 -m venv venv
source venv/bin/activate
```
and verify that the tests are passing
```
pip install -e .[test]
pytest
```
do some damage and just PR against master.
To just use the module, it's still good practice to checkout the repo and use a venv, but then just do
```
pip install .
```
instead. As you can see recommenden practice is to use the head at all times (if you're adventureous).
## Examples
### Generation
We can generate an isotropic, self-affine surface like this
```
import rough_surface.params as rp
import rough_surface.generate as rg
surface_params = rp.SelfAffineParameters()()
N_power_of_two = 9
surface = rg.self_affine(surface_params, N_power_of_two)
```
where `surface` is essentially a two-dimensional numpy array with a lattice size attribute `dxy`.
### Analysis
See `example_analysis.py` for a more complete overview and the provided plotting functions. In short, given a two-dimensional array `h` that represents discrete surface height uniformly spaced by `dxy`, the radially averaged power-spectrum can be obtained like this (this API is in flux)
```
import rough_surfaces.analyse as ra
spectrum = ra.radially_averaged_psd(surface)
invariants = ra.self_affine_psd_fit(*surface_spectrum)
print('Hurst = {0:.2f}'.format(invariants[1]))
```
An isotropic surface is characterized by a near-ideal straight line radially averaged PSD and same-slope curves for the angularly averaged spectra.
<p align="left">
<img src="https://raw.githubusercontent.com/plang85/rough_surfaces/master/doc/isotropic.png" height="400">
<br/>
</p>
An anisotropic surface is characterized by a less linear radially averaged PSD and different-slope curves for the angularly averaged spectra.
<p align="left">
<img src="https://raw.githubusercontent.com/plang85/rough_surfaces/master/doc/anisotropic.png" height="400">
<br/>
</p>
### Contact (elastic frictionless)
We can solve the elastic frictionless contact between two rough surfaces by solving the equivalent problem of a rigid composite surface against an elastic, flat body of composite properties
```
import rough_surfaces.contact as rc
nominal_stress = 1.0E7
E = 1.0E+9
nu = 0.3
contact = rc.contact_FFT(composite_surface, nominal_stress, E, nu, verbose=1)
```
For a more detailed snippet see `example_analysis.py`.
<p align="left">
<img src="https://raw.githubusercontent.com/plang85/rough_surfaces/master/doc/contact.png" height="400">
<br/>
</p>
<p align="left">
<img src="https://raw.githubusercontent.com/plang85/rough_surfaces/master/doc/contacttrace.png" height="300">
<br/>
</p>
We can also use a high-level function to compute the stiffness over a range of stresses
```
nominal_stress = np.logspace(6, 8, 15)
stiffness = rc.stiffness(nominal_stress, surface, E, nu, err_lim=1.0E-8)
```
<p align="left">
<img src="https://raw.githubusercontent.com/plang85/rough_surfaces/master/doc/stiffness.png" height="400">
<br/>
</p>
### Flow (steady-state laminar flow fluid pressure)
Working on porting this still...
## Publications
Lang, P. S., Paluszny, A., & Zimmerman, R. W. (2015). Hydraulic sealing due to pressure solution contact zone growth in siliciclastic rock fractures. Journal of Geophysical Research: Solid Earth, 120(6), 4080–4101. http://doi.org/10.1002/2015JB011968
Lang, P. S., Paluszny, A., & Zimmerman, R. W. (2016). Evolution of fracture normal stiffness due to pressure dissolution and precipitation. International Journal of Rock Mechanics and Mining Sciences, 88, 12–22. http://doi.org/10.1016/j.ijrmms.2016.06.004
Lang, P. S. (2016). Multi-scale modelling of coupled thermo-hydro-mechanical-chemical processes in fractured rocks.
Doctoral Thesis, Imperial College. http://hdl.handle.net/10044/1/45644
没有合适的资源?快使用搜索试试~ 我知道了~
粗糙表面和裂缝的计算力学框架。_Python_下载.zip
共31个文件
py:15个
png:5个
txt:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 75 浏览量
2023-04-10
23:35:31
上传
评论
收藏 7.14MB ZIP 举报
温馨提示
粗糙表面和裂缝的计算力学框架。_Python_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
粗糙表面和裂缝的计算力学框架。_Python_下载.zip (31个子文件)
rough_surfaces-master
.travis.yml 243B
setup.py 1KB
.coveragerc 89B
doc
isotropic.png 724KB
stiffness.png 62KB
anisotropic.txt 6.39MB
isotropic.txt 6.37MB
contact.png 182KB
anisotropic.png 780KB
notes.txt 63B
contacttrace.png 183KB
pytest.ini 403B
LICENSE 1KB
rough_surfaces
__init__.py 129B
plot.py 2KB
surface.py 3KB
contact.py 9KB
generate.py 3KB
analyse.py 4KB
params.py 255B
tests
test_surface.py 2KB
test_generate.py 1KB
test_contact.py 3KB
CONTRIBUTING.md 217B
examples
example_analysis.py 2KB
example_contact.py 1KB
example_stiffness.py 919B
example_generate.py 984B
stiffness 350B
.gitignore 1KB
README.md 4KB
共 31 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功