timproved readability of hydraulic conductivity calculations - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 664c0a08b861e03ddb55793ac5f24259f68ce95b
(DIR) parent e522004df56e551c2d24c04545ed81c011c8d562
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Wed, 13 Aug 2014 11:06:38 +0200
improved readability of hydraulic conductivity calculations
Diffstat:
M python/permeability-calculator.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/python/permeability-calculator.py b/python/permeability-calculator.py
t@@ -23,11 +23,16 @@ class PermeabilityCalc:
self.findCrossSectionalArea()
self.findCrossSectionalFlux()
self.findPressureGradient()
- self.k = -self.Q*self.sim.mu/(self.A*self.dP) # m^2
+ self.k = -self.Q*self.sim.mu/(self.A*self.dPdL) # m^2
def findConductivity(self):
# hydraulic conductivity
- self.K = self.k/self.sim.mu # m/s
+ self.findCellSpacing()
+ self.findCrossSectionalArea()
+ self.findCrossSectionalFlux()
+ self.findPressureGradient()
+ #self.K = self.k/self.sim.mu # m/s
+ self.K = -self.Q * self.dL / (self.A * self.dP)
def findMeanPorosity(self):
''' calculate mean porosity in cells beneath the top wall '''
t@@ -88,11 +93,13 @@ class PermeabilityCalc:
numpy.mean(self.sim.p_f[-1,:,:]) - numpy.mean(self.sim.p_f[0,:,:]),
numpy.mean(self.sim.p_f[:,-1,:]) - numpy.mean(self.sim.p_f[:,0,:]),
numpy.mean(self.sim.p_f[:,:,-1]) - numpy.mean(self.sim.p_f[:,:,0])
- ])/self.sim.L
+ ])
+ self.dL = self.sim.L
+ self.dPdL = self.dP/self.dL
def printResults(self):
print('\n### Permeability resuts for "' + self.sid + '" ###')
- print('Pressure gradient: dP = ' + str(self.dP) + ' Pa/m')
+ print('Pressure gradient: dP = ' + str(self.dPdL) + ' Pa/m')
print('Flux: Q = ' + str(self.Q) + ' m^3/s')
print('Intrinsic permeability: k = ' + str(self.k) + ' m^2')
print('Saturated hydraulic conductivity: K = ' + str(self.K) + ' m/s')