Skip to content

Commit 585c36e

Browse files
author
zech0001
committed
update documentation, fix for first publications
1 parent 8895c3a commit 585c36e

File tree

6 files changed

+257
-178
lines changed

6 files changed

+257
-178
lines changed

README.md

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,39 @@
11
[![GS-Frame](https://img.shields.io/badge/github-GeoStat_Framework-468a88?logo=github&style=flat)](https://github.com/GeoStat-Framework)
22
[![Gitter](https://badges.gitter.im/GeoStat-Examples/community.svg)](https://gitter.im/GeoStat-Examples/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
33

4-
# Template
5-
6-
This is a template for an example repository.
7-
8-
You can create a new example by simply clicking on "Use this template".
9-
10-
The included example is showing the generation of a conditioned random field ensemble
11-
in 1D taken from [GSTools](https://geostat-framework.readthedocs.io/projects/gstools/en/stable/examples/06_conditioned_fields/00_condition_ensemble.html#sphx-glr-examples-06-conditioned-fields-00-condition-ensemble-py).
4+
# Overview
125

6+
This project aims to use realizations of heterogeneous hydraulic conductivity with a binary inclusion structures for numerical subsurface flow and transport simulations.
7+
Code is available to (i) generate and (ii) visualize random conductivity structures of binary inclusions. Furthermore, routines are provided (iii) to perform flow and transport simulations making use of the FEM-solver OpenGeoSys and (iv) to post-process results.
138

149
## Structure
1510

16-
Please try to organize your example in the given Structure
17-
- `data/` - here you should place your input data
18-
- `src/` - here you should place your python scripts
19-
- `results/` - here your computed results and plots should be stored
20-
- `README.md` - please describe your example in the readme, potentially showing results
21-
- `LICENSE` - the default license is MIT, you can use another one if wanted
11+
The project is organized as follows
12+
• README.md - description of the project
13+
• data/ - folder for data used in the project
14+
• results/
15+
• src/ - folder containing the Python scripts of the project:
2216

17+
Please try to organize your example in the given Structure
18+
- `README.md` - description of the project
19+
- `data/` - folder for data used in the project
20+
- `results/` - folder with simulation results and plots
21+
- `src/` - folder containing the Python scripts of the project:
22+
+ 01_plot_binary_inclusions.py
23+
+ 02_run_sim.py
24+
+ 03_run_ensemble.py
25+
+ binary_inclusions.py
26+
+ sim_processing.py
2327

2428
## Python environment
2529

26-
To make the example reproducible, it would be a good practice to provide one of
27-
the following files:
30+
To make the example reproducible, we provide the following files:
2831
- `requirements.txt` - requirements for [pip](https://pip.pypa.io/en/stable/user_guide/#requirements-files) to install all needed packages
2932
- `spec-file.txt` - specification file to create the original [conda environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#building-identical-conda-environments)
3033

31-
32-
## Workflow
33-
34-
After finalizing your work, you should tag the repository with a version like `v1.0`.
35-
36-
Then, a [Zenodo](https://zenodo.org/) release will be created, so you can cite the repository in you publication.
37-
38-
Please keep your `master` branch in line with the latest release.
39-
For further development use the `develop` branch and update `master` with pull-requests.
40-
41-
4234
## Contact
4335

44-
You can contact us via <[email protected]>.
45-
36+
You can contact us via <[email protected]>.
4637

4738
## License
4839

src/01_plot_binary_inclusions.py

Lines changed: 54 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33
"""
4-
Created on Thu Oct 15 13:15:07 2020
4+
Script to create and visualize random binary inclusion structures:
5+
- simple inclusion structure
6+
- block inclusion structure
7+
Fields are by default in 2D for visualization.
58
6-
@author: zech0001
9+
Structures in 3D and different block arrangement can be created by modifying
10+
setting parameters, particular dim and/or axis
11+
12+
@author: A. Zech
13+
Licence MIT, A.Zech, 2020
714
"""
815

916
import numpy as np
@@ -12,57 +19,65 @@
1219

1320
np.random.seed(20201101)
1421

22+
#########################################
23+
### Simple binary inclusion structure ###
24+
#########################################
25+
26+
### initialize simple binary inclusion structure with specified settings
27+
### as instance of the class Simple_Binary_Inclusions
1528
BI = bi.Simple_Binary_Inclusions(
16-
dim=2,
17-
k_bulk=1e-5, # conductivity value of bulk
18-
k_incl=1e-3, # conductivity value of inclusions
19-
nx=4, # number of inclusions in x-direction
20-
lx=10, # inclusion length in x-direction
21-
nz=20, # number of inclusions in z-direction
22-
lz=0.5, # inclusion length in z-direction
23-
nz_incl=3, # number of inclusions with different K
29+
dim=2, # dimesionality of structure
30+
k_bulk=1e-5, # bulk conductivity value
31+
k_incl=1e-3, # conductivity value of inclusions
32+
nx=8, # number of units in x-direction
33+
lx=10, # unit length in x-direction
34+
nz=20, # number of unit in z-direction
35+
lz=0.5, # unit length in z-direction
36+
nz_incl=3, # number of inclusions (units with different K)
2437
)
2538

26-
###########################################
27-
### Simple 2D binary inclusion structure
39+
### Generate random realization of simple binary inclusion structure ###
2840
k1 = BI.structure()
2941
BI.structure2scale()
3042
xx, zz = np.meshgrid(BI.x, BI.z)
3143

44+
### Plot random realization of simple binary inclusion structure ###
3245
fig = plt.figure(1)
33-
ax = fig.add_subplot(1, 1, 1)
46+
im = plt.pcolor(xx, zz, k1.T, cmap=plt.get_cmap("binary_r"))
47+
plt.xlabel("$x$ [m]")
48+
plt.ylabel("$z$ [m]")
49+
plt.tight_layout()
50+
plt.savefig("../results/BI_Simple.png", dpi=300)
51+
print('Save figure of simple inclusion structure to ./results')
3452

35-
im = ax.pcolor(xx, zz, k1.T, cmap=plt.get_cmap("binary_r"))
36-
ax.set_xlabel("$x$ [m]")
37-
ax.set_ylabel("$z$ [m]")
38-
plt.savefig("../results/Simple_BI.png", dpi=300)
39-
40-
###########################################
41-
### Two stage 2D binary inclusion structure
53+
############################################
54+
### Two block binary inclusion structure ###
55+
############################################
4256

57+
### initialize block binary inclusion structure with specified settings
58+
### as instance of the class Block_Binary_Inclusions
4359
BIB = bi.Block_Binary_Inclusions(
44-
dim=3,
45-
axis=2,
46-
k_bulk=[1e-5, 1e-3], # conductivity value of bulk
47-
k_incl=[1e-3, 1e-5], # conductivity value of inclusions
48-
nn=[4, 20], # number of inclusions-blocks in x-direction
49-
ll=[10, 10], # inclusion length in x-direction
50-
nx=10, # number of inclusions in z-direction
51-
lx=5, # inclusion length in z-direction
52-
nz=20, # number of inclusions in z-direction
53-
lz=0.5, # inclusion length in z-direction
54-
nn_incl=[3, 3], # number of inclusions within different K
60+
dim=2, # dimesionality of structure
61+
axis=0, # direction of multiple blocks (0=x, 1=z, 2=y)
62+
k_bulk=[1e-5, 1e-3], # bulk-conductivity value in each block
63+
k_incl=[1e-3, 1e-5], # conductivity values of inclusions in each block
64+
nn=[4, 18], # number of units within each block (now x-dir)
65+
ll=[10, 10], # unit lengths within blocks (now x-dir)
66+
nz=20, # number of units in z-direction
67+
lz=0.5, # unit length in z-direction
68+
nn_incl=[3, 3], # number of inclusions (units within different K)
5569
)
5670

71+
### Generate random realization of simple binary inclusion structure ###
5772
k2 = BIB.structure()
5873
BIB.structure2scale(x0=-20, z0=52)
59-
6074
xx, zz = np.meshgrid(BIB.x, BIB.z)
6175

62-
fig = plt.figure(2, figsize=[6, 2])
63-
ax = fig.add_subplot(1, 1, 1)
64-
im = ax.pcolor(k2[:, 0, :].T, cmap=plt.get_cmap("binary_r"))
65-
# im = ax.pcolor(xx,zz,kk.T,cmap=plt.get_cmap('binary_r'))
66-
ax.set_xlabel("$x$ [m]")
67-
ax.set_ylabel("$z$ [m]")
68-
plt.savefig("../results/Block_BI.png", dpi=300)
76+
### Plot random realization of simple binary inclusion structure ###
77+
fig = plt.figure(2, figsize=[10, 2.5])
78+
plt.pcolor(xx,zz,k2.T,cmap=plt.get_cmap('binary_r'))
79+
plt.xlabel("$x$ [m]")
80+
plt.ylabel("$z$ [m]")
81+
plt.tight_layout()
82+
plt.savefig("../results/BI_Block.png", dpi=300)
83+
print('Save figure of block inclusion structure to ./results')

0 commit comments

Comments
 (0)