Skip to content

Instantly share code, notes, and snippets.

View jmarrec's full-sized avatar

Julien Marrec jmarrec

View GitHub Profile
@jmarrec
jmarrec / workflow_diagram.md
Created October 31, 2023 16:40
OpenStudio Workflow Diagram

OpenStudio Workflow Diagram

flowchart TB
    InitialOSM[Active OSM Model]
    FinalOSM[Final OSM Model]
    subgraph RunModelMeasures ["Run ModelMeasures"]
        direction TB
        ModelMeasureSignature[/"run(model, runner, user_arguments)"/]
        ModelMeasureSignature ~~~ ModelMeasureA[[ModelMeasure A]] -- Modified OSM --> ModelMeasureB[[ModelMeasure B]] -- Modified OSM --> ModelMeasureC[[ModelMeasure C]]
@jmarrec
jmarrec / add_swimming_pool.rb
Last active October 20, 2023 09:50
Add a Swimming Pool to an OpenStudio model
# Created model via CLI call: `openstudio -e "m = OpenStudio::Model::exampleModel(); m.save('example_model.osm')"`
require 'openstudio'
include OpenStudio::Model
# Helper to load a model in one line
# It will raise if the path (or the model) isn't valid
#
# @param path [String] The path to the osm
# @return [OpenStudio::Model::Model] the resulting model.
def osload(path)
@jmarrec
jmarrec / .inputrc
Created September 7, 2023 17:12
inputrc
########################################################################################
# R E A D L I N E C O N F I G U R A T I O N B Y J U L I E N M A R R E C
########################################################################################
# Visible = Don't ring the bell (sound), but show it as visible ([none, visible, audible])
set bell-style none
## Be more intelligent when autocompleting by also looking at the text after
# the cursor. For example, when the current line is "cd ~/src/mozil", and
# the cursor is on the "z", pressing Tab will not autocomplete it to "cd
@jmarrec
jmarrec / G0600370.epw
Last active June 29, 2023 09:02
Sample weather file
This file has been truncated, but you can view the full file.
LOCATION,Jack Northrop Fld H,CA,USA,TMY3,722956,33.92,-118.33,-8.0,21.0
DESIGN CONDITIONS,1,Climate Design Data 2009 ASHRAE Handbook,,Heating,12,7,7.6,-9.8,1.6,17.3,-7.4,2,16.6,8,14.3,7.1,15.4,0.7,70,Cooling,7,6.5,29.9,16.7,27.8,17.9,27,17.8,21.2,26,20.5,25,19.7,24.1,3.1,250,19.1,13.9,23.6,18.7,13.6,23.2,17.8,12.8,21.6,61.2,26.2,58.7,25,56.7,24,1751,Extremes,7.3,6.3,5.6,23.8,3.9,34.4,2.2,2.4,2.3,36.1,1,37.5,-0.3,38.8,-1.9,40.6
TYPICAL/EXTREME PERIODS,6,Summer - Week Nearest Max Temperature For Period,Extreme,7/15,7/21,Summer - Week Nearest Average Temperature For Period,Typical,9/ 2,9/ 8,Winter - Week Nearest Min Temperature For Period,Extreme,1/22,1/28,Winter - Week Nearest Average Temperature For Period,Typical,1/29,2/ 4,Autumn - Week Nearest Average Temperature For Period,Typical,11/ 5,11/11,Spring - Week Nearest Average Temperature For Period,Typical,5/20,5/26
GROUND TEMPERATURES,3,.5,,,,17.11,18.68,19.67,19.99,19.47,18.20,16.60,15.01,13.92,13.63,14.20,15.45,2,,,,16.45,17.69,18.62,19.05,19.05,18.34,17.24,
@jmarrec
jmarrec / CLI11.hpp
Created May 4, 2023 19:43
Built at 4a14b78ff44ee4e25105d0ec7d6fc1fbd7bbca5e
// CLI11: Version 2.3.2
// Originally designed by Henry Schreiner
// https://github.com/CLIUtils/CLI11
//
// This is a standalone header file generated by MakeSingleHeader.py in CLI11/scripts
// from: v2.3.2-22-g4a14b78
//
// CLI11 2.3.2 Copyright (c) 2017-2023 University of Cincinnati, developed by Henry
// Schreiner under NSF AWARD 1414736. All rights reserved.
//
@jmarrec
jmarrec / StdEPWDefFormat.def
Created March 7, 2023 07:11
standard EPW format
&wthdata
NumInHour=1
InputFileType='CUSTOM'
InFormat='DELIMITED'
DataElements=year,month,day,hour,minute,datasource,Dry_Bulb_Temperature,Dew_Point_Temperature,Relative_Humidity,Atmospheric_Pressure,Extraterrestrial_Horizontal_Radiation,Extraterrestrial_Direct_Normal_Radiation,Horizontal_Infrared_Radiation_Intensity_from_Sky,Global_Horizontal_Radiation,Direct_Normal_Radiation,Diffuse_Horizontal_Radiation,Global_Horizontal_Illuminance,Direct_Normal_Illuminance,Diffuse_Horizontal_Illuminance,Zenith_Luminance,Wind_Direction,Wind_Speed,Total_Sky_Cover,Opaque_Sky_Cover,Visibility,Ceiling_Height,Present_Weather_Observation,Present_Weather_Codes,Precipitable_Water,Aerosol_Optical_Depth,Snow_Depth,Days_Since_Last_Snow,Albedo,Liquid_Precipitation_Depth,Liquid_Precipitation_Quantity
DataMissingValues=99999,99,99,99,99,,999,999,999,999999,9999,9999,9999,9999,9999,9999,999900,999900,999900,9999,999,999,99,99,9999,99999,9,999999999,999,0.999,999,99,999,999,99
DataUnits='x','x','x','x','x','x','C','C','%','Pa','Wh/m2','Wh/
@jmarrec
jmarrec / expanded.cpp
Created January 28, 2023 10:40
better enums expansion
namespace std {
inline namespace __1 {}
} // namespace std
typedef long int ptrdiff_t;
typedef long unsigned int size_t;
typedef long double max_align_t;
namespace std {
typedef decltype(nullptr) nullptr_t;
}
Version,
22.2; !- Version Identifier
Timestep,
4; !- Number of Timesteps per Hour
LifeCycleCost:Parameters,
Life Cycle Cost Parameters, !- Name
EndOfYear, !- Discounting Convention
Version,
22.1; !- Version Identifier
Timestep,
4; !- Number of Timesteps per Hour
LifeCycleCost:Parameters,
Life Cycle Cost Parameters, !- Name
EndOfYear, !- Discounting Convention
@jmarrec
jmarrec / .gitignore
Last active June 17, 2022 12:32
.gitignore example for Simulation
# =========================
# eQuest
# =========================
*.CTL
*.DSN
*.erp
*.lcr
*.lin
*.LOG