A discrete model for energy transfer and its application to aluminate and octaborate