Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ endif()

# TODO: Modify the more specific variables as needed to indicate prerelease, etc
# Keep in beta in-between release cycles. Set to empty string (or comment out) for official)
set(PROJECT_VERSION_PRERELEASE "rc1")
set(PROJECT_VERSION_PRERELEASE "rc2")

# OpenStudio version: Only include Major.Minor.Patch, eg "3.0.0", even if you have a prerelease tag
set(OPENSTUDIOAPPLICATION_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
Expand Down
5 changes: 5 additions & 0 deletions FindOpenStudioSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ elseif(UNIX)
else()
set(OPENSTUDIO_EXPECTED_HASH 209820bd2f9b487f0d0f4d4df311753f)
endif()
elseif(LSB_RELEASE_ID_SHORT MATCHES "AlmaLinux")
if (ARCH MATCHES "arm64")
message(FATAL_ERROR "OpenStudio SDK for AlmaLinux is only built for x86_64")
endif()
set(OPENSTUDIO_EXPECTED_HASH 7ed93ad951b654cc6466803e365ddc17)
else()
message(FATAL_ERROR "OpenStudio SDK no longer provides packages for Ubuntu 20.04 or older")
endif()
Expand Down
1 change: 1 addition & 0 deletions ruby/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ if(BUILD_TESTING)
"/usr/share/rvm/rubies/ruby-3.2.2/bin/"
"$ENV{HOME}/.rvm/rubies/ruby-3.2.2/bin/"
"$ENV{HOME}/.rbenv/versions/3.2.2/bin/"
"/opt/rbenv/versions/3.2.2/bin/"

"C:/Ruby32-x64/bin/"

Expand Down
80 changes: 64 additions & 16 deletions src/openstudio_app/Resources/default/hvac_library.osm
Original file line number Diff line number Diff line change
Expand Up @@ -13068,7 +13068,7 @@ OS:Fan:ConstantVolume,
OS:Coil:Heating:Gas:MultiStage,
{3b1fedfa-eb94-4c41-9ff0-eb695f74535d}, !- Handle
Multi Speed HP Gas Htg Coil, !- Name
{1540674d-a780-43fe-a8dd-b0b23e85b39e}, !- Availability Schedule
{9f54092d-a4a8-41b8-a381-c4c332ecb843}, !- Availability Schedule
, !- Air Inlet Node
, !- Air Outlet Node
, !- Part Load Fraction Correlation Curve
Expand Down Expand Up @@ -13317,7 +13317,7 @@ OS:AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed,
, !- Controlling Zone or Thermostat Location
{0f1dd656-a681-48a5-839e-80d7417180c6}, !- Supply Air Fan
DrawThrough, !- Supply Air Fan Placement
{1540674d-a780-43fe-a8dd-b0b23e85b39e}, !- Supply Air Fan Operating Mode Schedule
{9f54092d-a4a8-41b8-a381-c4c332ecb843}, !- Supply Air Fan Operating Mode Schedule
{3b1fedfa-eb94-4c41-9ff0-eb695f74535d}, !- Heating Coil
-8, !- Minimum Outdoor Dry-Bulb Temperature for Compressor Operation {C}
{a76a42fb-2594-4514-afb9-fd45a05494fc}, !- Cooling Coil
Expand All @@ -13342,20 +13342,6 @@ OS:AirLoopHVAC:UnitaryHeatPump:AirToAir:MultiSpeed,
autosize, !- Speed 3 Supply Air Flow Rate During Cooling Operation {m3/s}
autosize; !- Speed 4 Supply Air Flow Rate During Cooling Operation {m3/s}

OS:Schedule:Constant,
{1540674d-a780-43fe-a8dd-b0b23e85b39e}, !- Handle
Always On Discrete, !- Name
{0dd600d4-b8cb-4c84-8eb6-780de152cd00}, !- Schedule Type Limits Name
1; !- Value

OS:ScheduleTypeLimits,
{0dd600d4-b8cb-4c84-8eb6-780de152cd00}, !- Handle
OnOff 1, !- Name
0, !- Lower Limit Value
1, !- Upper Limit Value
Discrete, !- Numeric Type
Availability; !- Unit Type

OS:Coil:Cooling:DX:VariableSpeed,
{3ef4dbff-bbcf-4645-93ab-fcd09507f984}, !- Handle
Coil Cooling DX Variable Speed - Two Speeds, !- Name
Expand Down Expand Up @@ -13607,3 +13593,65 @@ OS:Schedule:Day,
0, !- Minute 1
27; !- Value Until Time 1

OS:ZoneHVAC:EvaporativeCoolerUnit,
{d2f28626-5582-4e24-82ed-dfab77b63326}, !- Handle
Zone HVAC Evaporative Cooler Unit, !- Name
{9f54092d-a4a8-41b8-a381-c4c332ecb843}, !- Availability Schedule Name
, !- Availability Manager List Name
, !- Outdoor Air Inlet Node Name
, !- Cooler Outlet Node Name
, !- Zone Relief Air Node Name
{3247e7b6-3164-4d86-8f4e-a8238615ac29}, !- Supply Air Fan Name
autosize, !- Design Supply Air Flow Rate {m3/s}
BlowThrough, !- Fan Placement
ZoneTemperatureDeadbandOnOffCycling, !- Cooler Unit Control Method
1, !- Throttling Range Temperature Difference {deltaC}
100, !- Cooling Load Control Threshold Heat Transfer Rate {W}
{5e5b2500-4e30-4444-914c-39676a69a23b}, !- First Evaporative Cooler
, !- Second Evaporative Cooler
, !- Design Specification ZoneHVAC Sizing
100; !- Shut Off Relative Humidity {percent}

OS:Fan:SystemModel,
{3247e7b6-3164-4d86-8f4e-a8238615ac29}, !- Handle
Zone HVAC Evaporative Cooler Unit FanSystemModel, !- Name
{9f54092d-a4a8-41b8-a381-c4c332ecb843}, !- Availability Schedule Name
, !- Air Inlet Node Name
, !- Air Outlet Node Name
autosize, !- Design Maximum Air Flow Rate {m3/s}
Discrete, !- Speed Control Method
0.2, !- Electric Power Minimum Flow Rate Fraction
500, !- Design Pressure Rise {Pa}
0.9, !- Motor Efficiency
1, !- Motor In Air Stream Fraction
autosize, !- Design Electric Power Consumption {W}
PowerPerFlowPerPressure, !- Design Power Sizing Method
840, !- Electric Power Per Unit Flow Rate {W/(m3/s)}
1.66667, !- Electric Power Per Unit Flow Rate Per Unit Pressure {W-s/m3-Pa}
0.7, !- Fan Total Efficiency
, !- Electric Power Function of Flow Fraction Curve Name
, !- Night Ventilation Mode Pressure Rise {Pa}
, !- Night Ventilation Mode Flow Fraction
, !- Motor Loss Zone Name
0, !- Motor Loss Radiative Fraction
General; !- End-Use Subcategory

OS:EvaporativeCooler:Direct:ResearchSpecial,
{5e5b2500-4e30-4444-914c-39676a69a23b}, !- Handle
Zone HVAC Evaporative Cooler Unit First Evap Cooler, !- Name
{9f54092d-a4a8-41b8-a381-c4c332ecb843}, !- Availability Schedule Name
1, !- Cooler Design Effectiveness
0, !- Recirculating Water Pump Power Consumption {W}
, !- Primary Air Design Flow Rate {m3/s}
, !- Air Inlet Node Name
, !- Air Outlet Node Name
, !- Sensor Node Name
0, !- Drift Loss Fraction
0, !- Blowdown Concentration Ratio
, !- Effectiveness Flow Ratio Modifier Curve Name
0.1, !- Water Pump Power Sizing Factor {W/(m3/s)}
, !- Water Pump Power Modifier Curve Name
16, !- Evaporative Operation Minimum Drybulb Temperature
24, !- Evaporative Operation Maximum Limit Wetbulb Temperature
28; !- Evaporative Operation Maximum Limit Drybulb Temperature

4 changes: 4 additions & 0 deletions src/openstudio_lib/IconLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ IconLibrary::IconLibrary() {
m_icons[openstudio::IddObjectType(openstudio::IddObjectType::OS_ZoneHVAC_Dehumidifier_DX).value()] = new QPixmap(":/images/dehumidifier_dx.png");
m_icons[openstudio::IddObjectType(openstudio::IddObjectType::OS_ZoneHVAC_EnergyRecoveryVentilator).value()] =
new QPixmap(":/images/energy_recov_vent.png");
m_icons[openstudio::IddObjectType(openstudio::IddObjectType::OS_ZoneHVAC_EvaporativeCoolerUnit).value()] =
new QPixmap(":/images/zonehvac_evaporativecoolerunit.png");
m_icons[openstudio::IddObjectType(openstudio::IddObjectType::OS_Coil_Heating_Water_Baseboard).value()] =
new QPixmap(":/images/coilheatingwater_baseboard.png");
m_icons[openstudio::IddObjectType(openstudio::IddObjectType::OS_Coil_Heating_Water_Baseboard_Radiant).value()] =
Expand Down Expand Up @@ -701,6 +703,8 @@ IconLibrary::IconLibrary() {
new QPixmap(":/images/mini_icons/coilheatingwater_baseboard_mini.png");
m_miniIcons[openstudio::IddObjectType(openstudio::IddObjectType::OS_Coil_Heating_Water_Baseboard_Radiant).value()] =
new QPixmap(":/images/mini_icons/Coil_Heating_Water_Baseboard_Radiant.png");
m_miniIcons[openstudio::IddObjectType(openstudio::IddObjectType::OS_ZoneHVAC_EvaporativeCoolerUnit).value()] =
new QPixmap(":/images/mini_icons/zonehvac_evaporativecoolerunit.png");
m_miniIcons[openstudio::IddObjectType(openstudio::IddObjectType::OS_ZoneHVAC_FourPipeFanCoil).value()] =
new QPixmap(":/images/mini_single_ducts_constant_vol_4pipe.png");
m_miniIcons[openstudio::IddObjectType(openstudio::IddObjectType::OS_ZoneHVAC_HighTemperatureRadiant).value()] =
Expand Down
142 changes: 129 additions & 13 deletions src/openstudio_lib/LocationTabView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
#include "OSItemSelectorButtons.hpp"
#include "SchedulesTabController.hpp"

#include "../shared_gui_components/OSComboBox.hpp"
#include "../shared_gui_components/OSGridView.hpp"
#include "../shared_gui_components/OSQuantityEdit.hpp"
#include "../shared_gui_components/OSSwitch.hpp"

#include "../openstudio_app/OpenStudioApp.hpp"

Expand Down Expand Up @@ -70,6 +73,7 @@
#include <QCoreApplication>
#include <QObject>
#include <QPushButton>
#include <span>

static constexpr auto NAME("Name: ");
static constexpr auto LATITUDE("Latitude: ");
Expand Down Expand Up @@ -174,6 +178,11 @@ LocationView::LocationView(bool isIP, const model::Model& model, const QString&
weatherFileGridLayout->setContentsMargins(7, 3, 7, 7);
weatherFileGridLayout->setSpacing(7);

// ***** Measure Tags GridLayout *****
auto* siteInfoGridLayout = new QGridLayout();
siteInfoGridLayout->setContentsMargins(7, 7, 7, 7);
siteInfoGridLayout->setSpacing(7);

// ***** Measure Tags GridLayout *****
auto* measureTagsGridLayout = new QGridLayout();
measureTagsGridLayout->setContentsMargins(7, 7, 7, 7);
Expand Down Expand Up @@ -236,16 +245,13 @@ LocationView::LocationView(bool isIP, const model::Model& model, const QString&

weatherFileGridLayout->addLayout(hLayout, i++, 0);

m_latitudeLbl = new QLabel(tr("Latitude: "));
m_latitudeLbl = new QLabel(tr(LATITUDE));
weatherFileGridLayout->addWidget(m_latitudeLbl, i++, 0);

m_longitudeLbl = new QLabel(tr("Longitude: "));
m_longitudeLbl = new QLabel(tr(LONGITUDE));
weatherFileGridLayout->addWidget(m_longitudeLbl, i++, 0);

m_elevationLbl = new QLabel(tr("Elevation: "));
weatherFileGridLayout->addWidget(m_elevationLbl, i++, 0);

m_timeZoneLbl = new QLabel(tr("Time Zone: "));
m_timeZoneLbl = new QLabel(tr(TIME_ZONE));
weatherFileGridLayout->addWidget(m_timeZoneLbl, i++, 0);

// ***** Weather File Download Location *****
Expand All @@ -258,6 +264,91 @@ LocationView::LocationView(bool isIP, const model::Model& model, const QString&
leftVLayout->addLayout(weatherFileGridLayout);
leftVLayout->addStretch();

// Site Information
{
label = new QLabel(tr("Site Information:"));
label->setObjectName("H2");
leftVLayout->addWidget(label);

i = 0;

{
label = new QLabel(tr("Keep Site Location Information"));
label->setToolTip(tr("If enabled, this will write the Site:Location object that will keep the Elevation change for example."));

m_keepSiteLocationInfo = new OSSwitch2();

m_keepSiteLocationInfo->bind(*m_site, BoolGetter([this] { return m_site->keepSiteLocationInformation(); }),
boost::optional<BoolSetter>([this](bool b) {
bool result = m_site->setKeepSiteLocationInformation(b);

if (result) {

// force the style to update
m_elevation->clearCachedText();

if (b) {
// set elevation if turning on
if (m_site->isElevationDefaulted()) {
m_site->setElevation(m_weatherFileElevation);
} else {
m_site->setElevation(m_site->elevation());
}
} else {
// reset elevation if turning off
if (std::abs(m_weatherFileElevation) > 0.01) {
m_site->setElevation(m_weatherFileElevation);
} else {
m_site->resetElevation();
}
}
}
return result;
}),
boost::optional<NoFailAction>([this] { m_site->resetKeepSiteLocationInformation(); }),
boost::optional<BasicQuery>([this] { return m_site->isKeepSiteLocationInformationDefaulted(); }));

siteInfoGridLayout->addWidget(label, i, 0);
siteInfoGridLayout->addWidget(m_keepSiteLocationInfo, i++, 1);
}
{
label = new QLabel(tr(ELEVATION));
label->setToolTip(tr("Elevation affects the wind speed at the site, and is defaulted to the Weather File's elevation"));

m_elevation = new OSQuantityEdit2("m", "m", "ft", m_isIP);
connect(this, &LocationView::toggleUnitsClicked, m_elevation, &OSQuantityEdit2::onUnitSystemChange);

// Bind is delayed until after update() is called, so that the weatherFileElevation is set correctly.

m_elevation->setFixedWidth(200);

siteInfoGridLayout->addWidget(label, i, 0);
siteInfoGridLayout->addWidget(m_elevation, i++, 1);
}
// Terrain
{
label = new QLabel(tr("Terrain"));
label->setToolTip(tr("Terrain affects the wind speed at the site."));

m_terrain = new OSComboBox2();
m_terrain->bind<std::string>(*m_site, static_cast<std::string (*)(const std::string&)>(&openstudio::toString), &model::Site::validTerrainValues,
std::bind(&model::Site::terrain, m_site.get_ptr()),
std::bind(&model::Site::setTerrain, m_site.get_ptr(), std::placeholders::_1),
boost::optional<NoFailAction>(std::bind(&model::Site::resetTerrain, m_site.get_ptr())),
boost::optional<BasicQuery>(std::bind(&model::Site::isTerrainDefaulted, m_site.get_ptr())));

m_terrain->setFixedWidth(200);

siteInfoGridLayout->addWidget(label, i, 0);
siteInfoGridLayout->addWidget(m_terrain, i++, 1);
}

// ***** Site Info GridLayout *****
siteInfoGridLayout->setColumnStretch(++i, 10);
leftVLayout->addLayout(siteInfoGridLayout);
leftVLayout->addStretch();
}

// ***** Climate Zones *****
label = new QLabel(tr("Measure Tags (Optional):"));
label->setObjectName("H2");
Expand Down Expand Up @@ -400,11 +491,37 @@ LocationView::LocationView(bool isIP, const model::Model& model, const QString&
connect(m_itemSelectorButtons, &OSItemSelectorButtons::purgeClicked, m_designDaysGridView, &DesignDayGridView::onPurgeClicked);

update();
{
m_elevation->bind(m_isIP, *m_site, DoubleGetter([this] { return m_site->elevation(); }), boost::optional<DoubleSetter>([this](double d) {
// turn keep site info on
m_site->setKeepSiteLocationInformation(true);
return m_site->setElevation(d);
}),
boost::optional<NoFailAction>([this] {
// turn keep site info off
m_site->setKeepSiteLocationInformation(false);

// force the style to update
m_elevation->clearCachedText();

if (std::abs(m_weatherFileElevation) > 0.01) {
m_site->setElevation(m_weatherFileElevation);
} else {
m_site->resetElevation();
}
}),
boost::none, // autosize
boost::none, // autocalculate
boost::optional<BasicQuery>([this] { //
return (m_site->isElevationDefaulted() || !m_site->keepSiteLocationInformation());
}));
}

onSelectItem();
}

LocationView::~LocationView() {
// m_terrain->unbind(); // NOTE: I don't think this is necessary
saveQSettings();
}

Expand Down Expand Up @@ -496,6 +613,7 @@ void LocationView::update() {

if (fileExists) {
m_weatherFileBtn->setText(tr("Change Weather File"));
m_weatherFileElevation = weatherFile->elevation();
setSiteInfo();
} else {
m_weatherFileBtn->setText(tr("Set Weather File"));
Expand Down Expand Up @@ -526,11 +644,6 @@ void LocationView::setSiteInfo() {
info += temp;
m_longitudeLbl->setText(info);

info = tr(ELEVATION);
temp.setNum(m_site->elevation());
info += temp;
m_elevationLbl->setText(info);

info = tr(TIME_ZONE);
temp.setNum(m_site->timeZone());
info += temp;
Expand All @@ -544,9 +657,9 @@ void LocationView::clearSiteInfo() {

m_longitudeLbl->setText(tr(LONGITUDE));

m_elevationLbl->setText(tr(ELEVATION));

m_timeZoneLbl->setText(tr(TIME_ZONE));

m_weatherFileElevation = 0.0;
}

// ***** SLOTS *****
Expand Down Expand Up @@ -637,7 +750,10 @@ void LocationView::onWeatherFileBtnClicked() {
m_site->setName(weatherFile->city());
m_site->setLatitude(weatherFile->latitude());
m_site->setLongitude(weatherFile->longitude());
m_weatherFileElevation = weatherFile->elevation();
m_site->setKeepSiteLocationInformation(false);
m_site->setElevation(weatherFile->elevation());
m_site->resetTerrain();
m_site->setTimeZone(weatherFile->timeZone());

m_lastEpwPathOpened = QFileInfo(fileName).absoluteFilePath();
Expand Down
Loading
Loading