Metroscope-dev / metroscope-modeling-library

Modelica library to build physical models of nuclear and combined cycle gas power plants. Based on ThermoSysPro library
https://www.metroscope.tech/
Other
27 stars 1 forks source link

Pressure loss simplification #450

Closed valentind-met closed 1 year ago

valentind-met commented 1 year ago

Goal

This PR fixes the pressure loss complexity by using the inlet density instead of the mean density. Mean density created a complexity in which the pressure drop depends on the temperature, which creates a non desired causality possibility. This change is done in Pipes, ControlValves and SlidingValves.

No variables were deleted from the library, so the changes are transparent in terms of convergence (unless the model was using this weird causality).

For already calibrated models, results will slightly change. Most tests of the library were not significantly impacted by this, except some control valves of the steam turbine. This is therefore considered a breaking change but could be transparent for most models.

Fix #427

Type of change

Will it break anything in previous models ?

Checklist

You can also fill these out after creating the PR, but make sure to check them all before submitting your PR for review.