If you have an existing thermal description file (a .xml file -- a list of available thermal semiconductor models for PLECS are provided here), the first step is to add this file to your thermal library search path. For reference, see the PLECS user manual > chapter "Thermal Modeling" > "Thermal Library".
There are two ways to create a thermal library search path. One is a global thermal library search path, and the second is a local thermal library search path.
1. To create a global search path, create a directory at a location of your choice, and add the thermal .xml files to this directory. Then add this directory to PLECS Preferences > Thermal >Thermal description search path, as shown in the attached screenshot. For this change to take effect, either click on the "rescan" button or re-open PLECS. These thermal files are global and will be available for use with any PLECS model.
2. To create a local library search path -- let’s say the name of your PLECS/Simulink file is “example”, then within the same directory as your PLECS model, create a new directory named “example_plecs” and add the thermal .xml files to this directory. In this method there is no need to link the search path as shown above; PLECS will automatically add these files to the thermal .xml library. However, these files will be available for that specific "example" model only.
After creating the thermal library search path using any of the two methods above, you can then select the desired thermal description from the thermal tab of the switch/diode, as shown in the attached screenshot.
If you don't already have an existing thermal description file and you need help with creating one, please refer to this video here.
Hope this helps!