Skip to content

Change of k_min - #374

Draft
tobiasreischl wants to merge 2 commits into
DLR-SR:mainfrom
tobiasreischl:277-Decrease_k_min
Draft

Change of k_min#374
tobiasreischl wants to merge 2 commits into
DLR-SR:mainfrom
tobiasreischl:277-Decrease_k_min

Conversation

@tobiasreischl

Copy link
Copy Markdown
Contributor
  • changed min value to Modelica.Constants.eps of k_min in PartialValve.mo

  • Tested with existing test models and espresso machine

Closes #277

…e.mo

- Tested with existing test models and espresso machine

Closes DLR-SR#277

@CorentinLepais CorentinLepais left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BasicControlValve test model failed when simulating with k_min<1e-10. I did not check the other valve models but the min value for k_min should definitely be higher than Modelica.Constant.eps

@CorentinLepais
CorentinLepais marked this pull request as draft July 29, 2026 12:29
@tobiasreischl

tobiasreischl commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

The problem is triggered by the dynamic closing process, not by the steady-state closed valve.
If the valve should close completely we need to include different dynamic behavior - or include a sperate case distinction.
For now the formulas don´t allow for quick shutting the valve without (relevant) leakage.

In the current PartialValve formulation,

[
dp \propto \left(\frac{m_\mathrm{flow}}{k_u}\right)^2
]

With inertance enabled, m_flow cannot decay as quickly as k_u during closing. Therefore, reducing k_min by one decade can increase the transient pressure-loss term by roughly two decades.

Adding a first-order actuator only shifts the problem to smaller values of k_min; it does not remove the underlying (1/k_u^2) scaling.

Possible improvements

  • Regularize the zero-flow region in PartialValve, for example with Modelica.Fluid.Utilities.regSquare.
  • In SpecificValveType, interpolate k_u directly or interpolate log(zeta) instead of zeta, since the current curve spans several orders of magnitude close to the closed position.
  • Do not simply change the lower bound to Modelica.Constants.eps. This only allows numerically ill-conditioned parameter values without changing the underlying equations.
  • Keep a validated finite lower bound for k_min for the current valve implementation.
  • If ideal shut-off is required, implement it as a separate closed mode or dedicated shut-off valve model.

Conclusion

Regularization and improved curve scaling may reduce the practical lower limit of k_min, but arbitrarily small values are not numerically robust with the current pressure-loss formulation.

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

Successfully merging this pull request may close these issues.

Decrease k_min in ThermofluidStream.FlowControl.Internal.PartialValve

4 participants