Skip to content

Commit

Permalink
working on testing Thu Jun 24 13:46:48 PDT 2021
Browse files Browse the repository at this point in the history
  • Loading branch information
abarbour committed Jun 24, 2021
1 parent 28db2e4 commit 303afc3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions NOBUILD/Dev/01.test_codes.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
library(pbapply)
#pboptions(type = "timer")
library(viridis)

library(fields)
library(fMultivar)

source('LambertCodes.R')
source('beeler_cfs.R')
Expand Down Expand Up @@ -88,7 +89,12 @@ cu.o <- pbapply::pbsapply(Du, cfs_isoporo,
verbose=FALSE)
}

cu <- cu.o / 1e6 # to [Mk]Pa
# fill in singular points (only seen at reservoir 'corners')
r0 <- raster::raster(cu.o)
rF <- raster::focal(r0,
w=matrix(1, nrow=3, ncol=3), # equal-weighted average of all surrounding points
fun=mean, NAonly=TRUE, na.rm=TRUE)
cu <- as.matrix(rF)

#cu <- sapply(Du, mean_stress)
#cu <- sapply(Du, max_shear)
Expand All @@ -103,6 +109,7 @@ norm_by <- 1 #td

xy <- list(x = h./norm_by, y = d./norm_by)
Cu <- c(xy, list(z = cu))

laCu <- c(xy, list(z = log10(abs(cu))))
Cupos <- c(xy, list(z = 1*(cu>0)))
lCup <- c(xy, list(z = log10(cu)))
Expand All @@ -117,4 +124,4 @@ fields::image.plot(Cu, asp=1, ylim=rev(range(Cu[['y']], na.rm=TRUE)),
#contour(Cu, add=TRUE)
contour(laCu, add=TRUE, levels=seq(-3,3))
contour(laCu, add=TRUE, levels=seq(-3,3)+log10(2), lty=2)
rect(-hw/norm_by, (td + thk)/norm_by, hw/norm_by, td/norm_by, col='white', border='grey')
#rect(-hw/norm_by, (td + thk)/norm_by, hw/norm_by, td/norm_by, col='white', border='grey')

0 comments on commit 303afc3

Please sign in to comment.