Simscape two-phase fluid in closed accumulator looses pressure
6 次查看(过去 30 天)
显示 更早的评论
Dear community,
I used a Receiver Accumulator (2P) and closed all ports with caps and a perfect insulator in a simple simscape model. Just the BV port was left open and conected with a Controlled Mass Flow Rate Source (2P) to a reservoir. The massflow was set to zero, so there should not be any fluid going out or into the accumulator. The accumulator is charged with liquid water.
During the simulation, the mass stays constant in the accumulator, what is reasonable. Also the mass flow at the mass flow rate source stays zero as it should be. However, the pressure is rising and then immediatly drops as you can see below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1400459/image.png)
Do you have any idea, where it comes from? Is it a solver unstability? Is there a solution to gain more stability?
Thank you very much,
Patrick
2 个评论
Yifeng Tang
2023-6-8
This looks strange and ... interesting. If you could share a model, I can look into this and see if there is a plausible explanation to this.
采纳的回答
Yifeng Tang
2023-6-9
Hi Patrick,
I believe what you are seeing is the result of the "upwind energy scheme" implemented at all ports of thermo-fluids domains (Gas, MA, TL, 2P). It's documented here: https://www.mathworks.com/help/hydro/ug/simscape-fluids-numerical-scheme.html
In your case, while the mass flow rate source block makes the mass flow zero, it will not enforce zero energy flow. Since the internal energy on the two sides are different, due to pressure difference, there can be some small energy flowing through (think of it as conduction). If you look at Phi_BV in the result explorer, you'll see it's small but not zero, unlike Phi_AV,AL,BL. The amount of the energy flow depends on the difference in internal energy on both sides, and how big the port sizes are. The side with bigger port size will dominate in "conduct" or "diffuse" its property to the other end. Usually this effect is not obvious as the energy content carried by some flow will be orders of magnitude greater, but since you have zero flow, you may see a bit of that.
A few things to try to see this effect in play:
- make the outlet reservoir pressure the same as the accumulator, so delta_h is the same. Phi will be zero. Or,
- comment out the source and reservoir. No mass flow or energy flow, no state change. Or,
- Use an inifite flow resistence block in place of the source. This block enforce zero mass flow and zero energy flow. Or,
- make the outlet reservoir port size a lot smaller, say 1e-9. You may still see a small gradual change in the states (e.g. pressure), but the amount is going to be way smaller.
That said, I don't yet understand why the small energy loss through the port is leading to the pressure change in this fashion. I suspect that this has to do with the fact that the whole volume is filled with liquid water, and the volume is fixed. So any internal energy change will force the solver to find a point where rho remains the same for the given internal energy, and where that point is on the property table, well, I don't know, but it's unlikely to stay at the same location. I attached a simple test: a constant volume in TL domain, using the H port to take out a tiny amount of heat. The pressure will change quite a lot.
Hope this helps. If you find out why exactly the pressure changes in this fashion, please share your insights as well.
Thanks!
2 个评论
Yifeng Tang
2023-6-16
If you feel comfortable with customizing the blocks with Simscape language, you can add an "if ... else ..." or modechart into the source block, so when the flow is zero, it effectively applies the equations from the infinite flow resistance.
If I can think of any other quick fix, I'll let you know.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Tanks and Accumulators 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!