How the Nitinol Shape Memory Alloy work as a Heat Engine