Modeling and design of a residential energy community with PV sharing