In 2019, the European Union introduced two new actors in the European energy system: Renewable and Citizen Energy Communities (RECs and CECs). Modelling these two new actors and their effects on the energy system is crucial when implementing the European Legislation, incorporating energy communities (ECs) into the electric grid, planning ECs, and conducting academic research. This paper aims to bridge the gap between the letter of the law and numerical models of ECs. After introducing RECs and CECs, we list elements of the law to be considered by regulators, distribution system operators, EC planners, researchers, and other stakeholders when modelling ECs. Finally, we provide three case studies of EC models that explicitly include elements of the European Law.