trevert to old limits for phi, add verbose flag to permeability prefactor funct… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit f7201db24191523cbc2184e50143d4de1b57a463 | |
parent 94c094a97a9c0074f5083eb4ede142deaa2221c8 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 24 Nov 2014 14:43:24 +0100 | |
revert to old limits for phi, add verbose flag to permeability prefactor functi… | |
Diffstat: | |
M python/sphere.py | 21 +++++++++++---------- | |
M src/darcy.cuh | 7 ++++--- | |
2 files changed, 15 insertions(+), 13 deletions(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -3125,7 +3125,7 @@ class sim: | |
''' | |
self.bc_top[0] = 0 | |
- def setPermeabilityPrefactor(self, k_c): | |
+ def setPermeabilityPrefactor(self, k_c, verbose=True): | |
''' | |
Set the permeability prefactor from Goren et al 2011, eq. 24. The | |
function will print the limits of permeabilities to be simulated. This | |
t@@ -3136,15 +3136,16 @@ class sim: | |
''' | |
if self.cfd_solver[0] == 1: | |
self.k_c[0] = k_c | |
- phi = numpy.array([0.1, 0.35, 0.9]) | |
- k = self.k_c * phi**3/(1.0 - phi**2) | |
- K = k * self.rho_f*numpy.abs(self.g[2])/self.mu | |
- print('Hydraulic permeability limits for porosity phi = ' + \ | |
- str(phi) + ':') | |
- print('\tk = ' + str(k) + ' m*m') | |
- print('Hydraulic conductivity limits for porosity phi = ' + \ | |
- str(phi) + ':') | |
- print('\tK = ' + str(K) + ' m/s') | |
+ if verbose: | |
+ phi = numpy.array([0.1, 0.35, 0.9]) | |
+ k = self.k_c * phi**3/(1.0 - phi**2) | |
+ K = k * self.rho_f*numpy.abs(self.g[2])/self.mu | |
+ print('Hydraulic permeability limits for porosity phi = ' + \ | |
+ str(phi) + ':') | |
+ print('\tk = ' + str(k) + ' m*m') | |
+ print('Hydraulic conductivity limits for porosity phi = ' + \ | |
+ str(phi) + ':') | |
+ print('\tK = ' + str(K) + ' m/s') | |
else: | |
raise Exception('setPermeabilityPrefactor() only relevant for the ' | |
+ 'Darcy solver (cfd_solver = 1)') | |
diff --git a/src/darcy.cuh b/src/darcy.cuh | |
t@@ -475,8 +475,8 @@ __global__ void findDarcyPorosities( | |
//} | |
// Make sure that the porosity is in the interval [0.0;1.0] | |
- //phi = fmin(0.9, fmax(0.1, void_volume/cell_volume)); | |
- phi = fmin(0.99, fmax(0.01, void_volume/cell_volume)); | |
+ phi = fmin(0.9, fmax(0.1, void_volume/cell_volume)); | |
+ //phi = fmin(0.99, fmax(0.01, void_volume/cell_volume)); | |
//phi = void_volume/cell_volume; | |
/*Float dphi = phi - phi_0; | |
t@@ -484,7 +484,8 @@ __global__ void findDarcyPorosities( | |
dphi = 0.0;*/ | |
const Float dphi = | |
- (1.0 - fmin(phi_0,0.99))*dot_epsilon_kk*ndem*devC_dt; | |
+ (1.0 - fmin(phi_0, 0.9))*dot_epsilon_kk*ndem*devC_dt; | |
+ //(1.0 - fmin(phi_0,0.99))*dot_epsilon_kk*ndem*devC_dt; | |
// report values to stdout for debugging | |
//printf("%d,%d,%d\tphi = %f dphi = %f\n", x,y,z, phi, dphi); |