Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# Skip if the commit message contains "ci skip"
if: "!contains(github.event.head_commit.message, 'ci skip')"

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
# Checks-out repository under $GITHUB_WORKSPACE, so job can access it
Expand All @@ -33,11 +33,11 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.10.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
python-version: '3.12.3' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified

- name: "Install pip"
run: pip3 install --upgrade pip wheel
run: pip3 install --upgrade pip

- name: "Install BuildingsPy"
run: pip3 install git+https://github.com/lbl-srg/BuildingsPy@v5.2.0
Expand Down
8 changes: 4 additions & 4 deletions Buildings/Resources/Documentation/userGuide/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ html:
regressiontest: clean
@echo "Verify whether all files compile and no uncommitted changes exist"
@rm -rf virEnv
python -m venv virEnv
source virEnv/bin/activate
pip install -r requirements.txt --no-deps
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
python3 -m venv virEnv
source virEnv/bin/activate && \
pip install -r requirements.txt --no-deps && \
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html && \
rm -rf virEnv
git diff --exit-code .

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ We will now explain how state variables, such as temperature and pressure, can b

Consider a model consisting of a mass flow source ``Modelica.Fluid.Sources.MassFlowSource_T``, a fluid volume ``Buildings.Fluid.MixingVolumes.MixingVolume`` and
a fixed boundary condition ``Buildings.Fluid.Sources.Boundary_pT``,
connected in series as shown in the figure below. Note that the instance ``bou``
implements an equation that sets the medium pressure at its port, i.e., the port pressure ``bou.ports.p`` is fixed.
connected in series as shown in the figure below. Note that the instance ``sin``
implements an equation that sets the medium pressure at its port, i.e., the port pressure ``sin.ports.p`` is fixed.

.. figure:: img/MixingVolumeInitialization.*
:width: 300px
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,14 @@ The following rules need to be followed, in addition to the guidelines described
$ node app.js -f Buildings/Controls/OBC/ASHRAE/PrimarySystem/{path to package} -o json -m cdl


.. _sec_template:

HVAC and control templates
--------------------------

Developing HVAC and control templates, such as for `Buildings.Temlates`, is an advanced topic
which is explained in http://lbl-srg.github.io/modelica-buildings-templates/.

.. _sec_val:

Validation and unit tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Literature for Users
--------------------
The following books are useful for new users to get started:

* Modelica Buildings Library trainings documentation at https://simulationresearch.lbl.gov/modelica/training.html.
* The online book with interactive examples of Michael Tiller at https://mbe.modelica.university/.
* The books by Michael Tiller [Til2001]_ and Peter Fritzson ([Fri2011]_ and [Fri2004]_).
* The tutorials that are listed at https://modelica.org/publications.
Expand All @@ -27,9 +28,15 @@ as well as tools for workflow automation.
It also contains numerous examples that apply these technologies to the
design and operation of building and community energy systems.

Training Videos
---------------

Some of the Modelica Buildings Library trainings has posted recordings at https://simulationresearch.lbl.gov/modelica/training.html.

Spoken tutorials for beginners are available at https://spoken-tutorial.org/tutorial-search/?search_foss=OpenModelica&search_language=English.

Modelon has various online tutorials, including getting started with the Modelica Buildings Library, at
https://help.modelon.com/latest/videos/video_overview/.

Running the First Simulations
-----------------------------
Expand Down Expand Up @@ -72,7 +79,7 @@ Hence, we also recommend reading the paper about the standardization of thermo-f

The `Modelica Web Reference <https://webref.modelica.university>`_ gives a concise overview, explanation and further links about the Modelica language.

See :numref:`sec_sty_gui` for conventions and guidelines of the `Buildings` library.
See :numref:`Development` for instructions, conventions and guidelines for contributing to the `Buildings` library.


References
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/* Compatability shim for jQuery and underscores.js.
*
* Copyright Sphinx contributors
* Released under the two clause BSD licence
*/

/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};

/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;

/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};

/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};

/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();

var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];

return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@



body {

padding-top: 60px;

}
.page-top {

top: 60px;

}



.navbar-inner {
padding-left: 12px !important;
padding-right: 12px !important;
}


table {
border: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,36 @@
$(".bs-sidenav > ul > li > a").addClass("nav-header");


// back to top
setTimeout(function () {
var $sideBar = $(".bs-sidenav");
var $content = $(".content");

// Enlarge content if sidebar is larger.
if ($sideBar.outerHeight(true) > $content.outerHeight(true)) {
$content.css("min-height", $sideBar.outerHeight(true));
}

$sideBar
// Add affix.
.affix({
offset: {
top: function () {
var offsetTop = $sideBar.offset().top;
var sideBarMargin = parseInt($sideBar.css("margin-top"), 10);
var navOuterHeight = $("#navbar").outerHeight(true);

return (this.top = offsetTop - navOuterHeight);
},
bottom: function () {
return (this.bottom = $(".footer").outerHeight(true));
}
}
})
// Trigger to reset if page content is scrolled to bottom.
.trigger("scroll.bs.affix.data-api");
}, 0);


// Local TOC.
patchToc($("ul.localtoc"), 2);
Expand Down
Loading
Loading