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

You are not logged in.

#1 2021-03-08 16:45:08

Paul___
Member
Registered: 2021-02-12
Posts: 20

[SOLVED] Thermal expansion in y direction

Hello,

I would like to simulate a 2D thermal expansion. My model of thermal expansion that I have made works. However, the expansion is in x,y direction and I would like to simulate an expansion only in the y direction. Any suggestion of what to do to simulate thermal expansion in one direction ?

Thanks in advance,

This is the part of my code (Thermal model)

########### Thermal model  ###########

temp = sig_hydro

# Read thermal mesh
ther_mes = LIRE_MAILLAGE(FORMAT='MED',
                        UNITE=21)
                       
mesh1 = MAIL_PY() # We can now manipulate and access mesh with python
mesh1.FromAster(ther_mes)
NodeGroup = mesh1.gno # Acces mesh node groupes
face_rectan_nodes = list(NodeGroup['face_rectan'])# extracting all ids' of the face_rectan nodes group

# Create empty list of temperature
templist=[]     

# Python list to assign a temperature at each node (in a list)
for iter in face_rectan_nodes : #loop trough all nodes in the group
    templist.append(_F(NOEUD = 'N%d' % (i+1),TEMP=temp[c],),)

   
thermod = AFFE_MODELE(AFFE=_F(MODELISATION=('AXIS', ),
                            PHENOMENE='THERMIQUE',
                            TOUT='OUI'),
                    MAILLAGE=ther_mes)
                   
# Define thermal material: lambda
thermat = DEFI_MATERIAU(THER=_F(LAMBDA=6.0))

# Assign thermal material to thermal model
fieldma2 = AFFE_MATERIAU(AFFE=_F(MATER=(thermat, ),
                                TOUT='OUI'),
                        MODELE=thermod)

# Assign temerature at each node using the list templist created from the python loop                                 
ther_tem=AFFE_CHAR_THER(MODELE=thermod,TEMP_IMPO=(templist))

# Thermal results
resther = THER_LINEAIRE(CHAM_MATER=fieldma2,
                        EXCIT=_F(CHARGE=ther_tem),
                        MODELE=thermod)   

resther = CALC_CHAMP(reuse=resther,
            RESULTAT=resther,
            THERMIQUE=('FLUX_ELNO','FLUX_NOEU' ))                       

# Print thermal result in a .rmed file             
IMPR_RESU(FORMAT='MED',
    RESU=_F(RESULTAT=resther),
    UNITE=82)

Last edited by Paul___ (2021-03-10 10:24:40)

Offline

#2 2021-03-10 08:09:58

Humberto
Member
From: Ensenada, Mexico
Registered: 2012-10-15
Posts: 99
Website

Re: [SOLVED] Thermal expansion in y direction

I am not sure, But I would be trying to create an anisotropic material with lambda value = 0  in the dimension you don't want thermal expansion.

Just a thought.

Offline

#3 2021-03-10 10:23:20

Paul___
Member
Registered: 2021-02-12
Posts: 20

Re: [SOLVED] Thermal expansion in y direction

Hi Humberto,

This is exactly what I thought and it seems to works.

Thanks !

Offline