Multi-scale electrothermal simulation and modelling of resistive random access memory devices