ibpsa / project1

Project 1
48 stars 39 forks source link

Results vary with tolerance #23

Open bramvdh91 opened 5 years ago

bramvdh91 commented 5 years ago

As @FelixBue's results show, the network simulation results (mostly annual energy, to a lesser degree also heat losses) vary quite alarmingly with the tolerance setting for the solver. I have tested the same for the outlet temperatures in the example IBPSA.Fluid.FixedResistances.Examples.PlugFlowPipe and this also shows differences, as seen below. startrise steady

This also shows the error is not proportional to the tolerance. I still need to check if the deviations are of the same order as those shown in the DESTEST network.

Mathadon commented 5 years ago

Possibly these results are caused by not having a lot of states in the model, due to which the integrator can easily satisfy its tolerance criterion even when taking too large steps. This is easy to check by using Euler integration with a fixed small time step. If this produces the expected results, then I would look towards the integrator. What integrator are you currently using?

bramvdh91 commented 5 years ago

Using Dassl for now. Indeed, with Euler the results are the same irrespective of tolerance. Will check if Euler can handle the DESTEST network as well ;)

Mathadon commented 5 years ago

Note that euler does Not even use the tolerance setting, only the fixed time step size. So changing it should indeed not affect results.

Lsodar > CVode > dassl > radau as far as I am concerned:) Although I don't have that much experience with CVode