MATLAB Answers

Ideal Check Valve (Thermal Liquid, Simscape)

조회 수: 3(최근 30일)
Mash
Mash 2021년 7월 27일
답변: Mash 2021년 8월 2일
I do have a forked Thermal Liquid Network in simscape. I use Check Valves to stop backflow. But when the mass flow through my Mass Flow Rate is low, the leakage area allows backward flow as aspected. But then, the solver makes no progress anymore. Now I want a Check Valve with no leakage area - but the source code of the valve is protected. I cannot change the code.
Is there a solution to stop backflow entirely, even so its not realistic?
I wanted to change the code of the Local Restriction in the Foundation Library, to stop backward flow. But what to write where there?
Thanks alot for help.

답변(2개)

Yifeng Tang
Yifeng Tang 2021년 7월 30일
Hi Mash,
Having a check value (or any closed valve) with absolutely zero leakage is in general a bad idea. It basically changes the set of equations the solver needs to solve. If you are trying to resolve the issue of slow simulation by "fully" closing the valve, well, I suspect you may want to try the opposite, i.e. increase the minimal/leakage area. Let me explain.
First of all, use the solver profiler and make sure the check valve is the one causing the solver hanging problem. See more details on the Solver Profiler here: https://www.mathworks.com/help/simulink/ug/examine-solver-behavior-using-solver-profiler.html . You don't need to wait for the simulation to finish and you may stop the simulation after it hangs for a few seconds. You will get information on what blocks are causing the extremely small time steps.
Now the leakage. If it's set too small, what may happen is that the solver has to be able to resolve from a tiny flow, say 1e-10, to fully open (say 1e3). The difference in the order of magnitude (1) may not play well with your tolerance settings and (2) make the matrix to be solved really "stiff". I would suggest you increase the leakage area and see if the simulation speed improves, while keeping an eye on the leakage flow rate. A few orders of magnitude difference between open flow and closed is usually sufficient and realistic, but don't try too hard getting "zero" flow.
Hope this helps. If you could provide more info after you run the solver profiler or if you could share your model, we can take a closer look.

Mash
Mash 2021년 8월 2일
My model changed a bit the last days. Even so I could run an older version, I will continue with the newer one. I use now Ball Valves to stop forward and backfward flowing and four mass flow sources instead of one (the real system might work with four or with one). The ball valves are operated by constants, for testing only. Later, they will open if the mass flow source operates and closes, when the mass flow is 0.

Community Treasure Hunt

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

Start Hunting!

Translated by