Code Monkey home page Code Monkey logo

spawn's Introduction

Spawn

Spawn is a software package for performing co-simulations involving EnergyPlus and Modelica. The primary interface to spawn is the command line interface, spawn, which provides the following capabilities in one self contained executable software tool.

  1. A Modelica compiler toolchain for compiling Modelica source to Functional Mockup Unit (FMU) format
  2. A method for simulating a Functional Mockup Unit
  3. A method for exporting EnergyPlus models to FMU format

Additionally, the Spawn package bundles the Modelica Standard Library and the Modelica Buildings Library (MBL), and the built in compiler is preconfigured to utilize these libraries. The Buildings Library now includes custom models for interfacing seemlessly with EnergyPlus, without leaving the Modelica environment. Spawn's capability to export EnergyPlus models to FMU format is used behind the scenes to enable communication, between Modelica and EnergyPlus, however the necessary complexity is abstracted to create a user friendly environment.

The Spawn installation package is fully self contained, and there are no external third party dependencies. Together the capabilities in this package, provide a single integrated environment for performing hybrid Modelica and EnergyPlus simulations.

Installation

Binary packages for Ubuntu Linux 18.04 are published on GitHub, https://github.com/NREL/Spawn/releases. Extract the package to a location of your choosing and optionally put the bin/spawn executable in your system path.

Additional computer platforms, including versions of Mac OS and Windows will be supported in future releases.

Example Usage

Detailed help is built into the command line program spawn --help.

  • Compile a Modelica model to FMU format. Models contained with the Modelica Buildings Library and the Modelica Standard Library are included and available to the compiler by default.
spawn modelica --create-fmu Buildings.Examples.Tutorial.Boiler.System1
  • Compile a Modelica model, which internally leverages EnergyPlus.
spawn modelica --create-fmu Buildings.ThermalZones.EnergyPlus.Validation.ThermalZone.OneZoneOneYear
  • Compile a Modelica model using user defined libraries.
spawn modelica --modelica-path /sim/mixed_loads --create-fmu mixed_loads.Districts.DistrictEnergySystem
  • After generating a Functional Mockup Unit, run a simulation. Results will be generated to the file Buildings_Controls_OBC_CDL_Continuous_Validation_Line.csv.
spawn fmu --simulate Buildings_Controls_OBC_CDL_Continuous_Validation_Line.fmu --start 0.0 --stop 3600 --step 0.01

Compiling from source

apt install libllvm10 llvm-10-dev clang-10 libclang-10-dev liblld-10-dev liblld-10-dev gfortran
pip install conan
  • If neccessary add variables to locate llvm and clang. (not required for apt-get installed linux packages)
export LLVM_DIR=/path/to/llvm/
export Clang_DIR=/path/to/clang/
gu install native-image
  • Then follow the normal cmake build process.
git clone --recurse-submodules https://github.com/NREL/spawn.git
cd spawn
mkdir build
cd build
cmake ../
make -j

spawn's People

Contributors

kbenne avatar lefticus avatar jmythms avatar mwetter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.