DEBUT(LANG='FR')

beam = LIRE_MAILLAGE(FORMAT='MED',
                     UNITE=3)

section = LIRE_MAILLAGE(FORMAT='MED',
                        UNITE=20)

fiber = DEFI_GEOM_FIBRE(INFO=1,
                        SECTION=_F(ANGLE=0.0,
                                   COOR_AXE_POUTRE=(0.0, 0.0),
                                   GROUP_FIBRE='sec',
                                   MAILLAGE_SECT=section,
                                   TOUT_SECT='OUI'))

model = AFFE_MODELE(AFFE=_F(GROUP_MA=('beam', ),
                            MODELISATION=('POU_D_EM', ),
                            PHENOMENE='MECANIQUE'),
                    MAILLAGE=beam)

elemprop = AFFE_CARA_ELEM(GEOM_FIBRE=fiber,
                          MODELE=model,
                          MULTIFIBRE=_F(GROUP_FIBRE=('sec', ),
                                        GROUP_MA=('beam', )),
                          POUTRE=_F(CARA=('H', ),
                                    GROUP_MA=('beam', ),
                                    SECTION='RECTANGLE',
                                    VALE=(10.0, )))

#comment: mater = DEFI_MATERIAU(ECRO_LINE=_F(D_SIGM_EPSI=0.0001,
#comment:                                    SIGM_LIM=235.0,
#comment:                                    SY=235.0),
#comment:                       ELAS=_F(E=205000.0,
#comment:                               NU=0.3))

mater = DEFI_MATER_GC(ACIER=_F(D_SIGM_EPSI=0.001,
                               E=205000.0,
                               NU=0.3,
                               SY=235.0))

func = DEFI_FONCTION(NOM_PARA='INST',
                     PROL_DROITE='EXCLU',
                     PROL_GAUCHE='EXCLU',
                     VALE=(0.0, 0.0, 1.0, 1.0))

listr = DEFI_LIST_REEL(DEBUT=0.0,
                       INTERVALLE=_F(JUSQU_A=1.0,
                                     PAS=0.02))

times = DEFI_LIST_INST(DEFI_LIST=_F(LIST_INST=listr),
                       METHODE='MANUEL')

load = AFFE_CHAR_MECA(DDL_IMPO=_F(GROUP_NO=('kotei', ),
                                  LIAISON='ENCASTRE'),
                      FORCE_NODALE=_F(FX=30000.0,
                                      GROUP_NO=('saika', )),
                      MODELE=model)

behav = DEFI_COMPOR(GEOM_FIBRE=fiber,
                    MATER_SECT=mater,
                    MULTIFIBRE=_F(GROUP_FIBRE=('sec', ),
                                  MATER=mater,
                                  RELATION='VMIS_ISOT_LINE'))

fieldmat = AFFE_MATERIAU(AFFE=_F(GROUP_MA=('beam', ),
                                 MATER=(mater, )),
                         AFFE_COMPOR=_F(COMPOR=behav,
                                        GROUP_MA=('beam', )),
                         MAILLAGE=beam,
                         MODELE=model)

resnonl = STAT_NON_LINE(CARA_ELEM=elemprop,
                        CHAM_MATER=fieldmat,
                        COMPORTEMENT=_F(GROUP_MA=('beam', ),
                                        RELATION='MULTIFIBRE'),
                        CONVERGENCE=_F(ITER_GLOB_MAXI=100,
                                       RESI_GLOB_RELA=1e-05),
                        EXCIT=_F(CHARGE=load,
                                 FONC_MULT=func),
                        INCREMENT=_F(LIST_INST=listr),
                        MODELE=model,
                        NEWTON=_F(MATRICE='TANGENTE',
                                  REAC_ITER=1))

re = CALC_CHAMP(CARA_ELEM=elemprop,
                CHAM_MATER=fieldmat,
                CONTRAINTE=('SIGM_ELGA', ),
                CRITERES=('SIEQ_ELGA', ),
                DEFORMATION=('EPSI_ELGA', ),
                MODELE=model,
                RESULTAT=resnonl)

IMPR_RESU(FORMAT='MED',
          RESU=(_F(CARA_ELEM=elemprop,
                   IMPR_NOM_VARI='OUI',
                   NOM_CHAM=('SIGM_ELGA', 'EPSI_ELGA', 'SIEQ_ELGA'),
                   RESULTAT=re),
                _F(CARA_ELEM=elemprop,
                   IMPR_NOM_VARI='OUI',
                   NOM_CHAM=('DEPL', ),
                   RESULTAT=resnonl)),
          UNITE=80,
          VERSION_MED='3.3.1')

FIN()
