Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Thermomechanical Analysis

    • Amr 007
      Subscriber

      Hi,

      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:

      1. 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?

      2. 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,1
      save
      !--------------------------------------------------------------------------------------------------------
       
      ! Delete unused elements et nodes
      !----------------------------------------------
      /prep7                                                ! Enters the model creation preprocessor.
       
      allsel
      esel,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.
       
      allsel
      cmsel,u,vol_b1                               ! Unselect vol 1
      vclear,all                                         ! Deletes nodes and volume elements associated with selected volumes.
      aslv,s                                              ! Selects those areas contained in the selected volumes
      lsla,s                                               ! Selects those lines contained in the selected areas
      ksll,s                                               ! Selects those keypoints contained in the selected lines
      vdele,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 elements
      edele,all                                          ! Deletes selected elements from the model
      etdele,2                                           ! Deletes element types
      allsel
       
      ! 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 assemblies
      cmsel,a,nsurf_2               ! Selects a subset of components and assemblies
       
      D,all,ux,0                          ! Zero displacements in the x-axis
      D,all,uy,0                          ! Zero displacements in the y-axis
      D,all,uz,0                          ! Zero displacements in the z-axis
      allsel
      save
       
      !-----------------------------------------------------------------------------------------------------------
      ! Solution of thermal-stress problem
      !------------------------------------
      /solu
      ANTYPE,trans,new                              ! Specifies the analysis type and restart status
      rescontrol,define,all,last                       ! creation des restart files pour tous les loadstep et dernier substep Dispose d'un menu contextuel
      TREF,2000                                           ! Defines the reference temperature for thermal strain calculations
      allsel
       
      ! Initial condition
      !------------------
      ldread,temp,1,,,2,"Thermal_Analysis",rth
      time,time_array(1,1)
      kbc,1
      autots,on
      solve
       
      ! *do,i,1,n_time_step,1
      *do,i,2,10,1
      /solu
      time,time_array(i,1)
      autots,on                                      ! Specifies whether to use automatic time stepping or load stepping
      lnsrch,on                                      ! Activates a line search to be used with Newton-Raphson
      outres,all,all                                 ! Controls the solution-result data written to the database
      ldread,temp,i,,,1,"Thermal_Analysis",rth
      solve
      save
      *enddo


       

    • Giorgos Papa
      Forum Moderator

      Hi,

       

      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:

      https://innovationspace.ansys.com/courses/courses/structural-boundary-conditions/lessons/performing-a-thermal-stress-analysis-lesson-6/

       

      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

    • Amr 007
      Subscriber

       

      Hi 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,1
      save
      !——————————————————————————————————–
       
      ! Delete unused elements et nodes
      !———————————————-
      /prep7                                                ! Enters the model creation preprocessor.
       
      allsel
      esel,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.
       
      allsel
      cmsel,u,vol_b1                               ! Unselect vol 1
      vclear,all                                         ! Deletes nodes and volume elements associated with selected volumes.
      aslv,s                                              ! Selects those areas contained in the selected volumes
      lsla,s                                               ! Selects those lines contained in the selected areas
      ksll,s                                               ! Selects those keypoints contained in the selected lines
      vdele,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 elements
      edele,all                                          ! Deletes selected elements from the model
      etdele,2                                           ! Deletes element types
      allsel
       
      ! 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 assemblies
      cmsel,a,nsurf_2               ! Selects a subset of components and assemblies
       
      D,all,ux,0                          ! Zero displacements in the x-axis
      D,all,uy,0                          ! Zero displacements in the y-axis
      D,all,uz,0                          ! Zero displacements in the z-axis
      allsel
      save
       
      !———————————————————————————————————–
      ! Solution of thermal-stress problem
      !————————————
      /solu
      ANTYPE,static,new                              ! Specifies the analysis type and restart status
      rescontrol,define,all,last                       ! creation des restart files pour tous les loadstep et dernier substep Dispose d’un menu contextuel
      TREF,20                                               ! Defines the reference temperature for thermal strain calculations
      allsel
       
      *do,i,1,n_time_step,1
      time,time_array(i,1)
      autots,on                                      ! Specifies whether to use automatic time stepping or load stepping
      lnsrch,on                                      ! Activates a line search to be used with Newton-Raphson
      outres,all,all                                 ! Controls the solution-result data written to the database
      ldread,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 analysis
      solve
      save
      *enddo

       

      The problems in my first code consisted of:

       

      1. Applying temperatures from the thermal analysis as as nodal loads (D).
      2. 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.
      3. Not using apostrophes before and after the link of the .rth file
    • atiqbalochiw
      Subscriber

      Great questions — these come up a lot when doing coupled thermal–structural runs in APDL.

      1. 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.

      2. 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.

      3. 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",rth you need to loop through substeps correctly. Make sure you’ve saved the full transient thermal results (OUTRES,ALL,ALL in the thermal run) so the .RTH file actually contains multiple time points.

      • Also, use consistent arguments:

         
        ldread,temp,,i,,,,"Thermal_Analysis",rth

        where i matches the load step/substep index in the thermal database.

      • Sometimes it’s easier to do /INPUT,thermal_results.rth into the structural analysis with the right LDFILE/LDREAD sequence. Check that n_time_step and time_array match 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.

    • Amr 007
      Subscriber

       

      Thank you Atiq for your detailed response.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]