NOVELTY - The method involves recovering electrical energy from a renewable energy source (E1). The recovered energy is distributed (E2) and controlled such that a portion of the recovered energy is fed into a power grid and a processing system in two configurations, respectively. Distribution of the electrical energy is controlled (E3) by determining a storage status of a store and a duration for providing a predetermined portion of a content of the store. The portion of the recovered energy fed into the processing system is converted (E4) into a product i.e. hydrogen, to be stored in the store.    USE - Method for managing energy to be distributed between a power grid and a processing system for storing a part of the energy in a store in a form of a hydrogen containing product i.e. dihydrogen, that is utilized by a fuel cell in a building e.g. nuclear power plant and gas power station. Can also be used for an organic compound e.g. methanol, methane, formic acid and dimethyl ether, and ammonia.    ADVANTAGE - The distribution of the electrical energy is controlled by determining the storage status of the store and the duration for providing the predetermined portion of the content of the store, thus enabling optimization of distribution of the electrical energy and storage of a part of the electrical energy in a form of a hydrogen containing product.    DETAILED DESCRIPTION - INDEPENDENT CLAIMS are also included for the following:    (1) an energy managing device    (2) a data readable recording medium comprising a set of instructions for executing a method for managing energy    (3) a computer program comprising a set of instructions for executing a method for managing energy.    DESCRIPTION OF DRAWING(S) - The drawing shows a flow chart illustrating a method for managing energy to be distributed between a power grid and a processing system.'(Drawing includes non-English language text)'    Step for recovering electrical energy from renewable energy source (E1)    Step for distributing recovered electrical energy (E2)    Step for controlling distribution of electrical energy (E3)    Step for converting portion of recovered electrical energy into product (E4)    Step for storing product in store (E5)