command.py 1.73 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

from pylmgc90.chipy import *
from numpy import *

checkDirectories()

### computation's parameters definition ### 

dt = 0.01
nb_steps = 100
theta = 0.5

freq_display = 1


PRPRx_UseCpCundallDetection(300)
PRPRx_LowSizeArrayPolyr(70)

19

20 21 22 23 24 25 26 27 28 29 30
#PRPRx_VerboseF2F(1,2)

freq_detect = 1
tol = 0.1666e-3
relax = 1.0
quad = 'Maxm '
gs_it1 = 20
gs_it2 = 10

#nlgs_3D_SetWithQuickScramble()

31
SetDimension(3)
32

33
utilities_logMes('INIT TIME STEPPING')
34 35 36
TimeEvolution_SetTimeStep(dt)
Integrator_InitTheta(theta)

37 38
RBDY3_NewRotationScheme()

39
### model reading ###
40 41
utilities_logMes('READ BODIES')
ReadBodies()
42

43 44
utilities_logMes('READ BEHAVIOURS')
ReadBehaviours()
45 46

#LOADS
47
LoadBehaviours()
48

49 50
utilities_logMes('READ INI DOF')
ReadIniDof()
51

52
LoadTactors()
53

54 55
utilities_logMes('READ INI Vloc Rloc')
ReadIniVlocRloc()
56

57 58
utilities_logMes('READ DRIVEN DOF')
ReadDrivenDof()
59

60 61 62 63 64 65
utilities_logMes('WRITE BODIES')
WriteBodies()
utilities_logMes('WRITE BEHAVIOURS')
WriteBehaviours()
utilities_logMes('WRITE DRIVEN DOF')
WriteDrivenDof()
66

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

OpenDisplayFiles()
71
OpenPostproFiles()
72 73

### compute masses ###
74
ComputeMass()
75 76 77 78
RBDY3_PutBodyVector('Xbeg_', 3, [0., 0., 0.3, 0., 0., 0.])

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

    WriteLastDof()
    WriteLastVlocRloc()
97

98 99
    WriteDisplayFiles(freq_display,ref_radius)
    WritePostproFiles()
100 101 102

    overall_CleanWriteOutFlags()

103 104
WriteLastDof()
WriteLastVlocRloc()
105 106

CloseDisplayFiles()
107
ClosePostproFiles()