-
-
August 27, 2025 at 8:04 am
Amr 007
SubscriberHi,
I am working on a 3D thermomechanical analysis using ANSYS APDL. I have completed the transient thermal analysis and am now coupling the thermal results with the mechanical model using load-teansfer coupling method, where the temperature distribution from the thermal analysis acts as a thermal load in the structural model. The body starts at an initial temperature above 2000°C and cools down to below 1800°C.
I have two questions regarding the structural analysis setup:
What should be used as the reference temperature for thermal strain calculations? Should it be 20°C, representing a no-thermal-strain baseline, or the initial temperature of 2000°C, given that the body contracts during cooling?
Should the structural analysis be run as a transient or a static analysis? Considering that the thermal analysis is transient, is it necessary for the structural solution to also be transient to capture thermal stresses accurately?
Additionally, does the structural solution need transient time steps to properly capture the effects of the cooling rate on thermal stresses?
Any guidance on best practices or examples for modeling this type of thermomechanical cooling scenario in APDL would be highly appreciated.
Here is the first version of the code I am using, but it does not work (only the first step's temperature profile is read through out the time):
fini/clear! Lire le resultat de la thermique!-----------------------------------------------------------------------------------------------------------RESUME,'Thermal_Analysis','db',,0,0/reset!--------------------------------------------------------------------------------------------------------/filname,Mechanical_Analysis,1save!--------------------------------------------------------------------------------------------------------! Delete unused elements et nodes!----------------------------------------------/prep7 ! Enters the model creation preprocessor.allselesel,s,type,,10,110,1 ! Selects a subset of elements.nsle,s,1 ! Selects those nodes attached to the selected elements.edele,all ! Deletes selected elements from the model.ndele,all ! Deletes selected nodes from the model.etdele,10,110,1 ! Deletes element types.allselcmsel,u,vol_b1 ! Unselect vol 1vclear,all ! Deletes nodes and volume elements associated with selected volumes.aslv,s ! Selects those areas contained in the selected volumeslsla,s ! Selects those lines contained in the selected areasksll,s ! Selects those keypoints contained in the selected linesvdele,all ! Deletes unmeshed volumes.adele,all ! Deletes unmeshed areas.ldele,all ! Deletes unmeshed lines.kdele,all ! Deletes unmeshed keypoints.esel,s,type,,2 ! Selects a subset of elementsedele,all ! Deletes selected elements from the modeletdele,2 ! Deletes element typesallsel! Suppression des conditions aux limites thermiques!---------------------------------------------------------------------lsclear,all ! Clears loads and load step options from the database! Switch Element type!----------------------------ETCHG,TTS ! Converts the Thermal elements to Structural elements (70 > 185)! Proprietes des materiaux!-----------------------------------/input,Material_Properties,inp! Components definition!------------------------------...!-----------------------------------------------------------------------------------------------------------! Boundary Conditions!---------------------FINISH/SOLU! Zero displacement defined at some surfaces!-------------------------------------------------------------cmsel,s,nsurf_1 ! Selects a subset of components and assembliescmsel,a,nsurf_2 ! Selects a subset of components and assembliesD,all,ux,0 ! Zero displacements in the x-axisD,all,uy,0 ! Zero displacements in the y-axisD,all,uz,0 ! Zero displacements in the z-axisallselsave!-----------------------------------------------------------------------------------------------------------! Solution of thermal-stress problem!------------------------------------/soluANTYPE,trans,new ! Specifies the analysis type and restart statusrescontrol,define,all,last ! creation des restart files pour tous les loadstep et dernier substep Dispose d'un menu contextuelTREF,2000 ! Defines the reference temperature for thermal strain calculationsallsel! Initial condition!------------------ldread,temp,1,,,2,"Thermal_Analysis",rthtime,time_array(1,1)kbc,1autots,onsolve! *do,i,1,n_time_step,1*do,i,2,10,1/solutime,time_array(i,1)autots,on ! Specifies whether to use automatic time stepping or load steppinglnsrch,on ! Activates a line search to be used with Newton-Raphsonoutres,all,all ! Controls the solution-result data written to the databaseldread,temp,i,,,1,"Thermal_Analysis",rthsolvesave*enddo
-
August 27, 2025 at 4:02 pm
Giorgos Papa
Forum ModeratorHi,
For your first question: The reference temperature should be set to the point at which the material’s thermal strain is zero. You may find this ANSYS Innovation course on Performing a Thermal-Stress Analysis useful:
For your second question: In a transient thermal analysis, it isn’t always necessary to also perform a transient structural analysis in order to capture thermal stresses accurately. The choice depends on whether thermal expansion causes dynamic vibrations in the system. If such dynamic effects are significant, then a transient structural analysis is needed to account for mass inertia. If the main objective is simply to evaluate thermal stresses, however, both static and transient structural analyses can provide comparable results after a transient thermal simulation.
Finally, regarding the APDL code you shared: troubleshooting and verifying APDL scripts falls outside the scope of what ANSYS employees can address in this public forum. Hopefully, other community members will be able to provide feedback and suggestions.
Regards,
Giorgos
-
August 28, 2025 at 1:02 pm
Amr 007
SubscriberHi Giorgos, thanks for your precious support.
For anyone interested, here is an edited version of the above code that works:
fini/clear! Lire le resultat de la thermique!———————————————————————————————————–RESUME,’Thermal_Analysis’,’db’,,0,0/reset!——————————————————————————————————–/filname,Mechanical_Analysis,1save!——————————————————————————————————–! Delete unused elements et nodes!———————————————-/prep7 ! Enters the model creation preprocessor.allselesel,s,type,,10,110,1 ! Selects a subset of elements.nsle,s,1 ! Selects those nodes attached to the selected elements.edele,all ! Deletes selected elements from the model.ndele,all ! Deletes selected nodes from the model.etdele,10,110,1 ! Deletes element types.allselcmsel,u,vol_b1 ! Unselect vol 1vclear,all ! Deletes nodes and volume elements associated with selected volumes.aslv,s ! Selects those areas contained in the selected volumeslsla,s ! Selects those lines contained in the selected areasksll,s ! Selects those keypoints contained in the selected linesvdele,all ! Deletes unmeshed volumes.adele,all ! Deletes unmeshed areas.ldele,all ! Deletes unmeshed lines.kdele,all ! Deletes unmeshed keypoints.esel,s,type,,2 ! Selects a subset of elementsedele,all ! Deletes selected elements from the modeletdele,2 ! Deletes element typesallsel! Suppression des conditions aux limites thermiques!———————————————————————lsclear,all ! Clears loads and load step options from the database! Switch Element type!—————————-ETCHG,TTS ! Converts the Thermal elements to Structural elements (70 > 185)! Proprietes des materiaux!———————————–/input,’Material_Properties’,’inp'! Components definition!——————————…!———————————————————————————————————–! Boundary Conditions!———————FINISH/SOLU! Zero displacement defined at some surfaces!————————————————————-cmsel,s,nsurf_1 ! Selects a subset of components and assembliescmsel,a,nsurf_2 ! Selects a subset of components and assembliesD,all,ux,0 ! Zero displacements in the x-axisD,all,uy,0 ! Zero displacements in the y-axisD,all,uz,0 ! Zero displacements in the z-axisallselsave!———————————————————————————————————–! Solution of thermal-stress problem!————————————/soluANTYPE,static,new ! Specifies the analysis type and restart statusrescontrol,define,all,last ! creation des restart files pour tous les loadstep et dernier substep Dispose d’un menu contextuelTREF,20 ! Defines the reference temperature for thermal strain calculationsallsel*do,i,1,n_time_step,1time,time_array(i,1)autots,on ! Specifies whether to use automatic time stepping or load steppinglnsrch,on ! Activates a line search to be used with Newton-Raphsonoutres,all,all ! Controls the solution-result data written to the databaseldread,temp,,,time_array(i,1),0,’Thermal_Analysis’,’rth’,’ ‘ ! Temperatures from a thermal analysis are applied as body force nodal loads (BF) in a structural analysissolvesave*enddoThe problems in my first code consisted of:
- Applying temperatures from the thermal analysis as as nodal loads (D).
- Using load step number of the data set to be read (which is is not a problem though, but in my case it didn’t work) instead of time-point identifying the data set to be read.
- Not using apostrophes before and after the link of the .rth file
-
August 29, 2025 at 10:29 pm
atiqbalochiw
SubscriberGreat questions — these come up a lot when doing coupled thermal–structural runs in APDL.
Reference Temperature (TREF):
If you want to compute absolute thermal strains relative to a stress-free state at room temperature (say 20 °C), then TREF should be 20 °C. That means the solver will calculate expansion/contraction compared to that baseline.
If instead your part is already stress-free at 2000 °C and you only care about incremental contraction during cooling, then set TREF to 2000 °C. This is often the case in quenching/cooling studies where the hot state is “stress-free” and all stresses arise as the body cools.
In practice: pick the TREF that corresponds to the stress-free state in your physical scenario.
Transient vs. Static Structural Analysis:
The structural field itself is quasi-static (inertia is negligible in slow cooling), so you don’t have to run a transient dynamic analysis unless rapid cooling induces inertial effects.
But: you do need to step through time consistently with the thermal analysis to capture evolving temperature distributions. That means setting up a transient structural solution (ANTYPE,TRANS) and reading in temperature fields at each thermal time step (as you’re trying to do).
If you just run a single static load step with the final temperature field, you’ll miss stresses caused by thermal gradients at intermediate times.
Time Stepping in the Structural Model:
Yes, you should apply the thermal results at each transient time step to capture the effect of cooling rate and nonuniform temperature gradients.
The structural time stepping doesn’t need tiny increments unless you expect nonlinearity (plasticity, creep, contact). But it should align with the thermal time steps you exported.
On your code issue (only reading first temperature step):
In
ldread,temp,i,,,,"Thermal_Analysis",rthyou need to loop through substeps correctly. Make sure you’ve saved the full transient thermal results (OUTRES,ALL,ALLin the thermal run) so the .RTH file actually contains multiple time points.Also, use consistent arguments:
ldread,temp,,i,,,,"Thermal_Analysis",rthwhere
imatches the load step/substep index in the thermal database.Sometimes it’s easier to do
/INPUT,thermal_results.rthinto the structural analysis with the rightLDFILE/LDREADsequence. Check thatn_time_stepandtime_arraymatch your thermal run’s saved results.
Best practice:
Define TREF as the real stress-free state (2000 °C in your description).
Run a transient structural solution to import the full temperature history.
Match your structural time steps to the saved thermal output steps.
-
September 1, 2025 at 7:46 am
Amr 007
SubscriberThank you Atiq for your detailed response.
-
- You must be logged in to reply to this topic.
-
5879
-
1906
-
1420
-
1306
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.