Commit cd81d3bb authored by mozul's avatar mozul
Browse files

Squashed 'examples/' changes from da1441e..e5f8682

e5f8682 removing duplicate mur example
801823d Merge branch 'rc2015' of git-xen.lmgc.univ-montp2.fr:lmgc90/lmgc90_user_examples into rc2015
75681d7 update examples of Pre/prepro_grains for 2015 release
783cdf7 maj modele therm 3D
6c4b9fe maj modele elec
0de267e ajout mots cles manquant
d80b3dd Merge branch 'rc2015' of git-xen.lmgc.univ-montp2.fr:lmgc90/lmgc90_user_examples into rc2015
e5b8227 update display commands in rigid multi physics example for workshop
b9110d0 first update of Ateliers examples
acf58dc mise a jour des fct Ptr
b4b1e8f mise a jour des fct Ptr
580a96b first update of poro and therMAILx example
03ceb24 update mecaMAILx_RIGID_3D examples for 2015 release and add missing update of mecaMAILx_RIGID_2D
13255ca update mecaMAILx_RIGID_2D examples for 2015 release
d2b231c remove duplicate example script
b1c2a99 rename cubes_H8_explicit example in cubes_H8
50fb915 update mecaMAILx examples for 2015 release and remove cubes_H8 duplicate example
2ee408d update mecaMAILx_2D examples for 2015 release
2994047 update RIGID_3D examples for rev 2015 ddm and thermal not working yet
ea93075 update RIGID_2D example for new version

