HeatExchangerSimulation model

Requirements.Examples.SteadyState.HeatExchangerSimulation  ยท source

Icon of HeatExchangerSimulation

Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation with both inlet temperatures and both mass flows as parameters, run to its steady state

Extends Modelica.Icons.Example, Modelica.Fluid.Examples.HeatExchanger.HeatExchangerSimulation

A steady-state example: the MSL heat exchanger simulation with both inlet temperatures and both mass flows as parameters, so that a sweep over them is a map of the exchanger's operating points and a requirement (the outlet temperature of side 1 shall be at most 80 degC, the operating point shall stay within the exchanger map) is checked at every point of it. The example's ramp (counterflow to co-current at 50 s) is replaced by the constant m_flow2, negative for counterflow: massFlowRate2 at port_b2 then draws the fluid from ambient2, whose temperature is therefore side 2's inlet temperature T_in2; side 1 enters at massFlowRate1 with T_in1. The medium is water (StandardWaterOnePhase): keep the temperatures between 0.1 and 99.9 degC. The energy dynamics are FixedInitial -- the example's SteadyStateInitial would solve the steady state at initialisation; a run from the example's own start values (304 / 300 K) is the genuine time simulation to it, and the point is where the run ends up, settled over its last quarter (600 s suffice everywhere in the sweep below). The HX's start parameters carry Evaluate=true and cannot follow a sweep.

This model is the plant alone: it carries no requirement block, so that it can be simulated, swept and stored by any tool without the checks influencing the run. CheckHeatExchanger adds the requirements and checks one operating point in a plain simulation.

A sweep of this model over a 400-row table of inlet temperatures (a 20 × 20 grid from 5 to 95 degC on each side) with matched mass flows (side 1 from 0.1 to 0.3 kg/s, side 2 the counterflow of it within 10 %) settles on every row, and the hottest wall node sits at the hotter inlet, half a tolerance under a 96 degC limit.

Copyright © 2026 Model Based Innovation LLC. All rights reserved.

Parameters

NameTypeDescription
T_in1 parameterSI.TemperatureInlet temperature of side 1 (massFlowRate1; water: 0.1 to 99.9 degC)
T_in2 parameterSI.TemperatureInlet temperature of side 2 (ambient2, where the fluid enters in counterflow)
m_flow1 parameterSI.MassFlowRateMass flow of side 1, into port_a1
m_flow2 parameterSI.MassFlowRateMass flow of massFlowRate2 at port_b2: negative draws the fluid in from ambient2 at port_a2 and out at port_b2 -- the example's counterflow case

Outputs

NameTypeDescription
T_out1 outputSI.TemperatureOutlet temperature of side 1 (the last node, at port_b1)
T_out2 outputSI.TemperatureOutlet temperature of side 2 (the last node, at port_b2, where the negative massFlowRate2 draws the fluid out)
Q_flow outputSI.HeatFlowRateHeat flow into side 1 (negative: side 1 is cooled)
Q_transferred outputSI.HeatFlowRateHeat side 1 gives to side 2 (positive when side 1 is the hotter one)
T_wall_max outputSI.TemperatureHottest wall node