modelMixingVolumeZeroFlow

Mixing volume verification around zero flow with heat exchange

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This model verifies whether the equations in Buildings.Fluid.Interfaces.StaticTwoPortConservationEquation are consisent for all foreseeable cases. All MixingVolume instances contain the correct setting for prescribedHeatFlowRate. Switching the value will result in an error in each case. This error either is a non-physical solution to the (non-)linear system or a division by zero, which halts the simulation.

If you use Dymola, set Advanced.Define.AimForHighAccuracy = false to increase the chance of the error being produced for this simple example.

Components

TypeNameDefaultDescription
Buildings.Fluid.MixingVolumes.MixingVolumevolNonLinSysSteady state mixing volume requiring solution of non-linear system
Buildings.Fluid.Sources.MassFlowSource_Tsou2Source
Buildings.Fluid.Sources.Boundary_pTsinSink
Modelica.Blocks.Sources.Rampramp_m_flowMass flow rate ramp input
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlowpreHea2Prescribed heat flow
Modelica.Blocks.Sources.RealExpressionreaExpNon-linear thermal resistance equation
Buildings.HeatTransfer.Sources.PrescribedTemperaturepreTemPrescribed temperature
Modelica.Blocks.Sources.Cosinecos1Cosine input
Buildings.Fluid.MixingVolumes.MixingVolumevolTSteady state mixing volume with prescribed temperature input
Buildings.Fluid.Sources.MassFlowSource_Tsou3Source
Buildings.Fluid.MixingVolumes.MixingVolumevolLinSysSteady state mixing volume requiring solution of linear system
Buildings.Fluid.Sources.MassFlowSource_Tsou4Source
Modelica.Thermal.HeatTransfer.Components.ThermalResistortheResThermal resistor for creating linear system
Modelica.Blocks.Sources.Rampramp_TTemperature ramp input
Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlowpreHea1Prescribed heat flow
Buildings.Fluid.MixingVolumes.MixingVolumevolQflowSteady state mixing volume with fixed heat flow rate input
Buildings.Fluid.Sources.MassFlowSource_Tsou1Source
Modelica.Blocks.Math.GainreaPasThrReal pass through for unit conversion

Contents

NameDescription
Medium

Revisions

  • March 31, 2026, by Michael Wetter:
    Corrected unit propagation error that causes Dymola 2026x to not show certain units.
    See #2100.
  • January 27, 2016, by Filip Jorissen:
    Changed heat flow rate at zero flow to avoid triggering of conservation of energy check. This is for issue 470.
  • November 2, 2016, by Michael Wetter:
    Removed assertion as the variable that are tested are already part of the regression test. Also, the previous implementation mixed graphical with textual programming, which we try to avoid.
    This is for issue 441.
  • January 27, 2016, by Michael Wetter:
    Removed algorithm specification in experiment annotation.
  • July 2, 2015 by Michael Wetter:
    Revised example.
  • June 30, 2015 by Filip Jorissen:
    First implementation to test issue 282.