Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Aug 6, 2019
1 parent 50d56e9 commit da286e7
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 22 deletions.
File renamed without changes.
22 changes: 0 additions & 22 deletions examples/08_compare_thiem_grfsteady.py

This file was deleted.

File renamed without changes.
28 changes: 28 additions & 0 deletions examples/10_convergence_ext_theis_tpl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
import numpy as np
from matplotlib import pyplot as plt
from anaflow import ext_theis_tpl, ext_thiem_tpl

time = 1e4 # time point for steady state
rad = np.geomspace(0.1, 10) # radius from the pumping well in [0, 4]
r_ref = 10.0 # reference radius
KG = 1e-3 # the geometric mean of the transmissivity
len_scale = 10.0 # correlation length of the log-transmissivity
hurst = 0.5 # hurst coefficient
var = 0.5 # variance of the log-transmissivity
rate = -1e-4 # pumping rate
dim = 1.5 # using a fractional dimension

head1 = ext_thiem_tpl(rad, r_ref, KG, len_scale, hurst, var, dim=dim, rate=rate)
head2 = ext_theis_tpl(time, rad, 1e-3, KG, len_scale, hurst, var, dim=dim, rate=rate, r_bound=r_ref)

plt.plot(rad, head1, label="Ext Thiem TPL")
plt.plot(rad, head2, label="Ext Theis TPL (t={})".format(time), linestyle="--")

# plt.plot(rad, head1 / head2, label="ratio")

plt.xlabel("r in [m]")
plt.ylabel("h in [m]")
plt.legend()
plt.tight_layout()
plt.show()
27 changes: 27 additions & 0 deletions examples/11_convergence_ext_grf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
import numpy as np
from matplotlib import pyplot as plt
from anaflow import ext_grf, ext_grf_steady, grf

time = 1e4 # time point for steady state
rad = np.geomspace(0.1, 10) # radius from the pumping well in [0, 4]
r_ref = 10.0 # reference radius
K = 1e-3 # the geometric mean of the transmissivity
rate = -1e-4 # pumping rate
dim = 1.5 # using a fractional dimension

head1 = ext_grf_steady(rad, r_ref, K, dim=dim, rate=rate)
head2 = ext_grf(time, rad, [1e-3], [K], [0, r_ref], dim=dim, rate=rate)
head3 = grf(time, rad, 1e-3, K, dim=dim, rate=rate)

plt.plot(rad, head1, label="Ext GRF steady")
plt.plot(rad, head2, label="Ext GRF (t={})".format(time), linestyle="--")
plt.plot(rad, head3 - head3[-1], label="GRF quasi-steady (t={})".format(time), linestyle=":")

# plt.plot(rad, head1 / head2, label="ratio")

plt.xlabel("r in [m]")
plt.ylabel("h in [m]")
plt.legend()
plt.tight_layout()
plt.show()

0 comments on commit da286e7

Please sign in to comment.