I've been wondering, what would be a scientific approach to cooling a handheld device that generates power by using an internal heat source, by the means of things like Stirling engines and/or the Seebeck effect?
Of course one could use some form of radiator with a cooling fan, but I wanted one that would work as well in vacuum as it would inside an atmosphere... So, are there good ways of quickly dispersing heat or using it for work that would work in a closed system?
Also, is there maybe a way of forcing the heat away into a direction even if against the thermal gradient, as to force the cold part of the generators cool quicker?
Edit: Adding more information to the question.
So, the device I'm thinking of would be a science-based plasma weapon, like a plasma saber or plasma gun, I'm not too concerned about the weapon itself, but more on it's battery/generator, which would use a constant source of heat, like a radioisotope to generate energy, and it would keep generating energy constantly.
Because of that, I was thinking of ways to keep this battery having high internal temperatures for good power generation, but still cold to the touch outside, and that it could run underwater, on an atmosphere or in space without overheating and maybe melting down and leaking radiation on the people around.
It's for a RPG, so I wanted to get details and the scientific approach so players can get creative with it