command.py 1.69 KB
Newer Older
1
2
3
4
5
6
7
8

from pylmgc90.chipy import *
from numpy import *

checkDirectories()

### computation's parameters definition ### 

9
nb_steps = 100
10
11
12
dt = 0.0001
theta = 0.5

13
14
15
16
17
18
19
20
21
freq_display = 10

#PRPRx_CundallIteration(200)
PRPRx_UseCpF2fExplicitDetection(1.e-3)
PRPRx_ShrinkPolyrFaces(0.05)
PRPRx_LowSizeArrayPolyr(10)

nlgs_3D_DiagonalResolution()

22
23
24
freq_detect = 1
tol = 0.1666e-3
relax = 1.0
25
quad = 'QM/16'
26
type = 'Stored_Delassus_Loop          '
27
28
gs_it1 = 51
gs_it2 = 501
29
30
31
32
33


#nlgs_3D_SetWithQuickScramble()

SetDimension(3)
34
35
36
37
38

utilities_logMes('INIT TIME STEPPING')
TimeEvolution_SetTimeStep(dt)
Integrator_InitTheta(theta)

39
40
RBDY3_NewRotationScheme()

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

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

#LOADS
49
LoadBehaviours()
50
51

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

LoadTactors()
55
56

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

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

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

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

72
OpenDisplayFiles()
73
74

### compute masses ###
75
ComputeMass()
76

77
for k in range(nb_steps):
78
    #
79
    IncrementStep()
80
81
    #
    #
82
83
84
    ComputeFext()
    ComputeBulk()
    ComputeFreeVelocity()
85
    #
86
    SelectProxTactors(freq_detect)
87
    
88
89
90
91
92
93
    RecupRloc()
    ExSolver(type,quad, tol, relax, gs_it1, gs_it2)
    StockRloc()
    #
    ComputeDof()
    UpdateStep()
94

95
96
    WriteLastDof()
    WriteLastVlocRloc()
97

98
    WriteDisplayFiles(freq_display,0.01)
99
100
101

    overall_CleanWriteOutFlags()

102
103
WriteLastDof()
WriteLastVlocRloc()
104

105
CloseDisplayFiles()