In [2]:
using PyPlot, JLD, DataFrames
PyPlot.rc("font", family="sans")
In [4]:
file_name=["low_AOS", "mid_AOS", "high_AOS", "high_AOS2", "higher_AOS",
"high_amph", "high_amphosol_orig"]
AOS_higher = readtable("AOS_1.0_N2_benth_lowP.csv")
AOS_high = readtable("AOS0.5_N2_Benth_CT_mu_foam.csv")
AOS_high2 = readtable("data_lowPT_AOS_analyzed_SCAN.csv")
AOS_mid = readtable("AOS0.1_N2_Benth_CT_mu_foam.csv")
AOS_low = readtable("AOS0.03_N2_Benth_CT_mu_foam.csv")
AOS_higher_fg=(AOS_higher[:fg_in]+AOS_higher[:fg_out])/2.0
AOS_high_fg = AOS_high[:ug]./(AOS_high[:ug]+AOS_high[:uw])
AOS_high2_fg = AOS_high2[:ug]./(AOS_high2[:ug]+AOS_high2[:uw])
AOS_mid_fg = AOS_mid[:ug]./(AOS_mid[:ug]+AOS_mid[:uw])
AOS_low_fg = AOS_low[:ug]./(AOS_low[:ug]+AOS_low[:uw]);
#"fg", fg_opt, "muf", muf_opt,
#"sw", sw_plot, "sw_exp", sw_ct,
#"fg_exp", fg_exp, "muf_exp", muf_exp)
Out[4]:
In [22]:
figure(figsize=(7,5))
plot(AOS_low_fg, AOS_low[:muf_tot], "ob", markersize=7)
plot(AOS_mid_fg, AOS_mid[:muf_tot], "^k", markersize=7)
plot(AOS_high_fg, AOS_high[:muf_tot], "sg", markersize=7)
plot(AOS_high2_fg, AOS_high2[:mu_foam], "og", markersize=7)
plot(AOS_higher_fg, AOS_higher[:muf_tot], "vr", markersize=7)
line_color=["b--", "k-", "g-", "g-", "r--"]
for i in [1,2,4,5]
d=load(file_name[i]*".jld")
plot(d["fg"], d["muf"], line_color[i], linewidth=2)
end
xlabel("Gas fractional flow", fontsize=14)
ylabel("Foam apparent viscosity [Pa.s]", fontsize=14)
legend(["0.03wt% AOS", "0.1wt% AOS", "0.5wt% AOS", "0.5wt% AOS", "1.0wt% AOS"], loc=2)
grid()
tight_layout()
savefig("foam_fit_all.eps")
In [25]:
figure(figsize=(7,5))
line_color=["b-", "r--"]
for i=6:7
d=load(file_name[i]*".jld")
plot(d["fg"], d["muf"], line_color[i-5], linewidth=2,
d["fg_exp"], d["muf_exp"], "ob")
end
xlabel("Gas fractional flow", fontsize=14)
ylabel("Foam apparent viscosity [Pa.s]", fontsize=14)
legend(["Optimized krw", "Exp data", "Original krw"], loc=2)
grid()
tight_layout()
savefig("foam_fit_amph.eps")
In [26]:
figure(figsize=(7,5))
for i=6:7
d=load(file_name[i]*".jld")
plot(d["sw"], d["fg"], line_color[i-5], linewidth=2,
d["sw_exp"], d["fg_exp"], "ob")
end
ylabel("Gas fractional flow", fontsize=14)
xlabel("Liquid saturation", fontsize=14)
legend(["Optimized krw", "Exp data", "Original krw"], loc=1)
grid()
tight_layout()
savefig("foam_sat_amph_compare.eps")
In [23]:
figure(figsize=(7,5))
s_gl=0.03 # N/m surface tension
line_color=["b--", "k-", "g-", "g-", "r--"]
for i in [1,2,4,5]
print(i)
d=load(file_name[i]*".jld")
x=d["cmg_stars"]
semilogy(d["fg"], x[1]*(x[4]./(mean(d["u"]).*d["muf"]/s_gl)), line_color[i], linewidth=2)
end
xlabel("Gas fractional flow", fontsize=14)
ylabel("fmmob x F5", fontsize=14)
legend(["0.03wt% AOS", "0.1wt% AOS", "0.5wt% AOS", "1.0wt% AOS"], loc=2)
grid()
tight_layout()
savefig("fmmob_F5.eps")
In [26]:
for i in [1,2,4,5]
d=load(file_name[i]*".jld")
x=d["cmg_stars"]
println(x')
end