Energy Communities: From European Law to Numerical Modeling · Study