udk-vpt / buildingsystems Goto Github PK
View Code? Open in Web Editor NEWModelica BuildingSystems library
Home Page: http://modelica-buildingsystems.de/
License: BSD 3-Clause "New" or "Revised" License
Modelica BuildingSystems library
Home Page: http://modelica-buildingsystems.de/
License: BSD 3-Clause "New" or "Revised" License
Integration tests of the new netcdf data reader:
https://github.com/tbeu/netCDF-DataReader
The temperature of the outter interface heatSourcesPorts
of the zone model zoneTemplateAirvolumeMixed
is constant and equal to 20 °C.
This information/temperature is then forwarded to the outter interface of the building models heatSourcesPorts[nHeatSources]
and used to connect external heating or cooling installations (BuildingSystems.Applications.HeatingSystems.WaterHeatingSystem
, ...)
The temperature is set with heatPort.T = 293.15;
in the model BuildingSystems.Buildings.BaseClasses.RelationRadiationConvection
To solve it, it should be first decided which temperature should be linked to the heatPort
heatPort.T = heatPortCv.T ;
heatPort.T = heatPortLw.T ;
Error is thrown in standard check mode (so not pedantic
):
To reproduce, use
checkModel("BuildingSystems.Technologies.Photovoltaics.BaseClasses.ElectricalModels.ElectricalModelTwoDiodesGeneral")
The Wiki describes how to check the HTML documentation in the mo files:
https://github.com/UdK-VPT/BuildingSystems/wiki/Correct-HTML
The script finds some errors.
When running BuildingSystems.Fluid.Movers.FlowControlled_m_flow
with MSL.Water in pedantic mode I get:
`The value=0 not in range [611.657,1e+008] for variable pump.preSou.dp_start.``
Example:
model Source2Pump_
// replaceable package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater;
replaceable package Medium = Modelica.Media.Water.WaterIF97OnePhase_ph;
inner Modelica.Fluid.System system
annotation (Placement(transformation(extent={{-84,72},{-64,92}})));
BuildingSystems.Fluid.Sources.Boundary_pT boundary(
redeclare package Medium = Medium,
nPorts=1) annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=0,
origin={-70,14})));
BuildingSystems.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = Medium,
nPorts=1) annotation (Placement(transformation(
extent={{-10,-10},{10,10}},
rotation=180,
origin={60,14})));
BuildingSystems.Fluid.Movers.FlowControlled_m_flow pump(
redeclare package Medium = Medium,
m_flow_nominal=1,
inputType=BuildingSystems.Fluid.Types.InputType.Constant)
annotation (Placement(transformation(
extent={{-10,10},{10,-10}},
rotation=0,
origin={16,14})));
equation
connect(pump.port_b, bou.ports[1])
annotation (Line(points={{26,14},{38,14},{50,14}}, color={0,127,255}));
connect(boundary.ports[1], pump.port_a)
annotation (Line(points={{-60,14},{-28,14},{6,14}}, color={0,127,255}));
end Source2Pump_;
That is valid Modelica, but OpenModelica does not yet support it:
https://trac.openmodelica.org/OpenModelica/ticket/4541
We could (here, in this model) easily rewrite the FluidStorage model to use nEle
instead of end
.
Also, the for-loops could be rewritten from e.g.
for i in 1:nEle-3 loop
connect(vol[i].ports[2], vol[i+1].ports[1]);
end for;
to the shorter form
connect(vol[1:nEle-3].ports[2], vol[2:nEle-2].ports[1]);
The tests listed in the file
Resources/Scripts/skipUnitTestList.txt
take very long to simulate or are broken (i.e. BuildingsPy cannot parse them).
Could everybody please check whether you created one of the mos scripts and try to fix it?
If no easy fix is available, just leave it on the skip list.
Anyone who managed to get this example: DistrictHeatingNetwork_dp working, could give me a help? I keep getting this compilation error:
Compiler message:
Compiling and linking the model (GCC).
dsmodel.c: In function 'equations_31':
dsmodel.c:11931:47: warning: passing argument 1 of 'StringTemporaryDense' from incompatible pointer type [-Wincompatible-pointer-types]
StringElement( StringTemporaryDense( &DYNX(DYNAuxStr_,26+DYNStrInit(did_)),
^
In file included from C:/Program Files (x86)/Dymola 2018/Source/matrixop.h:11:0,
from dsmodel.c:7:
C:/Program Files (x86)/Dymola 2018/Source/matrixop1.h:490:27: note: expected 'const char **' but argument is of type 'char **'
DYMOLA_STATIC StringArray StringTemporaryDense(String*d,SizeType ndims,...);
^~~~~~~~~~~~~~~~~~~~
dsmodel.c:12100:47: warning: passing argument 1 of 'StringTemporaryDense' from incompatible pointer type [-Wincompatible-pointer-types]
StringElement( StringTemporaryDense( &DYNX(DYNAuxStr_,45+DYNStrInit(did_)),
^
In file included from C:/Program Files (x86)/Dymola 2018/Source/matrixop.h:11:0,
from dsmodel.c:7:
C:/Program Files (x86)/Dymola 2018/Source/matrixop1.h:490:27: note: expected 'const char **' but argument is of type 'char **'
DYMOLA_STATIC StringArray StringTemporaryDense(String*d,SizeType ndims,...);
^~~~~~~~~~~~~~~~~~~~
dsmodel.c: In function 'equations_32':
dsmodel.c:12229:47: warning: passing argument 1 of 'StringTemporaryDense' from incompatible pointer type [-Wincompatible-pointer-types]
StringElement( StringTemporaryDense( &DYNX(DYNAuxStr_,7+DYNStrInit(did_)),
^
In file included from C:/Program Files (x86)/Dymola 2018/Source/matrixop.h:11:0,
from dsmodel.c:7:
C:/Program Files (x86)/Dymola 2018/Source/matrixop1.h:490:27: note: expected 'const char **' but argument is of type 'char **'
DYMOLA_STATIC StringArray StringTemporaryDense(String*d,SizeType ndims,...);
^~~~~~~~~~~~~~~~~~~~
dsmodel.c:12731:47: warning: passing argument 1 of 'StringTemporaryDense' from incompatible pointer type [-Wincompatible-pointer-types]
StringElement( StringTemporaryDense( &DYNX(DYNAuxStr_,7+DYNStrInit(did_)),
^
In file included from C:/Program Files (x86)/Dymola 2018/Source/matrixop.h:11:0,
from dsmodel.c:7:
C:/Program Files (x86)/Dymola 2018/Source/matrixop1.h:490:27: note: expected 'const char **' but argument is of type 'char **'
DYMOLA_STATIC StringArray StringTemporaryDense(String*d,SizeType ndims,...);
^~~~~~~~~~~~~~~~~~~~
dsmodel.c: In function 'equations_33':
dsmodel.c:13112:47: warning: passing argument 1 of 'StringTemporaryDense' from incompatible pointer type [-Wincompatible-pointer-types]
StringElement( StringTemporaryDense( &DYNX(DYNAuxStr_,45+DYNStrInit(did_)),
^
In file included from C:/Program Files (x86)/Dymola 2018/Source/matrixop.h:11:0,
from dsmodel.c:7:
C:/Program Files (x86)/Dymola 2018/Source/matrixop1.h:490:27: note: expected 'const char **' but argument is of type 'char **'
DYMOLA_STATIC StringArray StringTemporaryDense(String*d,SizeType ndims,...);
^~~~~~~~~~~~~~~~~~~~
dsmodel.c:13664:47: warning: passing argument 1 of 'StringTemporaryDense' from incompatible pointer type [-Wincompatible-pointer-types]
StringElement( StringTemporaryDense( &DYNX(DYNAuxStr_,26+DYNStrInit(did_)),
^
In file included from C:/Program Files (x86)/Dymola 2018/Source/matrixop.h:11:0,
from dsmodel.c:7:
C:/Program Files (x86)/Dymola 2018/Source/matrixop1.h:490:27: note: expected 'const char **' but argument is of type 'char **'
DYMOLA_STATIC StringArray StringTemporaryDense(String*d,SizeType ndims,...);
^~~~~~~~~~~~~~~~~~~~
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_createEasyVar1D]+0xa): undefined reference to `__security_cookie'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_createEasyVar1D]+0x2e): undefined reference to `nc_open'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_createEasyVar1D]+0x4a): undefined reference to `@__security_check_cookie@4'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_createEasyVar1D]+0x62): undefined reference to `nc_inq_varid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_createEasyVar1D]+0x89): undefined reference to `nc_inq_varndims'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_createEasyVar1D]+0xb0): undefined reference to `nc_inq_vardimid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_createEasyVar1D]+0xca): undefined reference to `nc_inq_dimname'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_createEasyVar1D]+0x136): undefined reference to `@__security_check_cookie@4'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetScattered2D]+0xa): undefined reference to `__security_cookie'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetScattered2D]+0xae): undefined reference to `@__security_check_cookie@4'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeDouble]+0x11): undefined reference to `nc_open'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeDouble]+0x4a): undefined reference to `nc_inq_varid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeDouble]+0x82): undefined reference to `nc_inq_att'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeDouble]+0xa7): undefined reference to `nc_get_att_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeDouble]+0xbd): undefined reference to `nc_close'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeLong]+0x11): undefined reference to `nc_open'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeLong]+0x49): undefined reference to `nc_inq_varid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeLong]+0x80): undefined reference to `nc_inq_att'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeLong]+0xa5): undefined reference to `nc_get_att_long'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeLong]+0xbb): undefined reference to `nc_close'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeString]+0x11): undefined reference to `nc_open'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeString]+0x49): undefined reference to `nc_inq_varid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeString]+0x81): undefined reference to `nc_inq_att'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeString]+0xbe): undefined reference to `nc_get_att_text'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataReaderEA.obj):(.text[_ncEasyGetAttributeString]+0xdf): undefined reference to `nc_close'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DNew]+0x11): undefined reference to `nc_open'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DNew]+0x35): undefined reference to `nc_inq_varid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DNew]+0x53): undefined reference to `nc_inq_varndims'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DNew]+0x77): undefined reference to `nc_inq_vardimid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DNew]+0x88): undefined reference to `nc_inq_dimlen'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DNew]+0xa2): undefined reference to `nc_inq_dimlen'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DNew]+0x168): undefined reference to `nc_get_var_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DNew]+0x29a): undefined reference to `nc_close'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DGet]+0x7): undefined reference to `__security_cookie'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncScattered2D.obj):(.text[_ncScattered2DGet]+0x73): undefined reference to `@__security_check_cookie@4'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DNew]+0x13): undefined reference to `nc_open'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DNew]+0x38): undefined reference to `nc_inq_varid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DNew]+0x56): undefined reference to `nc_inq_varndims'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DNew]+0xe4): undefined reference to `nc_inq_vardimid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DNew]+0xf5): undefined reference to `nc_inq_dimlen'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DNew]+0x33e): undefined reference to `nc_get_var_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DNew]+0x37d): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DNew]+0x3a5): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DFree]+0x2b): undefined reference to `nc_close'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_loadChunk]+0x79): undefined reference to `nc_get_vara_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DGetItem]+0x26): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DSetOption]+0xa0): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DSetOption]+0xc7): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DDumpStatistics]+0xa): undefined reference to `__security_cookie'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DDumpStatistics]+0x2a): undefined reference to `nc_inq_varname'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DDumpStatistics]+0x128): undefined reference to `@__security_check_cookie@4'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncDataSet1D.obj):(.text[_ncDataSet1DDumpStatistics]+0x17d): undefined reference to `@__security_check_cookie@4'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DNew]+0x16): undefined reference to `nc_inq_varid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DNew]+0x3a): undefined reference to `nc_inq_varndims'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DNew]+0x5d): undefined reference to `nc_inq_vardimid'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DNew]+0x6d): undefined reference to `nc_inq_dimlen'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DNew]+0x247): undefined reference to `nc_get_var_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DNew]+0x4a3): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DNew]+0x4ce): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_loadChunk]+0x7e): undefined reference to `nc_get_vara_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DGetItem]+0x45): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DSetOption]+0x179): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DSetOption]+0x1a2): undefined reference to `nc_get_var1_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DDumpStatistics]+0xa): undefined reference to `__security_cookie'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DDumpStatistics]+0x2c): undefined reference to `nc_inq_varname'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DDumpStatistics]+0x73): undefined reference to `nc_inq_varname'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DDumpStatistics]+0x16b): undefined reference to `@__security_check_cookie@4'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/ncVar1D.obj):(.text[_ncVar1DDumpStatistics]+0x1e4): undefined reference to `@__security_check_cookie@4'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/Misc.obj):(.text[_ncError]+0x1b): undefined reference to `nc_strerror'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/Misc.obj):(.text[_ncGetAttributeDoubleDefault]+0x1e): undefined reference to `nc_inq_att'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/Misc.obj):(.text[_ncGetAttributeDoubleDefault]+0x41): undefined reference to `nc_get_att_double'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/Misc.obj):(.text[_ncGetAttributeLongDefault]+0x1e): undefined reference to `nc_inq_att'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/Misc.obj):(.text[_ncGetAttributeLongDefault]+0x41): undefined reference to `nc_get_att_long'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/Misc.obj):(.text[_ncGetAttributeTextDefault]+0x1d): undefined reference to `nc_inq_att'
C:/Users/Toshiba/Desktop/BuildingSystems-master/netCDF-DataReader/NcDataReader2/Resources/Library/win32\ncDataReader2.lib(ncDataReader2.dir/Release/Misc.obj):(.text[_ncGetAttributeTextDefault]+0x4b): undefined reference to `nc_get_att_text'
C:/Users/Toshiba/Desktop/BuildingSys
One of the latest merges introduced an error regarding Types.WaterVapourEnthalpy.
@jmoeckel Should it be "Modelica.SIunits.SpecificEnergy"?
Running the following commands with Dymola 2017 FD01
Advanced.PedanticModelica=true;
checkModel(BuildingSystems.Buildings.BuildingTemplates.Building1Zone0DDistrict)
in pedantic mode returns the following error:
Using conditionally enabled variable Q_flow_heating outside of connect.
Q_flow_heating
is decalred in ``BuildingSystems.Buildings.BaseClasses.BuildingTemplate```.
The subpackage BS/Utilities/MoistAirFunctions:
https://github.com/UdK-VPT/BuildingSystems/tree/master/BuildingSystems/Utilities/MoistAirFunctions
has some duplication with Annex60/Utilities/Psychrometrics:
https://github.com/iea-annex60/modelica-annex60/tree/master/Annex60/Utilities/Psychrometrics
and possibly also with Annex60/Media:
https://github.com/iea-annex60/modelica-annex60/tree/master/Annex60/Media
We should check our package to see what functions are missing in Annex60.
This is a follow-up issue to #1.
There are several variables declared as Real
and have a unit
. In many cases these are derived physical quantities which only appears once or twice.
In order to have consistent code: Should we change the style-guide in such way, that a Real
variable must not have a unit
property. Instead, each time a unit
is set, a new type
must be declared or an already defined type
must be used respectively.
Would concern following 45 files:
.mos
files are missing for the examples BuildingSystems.Utilities.Psychrometrics.Functions.Examples.Density_pTX
and BuildingSystems.Utilities.Psychrometrics.Examples.Density_pTX
.
The models in the SolarRadiationTransformers
package can be improved.
SolarRadiationTransformerGeneral
Edited
1. Remove Deg
and Angle
of the name of the cos..
and sin..
variables such as cosAngleDegInc
There are some variables with the name AngleDeg...
. So I guess it is not a good idea to change the names.
BuildingSystems.Types.Angle_deg
per Modelica.SIunits.Conversions.NonSIunits.Angle_deg
(It could be done per other models too). see 6b3da87SolarRadiationTransformerIsotropic
IrrDirHor*R
is higher than the total irradiance on a tilted surface IrrTotTil
, thus the diffuse irradiation on the tilted surface radiationPort.IrrDif
becomes negative). See f397b20There are some comments in German that should be translated or removed or moved into a proper documentation. Search for:
To be continued...
Small Error: The description of this connector is wrong. To be consistent it must be: Port for air exchange through an air path, large icon to be used for vectors of AirpathPorts (complex connector type)
Is there a reason, why the internal BuildingSystems AirpathPorts are not used in ZoneTemplateGeneral but the one from the standard Modelica library?
We could and should validate our building models against BESTEST
https://en.wikipedia.org/wiki/Building_Energy_Simulation_Test
http://dx.doi.org/10.1016/S0378-7788(02)00072-5
Advanced.PedanticModelica:=true;
checkModel("BuildingSystems.Technologies.Photovoltaics");
Advanced.PedanticModelica:=true;
checkModel("BuildingSystems.Technologies.SolarThermal");
Applying Dymolas (2017 FD01) checkModel()
in pedantic mode to Buildings.Data.AirpathCharacteristics.CdTiltedPane
throws following error:
Component type specifier Angle_degInput is a connector, that should not be used in a function
File: Q:/Git/BuildingSystems/BuildingSystems/Buildings/Data/AirpathCharacteristics/CdTiltedPane.mo, line 7
Component context: angleDegPanes
Component declared as Angle_degInput angleDegPanes in BuildingSystems.Interfaces
Probably due to ibpsa/modelica-ibpsa#779
That PR shows a conversion script that we forgot to apply to the library.
E.g. HeaterCooler_T has been renamed to PrescribedOutlet and so...
That change was then merged into our library by #96
Warning while loading the file f:\Libraries\BuildingSystems\BuildingSystems\Utilities\Visualisation3D\Modelica3D\Setup.mo.
The Modelica class of BuildingSystems.Utilities.Visualisation3D.Modelica3D.Setup.ExtSetup (model) and its base class BuiltIn.ExternalObject (type) are not compatible.
Message: Modelica.IncompatibleBaseClass
Warning while loading the file f:\Libraries\BuildingSystems\BuildingSystems\Utilities\Visualisation3D\Modelica3D\VisConfig.mo.
The Modelica class of BuildingSystems.Utilities.Visualisation3D.Modelica3D.VisConfig.ExtVisConfig (model) and its base class BuiltIn.ExternalObject (type) are not compatible.
Message: Modelica.IncompatibleBaseClass
Warning while loading the file f:\Libraries\BuildingSystems\BuildingSystems\Utilities\Visualisation3D\Modelica3D\Setup.mo.
The Modelica class of BuildingSystems.Utilities.Visualisation3D.Modelica3D.Setup.ExtSetup (model) and its base class BuiltIn.ExternalObject (type) are not compatible.
Message: Modelica.IncompatibleBaseClass
Warning while loading the file f:\Libraries\BuildingSystems\BuildingSystems\Utilities\Visualisation3D\Modelica3D\VisConfig.mo.
The Modelica class of BuildingSystems.Utilities.Visualisation3D.Modelica3D.VisConfig.ExtVisConfig (model) and its base class BuiltIn.ExternalObject (type) are not compatible.
Message: Modelica.IncompatibleBaseClass
We should check the subpackge BS/Utilities/SmoothFunctions.
https://github.com/UdK-VPT/BuildingSystems/tree/master/BuildingSystems/Utilities/SmoothFunctions
All functions that are usefull should get a documentation, a corresponding block and a runnable example with reference results. Then they can be added to Annex60/Utilities/Math:
https://github.com/iea-annex60/modelica-annex60/tree/master/Annex60/Utilities/Math
All other functions should be deleted or replaced with their MSL or Annex60 equivalent.
Do we need to keep these functions?
...to be extended
Add two district models to package BuildingSystems.Applications.DistrictSimulation
UniversityCampusBerlinCharlottenburg.mo
-> district model with low order building buildings of the university campus Berlin-Charlottenburg
UniversityCampusBerlinCharlottenburgDistrictHeating.mo
-> as UniversityCampusBerlinCharlottenburg.mo
, but the building models are supplied by a district heating grid with thermal energy.
Hi,
I just loaded the latest git version of the BuildingSystems library in openmodelica v1.11.0.
When I tried to run the "Building1Zone0D" example, I get this warning and error:
[20] 14:47:54 Translation Warning
[BuildingSystems.Buildings.Interfaces.SurfaceToConstructionPort: 2:1-22:30]: Connector .BuildingSystems.Buildings.Interfaces.SurfaceToConstructionPort$building1$innerConstructions$toSurfacePort_1 is not balanced: The number of potential variables (29) is not equal to the number of flow variables (2).
[21] 14:47:54 Translation Error
[BuildingSystems.Buildings.Constructions.Walls.WallThermal1DNodes: 14:5-14:39]: Type mismatch in binding lambda = {1.351370344342937}, expected subtype of Real, got type Real[1].
[22] 14:47:54 Translation Error
Error occurred while flattening model BuildingSystems.Buildings.Examples.Building1Zone0D
Do you have a hint, what I am doing wrong?
Thank you!
Fabian
Content of issues which contain valuable information, that should not be hard to find after closing the issue (as #3) should be moved to a new wiki-section (e.g. Tipps and Tricks).
Do you think, that this is a good idea - or would it even makes things worse, as the wiki is the last place, where people look for information?
The current version of the block Utilities.NcDataReader2.NcDataReader
sets the value of the parameters constantVariable[:]
to zero. These are the different constant values of the .nc
readed file, such as latitude
or longitude
.
@ainderfurth and I guess that the line of code = fill(0.0,size(varNameConstant,1))
was added intending to deal with those cases were the values for latitude
or any oher constant needed by the WeatherDataNetcdf
model are not defined in the .nc
file.
A possible correction is:
parameter Real constantVariable[size(varNameConstant,1)](start={ncEasyGetAttributeDouble(fileName,"",varNameConstant[j]) for j in 1:size(varNameConstant, 1)}) = {ncEasyGetAttributeDouble(fileName,"",varNameConstant[j]) for j in 1:size(varNameConstant, 1)};
The problem which was intended to avoid might happen again... In case the varNameConstant[j]
is not found in the .nc
file an error will occur with the following message:
ERROR | -43 | netcdf | NetCDF: Attribute not found
Up to now I did not find a way to check the file before the function is called... I think it might be enough to properly document the model, explaining what to check when this error occurs.
@nytschgeusen
Do I prepare a pull request with the suggested changes?
should I look depeer into it? or it is enough to document the error?
Start value ( start={ncEasyGetAttributeDouble(fi....
) not needed
github uses some default label names, here is an explanation of the meaning:
https://help.github.com/articles/about-labels/#using-default-labels
We do not yet have a good first issue
label,
I will create one.
The OpenModelica build server checks the HTML documentation of the BuildingSystems library every night. Please search for BuildingSystems
on this page:
https://build.openmodelica.org/Documentation/tidy.filtered
It still finds some errors / warnings that need to be fixed.
Please check the HTML as described in the Wiki:
https://github.com/UdK-VPT/BuildingSystems/wiki/Correct-HTML
As a result of
ibpsa/modelica-ibpsa#82 (comment)
we do now have two Weather Data Readers.
The version from Buildings has been added to Annex60 and is therefore now included in BuildingSystems. This Reader reads TMY3 files, converts them to CombiTimeTable format and uses a Bus to distribute the info to components.
BuildingSystems has the netCDF reader from @jraedler , but an old version.
There exists a newer version by @jraedler
https://bitbucket.org/jraedler/ncdatareader2
and there also exists a fork by @tbeu that has been restructured a lot.
https://github.com/tbeu/netCDF-DataReader
The newer netCDF reader can also read HDF5, I believe.
http://www.hdfgroup.org/projects/netCDF-4/
Should the two readers be combined? What is the better weather format, TMY3 or HDF5? Can we support both, if possible with the identical interface to the end user?
Another basic example that fails is Buildings.Constructions.Examples.WallTermal1DNodes
:
See all examples here
https://libraries.openmodelica.org/branches/master/BuildingSystems/BuildingSystems.html
and especially the Wall example here:
https://libraries.openmodelica.org/branches/master/BuildingSystems/files/BuildingSystems_BuildingSystems.Buildings.Constructions.Examples.WallThermal1DNodes.err
The 3D air flow model of the BuildingSystems library has to be re-integrated in the present library architecture.
It should be "Modelica License 2" instead of "Modelica 2 license" (at least in the Readme).
Running the following commands with Dymola 2017 FD01
Advanced.PedanticModelica=true;
checkModel(BuildingSystems.Buildings.Zones.ZoneTemplateAirvolumeMixed)
returns the following error:
The model BuildingSystems.Buildings.Zones.ZoneTemplateAirvolumeMixed component radiationDistribution is structurally singular.
when assuming the most generic outside couplings to all the flow variables of its connectors.
The flag NumberOfIntervals
within annotations is not standardized and throws an error in pedantic mode.
Following three (not Annex60)-files must be corrected:
Solution: Replace it with flag Interval
(= (StopTime - StartTime)/NumberOfIntervals
)
The connector BuildingSystems.Interfaces.RadiationPortGeneral
has 3 potential variables (no prefix) and 0 flow variables (prefix flow), making it a non-physical connctor:
https://www.modelica.org/events/modelica2008/Proceedings/sessions/session1a3.pdf
The same is true for some more connectors, e.g.
BuildingSystems.buildings.Interfaces.SurfaceToSurfacesPortGeneral
As discussed in ibpsa/modelica-ibpsa#607 the model Fluid.FixedResistances.FixedResistanceDpM
will be refactored soon, it will be split up in two simpler models. We are using FixedResistanceDpM in two models:
These two models will have to be updated, possibly using the conversion script supplied in the A60 Pull Request.
Error is thrown in standard check mode (so not pedantic
):
To reproduce, use
checkModel("BuildingSystems.Buildings.Zones.ZoneTemplateAirvolume3D")
There also errors thrown by:
BuildingSystems.Buildings.Zones.Examples.SingleZoneThermal3D
BuildingSystems.Buildings.Examples.ThermalModelHouse3D
BuildingSystems.Buildings.Examples.ThermalModelHouse3Dwindow
but I think, because of extends
, they all based on the error in the zone.
Both examples have some errors:
checkModel("BuildingSystems.Technologies.DistrictHeatingNetworks.Examples.DistrictHeatingNetwork_dp");
checkModel("BuildingSystems.Technologies.DistrictHeatingNetworks.Examples.DistrictHeatingNetwork_m_flow");
The heat ports of the buildings are not connected properly, might be part of the problem.
Applying Dymolas (2017 FD01) checkModel()
to BuildingSystems.Buildings.Constructions.Windows.SlidingWindow
in pedantic mode throws following error:
The model BuildingSystems.Buildings.Constructions.Windows.SlidingWindow component radTra1to2 is structurally singular.
when assuming inputs to be known,
and that non-physical connectors will impose suitable constraints.
Advanced.PedanticModelica:=true;
checkModel("BuildingSystems.HAM.HeatAndMoistureTransport");
Looks like there are some units wrong.
Some connect equations are strange/wrong in the ThermCollector model, e.g. this one:
And the ThermalCollectorInSeries model uses [end] in connect statement:
See more warnings/errors by simulating (with OpenModelica) the example Technologies.SolarThermal.Examples.BigCollectorInstallationWithStorage
or look at the errorlog here:
https://libraries.openmodelica.org/branches/v1.12/BuildingSystems/files/BuildingSystems_BuildingSystems.Technologies.SolarThermal.Examples.BigCollectorInstallationWithStorage.err
OpenModelica nightly testing runs all models that have an annotation(experiment)
.
https://trac.openmodelica.org/OpenModelica/ticket/4578
This annotation should be removed from all models that cannot be simulated directly, for example this one:
https://github.com/UdK-VPT/BuildingSystems/blob/master/BuildingSystems/Technologies/DistrictHeatingNetworks/EnergyProductionUnits/Central.mo
The Modelica Association seems to be switching to the BSD-3-Clause license (instead of Modelica license) for the Modelica Standard Library:
modelica/ModelicaStandardLibrary#2320
modelica/ModelicaStandardLibrary#2373
Once that is completed and released, we should consider switching to BSD-3-Clause as well.
https://choosealicense.com/licenses/bsd-3-clause/
https://opensource.org/licenses/alphabetical
Error is thrown in standard check mode (so not pedantic
):
To reproduce, use
checkModel("BuildingSystems.Buildings.Constructions.Examples.WallThermal3D_Vis3D")
Following rule 3.8 we should use units for variables, that have a physical correspondence - and if possible use types from Modelica.SIUnits.
There exists lot of variables in the BuildingSystems, that are declared as Real (without a unit) but have a physical correspondece.
Following files contain the keyword Real
and were NOT copied from Annex60. Files from package Types
some subpackages of Utilities
are not considered as they do not use physical quantities:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.