Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent temperature outlet of the component Processes/TransportDelay.mo #223

Open
agonnelle opened this issue Jan 10, 2025 · 0 comments

Comments

@agonnelle
Copy link

Dear ThermofluidStream user and developer community,

Myself and my company (Newheat) modelling team might have identified an inconsistency regarding the component TransportDelay.
Indeed, whereas the component should only delay the inlet temperature and mass-fraction signals, it appears that it also generates an increase in temperature, albeit very small (less than a 1/10 of a degC).
In our in-house library, as we conduct solar thermal yearly yield estimations, where we use the TransportDelay base classes in several of our solar field sub-component models, the cumulative error can amount to something like 5% of energy generated out of thin air over a year!
According to our analysis, it seems to be related with how the component calculates the outlet enthalpy, h_out.

The following equation is present in the component:
h_out = u_out + p_out * v_out;

While if we remember correctly our university courses in thermodynamics, this equation is technically true (at least for gases), it might not be consistent with how the Medium are internally defined in the MSL / TFS packages.
For example, when using simple incompressible liquids with constant thermodynamic properties like ThermofluidStream.Media.myMedia.Water.ConstantPropertyLiquidWater, Modelica defines the enthalpy as equals to the internal energy (h = u). The previous component equation generates then an error that creates this inconsistent increase in temperature. If we change the component equation for this specific fluid by h_out = u_out, the error disappears and the inlet temperature is equal to the outlet temperature, after the delay time.
We have not yet found a generic solution to this problem, which would be applicable to all mediums and does not create non-linearities in the component. This is why there is no merge request attached to this issue report.

Please find below some screenshots illustrating the problem for a slightly modified version of the example Processes/Tests/TransportDelay.mo. Here the parameters and boundary conditions where modified to be consistent with a liquid system and not air.

Here is a screenshot of the model diagram:
image

Here are the temperature results with the unmodified model
image

Here are the temperature results with the outlet enthalpy equation modified to h_out = u_out (hence applicable to the Constant properties water model)
image

We would be really interested to have your thoughts on this problem and let us know if you see any robust solution to it.
Best regards,
Alexis Gonnelle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant