Non-linear elastic thermal stress analysis with phase changes