Simulate a house with added solar and energy storage. It's also got an electric vehicle. By default it uses weather data from Vermont.
Eventually I'll try to aggregate a bunch of these together to look at regional and national building energy. But that's a lot harder than just whipping up a little python and gridlabd.
Here's what the output looks like, a summary of consumption, generation, temperatures, and total cost:
| --- ev charger
| --- waterheater
meter --- house --- | --- responsive loads (washing machine, dryer, dishwasher, ...)
| | --- unresponsive loads (lights, TV, other plug loads, ...)
|
| --- inverter --- battery
| --- inverter --- solar
First you'll need to install the prerequisites: Python, gridlabd, and matplotlib (pip install matplotlib
).
Then do a git clone https://github.com/dpinney/NetZeroEnergyHouseSim.git
or just download the thing.
The main outputs are in out_all_charts.png, and they're regenerated when you run python consumerSim.py
. The .csv outputs are also regenerated and are all named "out_....csv".
Edit in_superHouse.glm and change:
- The timespan of the simulation by editing the clock object starting on line 1.
- The climate, defined on line 30, can be switched to other the cities using files in_climates....csv or any TMY3 file.
- Insulation, square footage, heating system type, etc. for the house starting on line 47.
- Specs on the solar system starting on line 151.
- The energy storage system, which I confess I haven't really put on a schedule for charging/discharging, starting on line 182.
- Probably other things. Gridlabd includes a full distribution system simulator, so you can build a neighborhood of houses. Or play with wind generation. Or gas. Or thermal storage.
In general, the gridlabd objects are tricky, but you can get most of the available options from the documentation for the residential module and the generators module.
- Consumer Level (done)
- Neighborhood, distribution, transmission operator (kinda boring, renewables will have about the same output)
- ISO (interesting)
- XXX A little bit of plotting.
- XXX Additional devices? See superHouse.glm.
- XXX Switch to superHouse.glm.
- XXX Parse and display datetimes correctly.
- XXX chart all the loads.
- XXX chart the generation as negative load.
- XXX Hey, uh what are the gridlab-d attributes? gridlabd --modhelp residential; gridlabd --modhelp gernea
- XXX Units on all variables out of GridLAB-D.
- XXX Bill in dollars.
- XXX Try a second climate? Gave some more TMY2 options. You could also grab a new TMY3 file.
- XXX Clean up subplots.
- OOO What about scheduling and using the battery?