Ideal Check Valve (Thermal Liquid, Simscape)

7 views (last 30 days)
Mash
Mash on 27 Jul 2021
Answered: Mash on 2 Aug 2021
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.

Answers (2)

Yifeng Tang
Yifeng Tang on 30 Jul 2021
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 on 2 Aug 2021
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.

Categories

Find more on Thermal Liquid Library in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!