Nowadays grounding systems and protection devices are designed in order to protect goods and people at the industrial frequency range (50Hz). These systems are also sized to evacuate the lightning current whose frequency can reach up to some hundreds of kHz. The sizing which has been made for 50Hz is no more efficient or optimized for this frequency range. In addition, future buildings will include more and more smart and power electronics devices which have also an impact on this frequency range and beyond. This implies a need to consider a larger frequency range up to some MHz. The aim of this paper is to present a modeling process giving an electrical equivalent circuit of grounding systems taking into account the physical characteristics of the earth. Using this electrical equivalent circuit, the current as well as potential everywhere in the studied domain can be evaluated. Results on a complex system constituted by a building, a lightning conductor, grids and a transformer connected to the network are presented. They will help the designer to choose the appropriate protection devices using a more rigorous approach instead of empiricism. To reach an optimized solution is the final goal.