
DEBUT();

import sys
sys.path.append('/home/denis/Documents/disser/model/v4_wo_friction')
from materials import *

empty=DEFI_MATERIAU(ELAS=_F(E=m_empty['E'],          
                          NU=m_empty['NU'],),);

mat=DEFI_MATERIAU(ELAS=_F(E=m_matrix['E'],              
                          NU=m_matrix['NU'],),);

fib=DEFI_MATERIAU(ELAS=_F(E=m_fibers['E'],              
                          NU=m_fibers['NU'],),);


MAIL=LIRE_MAILLAGE(FORMAT='MED',);

MAIL=MODI_MAILLAGE(reuse =MAIL,
                   MAILLAGE=MAIL,
                   ORIE_PEAU_3D=_F(GROUP_MA=('ZY_Side','XY_Side',),),);

MODE=AFFE_MODELE(MAILLAGE=MAIL,
                 AFFE=_F(TOUT='OUI',
                         PHENOMENE='MECANIQUE',
                         MODELISATION='3D',),);

MATE=AFFE_MATERIAU(MAILLAGE=MAIL,
                   AFFE=(_F(GROUP_MA='Matrix',
                            MATER=mat,),
                         _F(GROUP_MA='Fibers',
                            MATER=fib,),
                         _F(GROUP_MA='fs1',
                            MATER=empty,),
                        ),
                   );

CHAR=AFFE_CHAR_MECA(MODELE=MODE,
                    DDL_IMPO=(
                              _F(GROUP_MA='YX_Side',
                                 DZ=0.0,),
                              _F(GROUP_MA='YZ_Side',
                                 DX=0.0,),
                              _F(GROUP_MA='ZX_Bott',
                                 DY=0,),
                              _F(GROUP_MA='XZ_Top',
                                 DY=0,),
                              _F(GROUP_MA='XY_Side',
                                  DZ=1.0),
                              _F(GROUP_MA='ZY_Side',
                                  DX=-2.0),
                              ),
                    );

RESU=MECA_STATIQUE(MODELE=MODE,
                   CHAM_MATER=MATE,
                   EXCIT=_F(CHARGE=CHAR,),);

RESU=CALC_CHAMP(reuse =RESU,
               MODELE=MODE,
               CHAM_MATER=MATE,
               RESULTAT=RESU,
               CONTRAINTE=('SIGM_ELNO','SIEF_ELNO',),
               DEFORMATION=('EPME_ELNO',),
               CRITERES=('SIEQ_ELNO',),
               EXCIT=_F(CHARGE=CHAR,),);

RESU=CALC_CHAMP(reuse =RESU,
             RESULTAT=RESU,
             CONTRAINTE=('SIEF_NOEU','SIGM_NOEU',),
             DEFORMATION=('EPME_NOEU',),
             CRITERES=('SIEQ_NOEU',),
             );

IMPR_RESU(FORMAT='MED',
          UNITE=80,
          RESU=_F(MAILLAGE=MAIL,
                  RESULTAT=RESU,
                  NOM_CHAM=('SIGM_NOEU','SIEQ_NOEU','DEPL','SIGM_ELNO',),),);

IMPR_RESU(FORMAT='RESULTAT',
          UNITE=22,
          RESU=_F(RESULTAT=RESU,
                  NOM_CHAM='SIGM_NOEU',
                  FORM_TABL='OUI',
                  GROUP_MA='Matrix',
                  IMPR_COOR='OUI',),);

IMPR_RESU(FORMAT='RESULTAT',
          UNITE=23,
          RESU=_F(RESULTAT=RESU,
                  NOM_CHAM='SIEQ_NOEU',
                  FORM_TABL='OUI',
                  GROUP_MA='Matrix',
                  IMPR_COOR='OUI',),);

IMPR_RESU(FORMAT='RESULTAT',
          UNITE=24,
          RESU=_F(RESULTAT=RESU,
                  NOM_CHAM='SIGM_NOEU',
                  FORM_TABL='OUI',
                  GROUP_MA='Fibers',
                  IMPR_COOR='OUI',),);

IMPR_RESU(FORMAT='RESULTAT',
          UNITE=25,
          RESU=_F(RESULTAT=RESU,
                  NOM_CHAM='SIEQ_NOEU',
                  FORM_TABL='OUI',
                  GROUP_MA='Fibers',
                  IMPR_COOR='OUI',),);

IMPR_RESU(FORMAT='RESULTAT',
          UNITE=26,
          RESU=_F(RESULTAT=RESU,
                  NOM_CHAM='SIGM_NOEU',
                  FORM_TABL='OUI',
                  IMPR_COOR='OUI',),);

IMPR_RESU(FORMAT='RESULTAT',
          UNITE=27,
          RESU=_F(RESULTAT=RESU,
                  NOM_CHAM='SIEQ_NOEU',
                  FORM_TABL='OUI',
                  IMPR_COOR='OUI',),);

IMPR_RESU(FORMAT='RESULTAT',
          UNITE=28,
          RESU=_F(RESULTAT=RESU,
                  NOM_CHAM='SIEQ_NOEU',
                  FORM_TABL='OUI',
                  GROUP_MA='fs1',
                  IMPR_COOR='OUI',),);
       
FIN();
