modelica-buildings icon indicating copy to clipboard operation
modelica-buildings copied to clipboard

ISAT models

Open JayHuLBL opened this issue 3 years ago • 11 comments

This PR is to merge the ISAT models developed by the CU Boulder Data Center project.

@caryfaulkner I see in this commit 8a34bcd, the release note should have been updated. However, I cannot see it in the Buildings/package.mo. Would you please update the note for version 9.0.0?

JayHuLBL avatar Jul 22 '21 18:07 JayHuLBL

This PR is to merge the ISAT models developed by the CU Boulder Data Center project.

@caryfaulkner I see in this commit 8a34bcd, the release note should have been updated. However, I cannot see it in the Buildings/package.mo. Would you please update the note for version 9.0.0?

@JayHuLBL Sure, I have just submitted a pull request including the updated release notes. Let me know if you need anything else.

caryfaulkner avatar Jul 22 '21 20:07 caryfaulkner

@caryfaulkner Please check the CI test. It is failing due to the wrong html, see https://github.com/lbl-srg/modelica-buildings/pull/2576/checks?check_run_id=3138353421

JayHuLBL avatar Jul 22 '21 21:07 JayHuLBL

@caryfaulkner Please check the CI test. It is failing due to the wrong html, see https://github.com/lbl-srg/modelica-buildings/pull/2576/checks?check_run_id=3138353421

@JayHuLBL Working on fixing them now. I am unfamiliar, do I need to fix all the warnings and info messages to solve the error?

caryfaulkner avatar Jul 22 '21 23:07 caryfaulkner

@caryfaulkner html format has been corrected and it passed the formatting test. Let's wait for the on-going CI tests for the model runs.

JayHuLBL avatar Jul 26 '21 22:07 JayHuLBL

@caryfaulkner @mwetter

The ISAT model failed to run with Optimica as shown in the CI test. It seems to be the same reason as shown in issue #2231 for the FFD models (see below). I would suggest to put these ISAT models in the exclude list for now.


jianjun@jianjun-virtual-machine:/opt/oct/bin$ jm_ipython.sh jmodelica.py Buildings.ThermalZones.Detailed.Examples.ISAT.ForcedConvection
WARNING:root:MODELICAPATH: Path "" does not exist. Environment may be corrupt.
*** Compiling Buildings.ThermalZones.Detailed.Examples.ISAT.ForcedConvection
Warning at line 50, column 12, in file '/home/jianjun/GitFolder/modelica-buildings/Buildings/Fluid/Sources/BaseClasses/PartialSource.mo',
In components:
    bouOut
    bounIn
  The cardinality() function-like operator is deprecated, and will be removed in a future version of Modelica
Warning at line 98, column 3, in file '/home/jianjun/GitFolder/modelica-buildings/Buildings/ThermalZones/Detailed/BaseClasses/CFDAirHeatMassBalance.mo',
In component roo.air:
  The parameter roo.air.C_outflow_fixed does not have a binding expression
