-
Notifications
You must be signed in to change notification settings - Fork 1
/
GetTemperature.py
executable file
·394 lines (351 loc) · 24.3 KB
/
GetTemperature.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 16th 2017
@author: jnzzp5
"""
import numpy as np
from Parameters import *
from io import StringIO
from StringIO import StringIO
import pandas as pad
from scipy import interpolate
from scipy.interpolate import interpn
from scipy.interpolate import RegularGridInterpolator
import matplotlib.pyplot as plt
from mayavi.mlab import *
import timeit
import os
class GetTemp:
def __init__(self, _Row_Num, _Column_Num, _TempFileNumber, _PathDir):
self.RowNum = _Row_Num
self.ColumnNum = _Column_Num
self.TempFileNumber = _TempFileNumber
self.PathDir = _PathDir
def NodeTemp(self, TempFile_start): # One node temperature; pandas.series is called.
TempList = list()
IndexList = list()
for i in range(TempFile_start, self.TempFileNumber):
TempND = np.loadtxt(r"C:\Program Files (x86)\SIMULIA\Abaqus\Temp\JingweiZhang\PostprocessData\ti64_1layer_temp_correct2014error_02142017\Nodeset-SET-FACE2_1layerTempTi64_Interpolate"+str(i),delimiter = ',')[155, 50]
TempList.append(TempND)
IndexList.append(str(i))
TempSer = pad.Series(TempList, index = IndexList)
TempSer.plot(kind = 'line', title = '[{0},{1}] node temperature history'.format(61, 160))
print "TempSer is:\n", TempSer
print "TempSer shape is ", TempSer.shape
def NodesTemp(self): #Several nodes temprature. pandas.dataframe is called.
TempList = list()
IndexList = list()
TempDict = dict()
for i in range(self.TempFileNumber):
TempND = list(np.loadtxt(r"C:\Program Files (x86)\SIMULIA\Abaqus\Temp\JingweiZhang\PostprocessData\NodesetSET-FACE2OnelayerTempTi6Al4VEff04_Interpolate" + str(i),delimiter = ',')[141:171, 50]) #???????is list necessary?
TempList.append(TempND)
IndexList.append(str(i))
TempArray = np.array(TempList) #?????????
# print TempArray.shape
# print type(TempList)
# names = ['160','161','162','163','164']
names = range(141, 171) # The columns
for j, name in enumerate(names):
TempDict[name] = TempArray[:, j]
Tempdf = pad.DataFrame(TempDict, columns=names)
Tempdf.to_csv(path_or_buf = r'C:\Users\jnzzp5\OneDrive\study\research\CA05122016\CA_2D_onelayer\NodesTempHistory')
writer = pad.ExcelWriter(r'C:\Users\jnzzp5\OneDrive\study\research\CA05122016\CA_2D_onelayer\NodesTempHistory.xlsx', engine='xlsxwriter') # Create a Pandas Excel writer using XlsxWriter as the engine.
Tempdf.to_excel(writer, sheet_name='Sheet1') # Convert the dataframe to an XlsxWriter Excel object.
writer.save() # Close the Pandas Excel writer and output the Excel file.
print Tempdf
# TempSer = pad.Series(TempList, index = IndexList)
# TempSer.plot(kind = 'line', title = '[{0},{1}] node temperature history'.format(166, 50))
# print "TempSer is:\n", TempSer
# print "TempSer shape is ", TempSer.shape
def NodesTempMultiLayer(self): #Several nodes temprature. pandas.dataframe is called. 02092017. 03012017 revise.
TempList = list()
IndexList = list()
TempDict = dict()
for i in range(self.TempFileNumber):
TempND = list(np.loadtxt(r"C:\Program Files (x86)\SIMULIA\Abaqus\Temp\JingweiZhang\PostprocessData\Nodeset-SET-CS_CLAD9_25layerTempTi64_Interpolate_finer" + str(i),delimiter = ',')[0:233:8, 300]) #???????is list necessary? In raw data, there are 233 rows and 601 columns. Cell size is 10um.
TempList.append(TempND)
IndexList.append(str(i))
TempArray = np.array(TempList) #????????? stores temperature.
print i
# print TempArray.shape
# s = raw_input('-->')
# print type(TempList)
# names = ['160','161','162','163','164']
names = range(0, 233, 8) # The columns
for j, name in enumerate(names):
TempDict[name] = TempArray[:, j]
Tempdf = pad.DataFrame(TempDict, columns=names)
Tempdf.to_csv(path_or_buf = r'C:\Users\jnzzp5\OneDrive\study\research\CA05122016\CA_2D_multiple_layer\25LayerNodesTempHistory')
writer = pad.ExcelWriter(r'C:\Users\jnzzp5\OneDrive\study\research\CA05122016\CA_2D_multiple_layer\25LayerNodesTempHistory.xlsx', engine='xlsxwriter') # Create a Pandas Excel writer using XlsxWriter as the engine.
Tempdf.to_excel(writer, sheet_name='Sheet1') # Convert the dataframe to an XlsxWriter Excel object.
Tempdf.plot(kind = 'line')
writer.save() # Close the Pandas Excel writer and output the Excel file.
print Tempdf
def get_temp_yanlei_2d(self, path1, path2, x_dim, y_dim, z_dim): # 09112017 created because "get_temp_yanlei" doesn't work well.
datalist = list()
ExtractTemp = np.array(datalist) # create an empty array.
for i in range(self.TempFileNumber):
temp_all = np.genfromtxt(path2 + str(i + 1) + ".txt")
middle_idx = np.argwhere((temp_all[:, 0] >= 0.005) & (temp_all[:, 0] <= 0.02) & (temp_all[:, 1] >= 0.0055) & (temp_all[:, 1] <= 0.0075))
temp_middle = temp_all[middle_idx[:, 0], :] # extract middle part node temperature
sort_middle_idx = np.lexsort((temp_middle[:, 0], temp_middle[:, 1], temp_middle[:, 2]))
temp_middle_sort = temp_middle[sort_middle_idx]
filename = path2 + "middle" + str(i + 1) + ".txt"
if not os.path.exists(filename):
np.savetxt(path2 + "middle" + str(i + 1) + ".txt", temp_middle_sort, fmt = '%1.6f', delimiter = ',')
ExtractTemp = np.append(ExtractTemp, temp_middle_sort[:, 5])
ExtractTemp = ExtractTemp.reshape(self.TempFileNumber, -1)
print "ExtractTemp shape is {0}".format(np.shape(ExtractTemp))
z, y, x = np.arange(1, z_dim + 1), np.arange(1, y_dim + 1), np.arange(1, x_dim + 1) #original index
znew2, xnew2 = np.arange(1.05, z_dim, 0.05), np.arange(1.05, x_dim, 0.05)
"""use syntactic sugar to interpolate 2d data"""
def Interpolate_2d(fn):
def wrapper(*args):
print "Before Cubic_inter function runs..."
return fn(*args)
return wrapper
@Interpolate_2d # Interpolate_2d is an decorator
def Cubic_inter(z,y,znew,ynew,surfacepoint): #interpolate temperature in space
f=interpolate.interp2d(z, y, surfacepoint, kind = 'cubic')
xnew=f(znew,ynew)
return xnew
for i in range(self.TempFileNumber):# i represents the time step
filename_int = path2 + "Interpolate2d_" + str(i)
if not os.path.exists(filename_int):
print "The temperature # is {0}..............".format(i)
ExtractTempArr = ExtractTemp[i, :].reshape(len(z),len(y),len(x)) # shape is (42, 10, 69)!!! This ordering is very important!
Temp_original = ExtractTempArr[:, int(round(y_dim / 2)), :]
print "Temp_original shape is {0}".format(np.shape(Temp_original))
plt.imshow(Temp_original, cmap='hot', interpolation = 'quadric') # show 2D temperature before interpolation.
plt.savefig(path2 + "Temp_15layers_NoInter_2D" + str(i) + '.png')
start_time1 = timeit.default_timer()
InterpTemp = Cubic_inter(x, z, xnew2, znew2, Temp_original)
elapsed1 = timeit.default_timer() - start_time1
print "InterpTemp shape is {0}".format(np.shape(InterpTemp))
print "InterpTemp execution time is {0}".format(elapsed1)
plt.imshow(InterpTemp, cmap = 'hot', interpolation = 'quadric')
plt.savefig(path2 + 'Temp_15layers_Interpolate2D_XZPlane' + str(i) + '.png')
with open(path2 + "Interpolate2d_" + str(i), 'w') as outfile:
outfile.write('# Array shape: {0}\n'.format(InterpTemp.shape))
np.savetxt(outfile, InterpTemp, fmt='%1.3e', delimiter=',')
def get_temp_yanlei_2d_1layer(self, path1, path2, x_dim, y_dim, z_dim): # 11292017 created because this is for final defense at different laser power.
datalist = list()
ExtractTemp = np.array(datalist) # create an empty array.
for i in range(self.TempFileNumber):
temp_all = np.genfromtxt(path2 + str(i + 1) + ".txt")
middle_idx = np.argwhere((temp_all[:, 0] >= 0.005) & (temp_all[:, 0] <= 0.02) & (temp_all[:, 1] >= 0.0055) & (temp_all[:, 1] <= 0.0075))
temp_middle = temp_all[middle_idx[:, 0], :] # extract middle part node temperature
sort_middle_idx = np.lexsort((temp_middle[:, 0], temp_middle[:, 1], temp_middle[:, 2]))
temp_middle_sort = temp_middle[sort_middle_idx]
filename = path2 + "middle" + str(i + 1) + ".txt"
if not os.path.exists(filename):
np.savetxt(path2 + "middle" + str(i + 1) + ".txt", temp_middle_sort, fmt = '%1.6f', delimiter = ',')
ExtractTemp = np.append(ExtractTemp, temp_middle_sort[:, 5])
ExtractTemp = ExtractTemp.reshape(self.TempFileNumber, -1)
print "ExtractTemp shape is {0}".format(np.shape(ExtractTemp))
z, y, x = np.arange(1, z_dim + 1), np.arange(1, y_dim + 1), np.arange(1, x_dim + 1) #original index
znew2, xnew2 = np.arange(1.05, z_dim, 0.05), np.arange(1.05, x_dim, 0.05)
"""use syntactic sugar to interpolate 2d data"""
def Interpolate_2d(fn):
def wrapper(*args):
print "Before Cubic_inter function runs..."
return fn(*args)
return wrapper
@Interpolate_2d # Interpolate_2d is an decorator
def Cubic_inter(z,y,znew,ynew,surfacepoint): #interpolate temperature in space
f=interpolate.interp2d(z, y, surfacepoint, kind = 'cubic')
xnew=f(znew,ynew)
return xnew
for i in range(self.TempFileNumber): # i represents the time step
filename_int = path2 + "Interpolate2d_" + str(i)
if not os.path.exists(filename_int):
print "The temperature # is {0}..............".format(i)
ExtractTempArr = ExtractTemp[i, :].reshape(len(z),len(y),len(x)) # shape is (42, 10, 69)!!! This ordering is very important!
Temp_original = ExtractTempArr[:, int(round(y_dim / 2)), :]
print "Temp_original shape is {0}".format(np.shape(Temp_original))
plt.imshow(Temp_original, cmap='hot', interpolation = 'quadric') # show 2D temperature before interpolation.
plt.savefig(path2 + "Temp_1layers_NoInter_2D" + str(i) + '.png')
start_time1 = timeit.default_timer()
InterpTemp = Cubic_inter(x, z, xnew2, znew2, Temp_original)
elapsed1 = timeit.default_timer() - start_time1
print "InterpTemp shape is {0}".format(np.shape(InterpTemp))
print "InterpTemp execution time is {0}".format(elapsed1)
plt.imshow(InterpTemp, cmap = 'hot', interpolation = 'quadric')
plt.savefig(path2 + 'Temp_1layers_Interpolate2D_XZPlane' + str(i) + '.png')
with open(path2 + "Interpolate2d_" + str(i), 'w') as outfile:
outfile.write('# Array shape: {0}\n'.format(InterpTemp.shape))
np.savetxt(outfile, InterpTemp, fmt='%1.3e', delimiter=',')
def get_temp_yanlei(self, path1, path2, x_dim, y_dim, z_dim): # 06132017 created. get subset node temperature from yanlei's temperature files.
selector = 2 # determine which part temperature will be extracted and sorted.
datalist = list()
ExtractTemp = np.array(datalist) # create an empty array.
"""select the temperature domain based on the selector value."""
if selector == 0: # only deposit part
for i in range(self.TempFileNumber):
temp_all = np.genfromtxt(self.PathDir + str(i + 1) + ".txt")
idx = np.argwhere(temp_all[:, 2] >= 0.006) # all row number of deposit location.
temp_deposit = temp_all[idx[:, 0], :] # extract deposit part node temperature
sort_deposit_idx = np.lexsort((temp_deposit[:, 0], temp_deposit[:, 1], temp_deposit[:, 2]))
temp_middle_sort = temp_deposit[sort_deposit_idx] # temperature after sorting
np.savetxt(path1 + str(i + 1) + ".txt", temp_middle_sort, fmt = '%1.6f', delimiter = ',')
if selector == 1: # deposit and underneath substrate part for three layers
for i in range(self.TempFileNumber):
temp_all = np.genfromtxt(self.PathDir + str(i + 1) + ".txt")
middle_idx = np.argwhere((temp_all[:, 0] >= 0.005) & (temp_all[:, 0] <= 0.02) & (temp_all[:, 1] >= 0.0055) & (temp_all[:, 1] <= 0.0075))
temp_middle = temp_all[middle_idx[:, 0], :] # extract middle part node temperature
sort_middle_idx = np.lexsort((temp_middle[:, 0], temp_middle[:, 1], temp_middle[:, 2]))
temp_middle_sort = temp_middle[sort_middle_idx]
np.savetxt(self.PathDir + "middle" + str(i + 1) + ".txt", temp_middle_sort, fmt = '%1.6f', delimiter = ',')
ExtractTemp = temp_middle_sort[:, 5]
print ExtractTemp.shape
print temp_middle_sort.shape
if selector == 2: # deposit and underneath substrate part for 15 layer result.
for i in range(self.TempFileNumber):
temp_all = np.genfromtxt(path2 + str(i + 1) + ".txt")
middle_idx = np.argwhere((temp_all[:, 0] >= 0.005) & (temp_all[:, 0] <= 0.02) & (temp_all[:, 1] >= 0.0055) & (temp_all[:, 1] <= 0.0075))
temp_middle = temp_all[middle_idx[:, 0], :] # extract middle part node temperature
sort_middle_idx = np.lexsort((temp_middle[:, 0], temp_middle[:, 1], temp_middle[:, 2]))
temp_middle_sort = temp_middle[sort_middle_idx]
filename = path2 + "middle" + str(i + 1) + ".txt"
if not os.path.exists(filename):
np.savetxt(path2 + "middle" + str(i + 1) + ".txt", temp_middle_sort, fmt = '%1.6f', delimiter = ',')
ExtractTemp = np.append(ExtractTemp, temp_middle_sort[:, 5])
ExtractTemp = ExtractTemp.reshape(self.TempFileNumber, -1)
print "ExtractTemp shape is {0}".format(np.shape(ExtractTemp))
"""interpolate 3D temperature"""
z, y, x = np.arange(1, z_dim + 1), np.arange(1, y_dim + 1), np.arange(1, x_dim + 1) #original index
znew, ynew, xnew = np.arange(1, z_dim + .2, 0.2), np.arange(1, y_dim + .2, 0.2), np.arange(1, x_dim + .2, 0.2) #interpolated index
points = (z, y, x) # three 1D grid along 3 direction.
inter_mesh1 = np.asarray(np.meshgrid(znew, ynew, xnew)) # generate 3D grid. keep consistent with points sequence.
interp_points1 = tuple(map(tuple, inter_mesh1))
# print "interp_points1 shape is {0}".format(np.shape(interp_points1))
points2 = (znew, ynew, xnew)
znew2, ynew2, xnew2 = np.arange(1.1, z_dim, 0.1), np.arange(1.1, y_dim, 0.1), np.arange(1.1, x_dim, 0.1)
inter_mesh2 = np.asarray(np.meshgrid(znew2, ynew2, xnew2))
# test2 = np.meshgrid(znew2, ynew2, xnew2)
# print "test2 shape is {0}".format(np.shape(test2))
interp_points2 = tuple(map(tuple, inter_mesh2))
print "interp_points2 shape is {0}".format(np.shape(interp_points2))
for i in range(self.TempFileNumber): # i represents the time step
ExtractTempArr = ExtractTemp[i, :].reshape(len(z),len(y),len(x)) # shape is (42, 10, 69)!!! This ordering is very important!
print "ExtractTempArr shape is {0}".format(np.shape(ExtractTempArr))
"""use mayavi to show 3D temperature."""
#==============================================================================
# self.DisplayTemp3D(ExtractTempArr)
#==============================================================================
plt.imshow(ExtractTempArr[:, len(y)/2, :], cmap='hot', interpolation = 'quadric') # show 2D temperature before interpolation. ("len(y)/2" is middle plane.)
plt.savefig(path2 + "Temp_15layers_NoInter_2D" + str(i) + '.png')
"""use interpn to interpolate data"""
#==============================================================================
# start_time1 = timeit.default_timer()
# InterpTemp1 = interpn(points, ExtractTempArr, interp_points2, method = "linear").reshape(len(znew2), len(ynew2), len(xnew2)) # core method to return interpolated points. points are sampled(original) grids. ExtractTempArr are the values of sampled grid. xi is new interpolated grid. returns are the values of interpolated grids.
# elapsed1 = timeit.default_timer() - start_time1
# print "InterpTemp1 shape is {0}".format(np.shape(InterpTemp1))
# print "InterpTemp1 execution time is {0}".format(elapsed1)
#==============================================================================
"""use RegularGridInterpolator to interpolate data. 09102017"""
start_time1 = timeit.default_timer()
rgi = RegularGridInterpolator(points, ExtractTempArr, method = "linear")
InterpTemp1 = rgi(interp_points2).reshape(len(znew2), len(ynew2), len(xnew2))
elapsed1 = timeit.default_timer() - start_time1
print "InterpTemp1 shape is {0}".format(np.shape(InterpTemp1))
print "InterpTemp1 execution time is {0}".format(elapsed1)
plt.imshow(InterpTemp1[:, len(ynew2) / 2, :], cmap = 'hot', interpolation = 'quadric') # len(ynew2) / 2 is equal to 44.
plt.savefig(path2 + 'test' + str(i) + '.png')
raw_input('>---------------')
# use mayavi to show 3D temperature.
self.DisplayTemp3D(InterpTemp1)
#==============================================================================
# start_time2 = timeit.default_timer()
# InterpTemp2 = interpn(points2, InterpTemp1, interp_points2, method = "linear")
# elapsed2 = timeit.default_timer() - start_time2
# print "InterpTemp1 execution time is {0}, \nInterpTemp2 execution time is {1}".format(elapsed1, elapsed2)
#==============================================================================
"""save 3D and 2D interpolated results to files"""
with open(path2 + "Interpolate" + str(i), 'w') as outfile, open(path2 + "Interpolate2D_XZPlane" + str(i), 'w') as outfile2d: # open multiple files using "with...as..." structure
outfile.write('# Array shape: {0}\n'.format(InterpTemp1.shape))
InterpTemp1 = np.rollaxis(np.rollaxis(InterpTemp1, 1, 0), 2, 1)
print '# InterpTemp1 Array shape: {0}\n'.format(InterpTemp1.shape)
for index, data_slice in enumerate(InterpTemp1):
"""3D interpolated storage. in order to save computation time, it is commented here."""
#==============================================================================
# outfile.write('#{0} New slice\n'.format(index))
# np.savetxt(outfile, data_slice, fmt='%1.3e', delimiter=',')
#==============================================================================
if index == int(round(len(ynew2) / 2)):
print "index is {0}".format(index)
print "data_slice shape is {0}".format(len(data_slice))
start_time3 = timeit.default_timer()
np.savetxt(outfile2d, data_slice, fmt = '%1.3e', delimiter = ',')
elapsed3 = timeit.default_timer() - start_time3
print "np.savetxt execution time is {0}".format(elapsed3)
"""display the interpolated temperature"""
plt.imshow(data_slice, cmap=None, interpolation='quadric')
plt.savefig(path2 + 'Temp_15layers_Interpolate2D_XZPlane' + str(i) + '.png')
print "done!"
def DisplayTemp3D(self, temp): # show 3d result.
obj = contour3d(temp, contours=4, transparent=True)
return obj
def get_temp(self):
Temp=np.zeros((self.RowNum,self.ColumnNum),dtype='float16')# this is created to store temperature data
try:
f=file("C:\Program Files (x86)\SIMULIA\Abaqus\Temp\JingweiZhang\PostprocessData\NodesetSET-FACE2OnelayerTempTi6Al4VEff04_Interpolate"+str(self.TempFileNumber),'r')
except IOError:
print "This temperature file cannot be found"
else:
j=0
for line in f.readlines():
line = line.replace("\n","") #delete '\n' in the line string
line = line.split(',') #split string data with comma
for i in xrange(self.ColumnNum):
Temp[j,i] = float(line[i]) # convert string data to float data, delimiter is comma; store every data to ndarray
j+=1
f.close()
return Temp
objective = "defense"
if objective == "normal": # works for multiple layers.
#"""Operation"""
c = 4 # select operation
PathDir = r"C:/Users/jnzzp5/OneDrive/study/research/CA05122016/CA_2D_multiple_layer/LeiYanTemperature/"
if c == 0: # 25 multiple layers
TempClass = GetTemp(233, 601, 200) # RowNum is 233, ColumnNum is 601, Time step number is 827.
TempClass.NodesTempMultiLayer()
if c == 1: # Onelayer one node temperature history
TempClass = GetTemp(171, 101, 519) # RowNum is 233, ColumnNum is 601, Time step number is 827.
TempClass.NodeTemp(400)
if c == 2:
TempClass = GetTemp(171, 101, 2) # 180 temperature files for 3 layers 06152017 revised.
TempClass.get_temp_yanlei()
if c == 3: # leiyan 15layers result
path1 = PathDir + "deposit"
path2 = PathDir + r"15layers/"
TempClass = GetTemp(206, 341, 2, PathDir) # 960 temperature files for 15 layers 07172017 revised.
TempClass.get_temp_yanlei(path1, path2, 69, 10, 42) # x_dim, y_dim, z_dim are 69, 10, 42
if c == 4: # leiyan 15layers result. 09112017 created.
path1 = PathDir + "deposit"
path2 = PathDir + r"15layers/"
TempClass = GetTemp(206, 341,959, PathDir) # 960 temperature files for 15 layers 09112017 revised.
TempClass.get_temp_yanlei_2d(path1, path2, 69, 10, 42) # x_dim, y_dim, z_dim are 69, 10, 42
elif objective == "defense": # works for one layer for final defense.
#"""Operation"""
selector = 4 # select operation
PathDir = r"C:/Users/jnzzp5/OneDrive/study/research/CA05122016/CA_2D_onelayer/Yanlei_Temperature/"
if selector == 0: # 25 multiple layers
TempClass = GetTemp(233, 601, 200) # RowNum is 233, ColumnNum is 601, Time step number is 827.
TempClass.NodesTempMultiLayer()
if selector == 1: # Onelayer one node temperature history
TempClass = GetTemp(171, 101, 519) # RowNum is 233, ColumnNum is 601, Time step number is 827.
TempClass.NodeTemp(400)
if selector == 2:
TempClass = GetTemp(171, 101, 2) # 180 temperature files for 3 layers 06152017 revised.
TempClass.get_temp_yanlei()
if selector == 3: # leiyan 15layers result
path1 = PathDir + "deposit"
path2 = PathDir + r"15layers/"
TempClass = GetTemp(206, 341, 2, PathDir) # 960 temperature files for 15 layers 07172017 revised.
TempClass.get_temp_yanlei(path1, path2, 69, 10, 42) # x_dim, y_dim, z_dim are 69, 10, 42
if selector == 4: # 11252017 created.
path1 = PathDir
path2 = PathDir + r"600W/"
TempClass = GetTemp(206, 341, 71, PathDir) # 71 temperature files for 1 layer 11292017 revised.
TempClass.get_temp_yanlei_2d_1layer(path1, path2, 69, 10, 12) # x_dim, y_dim, z_dim are 69, 10, 12