Skip to content

Commit b5d499c

Browse files
authored
Flow sign in the pipe component (#385)
* Replaced Q^2 by Q*abs(Q) in the pipe Signed-off-by: Nabil YOUSSEF <nabil.youssef@metroscope.tech> * Update the changelog --------- Signed-off-by: Nabil YOUSSEF <nabil.youssef@metroscope.tech>
1 parent f8d0496 commit b5d499c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Sensors now contain a flow model to ease convergence [PR#383](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/383)
1414

1515
### Fixed
16+
- Pipes now can have a unique flow direction according to the pressure difference direction [PR#385](https://github.com/Metroscope-dev/metroscope-modeling-library/pull/385)
1617

1718
## MML-v3.4.0
1819

MetroscopeModelingLibrary/Partial/Pipes/Pipe.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ equation
2121
fouling = 0;
2222
end if;
2323

24-
DP_f = - (1+ fouling/100) * Kfr * Q^2 / rho;
25-
DP_z = -rho *Constants.g * delta_z;
24+
DP_f = - (1+ fouling/100)*Kfr*Q*abs(Q)/rho;
25+
DP_z = - rho*Constants.g*delta_z;
2626

2727
DP = DP_f + DP_z;
2828
annotation (

0 commit comments

Comments
 (0)