/opt/oct/lib/RuntimeLibrary/libModelicaExternalC.a(ModelicaInternal.c.o): In function `ModelicaInternal_temporaryFileName':
/opt/OCT/P538-OCT/JModelica/ThirdParty/MSL/Modelica/Resources/C-Sources/ModelicaInternal.c:622: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
In file included from sources/Buildings_ThermalZones_Detailed_Examples_ISAT_ForcedConvection_funcs.c:5:0:
/home/jianjun/GitFolder/modelica-buildings/Buildings/Resources/C-Sources/isatStartCosimulation.c: In function ‘isatStartCosimulation’:
/home/jianjun/GitFolder/modelica-buildings/Buildings/Resources/C-Sources/isatStartCosimulation.c:96:23: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
   cosim->para->bouCon = (size_t *) malloc(nSur*sizeof(size_t));
                       ^
sources/Buildings_ThermalZones_Detailed_Examples_ISAT_ForcedConvection_funcs.c: In function ‘func_Modelica_Utilities_Streams_readLine_def6’:
sources/Buildings_ThermalZones_Detailed_Examples_ISAT_ForcedConvection_funcs.c:203:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     string_v = ModelicaInternal_readLine(fileName_v, tmp_1, &tmp_2);
              ^
sources/Buildings_ThermalZones_Detailed_Examples_ISAT_ForcedConvection_funcs.c: In function ‘func_Modelica_Utilities_Strings_substring_def10’:
sources/Buildings_ThermalZones_Detailed_Examples_ISAT_ForcedConvection_funcs.c:292:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     result_v = ModelicaStrings_substring(string_v, tmp_1, tmp_2);
              ^
/opt/oct/lib/RuntimeLibrary/libModelicaExternalC.a(ModelicaInternal.c.o): In function `ModelicaInternal_temporaryFileName':
/opt/OCT/P538-OCT/JModelica/ThirdParty/MSL/Modelica/Resources/C-Sources/ModelicaInternal.c:622: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/opt/oct/lib/RuntimeLibrary/libModelicaMatIO.a(ModelicaMatIO.c.o): In function `Mat_VarDelete':
/opt/OCT/P538-OCT/JModelica/ThirdParty/MSL/Modelica/Resources/C-Sources/ModelicaMatIO.c:4876: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'

Start ISAT Simulation with Thread
WARNING:root:No dependency information for the derivatives was found in the model description. Assuming complete dependency.
Final Run Statistics: --- e+02

 Number of steps                                 : 626
 Number of function evaluations                  : 763
 Number of Jacobian evaluations                  : 24
 Number of function eval. due to Jacobian eval.  : 0
 Number of error test failures                   : 11
 Number of nonlinear iterations                  : 670
 Number of nonlinear convergence failures        : 0
 Number of state function evaluations            : 650
 Number of time events                           : 24

Solver options:

 Solver                   : CVode
 Linear multistep method  : BDF
 Nonlinear solver         : Newton
 Linear solver type       : DENSE
 Maximal order            : 5
 Tolerances (absolute)    : 1e-08
 Tolerances (relative)    : 1e-08

Simulation interval    : 0.0 - 600.0 seconds.
Elapsed simulation time: 75.32612107193563 seconds.
malloc_consolidate(): invalid chunk size
/opt/oct/bin/jm_ipython.sh: line 28: 72459 Aborted                 (core dumped) IPOPT_HOME=${JMODELICA_HOME}/ThirdParty/IPOPT SUNDIALS_HOME=${JMODELICA_HOME}/ThirdParty/Sundials PYTHONPATH=:${JMODELICA_HOME}/Python/::$PYTHONPATH LD_LIBRARY_PATH=:${JMODELICA_HOME}/ThirdParty/IPOPT/lib/:${JMODELICA_HOME}/ThirdParty/Sundials/lib:${JMODELICA_HOME}/ThirdParty/CasADi/lib:$LD_LIBRARY_PATH SEPARATE_PROCESS_JVM=${JAVA_HOME} ipython "$@"

and


jianjun@jianjun-virtual-machine:/opt/oct/bin$ jm_ipython.sh jmodelica.py Buildings.ThermalZones.Detailed.Examples.FFD.Tutorial.MixedConvectionWithBox
WARNING:root:MODELICAPATH: Path "" does not exist. Environment may be corrupt.
*** Compiling Buildings.ThermalZones.Detailed.Examples.FFD.Tutorial.MixedConvectionWithBox
Warning at line 50, column 12, in file '/home/jianjun/GitFolder/modelica-buildings/Buildings/Fluid/Sources/BaseClasses/PartialSource.mo',
In components:
    bouIn
    bouOut
  The cardinality() function-like operator is deprecated, and will be removed in a future version of Modelica
Warning at line 98, column 3, in file '/home/jianjun/GitFolder/modelica-buildings/Buildings/ThermalZones/Detailed/BaseClasses/CFDAirHeatMassBalance.mo',
In component roo:
  The parameter roo.air.C_outflow_fixed does not have a binding expression
/opt/oct/lib/RuntimeLibrary/libModelicaExternalC.a(ModelicaInternal.c.o): In function `ModelicaInternal_temporaryFileName':
/opt/OCT/P538-OCT/JModelica/ThirdParty/MSL/Modelica/Resources/C-Sources/ModelicaInternal.c:622: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
In file included from sources/Buildings_ThermalZones_Detailed_Examples_FFD_Tutorial_MixedConvectionWithBox_funcs.c:5:0:
/home/jianjun/GitFolder/modelica-buildings/Buildings/Resources/C-Sources/cfdStartCosimulation.c: In function ‘cfdStartCosimulation’:
/home/jianjun/GitFolder/modelica-buildings/Buildings/Resources/C-Sources/cfdStartCosimulation.c:95:23: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
   cosim->para->bouCon = (size_t *) malloc(nSur*sizeof(size_t));
                       ^
