how to perform thermal analysis on an electronic component enclosed inside a closure

I want to perform a thermal analysis on an electronic component which is dissipating power of 5W and it is enclosed inside another component. I want to analyse that how the heat transfer due to convection happening between the electronic component and the air inside that enclosure. Is it possible to perform this type of analysis using thermal analysis or it requires flow simulation?

SolidworksSimulation