ibpsa / modelica-ibpsa

Modelica library for building and district energy systems developed within IBPSA Project 1
https://ibpsa.github.io/project1
143 stars 84 forks source link

FixedResistanceDpM revision #129

Closed mwetter closed 9 years ago

mwetter commented 9 years ago

This model needs two revision: First, it uses Fluid/BaseClasses/PartialResistance.mo assigns m_flow(start=0) which is already assigned in its base class. This can be removed.

Second, FixedResistances/FixedResistanceDpM.mo uses

if ( m_flow_turbulent > m_flow_nominal_pos) then
   Modelica.Utilities.Streams.print("Warning: In FixedResistanceDpM ....

This should use assert(..., ..., AssertionLevel.warning);

mwetter commented 9 years ago

Using the assert instead of if-then with print leads surprisingly to one more nonlinear equation. A service request has been filed with dassault (SR00238752).

Therefore, this issue is on hold until it is known how to avoid additonal nonlinear equations.

mwetter commented 9 years ago

Using annotation(Evaluate=true) on the parameter use_dh is required to allow the code translator to do the symbolic manipulation needed to avoid a non-linear equation. Without this, a user may change the value of this parameter, and then the argument m_flow_turbulent to the pressure drop functions may change. This would then avoid a symbolic processor to eliminate the nonlinear equation.

damienpicard commented 9 years ago

Issue129 resistance has been merged.