-
Notifications
You must be signed in to change notification settings - Fork 1
/
testing.py
116 lines (100 loc) · 4.65 KB
/
testing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import pandas as pd
from plot import makePlot
# with_trapping: 218; without_trapping: 70
#num = 70
#numDict = {'wt': 218, 'nt': 70}
numDict = {'wt': 241, 'nt': 92}
#numDict = {'wt': 3, 'nt': 4}
#numDict = {'wt': 1, 'nt': 1}
title = 'Bentheimer'
#title = 'estaillades_sublabel1'
drain = False
imbibe = False
probable = True
hysteresis = True
includeTrapping = True
scaled = True
plotDist = True
results = {'drainage':{}, 'imbibition':{}}
cycle=3
for i in range(1,cycle+1):
label = 'wt'
cycleLabel = 'cycle'+str(i)
if includeTrapping or scaled:
results['drainage'][label+'_'+cycleLabel] = pd.read_csv(
'./results_csv/Flowmodel_{}_Drainage_{}_wt_{}.csv'.format(
title, cycleLabel, numDict['wt']), names=[
'satW', 'qWout', 'krw', 'qNWout', 'krnw', 'capPres', 'invasions'],
sep=',', skiprows=17, index_col=False)
results['imbibition'][label+'_'+cycleLabel] = pd.read_csv(
'./results_csv/Flowmodel_{}_Imbibition_{}_wt_{}.csv'.format(
title, cycleLabel, numDict['wt']), names=[
'satW', 'qWout', 'krw', 'qNWout', 'krnw', 'capPres', 'invasions'],
sep=',', skiprows=17, index_col=False)
if plotDist:
'''results['drainage'][label+'_'+cycleLabel+'_trDi'] = pd.read_csv(
'./results_csv/Flowmodel_{}_Drainage_{}_wt_{}_trappedDist.csv'.format(
title, cycleLabel, numDict['wt']), names=[
'rad', 'volume', 'fluid', 'trappedW', 'trappedNW'],
sep=',', skiprows=1, index_col=False)'''
results['imbibition'][label+'_'+cycleLabel+'_trDi'] = pd.read_csv(
'./results_csv/Flowmodel_{}_Imbibition_{}_wt_{}_trappedDist.csv'.format(
title, cycleLabel, numDict['wt']), names=[
'rad', 'volume', 'fluid', 'trappedW', 'trappedNW'],
sep=',', skiprows=1, index_col=False)
if not includeTrapping or scaled:
label = 'nt'
results['drainage'][label+'_'+cycleLabel] = pd.read_csv(
'./results_csv/Flowmodel_{}_Drainage_{}_nt_{}.csv'.format(
title, cycleLabel, numDict['nt']), names=[
'satW', 'qWout', 'krw', 'qNWout', 'krnw', 'capPres', 'invasions'],
sep=',', skiprows=17, index_col=False)
results['imbibition'][label+'_'+cycleLabel] = pd.read_csv(
'./results_csv/Flowmodel_{}_Imbibition_{}_nt_{}.csv'.format(
title, cycleLabel, numDict['nt']), names=[
'satW', 'qWout', 'krw', 'qNWout', 'krnw', 'capPres', 'invasions'],
sep=',', skiprows=17, index_col=False)
if plotDist:
'''results['drainage'][label+'_'+cycleLabel+'_trDi'] = pd.read_csv(
'./results_csv/Flowmodel_{}_Drainage_{}_nt_{}_trappedDist.csv'.format(
title, cycleLabel, numDict['nt']), names=[
'rad', 'volume', 'fluid', 'trappedW', 'trappedNW'],
sep=',', skiprows=1, index_col=False)'''
results['imbibition'][label+'_'+cycleLabel+'_trDi'] = pd.read_csv(
'./results_csv/Flowmodel_{}_Imbibition_{}_nt_{}_trappedDist.csv'.format(
title, cycleLabel, numDict['nt']), names=[
'rad', 'volume', 'fluid', 'trappedW', 'trappedNW'],
sep=',', skiprows=1, index_col=False)
#print(results)
#from IPython import embed; embed()
if drain:
mkD = makePlot(numDict[label], title, drainage_results, True, True, True, False, include=None)
mkD.pcSw()
mkD.krSw()
if imbibe:
mkI = makePlot(numDict[label], title, imbibition_results, True, True, False, True, include=None)
mkI.pcSw()
mkI.krSw()
if hysteresis:
compWithLitData = True
if not scaled:
if not compWithLitData:
mkH = makePlot(numDict[label], title, results, includeTrapping=includeTrapping)
mkH.pcSw1()
#mkH.krSw()
else:
#compWithLitData = False
mkH = makePlot(numDict[label], title, results, includeTrapping=includeTrapping,
drain=True, imbibe=True, compWithLitData=compWithLitData)
#mkH.pcSw1()
print(mkH.compWithLitData)
mkH.krSw1()
#mkH.krSw2('drainage')
#mkH.krSw2('imbibition')
mkH.krSw3()
else:
mkH = makePlot(numDict[label], title, results, includeTrapping=includeTrapping)
#mkH.pcSwScaled()
#mkH.krSwScaled()
#mkH.krSwProposed()
mkH.plotDistribution()