DEBUT(LANG='EN')

mesh = LIRE_MAILLAGE(FORMAT='MED',
                     UNITE=2)

model = AFFE_MODELE(AFFE=_F(MODELISATION=('POU_D_E', ),
                            PHENOMENE='MECANIQUE',
                            TOUT='OUI'),
                    MAILLAGE=mesh)

elemprop = AFFE_CARA_ELEM(MODELE=model,
                          POUTRE=(_F(CARA=('HY', 'HZ'),
                                     GROUP_MA=('Line_1', ),
                                     SECTION='RECTANGLE',
                                     VALE=(100.0, 100.0)),
                                  _F(CARA=('R', ),
                                     GROUP_MA=('Line_2', ),
                                     SECTION='CERCLE',
                                     VALE=(10.0, ))))

mater = DEFI_MATERIAU(ELAS=_F(E=200000.0,
                              NU=0.3))

mater0 = DEFI_MATERIAU(ELAS=_F(ALPHA=1.17e-05,
                               E=200000.0,
                               NU=0.3))

load = AFFE_CHAR_MECA(DDL_IMPO=(_F(DRX=0.0,
                                   DRY=0.0,
                                   DRZ=0.0,
                                   DX=0.0,
                                   DY=0.0,
                                   DZ=0.0,
                                   GROUP_NO=('kotei', ),
                                   LIAISON='ENCASTRE'),
                                _F(DRY=0.0,
                                   DRZ=0.0,
                                   DX=0.0,
                                   DY=0.0,
                                   DZ=0.0,
                                   GROUP_NO=('kotei2', ),
                                   LIAISON='ENCASTRE')),
                      FORCE_NODALE=_F(FY=1000.0,
                                      GROUP_NO=('saika', )),
                      MODELE=model)

unnamed5 = CREA_CHAMP(AFFE=_F(GROUP_MA=('Line_2', ),
                              NOM_CMP=('TEMP', ),
                              VALE=(-200.0, )),
                      MODELE=model,
                      OPERATION='AFFE',
                      TYPE_CHAM='NOEU_TEMP_R')

fieldmat = AFFE_MATERIAU(AFFE=(_F(GROUP_MA=('Line_1', ),
                                  MATER=(mater, )),
                               _F(GROUP_MA=('Line_2', ),
                                  MATER=(mater0, ))),
                         AFFE_VARC=_F(CHAM_GD=unnamed5,
                                      GROUP_MA=('Line_2', ),
                                      NOM_VARC='TEMP',
                                      VALE_REF=20.0),
                         MODELE=model)

reslin = MECA_STATIQUE(CARA_ELEM=elemprop,
                       CHAM_MATER=fieldmat,
                       EXCIT=_F(CHARGE=load),
                       MODELE=model,
                       SOLVEUR=_F(METHODE='MUMPS',
                                  RESI_RELA=0.01))

unnamed4 = CALC_CHAMP(CARA_ELEM=elemprop,
                      CHAM_MATER=fieldmat,
                      CONTRAINTE=('SIGM_NOEU', ),
                      MODELE=model,
                      RESULTAT=reslin)

IMPR_RESU(FORMAT='MED',
          RESU=(_F(NOM_CHAM=('DEPL', ),
                   RESULTAT=reslin),
                _F(NOM_CHAM=('SIGM_NOEU', ),
                   RESULTAT=unnamed4)),
          UNITE=3)

FIN()
