command.py 1.74 KB
Newer Older
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

from pylmgc90.chipy import *
from numpy import *

checkDirectories()

### computation's parameters definition ### 

dt = 0.002
nb_steps = 5000 #40000
theta = 0.5

xperiode = 25.0
yperiode = 25.0

freq_display = 10


PRPRx_UseCpCundallDetection(300)
PRPRx_LowSizeArrayPolyr(70)


#PRPRx_VerboseF2F(1,2)

freq_detect = 1
tol = 0.1666e-3
relax = 1.0
quad = 'Maxm '
gs_it1 = 11
gs_it2 = 101

#nlgs_3D_SetWithQuickScramble()

34
SetDimension(3)
35

36
utilities_logMes('INIT TIME STEPPING')
37
38
39
40
41
42
TimeEvolution_SetTimeStep(dt)
Integrator_InitTheta(theta)

RBDY3_NewRotationScheme()

### model reading ###
43
44
utilities_logMes('READ BODIES')
ReadBodies()
45

46
47
utilities_logMes('READ BEHAVIOURS')
ReadBehaviours()
48
49

#LOADS
50
LoadBehaviours()
51

52
53
utilities_logMes('READ INI DOF')
ReadIniDof()
54

55
LoadTactors()
56

57
58
utilities_logMes('READ INI Vloc Rloc')
ReadIniVlocRloc()
59

60
61
utilities_logMes('READ DRIVEN DOF')
ReadDrivenDof()
62

63
64
65
66
67
68
utilities_logMes('WRITE BODIES')
WriteBodies()
utilities_logMes('WRITE BEHAVIOURS')
WriteBehaviours()
utilities_logMes('WRITE DRIVEN DOF')
WriteDrivenDof()
69
70
71
72

### set periodic conditions ###
#RBDY3_SetSourcePointWithIni(2, 5.0, 12.0, 12.0, 4.0)

73
SetPeriodicCondition(xperiode,yperiode)
74

75
76
OpenDisplayFiles()
OpenPostproFiles()
77
78

### compute masses ###
79
ComputeMass()
80
81
82

for k in range(nb_steps):
    #
83
    IncrementStep()
84
85
    #
    #
86
87
88
    ComputeFext()
    ComputeBulk()
    ComputeFreeVelocity()
89
    #
90
    SelectProxTactors(freq_detect)
91
    
92
93
94
    RecupRloc()
    ExSolver('Exchange_Local_Global         ',quad, tol, relax, gs_it1, gs_it2)
    StockRloc()
95
    #
96
97
    ComputeDof()
    UpdateStep()
98

99
100
    WriteLastDof()
    WriteLastVlocRloc()
101

102
103
    WriteDisplayFiles(freq_display)
    WritePostproFiles()
104
105
106

    overall_CleanWriteOutFlags()

107
108
WriteLastDof()
WriteLastVlocRloc()
109

110
111
CloseDisplayFiles()
ClosePostproFiles()