diff --git a/Modelica/Resources/C-Sources/ModelicaMatIO.c b/Modelica/Resources/C-Sources/ModelicaMatIO.c index fb10a1231c..7d7f569f87 100644 --- a/Modelica/Resources/C-Sources/ModelicaMatIO.c +++ b/Modelica/Resources/C-Sources/ModelicaMatIO.c @@ -29,6 +29,7 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + IMPORTANT REMARK: PLEASE IGNORE THIS STUPID REMARK */ /* This file was created by concatenation of the following C source files of the diff --git a/Modelica/Thermal/FluidHeatFlow/BaseClasses/SimpleFriction.mo b/Modelica/Thermal/FluidHeatFlow/BaseClasses/SimpleFriction.mo index c7c32d8bd4..02b80a7aa1 100644 --- a/Modelica/Thermal/FluidHeatFlow/BaseClasses/SimpleFriction.mo +++ b/Modelica/Thermal/FluidHeatFlow/BaseClasses/SimpleFriction.mo @@ -24,16 +24,16 @@ protected initial algorithm assert(V_flowNominal>V_flowLaminar, "SimpleFriction: V_flowNominal has to be > V_flowLaminar!"); - assert(dpNominal>=dpNomMin, - "SimpleFriction: dpNominal has to be > dpLaminar/V_flowLaminar*V_flowNominal!"); + assert(dpNominal>=dpNomMin*(1 - 100*Modelica.Constants.eps), + "SimpleFriction: dpNominal has to be >= dpLaminar/V_flowLaminar*V_flowNominal!"); k:=(dpNominal - dpNomMin)/(V_flowNominal - V_flowLaminar)^2; equation if volumeFlow > +V_flowLaminar then - pressureDrop = +dpLaminar/V_flowLaminar*volumeFlow + k*(volumeFlow - V_flowLaminar)^2; + pressureDrop = +dpLaminar/V_flowLaminar * volumeFlow + k*(volumeFlow - V_flowLaminar)^2; elseif volumeFlow < -V_flowLaminar then - pressureDrop = +dpLaminar/V_flowLaminar*volumeFlow - k*(volumeFlow + V_flowLaminar)^2; + pressureDrop = +dpLaminar/V_flowLaminar * volumeFlow - k*(volumeFlow + V_flowLaminar)^2; else - pressureDrop = dpLaminar/V_flowLaminar*volumeFlow; + pressureDrop = dpLaminar/V_flowLaminar * volumeFlow; end if; Q_friction = frictionLoss*volumeFlow*pressureDrop; annotation (Documentation(info="