As living things use chemical energy, they release thermal energy in the form of heat to their surroundings. Energy enters an ecosystem as light, is converted to chemical energy by producers, and exits the ecosystem as heat. Energy is not recycled within an ecosystem, but flows through it and out. The flow of energy is always unidirectional. The energy passes from primary producers to primary consumers. From the primary consumers, the energy is passed to secondary consumers and then to tertiary consumers.