Simscape 2P energy conservation bug ?

Hello everyone,
I'd like to report something which I think could be a bug ?
I attached a very simple model showcasing the effect presented below.
I have a tank of steam discharging into a translation mechanical converter (so a piston), no heat losses/gains, no friction etc.. It is linked to a spring just so that it reaches an equilibrium after some time.
The piston moves just like expected but the enthalpy and temperature inside it does not: it actually goes higher than the supply !! Whereas initial conditions in the cylinder are colder than the supply.
I can't think of this being possible in real world physics or am I missing something ??
Thanks, have fun !

3 Comments

Hi Joris,
This is indeed an interesting case. While I can confirm the "total" energy of the system didn't increase by looking into the simlog data, I too wonder whether the initial temperature and enthalpy jump is physical or just some numerical weirdness. Will follow up.
Impatient to know the reason behind
Thanks !

Sign in to comment.

 Accepted Answer

Yifeng Tang
Yifeng Tang on 1 May 2021
Hi Joris,
After a closer look at the results, it looks like everything was physically reasonable. There was some very quick action that was happening during the first 2e-5 sec and 0.15 sec that created the initial spike in the T_I of the cylinder. In fact, it's more than a simple spike.
0 ~ 2.5e-5 sec: vapor rush into the cylinder (mdot_A), pressure quickly rises (p_I), T_I quick rises because the incoming fluid is doing work to the volume. At this time, there is a huge amount of force applied by the cylinder on the mass because the initial force from the spring is zero. The mass will accelerate quickly.
0 ~ 0.05sec: the mass is accelerated quickly to 30m/s, expanding the cylinder volume. The pressure and temperature drops quickly because mdot_A can't keep up. The net force on the mass crosses zero ~0.035sec as the spring is compressed enough.
0.05 ~ 0.15sec: mass still moving away but slowing down. mdot_A catches up, doing work to the low pressure volume, increasing both the pressure and temperature. Around this time, the spring force starts to match the cylinder force and the volume starts to stablize.
After that, things start to approach steady-state.
During the process, the temperature of the chamber drops a little bit, while also fluctuates according to the sign/direction of mdot_A. That's also where all the energy comes from.
Hope this makes sense.

6 Comments

Hi Yifeng,
Can you detail how the temperature rises because mdot_A does work on the volume ?
I am not fully understanding the meaning of this sentence, is it some kind of fluid inertia effect ?
And if I were to reproduce this experience in real life, would I also witness the temperature in the cylinder rise above supply's temperature ?
Thank you for your help!
It's a poorly worded rendition of the First Law of Thermodynamics :p
If you push gas into a cylinder faster than the cylinder can expand, pressure will rise, as well as the temperature. An even simpler version would be pushing gas into a fixed-volume chamber, and yes, temperature goes up during this adiabatic process.
To observe this in real-life, the "adiabatic" part may make this a bit difficult to execute, but maybe here is an idea of a reverse process of pushing into a volume. If you have an air duster handy (a can of compressed air), you can try discharging it for a few seconds. The can body will become colder because the air inside becomes colder. You may also see the outlet air stream leaves condensation marks on the surface it hits, indicating the outlet air is very cold, too. Both are results of that air doing work (expanding) and it's internal energy drops, i.e. becomes colder. Now imagine a reserve process of this: somehow we push the cold outlet air back into the cold can. The can will go back to its original state of room temperature (hotter). What the control volume of that can is experience is exactly a cold incoming mdot doing work to a colder gas volume, rising the temperature of both to higher than that of the incoming mdot.
If some math helps: during an adiabatic process (https://en.wikipedia.org/wiki/Adiabatic_process), with fixed volume, the temperature changes as (the eqn above eqn c2)
so, higher pressure (probably from gas rushing in), higher temperature.
Mmmmmh I see, but there is still one thing that bugs me : the pressure.
This explanation would work if the pressure was indeed higher, but they are both equal at around 3 bars ?
Or maybe it's about some kind of thermal inertia ? The pressure is indeed higher at the very beginning, so both pressure and temperature rises but the temperature stays longer because of heat capacity of the fluid ?
The pressure and temperature look like they are well-synchronized at first. Both have an initial sharp rise (0-2e-5sec), a drop (0-0.05sec) and another rise (0.05-0.12sec). The drop and second rise has a lot to do with the inertia of the mass, which was dictating the change in the volume, pressure, and mass flow.
After 0.15 sec, the mass is just moving a little bit around equilibrium, so there isn't much of work done by inflow/outflow on the cylinder volume. Because the pressure is also balanced, the extra internal energy, i.e. temperature, can only leave the cylinder by conduction/diffuction through the restriction. That's why it takes a few hundreds of seconds for T_I to get down again.
Interesting ... something to get my head around finally!
I would love to see this phenomenon on a real life test bench.
Thank you very much !

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!