A methodology for on-line calculation of temperature and thermal stress under non-linear boundary conditions