Difference between revisions of "Contrib:KeesWouters/shell/static/command"

From CAELinuxWiki
Jump to: navigation, search
m ('''command file''')
m ('''command file''')
Line 2: Line 2:
  
  
 
+
<nowiki>
 
  DEBUT();
 
  DEBUT();
 
  th = 0.01;
 
  th = 0.01;
Line 187: Line 187:
  
 
  FIN();
 
  FIN();
 +
 +
 +
</nowiki>

Revision as of 20:35, 10 March 2010

command file

DEBUT(); th = 0.01; meshinit=LIRE_MAILLAGE(FORMAT='MED',); #meshinit=LIRE_MAILLAGE(); modinit=AFFE_MODELE(MAILLAGE=meshinit, AFFE=_F(GROUP_MA=('Fbot','Fmain','Ftop','Fcentre1','Fcentre2',), PHENOMENE='MECANIQUE', MODELISATION='3D',),); meshmod=CREA_MAILLAGE(MAILLAGE=meshinit, MODI_MAILLE=_F(TOUT='OUI', OPTION='TRIA6_7',),); meshmod=MODI_MAILLAGE(reuse =meshmod, MAILLAGE=meshmod, ORIE_NORM_COQUE=_F(GROUP_MA=('Fbot','Fmain','Ftop','Fcentre1','Fcentre2',),),); ###VECT_NORM= (0,0,+1),NOEUD='N19'),); modmod=AFFE_MODELE(MAILLAGE=meshmod, AFFE=_F(TOUT='OUI', PHENOMENE='MECANIQUE', MODELISATION='COQUE_3D',),); ##the shell characteristics ##the shells are applied on the group 'shell' defined in the Salome mesh ##the thickness of the shell is epais=th ##coque_ncou is the number of gauss nodes along the thickness, for linear analysis one node is sufficient. ##the parameter excentrement can give the offset of the shell wrt to the meshing plane, but this does not apply for coque_3d and is ignored here shellch=AFFE_CARA_ELEM(MODELE=modmod, COQUE=_F(GROUP_MA=('Fbot','Fmain','Ftop','Fcentre1','Fcentre2',), EPAIS=th, VECTEUR=(1.0,0.0,0.0,), COQUE_NCOU=1,),); ##define material properties of steel (ISO values) steel=DEFI_MATERIAU(ELAS=_F(E=210000000000.0, NU=0.3, RHO=7850.0,),); ##apply material properties to the whole mesh material=AFFE_MATERIAU(MAILLAGE=meshmod, AFFE=_F(TOUT='OUI', MATER=steel,),); ##define BC and loads load_bc=AFFE_CHAR_MECA(MODELE=modmod, DDL_IMPO=(_F(GROUP_MA='Lbot', DX=0.0, DY=0.0, DZ=0.0,), _F(GROUP_MA='Ltop', DZ=0.0,),), FORCE_COQUE=(_F(GROUP_MA=('Fcentre1','Fcentre2',), PRES=182.6e3,), _F(GROUP_MA='Ftop', PRES=24.3e3,), _F(GROUP_MA='Fbot', PRES=29.5e3,), _F(GROUP_MA='Fmain', PRES=25.8e3,),),); ###FORCE_COQUE=_F(TOUT='OUI',FZ=-1000.0,),); ##define the calculation ##determine stiffness matrix, depending on material, mesh and applied model (coque_3D) resu=MECA_STATIQUE(MODELE=modmod, CHAM_MATER=material, CARA_ELEM=shellch, EXCIT=_F(CHARGE=load_bc,), OPTION='SIEF_ELGA_DEPL',); resu=CALC_ELEM(reuse =resu, MODELE=modmod, CHAM_MATER=material, RESULTAT=resu, REPE_COQUE=_F(NIVE_COUCHE='SUP',), OPTION='SIGM_ELNO_DEPL',); ### added for nodal forces and reaction forces resu=CALC_NO(reuse =resu, RESULTAT=resu, OPTION=('FORC_NODA','REAC_NODA',),); resuSUP=CALC_ELEM(MODELE=modmod, CHAM_MATER=material, RESULTAT=resu, REPE_COQUE=_F(NIVE_COUCHE='SUP',), OPTION=('SIGM_ELNO_DEPL','EQUI_ELNO_SIGM',),); resuSUP=CALC_NO(reuse =resuSUP, RESULTAT=resuSUP, OPTION=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM',),); IMPR_RESU(MODELE=modmod, FORMAT='MED', UNITE=80, RESU=(_F(MAILLAGE=meshmod, RESULTAT=resu, NOM_CHAM='DEPL',), _F(MAILLAGE=meshmod, RESULTAT=resuSUP, NOM_CHAM=('SIGM_NOEU_DEPL','EQUI_NOEU_SIGM',),),),); meshmod=DEFI_GROUP(reuse =meshmod, MAILLAGE=meshmod, CREA_GROUP_NO=(_F(GROUP_MA='Lbot', NOM='Nbot',), _F(GROUP_MA='Ltop', NOM='Ntop',), _F(GROUP_MA='Lleft', NOM='Nleft',), _F(GROUP_MA='Lright', NOM='Nright',),),); meshmod=DEFI_GROUP(reuse =meshmod, MAILLAGE=meshmod, CREA_GROUP_NO=_F(UNION=('Nbot','Ntop','Nleft','Nright',), NOM='Nall',),); TB_nodf=POST_RELEVE_T(ACTION=_F(OPERATION='EXTREMA', INTITULE='displacements dz', RESULTAT=resu, NOM_CHAM='DEPL', TOUT_ORDRE='OUI', GROUP_NO='Nall', NOM_CMP='DZ',), INFO=2, TITRE='Min/max of displacement DZ',); IMPR_TABLE(TABLE=TB_nodf, FORMAT='TABLEAU', UNITE=26, SEPARATEUR=' * ', TITRE='extreme displacements on group allnodes',); IMPR_RESU(MODELE=modmod, FORMAT='MED', UNITE=80, RESU=_F(MAILLAGE=meshmod, RESULTAT=resu, NOM_CHAM='REAC_NODA',),); #TB_disp=POST_RELEVE_T(ACTION=(_F(OPERATION='EXTRACTION', # INTITULE='Displacements', # RESULTAT=result, # NOM_CHAM='DEPL', # TOUT_ORDRE='OUI', # GROUP_NO='nforce', # NOM_CMP=('DZ',),),), # #TOUT_CMP='OUI', # #RESULTANTE=('DZ',),),), # TITRE='DZ',); #TB_nodf=POST_RELEVE_T(ACTION=(_F(OPERATION='EXTRACTION', # INTITULE='displacements', # RESULTAT=Rdyn, # NOM_CHAM='DEPL', # TOUT_ORDRE='OUI', # GROUP_NO='Ntop', # RESULTANTE=('DX','DY','DZ',), # MOYE_NOEUD='NON',),), # TITRE='Displacement top of cylinder',); #Finally, write the data to a file (define a file in ASTK with file unit 26, in this case). #IMPR_TABLE(TABLE=TB_nodf, # FORMAT='TABLEAU', # UNITE=26, # SEPARATEUR=' * ', # TITRE='displacements at nodes on group Ntop',); ##=========================== FIN();