DEBUT(LANG='FR')


mesh = LIRE_MAILLAGE(identifier='0:1',
                     FORMAT='MED',
                     UNITE=20)

mesh0 = LIRE_MAILLAGE(identifier='1:1',
                      FORMAT='MED',
                      UNITE=2)

model = AFFE_MODELE(identifier='2:1',
                    AFFE=_F(GROUP_MA=('beam', ),
                            MODELISATION=('POU_D_EM', ),
                            PHENOMENE='MECANIQUE'),
                    MAILLAGE=mesh)

fiber = DEFI_GEOM_FIBRE(identifier='3:1',
                        SECTION=_F(COOR_AXE_POUTRE=(0.0, 0.0),
                                   GROUP_FIBRE='sec',
                                   GROUP_MA_SECT=('danmen', ),
                                   MAILLAGE_SECT=mesh0))

elemprop = AFFE_CARA_ELEM(identifier='4:1',
                          GEOM_FIBRE=fiber,
                          MODELE=model,
                          MULTIFIBRE=_F(GROUP_FIBRE=('sec', ),
                                        GROUP_MA=('beam', ),
                                        PREC_AIRE=1.01,
                                        PREC_INERTIE=1.01),
                          POUTRE=_F(CARA=('H', ),
                                    GROUP_MA=('beam', ),
                                    SECTION='RECTANGLE',
                                    VALE=(10.0, )))

mater = DEFI_MATERIAU(identifier='5:1',
                      ECRO_LINE=_F(D_SIGM_EPSI=0.01,
                                   SY=235.0),
                      ELAS=_F(E=200000.0,
                              NU=0.3))

func = DEFI_FONCTION(identifier='6:1',
                     NOM_PARA='INST',
                     PROL_DROITE='EXCLU',
                     PROL_GAUCHE='EXCLU',
                     VALE=(0.0, 0.0, 1.0, 1.0))

listr0 = DEFI_LIST_REEL(identifier='7:1',
                        DEBUT=0.0,
                        INTERVALLE=_F(JUSQU_A=1.0,
                                      PAS=0.1))

times = DEFI_LIST_INST(identifier='8:1',
                       DEFI_LIST=_F(LIST_INST=listr0),
                       METHODE='MANUEL')

load = AFFE_CHAR_MECA(identifier='9:1',
                      DDL_IMPO=_F(GROUP_NO=('kotei', ),
                                  LIAISON='ENCASTRE'),
                      MODELE=model)

load0 = AFFE_CHAR_MECA(identifier='10:1',
                       FORCE_NODALE=_F(FY=-10.0,
                                       GROUP_NO=('saika', )),
                       MODELE=model)

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

fieldmat = AFFE_MATERIAU(identifier='12:1',
                         AFFE=_F(GROUP_MA=('beam', ),
                                 MATER=(mater, )),
                         AFFE_COMPOR=_F(COMPOR=behav,
                                        GROUP_MA=('beam', )),
                         MODELE=model)

#comment: reslin0 = MECA_STATIQUE(identifier='13:1',
#comment:                         CARA_ELEM=elemprop,
#comment:                         CHAM_MATER=fieldmat,
#comment:                         EXCIT=_F(CHARGE=load),
#comment:                         MODELE=model)

resnonl = STAT_NON_LINE(identifier='14:1',
                        CARA_ELEM=elemprop,
                        CHAM_MATER=fieldmat,
                        COMPORTEMENT=_F(DEFORMATION='PETIT',
                                        GROUP_MA=('beam', ),
                                        RELATION='MULTIFIBRE'),
                        CONVERGENCE=_F(ITER_GLOB_MAXI=100,
                                       RESI_GLOB_RELA=0.001),
                        EXCIT=(_F(CHARGE=load),
                               _F(CHARGE=load0,
                                  FONC_MULT=func)),
                        INCREMENT=_F(LIST_INST=times),
                        MODELE=model,
                        NEWTON=_F(MATRICE='TANGENTE',
                                  REAC_ITER=1))

IMPR_RESU(identifier='15:1',
          FORMAT='MED',
          RESU=_F(CARA_ELEM=elemprop,
                  MAILLAGE=mesh,
                  NOM_CHAM=('DEPL', ),
                  RESULTAT=resnonl),
          UNITE=3)

FIN()