-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1821 from ibpsa/master
Merging master into issue1707
- Loading branch information
Showing
1,157 changed files
with
63,885 additions
and
43,692 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,17 +20,17 @@ services: | |
|
||
env: | ||
global: | ||
- BUILDINGSPY_VERSION=BuildingsPy@50ac74d8e4fd067179bb38bc23140c2c9254c94c | ||
|
||
- OMC_VERSION=ubuntu-2004-omc:1.20.0_dev-314-g3033f43-1 | ||
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2023x-x86_64 | ||
- DOCKER_REPONAME=lbnlblum | ||
- [email protected] | ||
- OMC_VERSION=ubuntu-2204-omc:1.22.0_dev-41-g8a5b18f-1 | ||
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2023x-x86_64_rev-1 | ||
|
||
jobs: | ||
# Test matrix for regression tests. | ||
# The documentation is tested using github actions. | ||
- TEST_ARG="make test-bestest" | ||
- TEST_ARG="make test-dymola PACKAGE=\"IBPSA.Experimental\"" | ||
- TEST_ARG="make test-openmodelica PACKAGE=\"IBPSA.Experimental\"" | ||
- TEST_ARG="make test-dymola PACKAGE=\"IBPSA.{Examples,Experimental}\"" | ||
- TEST_ARG="make test-openmodelica PACKAGE=\"IBPSA.{Examples,Experimental}\"" | ||
- TEST_ARG="make test-dymola PACKAGE=\"IBPSA.Fluid.{Actuators,BaseClasses,Chillers,Delays,Geothermal,Examples,FMI,FixedResistances}\"" | ||
- TEST_ARG="make test-openmodelica PACKAGE=\"IBPSA.Fluid.{Actuators,BaseClasses,Chillers,Delays,Geothermal,Examples,FMI,FixedResistances}\"" | ||
- TEST_ARG="make test-dymola PACKAGE=\"IBPSA.Fluid.{HeatExchangers,HeatPumps,Humidifiers,Interfaces,MassExchangers,MixingVolumes,Movers,Sensors,Sources,Storage}\"" | ||
|
@@ -45,11 +45,11 @@ env: | |
before_install: | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
- if [[ "$TEST_ARG" == *test-dymola* || "$TEST_ARG" == *test-bestest* ]]; then | ||
docker pull "$DOCKER_USERNAME"/${DYMOLA_VERSION}; | ||
docker pull "$DOCKER_REPONAME"/${DYMOLA_VERSION}; | ||
cp IBPSA/Resources/Scripts/travis/dymola/dymola $HOME/bin/; | ||
fi; | ||
- if [[ "$TEST_ARG" == *test-openmodelica* ]]; then | ||
docker pull "$DOCKER_USERNAME"/${OMC_VERSION}; | ||
docker pull "$DOCKER_REPONAME"/${OMC_VERSION}; | ||
cp IBPSA/Resources/Scripts/travis/omc/omc $HOME/bin/omc; | ||
fi; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
IBPSA/BoundaryConditions/WeatherData/BaseClasses/PartialConvertTime.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
within IBPSA.BoundaryConditions.WeatherData.BaseClasses; | ||
partial block PartialConvertTime | ||
"Converts the simulation time to calendar time in scale of 1 year (365 days), or a multiple of a year" | ||
extends Modelica.Blocks.Icons.Block; | ||
parameter Modelica.Units.SI.Time weaDatStaTim(displayUnit="d") = 0 | ||
"Start time of weather data"; | ||
parameter Modelica.Units.SI.Time weaDatEndTim(displayUnit="d") = 31536000 | ||
"End time of weather data"; | ||
Modelica.Units.SI.Time modTimAux "Model time"; | ||
Modelica.Units.SI.Time calTimAux "Calendar time"; | ||
|
||
protected | ||
parameter Modelica.Units.SI.Time lenWea=weaDatEndTim - weaDatStaTim | ||
"Length of weather data"; | ||
|
||
parameter Boolean canRepeatWeatherFile = abs(mod(lenWea, 365*24*3600)) < 1E-2 | ||
"=true, if the weather file can be repeated, since it has the length of a year or a multiple of it"; | ||
|
||
discrete Modelica.Units.SI.Time tNext(start=0, fixed=true) | ||
"Start time of next period"; | ||
|
||
equation | ||
when {initial(), canRepeatWeatherFile and modTimAux > pre(tNext)} then | ||
// simulation time stamp went over the end time of the weather file | ||
//(last time stamp of the weather file + average increment) | ||
tNext = if canRepeatWeatherFile then integer(modTimAux/lenWea)*lenWea + lenWea else time; | ||
end when; | ||
calTimAux = if canRepeatWeatherFile then modTimAux - tNext + lenWea else modTimAux; | ||
|
||
|
||
annotation ( | ||
defaultComponentName="conTim", | ||
Documentation(info="<html> | ||
<p> | ||
This component converts the simulation time to calendar time in a scale of 1 year (365 days), | ||
or a multiple of it, if this is the length of the weather file. | ||
</p> | ||
</html>", revisions="<html> | ||
<ul> | ||
<li> | ||
March 27, 2023, by Ettore Zanetti:<br/> | ||
Added partial class for conversion from simulation time to calendar time, to be | ||
used by solar models that require calendar time for calculations.<br/> | ||
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1716\">IBPSA #1716</a>. | ||
</li> | ||
</ul> | ||
</html>"), | ||
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, | ||
100}}))); | ||
end PartialConvertTime; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
within IBPSA.Electrical.AC.Interfaces; | ||
connector PowerOutput | ||
"Connector with real power, reactive power and power factor" | ||
output Modelica.Units.SI.Power real "Real power"; | ||
output Modelica.Units.SI.ReactivePower apparent "Apparent power"; | ||
output Modelica.Units.SI.Angle phi "Phase shift"; | ||
output Real cosPhi "Power factor"; | ||
|
||
annotation (Icon(graphics={ Polygon( | ||
points={{-100,100},{100,0},{-100,-100},{-100,100}}, | ||
lineColor={0,0,127}, | ||
fillColor={255,255,255}, | ||
fillPattern=FillPattern.Solid)}), Diagram(graphics={ | ||
Polygon( | ||
points={{-100,50},{0,0},{-100,-50},{-100,50}}, | ||
lineColor={0,0,127}, | ||
fillColor={255,255,255}, | ||
fillPattern=FillPattern.Solid), Text( | ||
extent={{30,110},{30,60}}, | ||
textColor={0,0,127}, | ||
textString="%name")}), | ||
Documentation(info="<html> | ||
This connector contains multiple quantities that can be used to monitor | ||
the power consumption of a generic AC systems. | ||
</html>", revisions="<html> | ||
<ul> | ||
<li> | ||
March 19, 2015, by Marco Bonvini:<br/> | ||
Added documentation. | ||
</li> | ||
</ul> | ||
</html>")); | ||
end PowerOutput; |
Oops, something went wrong.