-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResult.py
83 lines (62 loc) · 1.78 KB
/
Result.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
#'''
#Created on 17 feb. 2019
#@author: Inigo Gonzalez
#'''
#Result.py
#Creates an object in which the results and temperature of a simulation
#will be stored
class Result:
#Class constructor, stores results and their standard deviation. Alpha_P and the other
#parameters are expected to be arrays [result, stdDeviation]
def __init__(self, l, temp, press, vb, vs, fbv, fsv, eb, es, alpha_p, beta_t, c_p, k_s):
self.l=l
self.temperature=temp
self.press=press
self.vb=vb
self.vs=vs
self.lambdaVol=fbv/fsv
self.eb=eb
self.es=es
#Assigning result
self.alpha_p=alpha_p[0]
#Assigning error of the result
self.alphaDev=alpha_p[1]
self.beta_t=beta_t[0]
self.betaDev=beta_t[1]
self.c_p=c_p[0]
self.cDev=c_p[1]
self.k_s=k_s[0]
self.kDev=k_s[1]
#Return methods
def getL(self):
return self.l
def getT(self):
return self.temperature
def getP(self):
return self.press
def getVPlus(self):
return self.vb
def getVMinus(self):
return self.vs
def getLambda(self):
return self.lambdaVol
def getEPlus(self):
return self.eb
def getEMinus(self):
return self.es
def getAlpha_P(self):
return self.alpha_p
def getAlphaError(self):
return self.alphaDev
def getBeta_T(self):
return self.beta_t
def getBetaError(self):
return self.betaDev
def getC_P(self):
return self.c_p
def getCError(self):
return self.cDev
def getK_S(self):
return self.k_s
def getKError(self):
return self.kDev