Skip to content

Instantly share code, notes, and snippets.

View mitchute's full-sized avatar

Matt Mitchell mitchute

  • National Renewable Energy Laboratory
  • Golden, CO
View GitHub Profile
@mitchute
mitchute / batt.json
Created March 11, 2022 17:31
Battery Example
{
"measure_name": "add_battery",
"name": "add battery 1",
"parameters": [
{
"base_value": "NonlinearMPC",
"dtype": "string",
"method": "constant",
"name": "controls"
},
@mitchute
mitchute / main.py
Created January 31, 2022 22:59
Radial-Numerical-Tests
from ghedt.peak_load_analysis_tool.borehole_heat_exchangers import SingleUTube
from ghedt.peak_load_analysis_tool.media import Pipe, Grout, Soil
from ghedt.peak_load_analysis_tool.radial_numerical_borehole import RadialNumericalBH
from pygfunction.boreholes import Borehole
from pygfunction.media import Fluid
def main():
# fluid
brine = "MPG"
@mitchute
mitchute / results.txt
Created December 23, 2021 18:03
Performance Results
200 s
3b822380cde8b305b573f9faf7cd65cf1c15156e is the first bad commit
commit 3b822380cde8b305b573f9faf7cd65cf1c15156e
Author: Matt Mitchell <matt.mitchell@nrel.gov>
Date: Fri Feb 26 12:04:42 2021 -0700
fix build errors
:040000 040000 41614e3e0f6353616563cbcdbbec22f9383e7683 f83eb369cec9e8e3df5464b34ca954676e908865 M tst
@mitchute
mitchute / builds.csv
Last active December 27, 2021 18:56
performance tests
Tag/SHA commit message
v9.2.0 v9.2.0
v9.3.0 v9.3.0
v9.4.0 v9.4.0
v9.5.0 v9.5.0
v9.6.0 v9.6.0
develop develop
@mitchute
mitchute / PythonTest.py
Last active July 12, 2021 12:32
Python Plugin Relative Humidity Actuator Example
class Test(EnergyPlusPlugin):
def __init__(self):
super().__init__()
# class member variables
self.relhum_from_output_var_handle = None
self.relhum_from_actuator_var_handle = None
self.outdoor_air_relhum_handle = None
self.outdoor_air_relhum_actuator_handle = None

Enhanced Standard 140 Integration

Proposal: develop a standard, automated method for generating most of the standard 140 reports. Most of the data, including plots, can be automatically generated. The exception are the explanations given by the modelers in the modeler's report.

To enable this, the following is proposed:

  1. Develop a Jupyter notebook which will serve as the test suite runner.
    1. Jupyter notebook will serve as the project interface.
    2. The modeler will specify the test suite configurations here. e.g. OS SHA, E+ SHA, etc.
    3. The modeler will execute the test from the notebook.
  2. Plots will be reported to the notebook.
#!/bin/bash
singularity exec --contain -e --pwd /var/simdata/openstudio -B /lustre/eaglefs/scratch/mmitchel/output/0000001:/var/simdata/openstudio -B /lustre/eaglefs/scratch/mmitchel/EnStore/measures:/lib/measures:ro -B /lustre/eaglefs/scratch/mmitchel/EnStore/resources/seeds/mdoff/5b:/lib/seeds:ro -B /lustre/eaglefs/scratch/mmitchel/EnStore/resources/weather:/lib/weather:ro -B /lustre/eaglefs/scratch/mmitchel/EnStore/resources:/lib/resources:ro enstore.sif /var/simdata/openstudio/worker.sh
from textwrap import wrap
import matplotlib.pyplot as plt
import pandas as pd
def plot(base_path: str, mod_path: str, plot_vars=None):
"""
Plots the results from two eplusout.csv files. Attempts to match the columns names and plot these series together.
Severity Code Description Project File Line Suppression State
Warning C4297 'getPluginTrendVariableValue': function assumed not to throw an exception but does energyplusapi C:\Users\mmitchel\Documents\energyplus\src\EnergyPlus\api\datatransfer.cc 304
Error C2593 'operator =' is ambiguous energypluslib C:\Users\mmitchel\Documents\energyplus\src\EnergyPlus\InputProcessing\IdfParser.cc 272
Error C2593 'operator =' is ambiguous energypluslib C:\Users\mmitchel\Documents\energyplus\src\EnergyPlus\InputProcessing\IdfParser.cc 331
Error C2593 'operator =' is ambiguous energypluslib C:\Users\mmitchel\Documents\energyplus\src\EnergyPlus\InputProcessing\InputProcessor.cc 772
Error C2593 'operator =' is ambiguous energypluslib C:\Users\mmitchel\Documents\energyplus\src\EnergyPlus\InputProcessing\InputProcessor.cc 1145
Error C2593 'operator =' is ambiguous energypluslib C:\Users\mmitchel\Documents\energyplus\src\EnergyPlus\InputProcessing\InputProcessor.cc 1228
Error C2593 'operator =' is ambiguous energypluslib C:\
This file has been truncated, but you can view the full file.
[
{
"file-name": "ChillerExhaustAbsorption.cc",
"path": "/Users/mmitchel/Projects/EnergyPlus/dev/develop/src/EnergyPlus/ChillerExhaustAbsorption.cc",
"vars": [
{
"initial-value": 0,
"is-const": false,
"is-static": false,
"line-no": 133,