command.py 2.45 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 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

from pylmgc90.chipy import *

checkDirectories()

### definition des parametres du calcul ### 

dt=4.e-4
theta=0.5
nb_steps_meca=1000

freq_display=100

freq_detect=1
quad = 'Quad '
tol = 1.666e-5
relax = 1.
it1 = 33
it2 = 101


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

utilities_logMes('READ BODIES')
RBDY2_ReadBodies()

utilities_logMes('READ BEHAVIOURS')
bulk_behav_ReadBehaviours()
tact_behav_ReadBehaviours()

utilities_logMes('LOAD BULK & TACTORS')
RBDY2_LoadBehaviours()
DISKx_LoadTactors()
JONCx_LoadTactors()

mp_solver_ReadMpBehaviour()
RBDY2_MP_LoadBehaviours(0.,'therm')
#RBDY2_MP_LoadBehaviours(0.,'sener')


RBDY2_SetPeriodicCondition(0.1)
DKDKx_SetPeriodicCondition(0.1)
post2D_SetPeriodicCondition(0.1)

RBDY2_ComputeMass()

utilities_logMes('READ INITIAL STATE')
TimeEvolution_ReadIniDof()
RBDY2_ReadIniDof()

TimeEvolution_ReadIniVlocRloc()
DKDKx_ReadIniVlocRloc()
DKJCx_ReadIniVlocRloc()

RBDY2_ReadDrivenDof()

utilities_logMes('WRITE DATBOX COPY')
overall_WriteBodies()
RBDY2_WriteBodies()

tact_behav_WriteBehaviours()
bulk_behav_WriteBehaviours()
mp_solver_WriteMpBehaviour()

utilities_logMes('INIT GMV VISUALISATION')
post2D_SetDisplayedField('AVERAGE VELOCITY')
post2D_SetDisplayedField('HEAT            ')
post2D_Init()

overall_WriteOutDisplayFile(1)
post2D_WriteOutDisplayFile(0)

utilities_logMes('INIT POSTPRO')
postpro_PostproBeforeComputation()

utilities_logMes('START THERMO-MECA LOOP')

for k in xrange(1,nb_steps_meca+1,1):
   #
   utilities_logMes('INCREMENT STEP')
   TimeEvolution_IncrementStep()
   RBDY2_IncrementStep()
   
   utilities_logMes('DISPLAY TIME')
   TimeEvolution_DisplayStep()

   utilities_logMes('COMPUTE RHS')
   RBDY2_ComputeFext()
   RBDY2_ComputeBulk()
   RBDY2_ComputeFreeVelocity()

   utilities_logMes('CONTACT DETECTION')
   overall_SelectProxTactors(freq_detect)
   DKDKx_SelectProxTactors()
   DKJCx_SelectProxTactors()

   utilities_logMes('CONTACT RESOLUTION')
   DKDKx_RecupRloc()
   DKJCx_RecupRloc()
102
   nlgs_ExSolver('Stored_Delassus_Loop         ',quad,tol,relax,it1,it2)
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
   DKDKx_StockRloc()
   DKJCx_StockRloc()

   utilities_logMes('THERMAL RESOLUTION')
   mp_solver_RecupTemperature()
   mp_solver_SolveThermoProblem()

   RBDY2_ComputeDof()

   TimeEvolution_UpdateStep()
   RBDY2_UpdateDof()

   overall_WriteOutDisplayFile(freq_display)
   post2D_WriteOutDisplayFile(0)

   postpro_PostproDuringComputation()
   overall_CleanWriteOutFlags()

#
postpro_ClosePostproFiles()