Empirical Modelling of ReRAM Measured Characteristics Using Charge and Flux