git-subtree-dir: examples
git-subtree-split: e5f8682eef4f74ebf9a107e233fb271cbdbf5035
parent bdefdcb1
......@@ -5,6 +5,9 @@ import math
from pylmgc90.pre_lmgc import *
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
# on se place en 2D
dim = 2
......
......@@ -8,7 +8,7 @@ checkDirectories()
utilities_DisableLogMes()
# a 3D example is considered
overall_DIME(3,0)
SetDimension(3)
### computation's parameters definition ###
utilities_logMes('INIT TIME STEPPING')
......@@ -27,6 +27,7 @@ echo = 0
freq_detect = 1
# * visualization frequency
freq_display = 50
ref_radius = 1.
# * frequence d'ecriture des fichier de sortie
freq_write = 50
# 123456789012345678901234567890
......@@ -86,21 +87,7 @@ RBDY3_WriteDrivenDof()
RBDY3_ComputeMass()
### post3D ##
# 1234567890123456
# definition of fields to be computed by the post3D module
post3D_SetDisplayedField('POSITION')
post3D_SetDisplayedField('AVERAGE VELOCITY')
post3D_SetDisplayedField('STRESS')
# initialization of the post3D module
post3D_Init()
# definition of another fields to be displayed by the display_3D module
display_3D_SetDisplayedField('TACTOR')
display_3D_SetDisplayedField('INTERACTION')
# choose of the file format for the visualiztion
display_3D_SetDisplayFileFormat('VTK')
# initilization of the display_3D module
display_3D_Init(0)
OpenDisplayFiles()
# compute of a first visualization
#display_3D_WriteOutDisplayFile(0)
......@@ -148,10 +135,7 @@ for k in range(1, nb_steps + 1):
RBDY3_UpdateDof()
### post3D ###
post3D_Update()
overall_WriteOutDisplayFile(freq_display)
display_3D_WriteOutDisplayFile(0)
WriteDisplayFiles(freq_display,ref_radius)
TimeEvolution_WriteOutDof(freq_write)
RBDY3_WriteOutDof(-1,9999999)
......@@ -165,3 +149,5 @@ for k in range(1, nb_steps + 1):
TimeEvolution_WriteLastDof()
RBDY3_WriteLastDof()
CloseDisplayFiles()
......@@ -5,6 +5,9 @@ import math
from pylmgc90.pre_lmgc import *
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
# on se place en 3D
dim = 3
......
......@@ -17,6 +17,7 @@ echo = 0
# info generation fichier visu
freq_display = 50
ref_radius = 1.
# info contact
freq_detect = 1
......@@ -29,6 +30,7 @@ relax = 1.0
gs_it1 = 51
gs_it2 = 1001
SetDimension(2)
### definition des parametres du calcul ###
utilities_logMes('INIT TIME STEPPING')
TimeEvolution_SetTimeStep(dt)
......@@ -80,9 +82,7 @@ overall_WriteDrivenDof()
RBDY2_WriteDrivenDof()
### post2D ##
post2D_SetDisplayedField('CONTACT POINT ')
post2D_SetDisplayedField('TACTOR ')
post2D_Init()
OpenDisplayFiles()
utilities_logMes('COMPUTE MASS')
RBDY2_ComputeMass()
......@@ -135,7 +135,8 @@ for k in xrange(1, nb_steps + 1, 1):
DKJCx_WriteLastVlocRloc()
#
### post2D ###
overall_WriteOutDisplayFile(freq_display)
post2D_WriteOutDisplayFile(0)
WriteDisplayFiles(freq_display,ref_radius)
### wrtieout handling ###
overall_CleanWriteOutFlags()
CloseDisplayFiles()
......@@ -5,6 +5,9 @@ import math
from pylmgc90.pre_lmgc import *
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
# on se place en 2D
dim = 2
......
......@@ -17,6 +17,7 @@ echo = 0
# info generation fichier visu
freq_display = 50
ref_radius = 1.
# info contact
freq_detect = 1
......@@ -29,6 +30,7 @@ relax = 1.0
gs_it1 = 51
gs_it2 = 1001
SetDimension(2)
### definition des parametres du calcul ###
utilities_logMes('INIT TIME STEPPING')
TimeEvolution_SetTimeStep(dt)
......@@ -75,9 +77,7 @@ overall_WriteDrivenDof()
RBDY2_WriteDrivenDof()
### post2D ##
post2D_SetDisplayedField('CONTACT POINT ')
post2D_SetDisplayedField('TACTOR ')
post2D_Init()
OpenDisplayFiles()
utilities_logMes('COMPUTE MASS')
RBDY2_ComputeMass()
......@@ -130,7 +130,8 @@ for k in xrange(1, nb_steps + 1, 1):
DKJCx_WriteLastVlocRloc()
#
### post2D ###
overall_WriteOutDisplayFile(freq_display)
post2D_WriteOutDisplayFile(0)
WriteDisplayFiles(freq_display,ref_radius)
### wrtieout handling ###
overall_CleanWriteOutFlags()
CloseDisplayFiles()
......@@ -5,6 +5,9 @@ import math
from pylmgc90.pre_lmgc import *
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
# on se place en 2D
dim = 2
......
#COMMAND.DAT :
#23456789012345678901234567890:
# :
NO CHECK CHIC COMMAND :
#
ECHO ON :
DIME :
2D PSTRAIN :
#
TIME STEP :
1.D-02 :
FINAL TIME
10.D0 :
MIN TIME STEP :
1.D-05 :
MAX TIME STEP :
1.D-02 :
#
NB BULK ITER MAX :
20 : :
NB INC FOR GOODORBAD CONV :
999999 :
# :
THETA :
0.51D0 :
# :
APPELLE reading data : reading and processing data, see SUB
#
SET HALO :
0.1
# :
SET NB CLxxx BY EDGE :
2 :
#
##SET NONSYMMETRIC DETECTION :
#
COMPUTE BOX :
# :
COMPUTE MASS :
#
loading step : label beginning of the loading loop
TOTALISATEURS A ZERO :
INCREMENT STEP :
DISPLAY TIMES :
# :
COMPUTE Fext :
# :
>NR iteration :
COMPUTE NL BULK :
# :
ASSEMB NL RHS :
ASSEMB NL KT :
# :
COMPUTE NL FREE VELOCITY :
# :
SELECT PROX TACTORS :
# :
APPELLE Signorini Coulomb :
# :
COMPUTE DOF :
# :
CHECK NL CONVERGENCE :
1.e-3 :
IOK = FLAG 1 :
INTO CHECK NL CONVERGENCE :
STOP REPETE SI IOK = 0 :
STOP REPETE SI IOK = 2 :
# :
DEPUIS >NR iteration :
# :
COMPUTE TIME STEP :
IOK = FLAG 2 :
INTO COMPUTE TIME STEP :
CAP SI IOK = 0 :
SUR TOTO :
# :
UPDATE TACT BEHAV :
STOCK Rloc :
# :
UPDATE DOF :
UPDATE NL BULK :
#
APPELLE writing results : writing and displaying results, see SUB
#
AFFICHE TOTALISATEURS :
AFFICHE COMPTEURS :
#
IOK = FLAG 3 :
INTO COMPUTE TIME STEP :
STOP REPETE SI IOK = 0 :
TOTO
#
REPETE 99 FOIS :
DEPUIS loading step :
# :
WRITE LAST DOF : writing degrees of freedom and velocities
WRITE LAST Vloc Rloc :
WRITE LAST GPV :
#
CLOSE POSTPRO FILE :
#
FIN DU PROGRAMME
##############################
#-----------------------------:
SUB reading data :
# :
READ BODIES :
READ MODELS :
READ BEHAVIOURS :
#
WRITE BODIES :
WRITE MODELS :
WRITE BEHAVIOURS :
#
INIT MODELS :
INIT EXTERNAL MODELS :
LOAD MODELS :
LOAD BEHAVIOURS :
PUSH PROPERTIES :
STORE PROPERTIES :
CHECK PROPERTIES :
#
READ INI DOF :
READ INI Vloc Rloc :
READ INI GPV :
#
WRITE LAST DOF :
#
READ DRIVEN DOF :
WRITE DRIVEN DOF :
#
DISPLAY TACT POINT :
DISPLAY TACTOR :
DISPLAY MECHANICAL GPV :
DISPLAY DISPLACEMENT :
DISPLAY AVERAGE VELOCITY :
#DISPLAY STRESS :
INIT GMV :
WRITE OUTPUT GMV :
#
START POSTPRO :
#
RETOUR :
#-----------------------------:
#-----------------------------:
SUB Signorini Coulomb :
#
.doing Signorini Coulomb : Some label to draw attention
RECUP Rloc : from verlt into this
###ECHO OFF
NLGS CHECK TYPE :
Maxm 0.1666D-04 : tol
1.D0 : RELAX
EX PREP NLGS :
Stored_Delassus_Loops :
>more
quickSCRAMBLE :
>NLGS iteration :
EX ITER NLGS :
REPETE 100 FOIS :
DEPUIS >NLGS iteration :
AFTER ITER CHECK :
DISPLAY AFTER ITER CHECK :
IOK = FLAG 1 :
INTO AFTER ITER CHECK :
STOP REPETE SI IOK = 0 :
# SCALE Rloc : Improving mean violation
REPETE 200 FOIS :
DEPUIS >more :
EX POST NLGS :
###ECHO ON
STOCK Rloc : from this into verlt
# :
RETOUR :
#-----------------------------:
#-----------------------------:
SUB writing results : writing and displaying results
#
#WRITE LAST DOF : writing degrees of freedom and velocities
#WRITE LAST Vloc Rloc :
#WRITE LAST GPV :
#
WRITE OUT DOF STEP 5 :
WRITE OUT Vloc Rloc STEP 5 :
WRITE OUT Rnod STEP 5
#
WRITE OUTPUT GMV STEP 5 :
#
POSTPRO DURING COMPUTATION :
#
RETOUR :
#-----------------------------:
FIN DU FICHIER
......@@ -13,6 +13,7 @@ TimeEvolution_SetTimeStep(dt)
NewtonRaphson_SetFinalTime(t_final)
NewtonRaphson_SetMinTimeStep(dt)
NewtonRaphson_SetMaxTimeStep(dt)
NR_tol = 1.e-3
# Newton loop parameters:
NewtonRaphson_SetMaxIter(20)
......@@ -23,6 +24,7 @@ Integrator_InitTheta(0.5E0)
# info generation fichier visu
freq_display = 10
ref_radius = 1.
# info generation fichier de sortie
freq_write = 10
......@@ -32,19 +34,17 @@ freq_detect = 1
# 123456789012345678901234567890
type = 'Stored_Delassus_Loops '
norm='Quad '
tol = 0.1666E-04
ntype='Quad '
tol = 0.1666E-04
relax = 1.E0
gs_it1 = 101
gs_it2 = 201
# 2D PSTRAIN
overall_DIME(2,1)
SetDimension(2,1)
nlgs_SetWithQuickScramble()
mecaMAILx_WithRenumbering()
### model reading ###
utilities_logMes('READ BODIES')
MAILx_ReadBodies()
......@@ -118,19 +118,10 @@ RBDY2_WriteDrivenDof()
### post2D ##
utilities_logMes('INIT POSTPRO')
post2D_SetDisplayedField('TACTOR')
post2D_SetDisplayedField('CONTACT POINT')
post2D_SetDisplayedField('MECHANICAL GPV ')
post2D_SetDisplayedField('DISPLACEMENT ')
post2D_SetDisplayedField('AVERAGE VELOCITY')
post2D_Init()
overall_WriteOutDisplayFile(1)
post2D_WriteOutDisplayFile(0)
OpenDisplayFiles()
WriteDisplayFiles(1,ref_radius)
### postpro ###
#postpro_PostproBeforeComputation()
CLxxx_SetNbNodesByCLxxx(1)
......@@ -157,10 +148,13 @@ while TimeEvolution_GetTime() < t_final :
#utilities_logMes('COMPUTE Free Vlocy')
RBDY2_ComputeFreeVelocity()
# Newton loop
NewtonRaphson_Initialize(NR_tol)
k=0
is_converged = 1
# Newton loop
while is_converged == 1 : #looping until something changes in CheckNlConvergence
k+=1
#utilities_logMes('COMPUTE (gd) NL BULK')
mecaMAILx_ComputeBulk()
......@@ -182,7 +176,7 @@ while TimeEvolution_GetTime() < t_final :
### Signorini Coulomb
CLALp_RecupRloc()
CLJCx_RecupRloc()
nlgs_ExSolver(type, norm, tol, relax, gs_it1, gs_it2)
nlgs_ExSolver(type, ntype, tol, relax, gs_it1, gs_it2)
CLALp_StockRloc()
CLJCx_StockRloc()
###
......@@ -190,8 +184,10 @@ while TimeEvolution_GetTime() < t_final :
#utilities_logMes('COMPUTE DOF')
mecaMAILx_ComputeDof()
#
NewtonRaphson_CheckConvergence(1.E-3)
is_converged = mecaMAILx_CheckNlConvergence()
if k > 1:
norm = mecaMAILx_ComputeResidueNorm()
is_converged = NewtonRaphson_CheckConvergence(norm)
if is_converged == 0 or is_converged == 2 :
break
......@@ -244,8 +240,7 @@ while TimeEvolution_GetTime() < t_final :
TimeEvolution_WriteOutRnod(freq_write)
mecaMAILx_WriteOutRnod()
#
overall_WriteOutDisplayFile(freq_display)
post2D_WriteOutDisplayFile(0)
WriteDisplayFiles(freq_display,ref_radius)
### postpro ###
#postpro_PostproDuringComputation()
### writeout handling ###
......@@ -268,5 +263,6 @@ utilities_logMes('WRITE LAST GPV')
TimeEvolution_WriteLastGPV()
MAILx_WriteLastGPV()
CloseDisplayFiles()
### postpro ###
#postpro_ClosePostproFiles()
......@@ -5,6 +5,9 @@ import math
from pylmgc90.pre_lmgc import *
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
# on se place en 2D
dim = 2
......
......@@ -17,6 +17,7 @@ echo = 0
# info generation fichier visu
freq_display = 50
ref_radius = 1.
# info contact
freq_detect = 1
......@@ -29,6 +30,7 @@ relax = 1.0
gs_it1 = 51
gs_it2 = 1001
SetDimension(2)
### definition des parametres du calcul ###
utilities_logMes('INIT TIME STEPPING')
TimeEvolution_SetTimeStep(dt)
......@@ -75,9 +77,7 @@ overall_WriteDrivenDof()
RBDY2_WriteDrivenDof()
### post2D ##
post2D_SetDisplayedField('CONTACT POINT ')
post2D_SetDisplayedField('TACTOR ')
post2D_Init()
OpenDisplayFiles()
utilities_logMes('COMPUTE MASS')
RBDY2_ComputeMass()
......@@ -130,7 +130,8 @@ for k in xrange(1, nb_steps + 1, 1):
PLJCx_WriteLastVlocRloc()
#
### post2D ###
overall_WriteOutDisplayFile(freq_display)
post2D_WriteOutDisplayFile(0)
WriteDisplayFiles(freq_display,ref_radius)
### wrtieout handling ###
overall_CleanWriteOutFlags()
CloseDisplayFiles()
......@@ -5,6 +5,9 @@ import math
from pylmgc90.pre_lmgc import *
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
# on se place en 2D
dim = 2
......
......@@ -8,7 +8,7 @@ checkDirectories()
utilities_DisableLogMes()
# a 3D example is considered
overall_DIME(3,0)
SetDimension(3)
### computation's parameters definition ###
utilities_logMes('INIT TIME STEPPING')
......@@ -24,6 +24,7 @@ nb_steps = 1000
freq_detect = 1
# * visualization frequency
freq_display = 50
ref_radius = 1.
# * frequence d'ecriture des fichier de sortie
freq_write = 50
# 123456789012345678901234567890
......@@ -85,24 +86,7 @@ RBDY3_WriteDrivenDof()
RBDY3_ComputeMass()
### post3D ##
# 1234567890123456
# definition of fields to be computed by the post3D module
post3D_SetDisplayedField('POSITION ')
post3D_SetDisplayedField('AVERAGE VELOCITY')
post3D_SetDisplayedField('STRESS ')
# initialization of the post3D module
post3D_Init()
# definition of another fields to be displayed by the display_3D module
display_3D_SetDisplayedField('TACTOR')
display_3D_SetDisplayedField('INTERACTION')
# choose of the file format for the visualiztion
display_3D_SetDisplayFileFormat('VTK')
# initilization of the display_3D module
display_3D_Init(0)
# compute of a first visualization
#display_3D_WriteOutDisplayFile(0)
OpenDisplayFiles()
# time loop
for k in range(1, nb_steps + 1):
......@@ -150,10 +134,7 @@ for k in range(1, nb_steps + 1):
RBDY3_UpdateDof()
### post3D ###
post3D_Update()
overall_WriteOutDisplayFile(freq_display)
display_3D_WriteOutDisplayFile(0)
WriteDisplayFiles(freq_display,ref_radius)
TimeEvolution_WriteOutDof(freq_write)
RBDY3_WriteOutDof(-1,9999999)
......@@ -168,3 +149,5 @@ for k in range(1, nb_steps + 1):
TimeEvolution_WriteLastDof()
RBDY3_WriteLastDof()
CloseDisplayFiles()
......@@ -5,6 +5,9 @@ import math
from pylmgc90.pre_lmgc import *
if not os.path.isdir('./DATBOX'):
os.mkdir('./DATBOX')
# on se place en 3D
dim = 3
......
......@@ -17,6 +17,7 @@ echo = 0
# info generation fichier visu
freq_display = 50
ref_radius = 1.
# info contact