Branching of a two-phase fluid
1 回表示 (過去 30 日間)
古いコメントを表示
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/654130/image.png)
Since it doesn't work like that yet, I created a much simplified model. Now I simply want to test the two shutoff valves.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/654145/image.png)
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/654150/image.png)
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
0 件のコメント
採用された回答
Yifeng Tang
2021 年 6 月 16 日
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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Two-Phase Fluid Library についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!