Branching of a two-phase fluid

8 views (last 30 days)
Kai Franke
Kai Franke on 15 Jun 2021
Edited: Kai Franke on 19 Jun 2021
I am currently trying to expand the Electric Vehicle Thermal Management model by adding a heat pump for heating operation instead of the PTC element. I would like to have the two-phase fluid flow through some kind of valve into another circuit. Since there seems to be no closing valves for 2P, I have tried to insert a valve orifice.
Below you can see my modified circuit.
Since it doesn't work like that yet, I created a much simplified model. Now I simply want to test the two shutoff valves.
SV1 should be open and SV2 closed. I realize this via a MATLAB function in the control block. cmd_SV1 or cmd_SV2 is either 1 or 0 and thus opens or closes the orifice.
function [cmd_SV1,cmd_SV2] = modefunction(delta_T_cabin)
if delta_T_cabin > 0 % cooling
cmd_SV1 = 1;
cmd_SV2 = 0;
else % heating
cmd_SV1 = 0;
cmd_SV2 = 1;
% elseif % mixed
% elseif % off
end
The scenario:
  • Cabin temperature: 30 °C
  • Target temperature: 21 °C
  • delta_T_cabin = 9 °C (For the original model)
Now, strangely enough, the following case occurs: With two valves, a temperature difference of -21 °C is passed to the function because the cabin temperature is suddenly 0 °C. This means that my valves are not controlled correctly and an error occurs.
Now my questions:
Is it possible to switch a two-phase fluid like this at all? If so, how do I solve the problem? Why is my cabin temperature suddenly changed? Without SV2 but with SV1 the simulation runs without any problems.
Thanks for your help!
Kind regards
Kai

Accepted Answer

Yifeng Tang
Yifeng Tang on 16 Jun 2021
Hi Kai,
You are using the "Orifice (2P)" block to model the valve, right? Good choice, I'd say, but there are a few things you need to pay attention to.
1. the S signal to the orifice block is supposed to be the spool position, with a unit of length (m/cm/mm/inch, etc.). The parametrization of the block will translate this position to opening area. This is similar to how most of the hydraulic valve blocks are parametrized. Giving it command of 0 and 1 without specifying a unit consistent with the block parameters, may give you unexpected results.
2. Trying to open or close a valve instantaneously can cause numerical problems as well. And it's not really physical. Consider add a 1st order transfer function or add derivatives in the Simulink-PS converter to slow it down a bit.
3. A bang-bang type of control algorithm with no deadzone in the midde is usually not optimal for refrigeration loop, either. You may want add a threshold around your target (delta_T=0), beyond which the valves will act and switch direction.
  1 Comment
Kai Franke
Kai Franke on 17 Jun 2021
Great! Thanks for the quick reply. I'll see if I can get the problem solved with these tips. Thank you!

Sign in to comment.

More Answers (0)

Categories

Find more on Two-Phase Fluid Library in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!