# Simple Contact 3D - Stress and displacement

• valentin rul
• Topic Author
• Offline
• New Member
• 6 years 9 months ago - 6 years 9 months ago #8499 by valentin rul
Simple Contact 3D - Stress and displacement was created by valentin rul
Hi everybody,

I'm trying to simulate a simple 3D contact between a "block" and a cylinder. A side of the block is embed (DX=DY=DZ=0). A cylinder "presses" the block (displacement 1 mm DZ=-1.).

I made a simple .comm file with contact, non linear resolution that give me the right displacement but I can't see the distribution of the stress in ParaVis.

First of all, my code was very very simple :
- A reading of the quadratic mesh,
- A model definiton,
- A setting of the BCs,
- ....
After that I wrote a second code with a projection on a linear mesh for the printing of the results but it didn't work.

So, can someone help me to fix this problem ? In the future I would like to see the stress distribution in a beam in 4 points bending in a 3D model.

Please look at my .comm file,in attachement,

Thanks a lot.

contact_aster.zip
Last edit: 6 years 9 months ago by valentin rul.

Please Log in or Create an account to join the conversation.

• valentin rul
• Topic Author
• Offline
• New Member
• 6 years 9 months ago #8504 by valentin rul
Replied by valentin rul on topic Re: Simple Contact 3D - Stress and displacement
```DEBUT();

#---------------------------------------------------
linme=LIRE_MAILLAGE(FORMAT='MED',);

#---------------------------------------------------
qme=CREA_MAILLAGE(MAILLAGE=linme,
PREF_NOEUD='NS',
PREF_NUME=5000,),);
#---------------------------------------------------
feml=AFFE_MODELE(MAILLAGE=linme,
AFFE=(_F(TOUT='OUI',
PHENOMENE='MECANIQUE',
MODELISATION='3D',),),);

femq=AFFE_MODELE(MAILLAGE=qme,
AFFE=(_F(TOUT='OUI',
PHENOMENE='MECANIQUE',
MODELISATION='3D',),),);
#--------------------------------------------------
qme=MODI_MAILLAGE(reuse =qme,
MAILLAGE=qme,
ORIE_PEAU_3D=_F(GROUP_MA='hbeam',),
);

qme=MODI_MAILLAGE(reuse =qme,
MAILLAGE=qme,
ORIE_PEAU_3D=_F(GROUP_MA='tbeam',),
);

qme=MODI_MAILLAGE(reuse =qme,
MAILLAGE=qme,
ORIE_PEAU_3D=_F(GROUP_MA='scyl',),
);
#--------------------------------------------------

MAT=DEFI_MATERIAU(ELAS=_F(E = 3.1e3,NU = 0.3,));

CHMAT=AFFE_MATERIAU(MAILLAGE=qme,
AFFE=(_F(TOUT='OUI',
MATER = MAT,),),
);
#--------------------------------------------------------
CHA1=AFFE_CHAR_MECA(MODELE=femq,
DDL_IMPO=(_F(GROUP_MA = 'scyl',  DX = 0.0, DY = -0.00, DZ = -1,),
_F(GROUP_MA = 'hbeam',  DX = 0.0, DY = -0.00, DZ = 0.0,),),);

CHA2 = DEFI_CONTACT(MODELE         = femq,
FORMULATION    = 'DISCRETE',
ZONE =_F(
GROUP_MA_ESCL = 'tbeam',
GROUP_MA_MAIT = 'scyl',
),);

#-----------------------------------------------------------
L_INST=DEFI_LIST_REEL(DEBUT=0.0,
INTERVALLE=_F(JUSQU_A=1., NOMBRE=1,));

FONC=DEFI_FONCTION(NOM_PARA='INST',
VALE=(0., 0.0,1., 1.0,));
#-----------------------------------------------
RESU=STAT_NON_LINE (MODELE     = femq,
CHAM_MATER = CHMAT,
INCREMENT  =_F(LIST_INST=L_INST,
NUME_INST_FIN=1,),
EXCIT      =(_F(CHARGE=CHA1,
FONC_MULT=FONC,),),
CONTACT    = CHA2,
#COMPORTEMENT  =_F(RELATION='ELAS'),
#     NEWTON=_F(MATRICE='ELASTIQUE',REAC_ITER=1),
#CONVERGENCE=_F(ARRET='OUI',
#      ITER_GLOB_MAXI=30,
#      RESI_GLOB_MAXI=1.E-8,),
);

#-----------------------------------------------

RESU=CALC_CHAMP(reuse=RESU,RESULTAT=RESU,CONTRAINTE=('SIGM_ELNO'));

#-----------------------------------------------------------------------------------------------------------RESU=CALC_ELEM(reuse =RESU,
#-----------------------------------------------------------------------------------------------------------RESULTAT=RESU,
#-----------------------------------------------------------------------------------------------------------OPTION=('SIEF_ELNO_ELGA','EPSI_ELNO_DEPL','EQUI_ELNO_SIGM',),);

#---------------------------------------------------
RESULIN=PROJ_CHAMP(RESULTAT=RESU,
MODELE_1=femq,
MODELE_2=feml,
NOM_CHAM=('DEPL','SIGM_ELNO',),);
#---------------------------------------------------
IMPR_RESU(               #MODELE=feml,
FORMAT='MED',
UNITE=80,
RESU=(_F(MAILLAGE=linme,
RESULTAT=RESULIN,
NOM_CHAM=('DEPL','SIGM_ELNO',),),),
);

#---------------------------------------------------

FIN();
```

Please Log in or Create an account to join the conversation.

• valentin rul
• Topic Author
• Offline
• New Member
• 6 years 9 months ago #8508 by valentin rul
Replied by valentin rul on topic Re: Simple Contact 3D - Stress and displacement
Ok, I've got it.

The problem was not the contact definition but what I asked Code_Aster to calculate.

I found a post of Jean Pierre Aubry in which he gives a sample of code for stress printing :
```stat=CALC_CHAMP(
reuse=stat,
RESULTAT=stat,
CONTRAINTE='SIGM_ELNO',
FORCE='REAC_NODA',
CRITERES=('SIEQ_ELNO','SIEQ_NOEU','SIEQ_ELGA'),
);```

Now I can see the distribution of the stress.

Thanks Jean Pierre Aubry,

SOLVED

Please Log in or Create an account to join the conversation.

Moderators: catux
Time to create page: 0.108 seconds