Skip to content

Commit

Permalink
Updated Spawn installation instructions (#4057)
Browse files Browse the repository at this point in the history
This is for #4055
  • Loading branch information
mwetter authored Nov 22, 2024
1 parent 07dfbd5 commit ba8277f
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 22 deletions.
72 changes: 69 additions & 3 deletions Buildings/ThermalZones/EnergyPlus_24_2_0/UsersGuide.mo
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,76 @@ The official release of the Modelica Buildings Library that can be downloaded at
<a href=\"https://simulationresearch.lbl.gov/modelica/download.html\">simulationresearch.lbl.gov/modelica/download.html</a>
contains all binaries required to simulated the models in
<a href=\"modelica://Buildings.ThermalZones\">Buildings.ThermalZones_24_2_0</a>.
You should not have to do any other installations or settings.
You should not have to do any other installations or settings and skip the instructions below.
</p>
<p>
However, binaries can also be downloaded and installed manually,
However, binaries can also be downloaded and installed either using an installation script or
using a manual installation.
This is only required for users who clone the <code>Buildings</code> library from github.
Developers may install or build these binaries individually.
</p>
<p>
There are three different binaries:
</p>
<ol>
<li>
The <i>Spawn of EnergyPlus library</i> that contains a special version of EnergyPlus.
</li>
<li>
The <i>Modelica to EnergyPlus library</i> that provides a layer to link
Modelica with EnergyPlus.
</li>
<li>
The <i>fmi-library</i> that provides the API functions that communicate
with EnergyPlus.
</li>
</ol>
<p>
To install or build these libraries, proceed as described below.
</p>
<h5>Spawn of EnergyPlus library</h5>
<p>
If the Buildings library is cloned from github, then the EnergyPlus
libraries need to be installed by running
</p>
<pre>
Buildings/Resources/src/ThermalZones/install.py --binaries-for-os-only
</pre>
<p>
To install the binaries for all operating systems, omit the flag <code>--binaries-for-os-only</code>.
</p>
<h5>Modelica to EnergyPlus</h5>
<p>
Rebuilding this library requires CMake to be installed.
</p>
<p>
To rebuild the library, run
</p>
<pre>
cd modelica-buildings
rm -rf build &amp;&amp; mkdir build &amp;&amp; cd build &amp;&amp; &#92;
cmake ../ &amp;&amp; cmake --build . --target install &amp;&amp; &#92;
cd .. &amp;&amp; rm -rf build
</pre>
<h5>fmi-library</h5>
<p>
Rebuilding this library requires CMake to be installed.
</p>
<p>
To rebuild the library, run
</p>
<pre>
cd Buildings/Resources/src/fmi-library
rm -rf build &amp;&amp; mkdir build &amp;&amp; &#92;
cd build &amp;&amp; cmake .. &amp;&amp; cmake --build . &amp;&amp; &#92;
cd .. &amp;&amp; rm -rf build
</pre>
<h5>Manual installation of the libraries without using a script</h5>
<p>
Alternatively, instead of using <code>install.py</code>,
the binaries can be downloaded from the following links:
</p>
<table summary=\"Download instructions\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
Expand Down Expand Up @@ -416,7 +482,7 @@ Conventionally, EnergyPlus handles this requirement using a warmup period,
and in Spawn the traditional EnergyPlus warmup algorithm is employed
to initialize unconnected zones.
The EnergyPlus warmup algorithm is described in the
<a href=\"https://bigladdersoftware.com/epx/docs/9-3/engineering-reference/warmup-convergence.html#warmup-convergence\">
<a href=\"https://bigladdersoftware.com/epx/docs/24-2/engineering-reference/warmup-convergence.html#warmup-convergence\">
EnergyPlus Engineering Reference</a>, and summarized in the following steps.
</p>
<ol>
Expand Down
70 changes: 68 additions & 2 deletions Buildings/ThermalZones/EnergyPlus_9_6_0/UsersGuide.mo
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,76 @@ The official release of the Modelica Buildings Library that can be downloaded at
<a href=\"https://simulationresearch.lbl.gov/modelica/download.html\">simulationresearch.lbl.gov/modelica/download.html</a>
contains all binaries required to simulated the models in
<a href=\"modelica://Buildings.ThermalZones\">Buildings.ThermalZones_9_6_0</a>.
You should not have to do any other installations or settings.
You should not have to do any other installations or settings and skip the instructions below.
</p>
<p>
However, binaries can also be downloaded and installed manually,
However, binaries can also be downloaded and installed either using an installation script or
using a manual installation.
This is only required for users who clone the <code>Buildings</code> library from github.
Developers may install or build these binaries individually.
</p>
<p>
There are three different binaries:
</p>
<ol>
<li>
The <i>Spawn of EnergyPlus library</i> that contains a special version of EnergyPlus.
</li>
<li>
The <i>Modelica to EnergyPlus library</i> that provides a layer to link
Modelica with EnergyPlus.
</li>
<li>
The <i>fmi-library</i> that provides the API functions that communicate
with EnergyPlus.
</li>
</ol>
<p>
To install or build these libraries, proceed as described below.
</p>
<h5>Spawn of EnergyPlus library</h5>
<p>
If the Buildings library is cloned from github, then the EnergyPlus
libraries need to be installed by running
</p>
<pre>
Buildings/Resources/src/ThermalZones/install.py --binaries-for-os-only
</pre>
<p>
To install the binaries for all operating systems, omit the flag <code>--binaries-for-os-only</code>.
</p>
<h5>Modelica to EnergyPlus</h5>
<p>
Rebuilding this library requires CMake to be installed.
</p>
<p>
To rebuild the library, run
</p>
<pre>
cd modelica-buildings
rm -rf build &amp;&amp; mkdir build &amp;&amp; cd build &amp;&amp; &#92;
cmake ../ &amp;&amp; cmake --build . --target install &amp;&amp; &#92;
cd .. &amp;&amp; rm -rf build
</pre>
<h5>fmi-library</h5>
<p>
Rebuilding this library requires CMake to be installed.
</p>
<p>
To rebuild the library, run
</p>
<pre>
cd Buildings/Resources/src/fmi-library
rm -rf build &amp;&amp; mkdir build &amp;&amp; &#92;
cd build &amp;&amp; cmake .. &amp;&amp; cmake --build . &amp;&amp; &#92;
cd .. &amp;&amp; rm -rf build
</pre>
<h5>Manual installation of the libraries without using a script</h5>
<p>
Alternatively, instead of using <code>install.py</code>,
the binaries can be downloaded from the following links:
</p>
<table summary=\"Download instructions\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse:collapse;\">
Expand Down
48 changes: 31 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Instructions for developers are available on the [wiki](https://github.com/lbl-s

The Modelica Buildings library is a free open-source library with dynamic simulation models for building energy and control systems. The library contains models for

- HVAC systems,
- energy storage,
- HVAC systems for buildings, district energy systems, and data centers,
- components and systems with energy storage,
- controls, including a reference implementation of ASHRAE Standard 231P,
- heat transfer among rooms and the outside, either
- natively in Modelica with a detailed or a reduced order model, or
Expand Down Expand Up @@ -47,38 +47,52 @@ Prior to issuing a pull request, make sure your code follows the [style guide an
## Building binaries

The distribution at https://simulationresearch.lbl.gov/modelica/download.html
contains all binaries.
contains all binaries, and users need not do any other step.

Developers may build the binaries as follows.
Developers may install or build these binaries individually.

### Spawn of EnergyPlus
There are three different binaries:
1. The *Spawn of EnergyPlus library* that contains a special version of EnergyPlus.
2. The *Modelica to EnergyPlus library* that provides a layer to link
Modelica with EnergyPlus.
3. The *fmi-library* that provides the API functions that communicate
with EnergyPlus.

The Buildings library already contains the compiled binaries that are needed to link to EnergyPlus.
To install or build these libraries, proceed as described below.

To rebuild the Spawn of EnergyPlus binaries, CMake is required. The binaries
consist of the fmi-library, and a library that connects Modelica to EnergyPlus.
### Spawn of EnergyPlus library

If the Buildings library is cloned from github, then the EnergyPlus
libraries need to be installed by running

To build the fmi-library, which is only needed if https://github.com/modelon-community/fmi-library is updated, run
```
cd Buildings/Resources/src/fmi-library
rm -rf build && mkdir build && \
cd build && cmake .. && cmake --build . && \
cd .. && rm -rf build
Buildings/Resources/src/ThermalZones/install.py --binaries-for-os-only
```
To install the binaries for all operating systems, omit the flag `--binaries-for-os-only`

### Modelica to EnergyPlus

Rebuilding this library requires CMake to be installed.

To build the Modelica to EnergyPlus library, run
To rebuild the library, run
```
cd modelica-buildings
rm -rf build && mkdir build && cd build && \
cmake ../ && cmake --build . --target install && \
cd .. && rm -rf build
```

To install the EnergyPlus binaries for the Spawn interface for the current operating system, run
### fmi-library

Rebuilding this library requires CMake to be installed.

To rebuild the library, run
```
Buildings/Resources/src/ThermalZones/install.py --binaries-for-os-only
cd Buildings/Resources/src/fmi-library
rm -rf build && mkdir build && \
cd build && cmake .. && cmake --build . && \
cd .. && rm -rf build
```
To install the binaries for all operating systems, omit the flag `--binaries-for-os-only`

## Citation

Expand Down

0 comments on commit ba8277f

Please sign in to comment.