A thermal fluid dynamics framework applied to multi-component substrates experiencing fusion and vaporisation state transitions