Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dchassin committed Jun 25, 2023
1 parent 22fa42b commit 008b613
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Simulation

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
build:
runs-on: ubuntu-latest
container: hipas/gridlabd:latest

steps:
- uses: actions/checkout@v3

- name: Cache IEEE 123 model
id: ieee-123-model
uses: actions/cache@v3
with:
path: 123.glm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('123.glm') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run simulation
run: gridlabd main.glm

- name: Save results
uses: actions/upload-artifact@v3
with:
name: IEEE 123 voltage profile
path: IEEE-123-voltage-profile.png

28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2023, gridlabd-tutorials

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[![Simulation](../../actions/workflows/main.yml/badge.svg)](../../actions/workflows/main.yml)

# Lesson 3 - Energy Storage

The goal this lesson is to familiarize you with the various ways of modeling generators in GridLAB-D. The specific learning objectives are the following

1. How to connect a battery.

## Batteries

Batteries can be connected to either single phase or 3-phase nodes on a network through an inverter. There are

## Tasks

The following tasks are illustrated in [`main.glm`](main.glm):

1. Add a medium size commercial battery with 50% SOC, discharging at 100 kW, using an inverter with 200 kW rated power (see [`main.glm@6`](main.glm#L6-L27))
1. Add a meter ([`main.glm@7`](main.glm#L7-L27)).
2. Add an inverter ([`main.glm@13`](main.glm#L13-L26)).
3. Add the battery ([`main.glm@16`](main.glm#L16-L25)).

# Exercises

1. Add three household batteries to `load_75`, discharging at 10 kW, each using a 20 kW inverter.

# More Information

* [Battery](https://docs.gridlabd.us/index.html?owner=arras-energy&project=gridlabd&branch=master&folder=/Module/Generators&doc=/Module/Generators/Battery.md)

# Next Lesson

* [Lesson 5 - Running simultions over time](../../../lesson-5)
29 changes: 29 additions & 0 deletions main.glm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#ifmissing "123.glm"
#model get IEEE/123
#endif
#include "123.glm"

// Task 1 - Add a 100kW
module generators;
object meter
{
parent load_1;
nominal_voltage 2401.7771;
phases ABCN;
object inverter
{
rated_power 200 kW;
object battery
{
generator_status ONLINE;
generator_mode CONSTANT_PQ;
rfb_size MED_COMMERCIAL;
use_internal_battery_model TRUE;
state_of_charge 50%;
battery_state DISCHARGING;
battery_load 100 kW;
};
};
}

#output "IEEE-123-voltage-profile.png" -t profile -l 10

0 comments on commit 008b613

Please sign in to comment.