Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2020-12-29 10:52:45

Nidish
Member
Registered: 2020-06-04
Posts: 21

Smoothing field (CHAMP) with Code_Aster

Hello,

I have an application where I need to use a "spatially smoothened version" of the strain energy density on my object of calculation to determine how to proceed with the calculations. Specifically, I'm using CALC_CHAMP for exporting ENEL_NOEU (energy density at nodes), and using CREA_CHAMP for extracting the energy field into a variable.

I would like to know if there are any functions in Code_Aster itself for smoothing this (something simple would be sufficient, say, a kernel smoothing) over the domain.

Here is my code:

DEBUT(LANG='EN')


# Default Young's modulus
Eini = 2e11

# Default Poisson's ratio
nu = 0.3

mesh = LIRE_MAILLAGE(identifier='4:1',
                     UNITE=20)

model = AFFE_MODELE(identifier='5:1',
                    AFFE=_F(MODELISATION=('C_PLAN', ),
                            PHENOMENE='MECANIQUE',
                            TOUT='OUI'),
                    MAILLAGE=mesh)

homsteel = DEFI_MATERIAU(identifier='6:1',
                         ELAS=_F(E=Eini,
                                 NU=nu))

fieldmat = AFFE_MATERIAU(identifier='7:1',
                         AFFE=_F(MATER=(homsteel, ),
                                 TOUT='OUI'),
                         MODELE=model)

load = AFFE_CHAR_MECA(identifier='8:1',
                      FORCE_NODALE=_F(FY=-1000.0,
                                      GROUP_NO=('Load1', )),
                      MODELE=model)

pinends = AFFE_CHAR_MECA(identifier='9:1',
                         DDL_IMPO=_F(DX=0.0,
                                     DY=0.0,
                                     GROUP_NO=('Pin1', 'Pin2')),
                         MODELE=model)

reslin = MECA_STATIQUE(identifier='10:1',
                       CHAM_MATER=fieldmat,
                       EXCIT=(_F(CHARGE=pinends),
                              _F(CHARGE=load)),
                       MODELE=model,
                       OPTION='SIEF_ELGA')

reslin = CALC_CHAMP(identifier='11:1',
                    reuse=reslin,
                    CHAM_MATER=fieldmat,
                    ENERGIE=('ENEL_NOEU', ),
                    MODELE=model,
                    RESULTAT=reslin)

IMPR_RESU(identifier='14:1',
          RESU=_F(RESULTAT=reslin),
          UNITE=80)

# THIS IS THE ENERGY FIELD THAT I WANT TO SMOOTHEN
ENELfld = CREA_CHAMP(identifier='13:1',
                     NOM_CHAM='ENEL_NOEU',
                     OPERATION='EXTR',
                     RESULTAT=reslin,
                     TYPE_CHAM='NOEU_ENER_R')

FIN()

I will appreciate any help on this.

Thanks,
Nidish

Offline