sources/Buildings_ThermalZones_Detailed_Examples_FFD_Tutorial_MixedConvectionWithBox_funcs.c: In function ‘func_Modelica_Utilities_Streams_readLine_def2’:
sources/Buildings_ThermalZones_Detailed_Examples_FFD_Tutorial_MixedConvectionWithBox_funcs.c:142:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     string_v = ModelicaInternal_readLine(fileName_v, tmp_1, &tmp_2);
              ^
sources/Buildings_ThermalZones_Detailed_Examples_FFD_Tutorial_MixedConvectionWithBox_funcs.c: In function ‘func_Modelica_Utilities_Strings_substring_def7’:
sources/Buildings_ThermalZones_Detailed_Examples_FFD_Tutorial_MixedConvectionWithBox_funcs.c:247:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
     result_v = ModelicaStrings_substring(string_v, tmp_1, tmp_2);
              ^
/opt/oct/lib/RuntimeLibrary/libModelicaExternalC.a(ModelicaInternal.c.o): In function `ModelicaInternal_temporaryFileName':
/opt/OCT/P538-OCT/JModelica/ThirdParty/MSL/Modelica/Resources/C-Sources/ModelicaInternal.c:622: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/opt/oct/lib/RuntimeLibrary/libModelicaMatIO.a(ModelicaMatIO.c.o): In function `Mat_VarDelete':
/opt/OCT/P538-OCT/JModelica/ThirdParty/MSL/Modelica/Resources/C-Sources/ModelicaMatIO.c:4876: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'

Start Fast Fluid Dynamics Simulation with Thread
WARNING:root:No dependency information for the derivatives was found in the model description. Assuming complete dependency.
Final Run Statistics: --- e+02

 Number of steps                                 : 549
 Number of function evaluations                  : 666
 Number of Jacobian evaluations                  : 30
 Number of function eval. due to Jacobian eval.  : 0
 Number of error test failures                   : 0
 Number of nonlinear iterations                  : 549
 Number of nonlinear convergence failures        : 0
 Number of state function evaluations            : 579
 Number of time events                           : 30

Solver options:

 Solver                   : CVode
 Linear multistep method  : BDF
 Nonlinear solver         : Newton
 Linear solver type       : DENSE
 Maximal order            : 5
 Tolerances (absolute)    : 1e-08
 Tolerances (relative)    : 1e-08

Simulation interval    : 0.0 - 180.0 seconds.
Elapsed simulation time: 306.5101284289267 seconds.
malloc_consolidate(): invalid chunk size
/opt/oct/bin/jm_ipython.sh: line 28: 73761 Aborted                 (core dumped) IPOPT_HOME=${JMODELICA_HOME}/ThirdParty/IPOPT SUNDIALS_HOME=${JMODELICA_HOME}/ThirdParty/Sundials PYTHONPATH=:${JMODELICA_HOME}/Python/::$PYTHONPATH LD_LIBRARY_PATH=:${JMODELICA_HOME}/ThirdParty/IPOPT/lib/:${JMODELICA_HOME}/ThirdParty/Sundials/lib:${JMODELICA_HOME}/ThirdParty/CasADi/lib:$LD_LIBRARY_PATH SEPARATE_PROCESS_JVM=${JAVA_HOME} ipython "$@"

JayHuLBL avatar Jul 27 '21 20:07 JayHuLBL

@caryfaulkner Would you please take another look to verify if the changes are intended, as it has been a while since our actively working on it last time?

JayHuLBL avatar Jul 28 '21 23:07 JayHuLBL

@caryfaulkner Would you please take another look to verify if the changes are intended, as it has been a while since our actively working on it last time?

@JayHuLBL Yes, I will look into this and get back to you as soon as possible.

caryfaulkner avatar Jul 28 '21 23:07 caryfaulkner

@caryfaulkner Would you please take another look to verify if the changes are intended, as it has been a while since our actively working on it last time?

@JayHuLBL Yes, I will look into this and get back to you as soon as possible.

@JayHuLBL I am having difficulty determining what is causing these models to fail with Optimica. Looking through our previous email chains, it appears they worked previously with Optimica. I am curious, do all of the ISAT models fail with Optimica in both Windows and Linux environments?

caryfaulkner avatar Aug 02 '21 16:08 caryfaulkner

@mwetter It's ready for your review.

JayHuLBL avatar Oct 27 '21 20:10 JayHuLBL

@caryfaulkner Would you please address Michael's inline comments?

JayHuLBL avatar Oct 29 '21 21:10 JayHuLBL

@caryfaulkner Would you please address Michael's inline comments?

Sure, I will work on addressing these comments.

caryfaulkner avatar Nov 01 '21 21:11 caryfaulkner