modelInversion1
Extends from ThermofluidStream.Idealized.Tests.Inversion.BaseClasses.PartialInverse (Base model defining the mixing problem), Modelica.Icons.Example (Icon for runnable examples), ThermofluidStream.Idealized.Utilities.IconInertanceNeglect (Icon for considerInertance = false).
Information
Mixing of two fluid streams, A and B. Assuming constant specific heat capacities c_p, the mixing equation is:
m_flow_A * T_A + m_flow_B * T_B = (m_flow_A + m_flow_B) * T_mix;
This equation can be easily solved for a single unknown.
In this test, the goal is to determine the mass flow rate m_flow_B such that the mixture temperature is
T_mix = 25 °C. The solution is:
m_flow_B = - m_flow_A * (T_B - T_mix) / (T_A - T_mix)
= - 1 kg/s * (30 - 25) / (20 - 25)
= 1 kg/s
Dymola uses the mass flow rate
junction.m_flowA and the specific enthalpy of the mixture junction.h_mix as the iteration variable. Their default start values might not be appropriate, which can cause the simulation to fail.
Components
| Type | Name | Default | Description |
|---|---|---|---|
| ThermofluidStream.DropOfCommons | dropOfCommons (from PartialInverse) | ||
| ThermofluidStream.Boundaries.Source | sourceA (from PartialInverse) | ||
| .ThermofluidStream.Idealized.Boundaries.Sink_free | sink (from PartialInverse) | ||
| ThermofluidStream.Idealized.Topology.JunctionT2 | junction (from PartialInverse) | ||
| ThermofluidStream.Boundaries.Source | sourceB (from PartialInverse) | ||
| .ThermofluidStream.Idealized.Boundaries.MassFlowRate | massFlowRateB (from PartialInverse) | ||
| .ThermofluidStream.Idealized.Boundaries.MassFlowRate | massFlowRateA (from PartialInverse) | ||
| ThermofluidStream.Sensors.SingleSensorSelect | singleSensorSelect (from PartialInverse) | ||
| Modelica.Blocks.Sources.RealExpression | temperatureSetpoint | ||
| Modelica.Blocks.Math.InverseBlockConstraints | inverseBlockConstraints |
Revisions
-
2026, by Raphael Gebhart (raphael.gebhart@dlr.de):
Initial version.