This experiment demonstrates the sizing functionality with the TwoPhase-Liquid heat exchanger, using the Physics-based Solving capability of Modelon Impact.

The model extends from the SteadyState HeatPump example and sizes the evaporator heat transfer area for the liquid side according to a prescribed heat flow rate.

Note: This will not work with dynamic simulation unless PbS and PbS-only features are disabled.


This model extends from VaporCycle.Experiments.HeatPumpSteadyState.Base so it is already prepared to run in PbS

The following are modifiers for setting up the sizing problem. Look for them in the sizing tab of the evaporator parameters.

  • evaporator.sizing = true, This enables the sizing feature of the heat exchanger
  • evaporator.designMode = Custom , The mode is set to custom to just size one parameter instead of two
  • evaporator.sizing_sec = true, Turning on sizing for the secondary channel because the liquid heat transfer area is on that side
  • evaporator.A_heat_fixed_sec = false, By setting this to false the heat transfer area becomes unfixed and solved for the prescribed heat flow rate
  • evaporator.Q_flow0_sec = -5000 W, this is the prescribed heat flow rate from the liquid side. The heat flow is negative because energy is transferred from the liquid to two phase side


  1. In Settings > Execution > Steady State > Compiler Options turn on variability_propagation
  2. Run the example using Modelon Impact's Steady State execution. Make sure 'Enable steady state simulation' is enabled in the Settings > Application
  3. From the Results mode, rename the result from Result 1 to Nominal
  4. Switch to the Experiment mode (or press [2] on the keyboard)
  5. Expand the right sidebar and in the Experiment section create a New Experiment and call it MultiRun
  6. While still in Experiment mode, open the evaporator sizing parameters and set Q_flow0_sec = range(-5900,-4300,17)
    • This will tell the experiment to run a sweep of evaporator.Q_flow0_sec starting from -5.9 kW to -4.3 kW taking 17 steps
  7. In the Experiment section, under Analysis, expand the Advanced section and for Initialize from select Nominal from the drop-down. This will initialize each case of the sweep using the values from the nominal result to assist with convergence. Initializing from a nominal or close result will be give a better chance of convergence.
  8. Image

  9. Run with Steady State again


Plot evaporator.hex.secondaryChannel.A_heat_set to see what the required secondary heat transfer area needs to be in order to reach the prescribed heat flow rate. This is the total heat transfer area and is divided equally over the discretized channel.


Observe the rate at which the required heat transfer area quickly increases faster than the prescribed heat flow rate.