Atom topic feed | site map | contact | login | Protection des données personnelles | Powered by FluxBB | réalisation artaban
You are not logged in.
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
Hi Humberto,
This is exactly what I thought and it seems to works.
Thanks !
Offline