Dynamics of coronal structures - Magnetic field-related heating and loop energy balance