Open AntoineGautier opened 7 months ago
Templates.Plants.Controls.HeatPumps.Validation.AirToWater
with OCTSimulating the model with OCT gives the following statistics.
Number of steps : 274844
Number of function evaluations : 759416
****** Number of Jacobian evaluations : 168509
Number of function eval. due to Jacobian eval. : 0
Number of error test failures : 531
Number of nonlinear iterations : 757470
Number of nonlinear convergence failures : 83962
Number of state function evaluations : 276151
Number of state events : 124
Number of time events : 365
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 - 86400.0 seconds.
****** Elapsed simulation time: 61.745942472000024 seconds.
Simulating the same model with Dymola gives the following statistics.
Integration terminated successfully at T = 86400
****** CPU-time for integration : 0.481699 seconds
CPU-time for initialization : 0.0383539 seconds
Number of result points : 1437
Number of grid points : 501
Number of accepted steps : 9767
Number of rejected steps : 483
Number of f-evaluations (dynamics) : 14418
Number of non-linear iteration : 13094
Number of non-linear convergence failures : 0
****** Number of Jacobian-evaluations : 381
Number of crossing function evaluations : 11225
Number of model time events : 379
Number of state events : 91
Number of step events : 0
Maximum integration order : 5
The overhead is due to the Python dependencies.
Templates.Plants.Controls.HeatPumps.Validation.AirToWater
with DymolaPrimary-only configurations exhibit non-linear solver failures. In most configurations, the tool recovers from these failures and the simulation succeeds. Only one configuration results in simulation failing:
pla(
typDis_select1=Buildings.Templates.Plants.HeatPumps.Types.Distribution.Variable1Only,
typArrPumPri=Buildings.Templates.Components.Types.PumpArrangement.Dedicated,
have_pumChiWatPriDed_select=false,
linearized=false
The simulation fails with both DASSL and CVODE. Linearizing the flow/∆p equations in the valve components solves the issue. However, since the HP flow resistance is lumped with the isolation valve, there is an impact on the pump head and pump power.
The purpose of this ticket is to investigate issues observed during translation, initialization or simulation with the heat pump plant template
Templates.Plants.HeatPumps.AirToWater
and its components.MBL commit 4191036ff3
Dymola 2024xRefresh1 running on Ubuntu 22.04
OCT version: 1.48.2 running on Ubuntu 22.04. Simulation models that cause issues:
Buildings.Templates.Plants.HeatPumps.Components.Validation.ValvesIsolation
: configuration with separate dedicated primary CHW pumps. This has been fixed with d0522205ba. It was due to the way the multiple pump record was cast into an array of single pump records.Buildings.Templates.Plants.Controls.HeatPumps.Validation.AirToWater
: simulation overhead compared to Dymola, see https://github.com/lbl-srg/modelica-buildings/issues/3759#issuecomment-2077276215.Buildings.Templates.Plants.HeatPumps.Validation.AirToWater
: most plant configurations fail to translate. This has been fixed with d0522205ba and 0489976e4a. It was due to 1) the way the multiple pump record was cast into an array of single pump records, and 2) a parameter binding that resulted in evaluatingmax(fill(..., 0))
— which Dymola evaluates to-inf
where OCT crashes w/o explicit error log.Buildings.Templates.Plants.HeatPumps.Validation.AirToWater
: several plant configurations fail to initialize. OCT also fails to solve for the pump speed in a configuration with separate dedicated primary HW and CHW pumps.Buildings.Templates.Plants.HeatPumps.Validation.AirToWater
: primary-only configurations exhibit non-linear solver failures as with Dymola.