Device to device (D2D) communications is a promising concept to improve data rates and the energy efficiency of mobile networks. User devices (UEs) participated in D2D communications may increase their own data rates by retrieving the content from their neighboring peers instead of from the base stations. Meanwhile, UEs may drain their batteries while performing as content providers and transmitting the content to their peers. Increasing the data rates of D2D communications is desirable to alleviate the UEs' power consumption. In this paper, we propose a novel green relay assisted D2D communication architecture, in which the relay nodes powered by green energy are deployed to increase the data rates of D2D communications. However, achieving the optimal relay assignment for green relay assisted D2D communications is challenging. We propose a heuristic green relay assignment algorithm which maximizes the minimum data rates of the D2D pairs while considering the green load capacity of the relay nodes. We show that the proposed algorithm approximates the optimal solution with low computational complexity, and validate its performance by using simulation results.