-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPPTCM.py
More file actions
100 lines (83 loc) · 2.66 KB
/
PPTCM.py
File metadata and controls
100 lines (83 loc) · 2.66 KB
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
# Modified from the original file, which can be found in https://github.com/USArmyResearchLab/ParaPower
from PPMatLib import PPMatLib
class PPTCM:
def __init__(self,**kwargs):
if len(kwargs) == 0:
self.PottingMaterial = "0"
self.ParamVar = []
self.VariableList = []
self.iFeatures = []
self.iParams = []
self.Params = []
self.iExternalConditions = []
self.iExpanded = False
self.iFeaturesTemplate = {
"x": [],
"y": [],
"z": [],
"Matl": [],
"Q": [],
"dx": [],
"dy": [],
"dz": [],
"Desc": []
}
self.Version = ""
self.MatLib = PPMatLib()
self.set_params("Init")
self.set_features("Init")
self.set_external_conditions("Init")
else:
raise NotImplementedError("kwargs > 0 not implemented yet")
def set_external_conditions(self, input_):
S = {
"h_Xminus": [],
"h_Xplus": [],
"h_Yminus": [],
"h_Yplus": [],
"h_Zminus": [],
"h_Zplus": [],
"Ta_Xminus": [],
"Ta_Xplus": [],
"Ta_Yminus": [],
"Ta_Yplus": [],
"Ta_Zminus": [],
"Ta_Zplus": [],
"Tproc": []
}
Fields = []
if input_ == "Init":
Fields = []
if len(self.iExternalConditions) == 0:
self.iExternalConditions = S
self.ExternalConditions = S
def set_features(self, input_):
F = self.iFeaturesTemplate
if input_ == "Init":
FieldsInput = []
Input = []
else:
raise NotImplementedError
FieldsObject = list(F.keys())
self.iFeatures = Input
self.Features = Input
def set_params(self, input_):
S = {
'Tinit': [],
'DeltaT': [],
'Tsteps': []
}
if input_ == "Init":
Fields = []
if len(self.iParams) == 0:
self.iParams = S
self.Params = S
if len(Fields) > 0:
raise NotImplementedError
def features(self):
FeaturesOut = self.iFeatures
if len(FeaturesOut) == 0:
FeaturesOut = self.iFeaturesTemplate
else:
raise NotImplementedError
return FeaturesOut