Simulation of two phase fluid with Simscape - pressure behavior unexplicable

16 views (last 30 days)
I simulate the attached system, using the two phase fluid and the self crated properties block with the properties of hydrogen. The tank has 7 bar, the reservoir has 2 bar. Imidiatelly after starting simulation, the pressure in the tank drops down to the level of the reservoir (2 bar). That makes logical for me so sence. When I have a pressure tank with a small exit (area: 1e-4 m²) the pressure in the tank should go down slowly. The level is also plottet, where one can see that even the tank goes empty slowly.
So waht could be my mistake here?
  3 Comments
Marcel Thevagt
Marcel Thevagt on 26 Jun 2024
Edited: Marcel Thevagt on 1 Jul 2024
Thanks for answering. I'm sorry for the difficulties. I added some annotation in the screenshot to claify. But all in all you understood the thing I'm trying to simulate right and also your understanding of my system is right. I drawed a circle arround the pressure drop in one of the plots. This is the drop I mean and I'm wondering about. At AV I measure directly the pressure in the tank. The tank has 50l. All ports and even the pipe have a area in the range of 1e-4 m².
Umar
Umar on 26 Jun 2024
Hi Marcel, it seems like you are experiencing a rapid drop in pressure in the tank to match the reservoir pressure immediately after starting the simulation. This abrupt pressure equalization may be unexpected, especially when considering the small exit area of the tank. One potential explanation for this behavior could be related to the properties and behavior of the two-phase fluid you are using in the simulation. If the fluid properties or phase change characteristics are not accurately represented, it could lead to unrealistic pressure dynamics. Additionally, the modeling of the exit area and flow characteristics plays a crucial role in determining the rate at which pressure decreases in the tank. A small exit area, as you mentioned, should indeed result in a slower pressure drop compared to a larger exit area. However, if there are errors in how the flow is modeled or if there are issues with boundary conditions, it could lead to unexpected results. To troubleshoot this issue, you may want to carefully review and validate the properties of the two-phase fluid block, ensure that the exit area and flow calculations are accurately represented, and double-check all boundary conditions and assumptions in your simulation setup. It might also be helpful to compare your results with theoretical calculations or experimental data if available to verify the accuracy of your model.

Sign in to comment.

Answers (2)

Yifeng Tang
Yifeng Tang on 27 Jun 2024
Hi Marcel,
The port area parameter of the Receiver Accumulator block doesn't affect the pressure drop between inside and outside the volume. In fact, there is NO pressure difference between the pressure inside the receiver and at the port. See here:
  • Flow resistance through the outlets is not modeled. To model pressure losses associated with the outlets, connect a Local Restriction (2P) block or a Flow Resistance (2P) block to the ports of the Receiver-Accumulator (2P) block.
In your case, the pressure drop is solely due to the pipe block and the local restriction block. If you expect a different flow rate or change of pressure, look for different parameters for those two blocks.
That said, the port area of the receiver does play another role. It's used in calculating the local velocity at the port, which is part of the total energy flow. So, keep it at a reasonable value, for example the actual port area :).
  14 Comments
Yifeng Tang
Yifeng Tang on 9 Jul 2024
Hi Marcel,
Do you have access to R2024b pre-release? The Receiver block in this newest release has a feature that allow you to set the initial liquid and vapor state seperately. See below.
This way you'll be able to keep the liquid hydrogen at 20K while the vapor can be at a higher temperature so it can stay in vapor phase at higher pressure (say 7 bar).
Also, if you have access to R2024b, you can check out this example on liquid hydrogen storage and transportation.
Marcel Thevagt
Marcel Thevagt on 17 Jul 2024
Fortunaltelly I have access to the pre-release version. So I tried the option to have different temperatures for the vapor and liquid phase, respectively.
Furthermore I extednded the system a little bit. So I added an evaporator and a pipe, with proper heat transfer, to model some not perfectly isolated pipes in the system. I dont't want to hide this system from the community, so I attached it here (the additional script is only for some variable, don't care about this to much, just run it in advance).
Unfortunatelly, there is still 'this drop', as one can see in the picture below. Even if it is not as fast, as bevore. I used following Initial temperatures for this simulation: 20K liquid and 30K vapor.
The first plot shows the fill level. It starts, as desired at about 90%.
The second plot shows the pressure, before (blue) and after (orange) the pressure controlling valve. There, one can observe, that the pressure drops down from 7 bar to 1 bar in less than 1000s, but the tank is still over 80% full of liqid. Yes, liquid is not compressible (drop on left side of boiling line), but to modell properly, therefore there are roughtly 10% vapor at the beginning. Even when I decrease the initial fill level to 70% liquid, this drop occurs in more or less the same time. Additionally, after a while the pressure goes bellow 1 bar, so the flow rate source produces a slight vaccum, but still the tank is full of liquid? Sounds wrong... I tried to increase the areas of the ports and the valve a bit, but that has no influence to this behavior. I tired arround with the initial temperature of the vapor (in range 30K...60K), but again no big influence.

Sign in to comment.


Umar
Umar on 1 Jul 2024
Hi Marcel,
To answer your question, yes, you are right about transition occurring in less than 1 second indicating a rapid response time. Such rapid changes can impact the overall system dynamics and may lead to issues such as pressure spikes or flow fluctuations.
In my opinion, it may be beneficial to analyze the system parameters, such as the flow rate, pressure drop across the restriction, and the material properties of the fluid. By adjusting these factors or introducing additional control measures, it may be possible to optimize the system's response time and ensure smoother operation.
Hope this helps you resolve your issue.

Categories

Find more on Chemistry in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!