Updated R analysis scripts for piston case
This commit is contained in:
parent
e06b81a4ca
commit
cddb89402e
@ -7,8 +7,11 @@ ens=expression(epsilon^{bar(bar(ns))})
|
||||
ewns=expression(epsilon^{bar(bar(wns))})
|
||||
pan=expression(p^n)
|
||||
paw=expression(p^w)
|
||||
Jwn=expression(J[w]^{wn})
|
||||
cwns=expression(phi1^{bar(bar(wn))})
|
||||
Jwn=expression(J[w]^{bar(bar(wn))})
|
||||
JwnD=expression(J[w]^{bar(bar(wn))}~D)
|
||||
KNwns=expression(kappa[N]^{bar(bar(wns))})
|
||||
KGwns=expression(kappa[G]^{bar(bar(wns))})
|
||||
cwns=expression(phi1^{bar(bar(wns))})
|
||||
vanx=expression(v[x]^{bar(n)})
|
||||
vany=expression(v[y]^{bar(n)})
|
||||
vanz=expression(v[z]^{bar(n)})
|
||||
@ -21,21 +24,21 @@ vawnz=expression(v[z]^{bar(wn)})
|
||||
vawnsx=expression(v[x]^{bar(wns)})
|
||||
vawnsy=expression(v[y]^{bar(wns)})
|
||||
vawnsz=expression(v[z]^{bar(wns)})
|
||||
Gwnxx=expression(G[xx]^{bar(wn)})
|
||||
Gwnyy=expression(G[yy]^{bar(wn)})
|
||||
Gwnzz=expression(G[zz]^{bar(wn)})
|
||||
Gwnxy=expression(G[xy]^{bar(wn)})
|
||||
Gwnxz=expression(G[xz]^{bar(wn)})
|
||||
Gwnyz=expression(G[yz]^{bar(wn)})
|
||||
Gwsxx=expression(G[xx]^{bar(ws)})
|
||||
Gwsyy=expression(G[yy]^{bar(ws)})
|
||||
Gwszz=expression(G[zz]^{bar(ws)})
|
||||
Gwsxy=expression(G[xy]^{bar(ws)})
|
||||
Gwsxz=expression(G[xz]^{bar(ws)})
|
||||
Gwsyz=expression(G[yz]^{bar(ws)})
|
||||
Gnsxx=expression(G[xx]^{bar(ns)})
|
||||
Gnsyy=expression(G[yy]^{bar(ns)})
|
||||
Gnszz=expression(G[zz]^{bar(ns)})
|
||||
Gnsxy=expression(G[xy]^{bar(ns)})
|
||||
Gnsxz=expression(G[xz]^{bar(ns)})
|
||||
Gnsyz=expression(G[yz]^{bar(ns)})
|
||||
Gwnxx=expression(G[xx]^{wn})
|
||||
Gwnyy=expression(G[yy]^{wn})
|
||||
Gwnzz=expression(G[zz]^{wn})
|
||||
Gwnxy=expression(G[xy]^{wn})
|
||||
Gwnxz=expression(G[xz]^{wn})
|
||||
Gwnyz=expression(G[yz]^{wn})
|
||||
Gwsxx=expression(G[xx]^{ws})
|
||||
Gwsyy=expression(G[yy]^{ws})
|
||||
Gwszz=expression(G[zz]^{ws})
|
||||
Gwsxy=expression(G[xy]^{ws})
|
||||
Gwsxz=expression(G[xz]^{ws})
|
||||
Gwsyz=expression(G[yz]^{ws})
|
||||
Gnsxx=expression(G[xx]^{ns})
|
||||
Gnsyy=expression(G[yy]^{ns})
|
||||
Gnszz=expression(G[zz]^{ns})
|
||||
Gnsxy=expression(G[xy]^{ns})
|
||||
Gnsxz=expression(G[xz]^{ns})
|
||||
Gnsyz=expression(G[yz]^{ns})
|
||||
|
@ -9,205 +9,161 @@ gamma = 0.058
|
||||
D=15.5
|
||||
volume=2e6
|
||||
PI=3.14159265
|
||||
tau = 0.7
|
||||
|
||||
tau = 1.0
|
||||
visc = (tau-0.5)/3
|
||||
|
||||
C1 <- read.csv(file="~/Data/Multiphase/Piston/Case1/timelog.tcat",head=TRUE,sep=" ")
|
||||
C1$label <- "Case 1"
|
||||
C1$U <- predict(sm.spline(C1$time,C1$sw),C1$time,1)*200
|
||||
C1$label <- "A"
|
||||
C1$U <- predict(sm.spline(C1$time,C1$sw),C1$time,1)*400
|
||||
C1$Ca<-C1$U*visc/gamma
|
||||
|
||||
C2 <- read.csv(file="~/Data/Multiphase/Piston/Case2/timelog.tcat",head=TRUE,sep=" ")
|
||||
C2$label <- "Case 2"
|
||||
C2$U <- predict(sm.spline(C2$time,C2$sw),C2$time,1)*200
|
||||
tau = 0.9
|
||||
visc = (tau-0.5)/3
|
||||
C2<-read.csv(file="~/Data/Multiphase/Piston/Case2/timelog.tcat",head=TRUE,sep=" ")
|
||||
C2$label <- "B"
|
||||
C2$U <- predict(sm.spline(C2$time,C2$sw),C2$time,1)*400
|
||||
C2$Ca<-C2$U*visc/gamma
|
||||
|
||||
tau = 0.8
|
||||
visc = (tau-0.5)/3
|
||||
C3 <- read.csv(file="~/Data/Multiphase/Piston/Case3/timelog.tcat",head=TRUE,sep=" ")
|
||||
C3$label <- "Case 3"
|
||||
C3$U <- predict(sm.spline(C3$time,C3$sw),C3$time,1)*200
|
||||
C3$label <- "C"
|
||||
C3$U <- predict(sm.spline(C3$time,C3$sw),C3$time,1)*400
|
||||
C3$Ca<-C3$U*visc/gamma
|
||||
|
||||
tau = 1.0
|
||||
visc = (tau-0.5)/3
|
||||
C4 <- read.csv(file="~/Data/Multiphase/Piston/Case4/timelog.tcat",head=TRUE,sep=" ")
|
||||
C4$label <- "Case 4"
|
||||
C4$U <- predict(sm.spline(C4$time,C4$sw),C4$time,1)*200
|
||||
C4$label <- "D"
|
||||
C4$U <- predict(sm.spline(C4$time,C4$sw),C4$time,1)*400
|
||||
C4$Ca<-C4$U*visc/gamma
|
||||
|
||||
tau = 0.9
|
||||
visc = (tau-0.5)/3
|
||||
C5 <- read.csv(file="~/Data/Multiphase/Piston/Case5/timelog.tcat",head=TRUE,sep=" ")
|
||||
C5$label <- "Case 5"
|
||||
C5$U <- predict(sm.spline(C5$time,C5$sw),C5$time,1)*200
|
||||
C5$label <- "E"
|
||||
C5$U <- predict(sm.spline(C5$time,C5$sw),C5$time,1)*400
|
||||
C5$Ca<-C5$U*visc/gamma
|
||||
|
||||
tau = 0.8
|
||||
visc = (tau-0.5)/3
|
||||
C6 <- read.csv(file="~/Data/Multiphase/Piston/Case6/timelog.tcat",head=TRUE,sep=" ")
|
||||
C6$label <- "Case 6"
|
||||
C6$U <- predict(sm.spline(C6$time,C6$sw),C6$time,1)*200
|
||||
|
||||
C7 <- read.csv(file="~/Data/Multiphase/Piston/Case1a/timelog.tcat",head=TRUE,sep=" ")
|
||||
C7$label <- "Case 1a"
|
||||
C7$U <- predict(sm.spline(C7$time,C7$sw),C7$time,1)*200
|
||||
|
||||
C8 <- read.csv(file="~/Data/Multiphase/Piston/Case2a/timelog.tcat",head=TRUE,sep=" ")
|
||||
C8$label <- "Case 2a"
|
||||
C8$U <- predict(sm.spline(C8$time,C8$sw),C8$time,1)*200
|
||||
|
||||
C9 <- read.csv(file="~/Data/Multiphase/Piston/Case3a/timelog.tcat",head=TRUE,sep=" ")
|
||||
C9$label <- "Case 3a"
|
||||
C9$U <- predict(sm.spline(C9$time,C9$sw),C9$time,1)*200
|
||||
|
||||
C10 <- read.csv(file="~/Data/Multiphase/Piston/Case4a/timelog.tcat",head=TRUE,sep=" ")
|
||||
C10$label <- "Case 4a"
|
||||
C10$U <- predict(sm.spline(C10$time,C10$sw),C10$time,1)*200
|
||||
|
||||
C11 <- read.csv(file="~/Data/Multiphase/Piston/Case5a/timelog.tcat",head=TRUE,sep=" ")
|
||||
C11$label <- "Case 5a"
|
||||
C11$U <- predict(sm.spline(C11$time,C11$sw),C11$time,1)*200
|
||||
|
||||
C12 <- read.csv(file="~/Data/Multiphase/Piston/Case6a/timelog.tcat",head=TRUE,sep=" ")
|
||||
C12$label <- "Case 6a"
|
||||
C12$U <- predict(sm.spline(C12$time,C12$sw),C12$time,1)*200
|
||||
|
||||
C13 <- read.csv(file="~/Data/Multiphase/Piston/Case7/timelog.tcat",head=TRUE,sep=" ")
|
||||
C13$label <- "Case 7"
|
||||
C13$U <- predict(sm.spline(C13$time,C13$sw),C13$time,1)*600
|
||||
|
||||
C14 <- read.csv(file="~/Data/Multiphase/Piston/Case8/timelog.tcat",head=TRUE,sep=" ")
|
||||
C14$label <- "Case 8"
|
||||
C14$U <- predict(sm.spline(C14$time,C14$sw),C14$time,1)*600
|
||||
C6$label <- "F"
|
||||
C6$U <- predict(sm.spline(C6$time,C6$sw),C6$time,1)*400
|
||||
C6$Ca<-C6$U*visc/gamma
|
||||
|
||||
#Bind all of the data into one frame for ggplot (combine as labeled rows)
|
||||
Full<-rbind(C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12)
|
||||
Big<-rbind(C13,C14)
|
||||
|
||||
Full<-rbind(C1,C2,C3,C4,C5,C6)
|
||||
|
||||
Full$Ca<-Full$Ca*(-1)
|
||||
Full$vawnz<-Full$vawnz*(-1)
|
||||
Full$vawnsz<-Full$vawnsz*(-1)
|
||||
Full$awn<-Full$awn*volume/(PI*D*D*D)
|
||||
#Full$awn<-Full$awn*volume/(PI*D*D*D)
|
||||
Full$sgkvpmawns<-Full$sgkvpmawns*(-1)
|
||||
Full$trJwn<-D*Full$trJwn
|
||||
Full$U<-Full$U*(-1)
|
||||
Full$Ca<-Full$U*visc/gamma
|
||||
|
||||
Big$vawnz<-Big$vawnz*(-1)
|
||||
Big$vawnsz<-Big$vawnsz*(-1)
|
||||
Big$awn<-Big$awn*volume/(PI*D*D*D)
|
||||
Big$sgkvpmawns<-Big$sgkvpmawns*(-1)
|
||||
Big$trJwn<-D*Big$trJwn
|
||||
Big$U<-Big$U*(-1)
|
||||
Big$Ca<-Big$U*visc/gamma
|
||||
|
||||
Full$awn<-Full$awn/D
|
||||
Full$aws<-Full$aws/D
|
||||
Full$ans<-Full$ans/D
|
||||
Full$lwns<-Full$lwns/D/D
|
||||
|
||||
# Plot the saturation against time
|
||||
p<-ggplot(Full,aes(time,sw,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(sw) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/sw.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-sw.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,awn,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(ewn) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/ewn.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-ewn.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,ans,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(ens) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/ens.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-ens.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,aws,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(ews) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/ews.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-ews.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,lwns,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(ewns) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/ewns.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-ewns.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,vawz,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(vawz) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/vaw.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-vaw.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,vanz,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(vanz) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/van.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/piston-van.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,vawnz,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(vawnz) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/vawn.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-vawn.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,vawnsz,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(vawnsz) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/vawns.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-vawns.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,sgkvpmawns,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(cwns) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/cwns.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-cwns.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Big,aes(time,KNwns,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab("KNwns") + theme_bw() +
|
||||
p<-ggplot(Full,aes(time,KNwns,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(KNwns) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/KNwns.eps",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-KNwns.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,KGwns,colour=label),coord_cartesian(xlim=c(0,25000)))+
|
||||
geom_line() + xlab("time") + ylab(KGwns) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-KGwns.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Full,aes(time,U,colour=label)) +
|
||||
geom_line() + xlab("time") + ylab("U") + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(xlim=c(0,25000))
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
ggsave("~/Data/Multiphase/Piston/piston-U.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/U.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Big,aes(time,vawz,colour=label))+
|
||||
geom_line() + xlab("time") + ylab(vawz) + theme_bw() +
|
||||
p<-ggplot(Full,aes(time,Gwnxx,colour=label))+
|
||||
geom_line() + xlab("time") + ylab(Gwnxx) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(ylim=c(0,0.015))
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/piston-Gwnxx.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/big-vaw.pdf",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Big,aes(time,vanz,colour=label))+
|
||||
geom_line() + xlab("time") + ylab(vanz) + theme_bw() +
|
||||
p<-ggplot(Full,aes(time,Ca,colour=label))+
|
||||
geom_line() + xlab("time") + ylab("Ca") + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(ylim=c(0,0.0185))
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/piston-Ca.eps",p,width=4.5,heigh=3.5)
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/big-van.pdf",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Big,aes(time,vawnz,colour=label))+
|
||||
geom_line() + xlab("time") + ylab(vawnz) + theme_bw() +
|
||||
p<-ggplot(Full,aes(time,trJwn,colour=label))+
|
||||
geom_line() + xlab("time") + ylab(JwnD) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(ylim=c(0,0.015))
|
||||
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/big-vawn.pdf",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Big,aes(time,vawnsz,colour=label))+
|
||||
geom_line() + xlab("time") + ylab(vawnsz) + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(ylim=c(0,0.015))
|
||||
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/big-vawns.pdf",p,width=4.5,heigh=3.5)
|
||||
|
||||
p<-ggplot(Big,aes(time,U,colour=label))+
|
||||
geom_line() + xlab("time") + ylab("U") + theme_bw() +
|
||||
theme(text=element_text(family="Helvetica",size=rel(4))) +
|
||||
coord_cartesian(ylim=c(0,0.015))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/big-U.pdf",p,width=4.5,heigh=3.5)
|
||||
theme(legend.text=element_text(size=rel(4)))
|
||||
|
||||
ggsave("~/Data/Multiphase/Piston/piston-Jwn.eps",p,width=4.5,heigh=3.5)
|
||||
|
Loading…
Reference in New Issue
Block a user