Commit f062dc72 authored by mozul's avatar mozul
Browse files

Merge commit 'bdefdcb1' as 'examples'

parents 975279a9 bdefdcb1
This source diff could not be displayed because it is too large. You can view the blob instead.
! File BEHAVIOUR
!
! The symbol '$' preceeds a keyword used in scanning files.
!
! The symbol 'behav' stands for the nickname of a bulk or
! contact behaviour law, character(LEN=5).
!
! The symbol 'lawty' stands for the name of a bulk or
! contact behaviour law, character(LEN=30).
!
! The symbol 'seety' stands for description of a candidate
! 'cdbdy' type of body, 'cdtac' type of contactor, 'cdcol' color
! ready to meet with the contact behaviour law 'behav' an antagonist
! 'anbdy' type of body, 'antac' type of contactor, 'ancol' color.
!
! Candidate antagonist objects are considered only within some distance
! 'alert'.
!
! STANDARD PACKAGE of bulk or contact behaviour laws
!
! 123456789012345678901234567890:
! :
! bulk behaviour :
! :
!
$gravy
grv1= 0.0000000e+00 grv2=-9.8100000e+00 grv3= 0.0000000e+00
$behav lawty
TDURx RIGID Umas= 1.0000000e+03
$behav lawty
PLEXx RIGID Umas= 1.0000000e+02
$steps 0 time= 0.0000000D+00
$bdyty
RBDY2 544
$nodty
NO3xx 1 X(1)= 0.0000000e+00 X(2)= 0.0000000e+00 X(3)=-1.5707963e+00
V(1)= 0.0000000e+00 V(2)= 0.0000000e+00 V(3)= 0.0000000e+00
$$$$$$
$bdyty
RBDY2 545
$nodty
NO3xx 1 X(1)= 0.0000000e+00 X(2)= 0.0000000e+00 X(3)= 1.5707963e+00
V(1)= 0.0000000e+00 V(2)= 0.0000000e+00 V(3)= 0.0000000e+00
$$$$$$
! DOF
$bdyty
RBDY2 542
$nodty
NO3xx 1
$dofty numbr [CT......+......AMP..*..cos.(..OMEGA.*.time.+.PHI..)]...*...[RAMPI.....+.....RAMP.*.time]
vlocy 1 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 2 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 3 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
$$$$$$
$bdyty
RBDY2 543
$nodty
NO3xx 1
$dofty numbr [CT......+......AMP..*..cos.(..OMEGA.*.time.+.PHI..)]...*...[RAMPI.....+.....RAMP.*.time]
vlocy 1 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 2 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 3 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
$$$$$$
$bdyty
RBDY2 544
$nodty
NO3xx 1
$dofty numbr [CT......+......AMP..*..cos.(..OMEGA.*.time.+.PHI..)]...*...[RAMPI.....+.....RAMP.*.time]
vlocy 1 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 2 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 3 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
$$$$$$
$bdyty
RBDY2 545
$nodty
NO3xx 1
$dofty numbr [CT......+......AMP..*..cos.(..OMEGA.*.time.+.PHI..)]...*...[RAMPI.....+.....RAMP.*.time]
vlocy 1 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 2 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 3 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
$$$$$$
#23456789012345678901234567890
SOLVER INFORMATIONS :
STEP 1 :
VIOLATION EVOLUTION :
STEP 1 :
END :
$behav
iqsc1 IQS_CLB fric= 5.0000000e-01
$behav
iqsc0 IQS_CLB fric= 3.0000000e-01
$seety
cdbdy cdtac cdcol behav anbdy antac ancol alert
RBDY2 DISKx BLEUx iqsc0 RBDY2 DISKx BLEUx 5.0395844e-02
$seety
cdbdy cdtac cdcol behav anbdy antac ancol alert
RBDY2 DISKx BLEUx iqsc1 RBDY2 DISKx WALLx 5.0395844e-02
import os,sys
from pylmgc90.chipy import *
overall_DIME(2,0)
# Nombre de decoupe suivant l'axe x et y
nb_sdmx = 2
nb_sdmy = 2
# Type de methode de DDM : 0 -> Schwarz ; 1 -> NSCDD
ddm_type = 0
# Pilotage des pas de temps
nb_steps = 200
dt = 5.e-3
# Parametre du schema d'integration
# de la dynamique des corps
theta = 0.5
# Frequence de detection des contacts "grossiers" qui donne
# aussi la frequence de partionnement en sous-domaine
freq_detect = 5
# Frequence d'ecriture des visu VTK
freq_display = 10
# Frequence d'ecritue des DOF et VlocRloc
freq_write = 10
# Frequence des sauvegardes des DOF, VlocRloc et timers
freq_last = 1000
# Frequence d'ecriture dans les fichiers de postpro
freq_postpro = 1
# Pilotage du Gauss-Seisel
# 123456789012345678901234567890
type = 'Stored_Delassus_Loops '
#type = 'Exchange_Local_Global '
tol = 1.e-4
relax = 1.0
quad = 'QM/16'
gs_it1 = 50
gs_it2 = 200
nlgs_SetWithQuickScramble()
### Initialisation de MPI ###
overall_Initialize()
### WD par sous-domaine ###
DDM_2D_SetDDWorkingDirectory()
### Gestion des messages de log ###
#utilities_DisableLogMes()
utilities_EnableLogMes()
### Pour ne pas ecrire les donnees ###
### des corps invisibles dans les ###
### les fichiers par sous-domaine ###
RBDY2_SkipInvisible()
### Definition des parametres du calcul ###
utilities_logMes('INIT TIME STEPPING')
TimeEvolution_SetTimeStep(dt)
Integrator_InitTheta(theta)
### Model reading ###
utilities_logMes('READ BODIES')
RBDY2_ReadBodies()
utilities_logMes('READ INI DOF')
TimeEvolution_ReadIniDof()
RBDY2_ReadIniDof()
utilities_logMes('READ DRIVEN DOF')
RBDY2_ReadDrivenDof()
### LOADS ###
DISKx_LoadTactors()
utilities_logMes('READ BEHAVIOURS')
bulk_behav_ReadBehaviours()
tact_behav_ReadBehaviours()
RBDY2_LoadBehaviours()
utilities_logMes('READ INI Vloc Rloc')
TimeEvolution_ReadIniVlocRloc()
DKDKx_ReadIniVlocRloc()
### Ecriture paranoiaque du modele ###
utilities_logMes('WRITE BODIES')
overall_WriteBodies()
RBDY2_WriteBodies()
utilities_logMes('WRITE BEHAVIOURS')
bulk_behav_WriteBehaviours()
tact_behav_WriteBehaviours()
utilities_logMes('WRITE DRIVEN DOF')
overall_WriteDrivenDof()
RBDY2_WriteDrivenDof()
utilities_logMes('COMPUTE MASS')
RBDY2_ComputeMass()
### Initialisation du module DDM_2D ###
utilities_logMes('Initializing DDM')
DDM_2D_Initialize(nb_sdmx,nb_sdmy,ddm_type)
utilities_logMes('Set DDM parameters')
DDM_2D_SetParameters(freq_detect,freq_write,freq_last,freq_postpro,freq_display)
### Boucle en temps ###
utilities_logMes('Starting Time Loop')
for k in xrange(1,nb_steps+1,1):
#
TimeEvolution_IncrementStep()
TimeEvolution_DisplayStep()
#
### Detection grossiere et partionnement en sous-domaines ###
overall_SelectProxTactors(freq_detect)
DDM_2D_Partitioning()
#
RBDY2_IncrementStep()
RBDY2_ComputeFext()
RBDY2_ComputeBulk()
#
### Ajout de la contribution des sous-domaines
### interconnectes sur les corps d'interface ###
DDM_2D_AddToFext()
#
RBDY2_ComputeFreeVelocity()
#
# Functions embedded in DKDKx_SelectProxTactors()
# are replaced by functions at the beginning of DDM_2D_ExSolver
# because of a specificity of DDM current implementation.
# Removing this specificity should be added to the TODO list !
#DKDKx_SelectProxTactors()
#
# Functions embedded in DKDKx_RecpRloc()
# are replaced by functions at the beginning of DDM_2D_ExSolver
# because of a specificity of DDM current implementation.
# Removing this specificity should be added to the TODO list !
#DKDKx_RecupRloc()
DDM_2D_ExSolver(type,quad, tol, relax, gs_it1, gs_it2)
DKDKx_StockRloc()
#
DDM_2D_ComputeDof()
#
TimeEvolution_UpdateStep()
RBDY2_UpdateDof()
#
### Output : write, out, postpro and last ###
DDM_2D_Post()
### writeout handling ###
overall_CleanWriteOutFlags()
#
### LAST en fin de simulation ###
DDM_2D_WriteLast()
### postpro ###
DDM_2D_Finalize()
overall_Finalize()
from pylmgc90.chipy import *
sys.path.append('~/LMGC90/build_LMGC90_gfortran_opt/lib')
from numpy import *
checkDirectories()
# desactivation des messages de log
#utilities_EnableLogMes()
utilities_DisableLogMes()
####
# info gestion du temps
dt = 5.e-3
nb_steps = 200
# Parametre du schema d'integration
# de la dynamique des corps
theta = 0.5
# info generation fichier visu
freq_display = 10
liste_tactors=['DISKx','JONCx']
liste_inters=['DKDKx','DKJCx']
# info contact
freq_detect = 10
nlgs_SetWithQuickScramble()
# 123456789012345678901234567890
type = 'Stored_Delassus_Loops '
norm = 'QM/16'
tol = 1.e-4
relax = 1.0
gs_it1 = 50
gs_it2 = 200
### definition des parametres du calcul ###
utilities_logMes('INIT TIME STEPPING')
TimeEvolution_SetTimeStep(dt)
Integrator_InitTheta(theta)
### lecture du modele ###
### model reading ###
utilities_logMes('READ BODIES')
RBDY2_ReadBodies()
utilities_logMes('READ INI DOF')
TimeEvolution_ReadIniDof()
RBDY2_ReadIniDof()
utilities_logMes('READ BEHAVIOURS')
bulk_behav_ReadBehaviours()
tact_behav_ReadBehaviours()
#LOADS
DISKx_LoadTactors()
RBDY2_LoadBehaviours()
utilities_logMes('READ INI Vloc Rloc')
TimeEvolution_ReadIniVlocRloc()
DKDKx_ReadIniVlocRloc()
utilities_logMes('READ DRIVEN DOF')
RBDY2_ReadDrivenDof()
### ecriture paranoiaque du modele ###
utilities_logMes('WRITE BODIES')
overall_WriteBodies()
RBDY2_WriteBodies()
utilities_logMes('WRITE BEHAVIOURS')
bulk_behav_WriteBehaviours()
tact_behav_WriteBehaviours()
utilities_logMes('WRITE DRIVEN DOF')
overall_WriteDrivenDof()
RBDY2_WriteDrivenDof()
utilities_logMes('COMPUTE MASS')
RBDY2_ComputeMass()
### post2D ##
postpro_PostproBeforeComputation()
tactors_dict={}
InitTactorsToVTK(liste_tactors,tactors_dict)
inters_dict={}
InitIntersToVTK(liste_inters,inters_dict)
fit = startCollection('tacts.pvd')
fii = startCollection('inters.pvd')
for k in xrange(1, nb_steps + 1, 1):
#
utilities_logMes('itere : '+str(k))
#
utilities_logMes('INCREMENT STEP')
TimeEvolution_IncrementStep()
RBDY2_IncrementStep()
utilities_logMes('DISPLAY TIMES')
TimeEvolution_DisplayStep()
utilities_logMes('COMPUTE Fext')
RBDY2_ComputeFext()
utilities_logMes('COMPUTE Fint')
RBDY2_ComputeBulk()
utilities_logMes('COMPUTE Free Vlocy')
RBDY2_ComputeFreeVelocity()
#
utilities_logMes('SELECT PROX TACTORS')
overall_SelectProxTactors(freq_detect)
DKDKx_SelectProxTactors()
#
DKDKx_RecupRloc()
nlgs_ExSolver(type, norm, tol, relax, gs_it1, gs_it2)
DKDKx_StockRloc()
#
utilities_logMes('COMPUTE DOF')
RBDY2_ComputeDof()
#
utilities_logMes('UPDATE DOF')
TimeEvolution_UpdateStep()
RBDY2_UpdateDof()
#
utilities_logMes('WRITE LAST DOF')
TimeEvolution_WriteLastDof()
RBDY2_WriteLastDof()
#
#
### viz ###
if k % freq_display == 0:
utilities_logMes('tact')
writeTactorsToVTK('./DISPLAY/tacts'+'_'+str(k)+'.vtp',fit,tactors_dict)
utilities_logMes('inter')
writeIntersToVTK('./DISPLAY/inters'+'_'+str(k)+'.vtp',fii,inters_dict,1e0)
utilities_logMes('---')
### postpro ###
postpro_PostproDuringComputation()
### wrtieout handling ###
overall_CleanWriteOutFlags()
utilities_logMes('WRITE LAST Vloc Rloc')
TimeEvolution_WriteLastVlocRloc()
DKDKx_WriteLastVlocRloc()
#
postpro_ClosePostproFiles()
stopCollection(fit)
stopCollection(fii)
import os,sys,shutil
from pylmgc90.chipy import *
from numpy import *
# plage de fichiers a traiter
min=1
max=21
# nom du repertoire ou on va faire le post
tmp='post'
tmp=os.getcwd()+'/'+tmp+'/'
if os.path.isdir(tmp):
print "Le repertoire ",tmp," existe deja, ca n'est pas la peine de le creer"
# on teste la presence de DATBOX
if os.path.isdir(tmp+'DATBOX'):
print " on ne copie pas DATBOX"
else:
shutil.copytree('./DATBOX',tmp+'DATBOX')
else:
os.mkdir(tmp)
shutil.copytree('./DATBOX',tmp+'DATBOX')
overall_SetWorkingDirectory(tmp)
print "C'est partie"
####
checkDirectories()
dt = 5.e-3
freq_display = 1
freq_write = 1
######## etat 0 ###########################
### computation's parameters definition ###
overall_DIME(2,1)
utilities_logMes('INIT TIME STEPPING')
TimeEvolution_SetTimeStep(dt)
### model reading ###
print 'READ BODIES'
RBDY2_ReadBodies()
print 'READ BEHAVIOURS'
bulk_behav_ReadBehaviours()
tact_behav_ReadBehaviours()
#LOADS
DISKx_LoadTactors()
JONCx_LoadTactors()
RBDY2_LoadBehaviours()
print 'READ INI DOF'
TimeEvolution_ReadIniDof()
RBDY2_ReadIniDof()
print 'READ INI Vloc Rloc'
TimeEvolution_ReadIniVlocRloc()
DKJCx_ReadIniVlocRloc()
DKDKx_ReadIniVlocRloc()
names= ['DOF','Vloc_Rloc']
tacts_dict={}
InitTactorsToVTK(['DISKx','JONCx'],tacts_dict)
inters_dict={}
InitIntersToVTK(['DKDKx','DKJCx'],inters_dict)
fit = startCollection('tacts.pvd')
fii = startCollection('inters.pvd')
for k in xrange(min,max+1,1):
#
utilities_logMes('on traite le set : '+str(k))
#
for name in names:
shutil.copy('./OUTBOX/'+name+'.OUT.'+str(k),tmp+'DATBOX/'+name+'.INI')
utilities_logMes('READ INI DOF')
TimeEvolution_ReadIniDof()
RBDY2_ReadIniDof()
utilities_logMes('READ INI Vloc Rloc')
TimeEvolution_ReadIniVlocRloc()
DKJCx_ReadIniVlocRloc()
DKDKx_ReadIniVlocRloc()
utilities_logMes('tact')
writeTactorsToVTK('./DISPLAY/tacts'+'_'+str(k)+'.vtp',fit,tacts_dict)
utilities_logMes('inter')
writeIntersToVTK('./DISPLAY/inters'+'_'+str(k)+'.vtp',fii,inters_dict,1e+0)
utilities_logMes('---')
stopCollection(fit)
stopCollection(fii)
This source diff could not be displayed because it is too large. You can view the blob instead.
! File BEHAVIOUR
!
! The symbol '$' preceeds a keyword used in scanning files.
!
! The symbol 'behav' stands for the nickname of a bulk or
! contact behaviour law, character(LEN=5).
!
! The symbol 'lawty' stands for the name of a bulk or
! contact behaviour law, character(LEN=30).
!
! The symbol 'seety' stands for description of a candidate
! 'cdbdy' type of body, 'cdtac' type of contactor, 'cdcol' color
! ready to meet with the contact behaviour law 'behav' an antagonist
! 'anbdy' type of body, 'antac' type of contactor, 'ancol' color.
!
! Candidate antagonist objects are considered only within some distance
! 'alert'.
!
! STANDARD PACKAGE of bulk or contact behaviour laws
!
! 123456789012345678901234567890:
! :
! bulk behaviour :
! :
!
$gravy
grv1= 0.0000000e+00 grv2= 0.0000000e+00 grv3=-9.8100000e+00
$behav lawty
TOITx RIGID Umas= 6.9494249e+03
$behav lawty
TDURx RIGID Umas= 2.5000000e+03
$behav lawty
PLEXx RIGID Umas= 2.5000000e+03
$behav lawty
DALLE RIGID Umas= 3.0000000e+03
This source diff could not be displayed because it is too large. You can view the blob instead.
! DOF
$bdyty
RBDY3 1207
$nodty
NO6xx 1
$dofty numbr [CT......+......AMP..*..cos.(..OMEGA.*.time.+.PHI..)]...*...[RAMPI.....+.....RAMP.*.time]
vlocy 1 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 2 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 3 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 4 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 5 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00
vlocy 6 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 1.0000000e+00 0.0000000e+00