Self-consistent modelling of resonant tunnelling structures