temperature calculation in a hydrogen refueling station model

4 visualizaciones (últimos 30 días)
Roberta
Roberta el 12 de Nov. de 2024
Comentada: Roberta el 25 de Nov. de 2024
I'm working on simulink: I have a flow rate with positive and negative values ​​(sinusoidal function), with which I have to calculate the pressure, temperature and other parameters of a hydrogen tank to simulate its refueling and emptying. When the flow rate is greater than zero, I continue filling the tank, with all the relevant equations in specific blocks. If, on the other hand, the flow rate is negative, thanks to the else function of a if block, I calculate all the parameters with slightly different equations, placed in other blocks. When I move from one block to another, that is, from the filling phase to the emptying phase, I have a problem with the temperature calculation. In fact, the code, when it calculates the temperature in the filling phase in different intervals, takes the previous temperature as a reference: therefore, in the first interval (refilling) the temperature is calculated correctly, while in the second filling interval (which occurs after the first emptying interval) the previous temperature taken into consideration is not the last one of the first emptying phase, but the last one of the first filling phase. This results in having a step in the final values ​​at the beginning of each filling and emptying phase. How can I eliminate this step? If you need more information just ask
  2 comentarios
Swastik Sarkar
Swastik Sarkar el 20 de Nov. de 2024
Could you please share the model with us so that we can reproduce the results on our end?
Roberta
Roberta el 25 de Nov. de 2024
I have already solved the problem by taking the integral of the temperatures out of the respective charge and discharge blocks. In practice, when the system changed from charge to discharge it was as if it "forgot" what was happening before. Some results were already reported on the right of the image (temperatures of the hydrogen and the tank walls)

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by