tInterpret results from permeability{1-3}.py - sphere - GPU-based 3D discrete e… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 77bce7ca2f3aa916e57ae62e837a9257248549db | |
parent fb03b34bb82f5d8cfac1c1f5d0c87961afe57dca | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 18 Aug 2014 11:56:27 +0200 | |
Interpret results from permeability{1-3}.py | |
Diffstat: | |
A python/permeability-results-c=1.py | 47 +++++++++++++++++++++++++++++… | |
1 file changed, 47 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/python/permeability-results-c=1.py b/python/permeability-results-c… | |
t@@ -0,0 +1,47 @@ | |
+#!/usr/bin/env python | |
+import numpy | |
+import sphere | |
+from permeabilitycalculator import * | |
+import matplotlib.pyplot as plt | |
+ | |
+sigma0_list = numpy.array([1.0e3, 2.0e3, 4.0e3, 10.0e3, 20.0e3, 40.0e3]) | |
+ | |
+sids = [] | |
+for sigma0 in sigma0_list: | |
+ sids.append('permeability-dp=' + str(sigma0)) | |
+ | |
+K = numpy.empty(len(sids)) | |
+dpdz = numpy.empty_like(K) | |
+Q = numpy.empty_like(K) | |
+i = 0 | |
+ | |
+for sid in sids: | |
+ pc = PermeabilityCalc(sid, plot_evolution=False) | |
+ K[i] = pc.conductivity() | |
+ pc.findPressureGradient() | |
+ pc.findCrossSectionalFlux() | |
+ dpdz[i] = pc.dPdL[2] | |
+ Q[i] = pc.Q[2] | |
+ i += 1 | |
+ | |
+# produce VTK files | |
+#for sid in sids: | |
+ #sim = sphere.sim(sid, fluid=True) | |
+ #sim.writeVTKall() | |
+ | |
+fig = plt.figure() | |
+ | |
+plt.subplot(2,1,1) | |
+plt.xlabel('Pressure gradient $\\Delta p/\\Delta z$ [Pa m$^{-1}$]') | |
+plt.ylabel('Hydraulic conductivity $K$ [ms$^{-1}$]') | |
+plt.plot(dpdz, K, '+') | |
+plt.grid() | |
+ | |
+plt.subplot(2,1,2) | |
+plt.xlabel('Pressure gradient $\\Delta p/\\Delta z$ [Pa m$^{-1}$]') | |
+plt.ylabel('Hydraulic flux $Q$ [m$^3$s$^{-1}$]') | |
+plt.plot(dpdz, Q, '+') | |
+plt.grid() | |
+ | |
+plt.tight_layout() | |
+plt.savefig('permeability-dpdz-vs-K.png') |