-
Notifications
You must be signed in to change notification settings - Fork 0
/
GlobalConstants.py
executable file
·106 lines (91 loc) · 4.53 KB
/
GlobalConstants.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
displayRatio = 300
midInteractionNum = 100
inLineDelimiter = '\t'
ballFlag = 'ball:'
ballInitFlag = 'ballInit:'
wallFlag = 'wall:'
wallInitFlag = 'wallInit:'
utilsFlag = 'utils:'
strangeFlag = 'strange:'
nextStepFlag = 'next'
endFileFlag = 'end\n'
def getForceDamping(c):
return 1 - (1 - c) ** (1 / midInteractionNum)
isDraw = False
isForce = True
# Класс GlobalUtils будет хранить в себе все сторонние библиотеки и константы
epsVelocity = 0.01
epsAcceleration = 0.00001
eps = 1e-9
# inf = 1e11
# Критически малая величина, необходимая для сравнения вещественных чисел
step = 100
deltaTime = 1 * 1e-5
numOfSeconds = 15
numOfSteps = int(numOfSeconds * int(1 / deltaTime))
addNewBalls = True
newBallPeriod = 0.4
newBallPeriodSteps = round(newBallPeriod * int(1 / deltaTime))
newBallCount = round(numOfSeconds / newBallPeriod)
newBallSteps = [i * newBallPeriodSteps for i in range(1, newBallCount)]
# Шаг по времени
cn_wall = 1
cs_wall = 0.2
Emod_wall = 2 * 1e11
nu_wall = 0.3
Gmod_wall = Emod_wall / (2 * (1 + nu_wall))
coefficientOfDampingTheta = 0
coefficientOfFrictionSliding = 0.1
coefficientOfFrictionRolling = 0.05
# коэффициенты демпфирования для стенок
accelerationX = 0
accelerationY = 9.81
kn = 2 * 1e5
ballStartFileName1Ball = './ball_sets/1_ball.txt'
ballStartFileName2Ball = './ball_sets/2_ball.txt'
ballStartFileName4Ball = './ball_sets/4_ball.txt'
ballStartFileName4BallAnother = './ball_sets/4_ball_another.txt'
ballStartFileName2PlateVol = './ball_sets/2_plate_volume.txt'
ballStartFileName2PlateDen = './ball_sets/2_plate_density.txt'
ballStartFileName4Plate = './ball_sets/4_plate.txt'
ballStartFileName4PlateCustom = './ball_sets/4_plate_custom.txt'
ballStartFileNameSimple = './ball_sets/balls_start_simple.txt'
ballStartFileNameBallMill = './ball_sets/mill/ball_mill_60.txt'
ballStartFileNameBallMillBig = './ball_sets/mill/ball_mill_120.txt'
ballStartFileNameVibro1 = './ball_sets/vibro/vibrotest_1.txt'
ballStartFileNameFractionOld = './ball_sets/mill/fraction/old.txt'
ballStartFileNameOreOld = './ball_sets/mill/ore/old.txt'
ballStartFileNameFractionDiploma1 = './ball_sets/mill/fraction/diploma1.txt'
ballStartFileNameOreDiploma1 = './ball_sets/mill/ore/diploma1.txt'
ballStartFileNameFractionDiploma2 = './ball_sets/mill/fraction/diploma2.txt'
ballStartFileNameOreDiploma2 = './ball_sets/mill/ore/diploma2.txt'
ballStartFileNameTest1_1 = './ball_sets/tests/ball-ball/tests1/test1_1.txt'
ballStartFileNameTest1_2 = './ball_sets/tests/ball-ball/tests1/test1_2.txt'
ballStartFileNameTest1_3 = './ball_sets/tests/ball-ball/tests1/test1_3.txt'
ballStartFileNameTest1_4 = './ball_sets/tests/ball-ball/tests1/test1_4.txt'
ballStartFileNameTest2_1 = './ball_sets/tests/ball-ball/tests2/test2_1.txt'
ballStartFileNameTest2_2 = './ball_sets/tests/ball-ball/tests2/test2_2.txt'
ballStartFileNameTest2_3 = './ball_sets/tests/ball-ball/tests2/test2_3.txt'
ballStartFileNameTest2_4 = './ball_sets/tests/ball-ball/tests2/test2_4.txt'
ballStartFileNameTest3_1 = './ball_sets/tests/ball-wall/tests3/test3_1.txt'
ballStartFileNameTest3_2 = './ball_sets/tests/ball-wall/tests3/test3_2.txt'
ballStartFileNameTest3_3 = './ball_sets/tests/ball-wall/tests3/test3_3.txt'
ballStartFileNameTest3_4 = './ball_sets/tests/ball-wall/tests3/test3_4.txt'
ballStartFileNameTest3_5 = './ball_sets/tests/ball-wall/tests3/test3_5.txt'
ballStartFileNameTest4_1 = './ball_sets/tests/ball-wall/tests4/test4_1.txt'
ballStartFileNameTest4_2 = './ball_sets/tests/ball-wall/tests4/test4_2.txt'
ballStartFileNameTest4_3 = './ball_sets/tests/ball-wall/tests4/test4_3.txt'
ballStartFileNameTest4_4 = './ball_sets/tests/ball-wall/tests4/test4_4.txt'
ballStartFileNameTest4_5 = './ball_sets/tests/ball-wall/tests4/test4_5.txt'
coordinatesFileNameCircle = './walls_dynamic/circle.txt'
coordinatesFileNameCylinderBall = './walls_dynamic/cylinder_ball.txt'
coordinatesFileNameCylinderCone = './walls_dynamic/cylinder_cone.txt'
coordinatesFileNamePolygon = './walls_dynamic/polygon.txt'
coordinatesFileNameRhombus = './walls_dynamic/rhombus.txt'
coordinatesFileNameSquare = './walls_dynamic/square.txt'
coordinatesFileNameSquareBig = './walls_dynamic/square_big.txt'
coordinatesFileNameTrapezoid = './walls_dynamic/trapezoid.txt'
coordinatesFileNameTriangle = './walls_dynamic/triangle.txt'
coordinatesFileNameMill2Dot5m = './walls_dynamic/wall_mill_2dot5m.txt'
coordinatesFileNameMill1m = './walls_dynamic/wall_mill_1m.txt'
coordinatesFileNameVibroBox = './walls_dynamic/vibro_box.txt'