command_post.py 1.79 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
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

from pylmgc90.chipy import *
from numpy import *

# plage de fichiers a traiter
min=1
max=40

names= ['DOF','GPV','Vloc_Rloc']

inters_dict={}
InitIntersToVTK(['CLALp'],inters_dict)


####

checkDirectories()

# ne sert pas a grand chose
dt = 1.

######## etat 0 ###########################

### computation's parameters definition ### 
overall_DIME(2,1)

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

print 'READ BODIES'
MAILx_ReadBodies()

print 'READ MODELS'
models_ReadModels()

print 'READ BEHAVIOURS'
bulk_behav_ReadBehaviours()
tact_behav_ReadBehaviours()
### models initialization ###
print 'INIT MODELS'
models_InitModels()
ExternalModels_InitModels()

#LOADS
mecaMAILx_LoadModels()

mecaMAILx_LoadBehaviours()

mecaMAILx_PushProperties()
models_StoreProperties()
ExternalModels_CheckProperties()

CLxxx_LoadTactors()
ALpxx_LoadTactors()

### initial and boundary conditions ###
print 'READ INI DOF'
TimeEvolution_ReadIniDof()
mecaMAILx_ReadIniDof()

TimeEvolution_ReadIniGPV()
mecaMAILx_ReadIniGPV()

TimeEvolution_ReadIniVlocRloc()
CLALp_ReadIniVlocRloc()

67
68
fim = startCollection('DISPLAY/mecafe.pvd')
fii = startCollection('DISPLAY/inters.pvd')
69
70
71

k=0
utilities_logMes('tact')
72
writeMecafeToVTK('DISPLAY/mecafe'+'_'+str(k)+'.vtu',fim,2)
73
74
75
76
77
78
79

for k in xrange(min,max+1,1):
    #
    utilities_logMes('on traite le set : '+str(k))
    #

    utilities_logMes('READ INI DOF')
80
81
    TimeEvolution_ReadIniDof(k)
    mecaMAILx_ReadIniDof(k)
82

83
84
    TimeEvolution_ReadIniGPV(k)
    mecaMAILx_ReadIniGPV(k)
85
86

    utilities_logMes('tact')
87
    writeMecafeToVTK('DISPLAY/mecafe'+'_'+str(k)+'.vtu',fim,2)
88

89
90
    TimeEvolution_ReadIniVlocRloc(k)
    CLALp_ReadIniVlocRloc(k)
91
92

    utilities_logMes('inter')
93
    writeIntersToVTK('DISPLAY/inters'+'_'+str(k)+'.vtp',fii,inters_dict,0.3e-1)
94
95
96
97
98

stopCollection(fim)
stopCollection(fii)