Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently
ThermofluidStream.HeatExchangers.Internal.PartialNTU
uses a time constantparameter Modelica.Units.SI.Time TC=0.01 "Heat exchanger time constant" annotation (Dialog(tab="Advanced"));
and filters the outlet enthalpy to ensure a robust simulation. On the other hand, the time constant can be a good first guess to consider the transient behavior without the need of a high spatial resolution, e.g. like
ThermofluidStream.HeatExchangers.DiscretizedCounterFlowHEX
. (Note that DiscretizedCounterFlowHEX does not consider the thermal inertia of the heat exchanger wall material, which might be relevant (e.g. for m_Wall c_Wall > m_flow_Fluid c_Fluid, i.e. for gas where rho_Wall >> rho_Fluid. We might reconsider that)Hence i added a short description for the time constant.
I would suggest to move the time constant from
Advanced
tab, since it matters.I would suggest that the user can change initialization (e.g. h_out(T_0) instead of h_out=h_in). We could use
ThermofluidStream.Processes.Internal.InitializationMethodsCondElement
for that (or something similar). I tested it and it works.I would suggest to change the default value of the heat exchanger time constant, because the heat exchanger time constant default value is currently less than the default value of the fluid flow time constant, which is not physical and leads to unphysical results, see figure below, where the heat exchanger is faster than the mass flow rate: Dimensional analysis (https://en.wikipedia.org/wiki/Dimensional_analysis) yields e.g. for water a time constant of TC ~ L sqrt(dp/rho) = 0.1s (L = dropOfCommons.L, dp = 1 bar, rho = 1000 kg/s) or for air TC = 1s (L = dropOfCommons.L, dp = 0.1 bar, rho = 1 kg/s). For the instationary bernoulli the time constant T = sqrt(1/2*dp/rho)*1/l (l - length)
Bonus: We could add a delay time like
Modelica.Blocks.Nonlinear.FixedDelay
or its approximationModelica.Blocks.Nonlinear.PadeDelay
https://www.fluid.tuwien.ac.at/322034?action=AttachFile&do=get&target=1_6_1.pdf