Skip to content

Thermo-mechanical coupling

This example shows a coupled transient thermo-mechanical analysis. A rectangular domain is clamped on its left edge and loaded by temperature, see the figure below.

Thermo-mechanical problem setup

Problem setup

  • Thermal problem. Heat convection on the top edge with an ambient temperature of 10 °C. The left and bottom edges have a prescribed temperature of 0 °C, and the right edge has no boundary condition. The initial temperature is 0 °C, the heat conductivity is 1 W/m/K, the heat capacity is 1.0 J/kg/K and the density is 1.0 kg/m³.
  • Mechanical problem. Young's modulus 30 GPa, Poisson's ratio 0.25, coefficient of linear thermal expansion 12×10⁻⁶ °C⁻¹.
  • Time integration. A constant time step of 1 s, 10 steps in total.

In each time step, the temperature distribution is solved in the whole domain first. The temperature field is then passed to the mechanical analysis, which evaluates the corresponding displacement field. The thermal and mechanical problems use different discretizations: 50 linear elements for the thermal problem and 160 for the mechanical one. The platform takes care of the field interpolation.

Evolution of temperature and deformation

The workflow

The core of the workflow passes the temperature field from the thermal model to the mechanical model in every time step:

import mupif as mp

class ThermoMechanical(mp.Workflow):

    def solveStep(self, istep, stageID=0, runInBackground=False):
        self.getModel('thermal').solveStep(istep, stageID, runInBackground)
        self.getModel('mechanical').set(
            self.getModel('thermal').get(mp.DataID.FID_Temperature, istep.getTime()))
        self.getModel('mechanical').solveStep(istep, stageID, runInBackground)

The same workflow runs unchanged whether the two models are local or remote. In the distributed variant, the thermal model runs on a server and the mechanical model on a local computer, and they communicate over the VPN.

Temperature and displacement fields

Try it

The complete examples are part of the MuPIF distribution:

The workflow can also be composed graphically in the workflow editor, which ships it as a built-in example.


(since February, 2023)