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

Adds hydraulic library #78

Closed

Conversation

ValentinKaisermayer
Copy link
Contributor

@ValentinKaisermayer ValentinKaisermayer commented Jun 15, 2022

There seems to be still an issue, maybe with the solver, I'm not sure.
The mass flow rate should get to zero when the pressure of the volume is equal to the pressure of the source.

Rodas4

hydraulic

Tsit5

hydraulic

Since many components need some sort of media properties, I used the variable scope to lift them into the overall model where they can be centrally defined. Maybe there is a better way to do this. Modelica and Simscape do this via a special block that is present in the model.

@codecov
Copy link

codecov bot commented Jun 19, 2022

Codecov Report

Merging #78 (0efd202) into main (70ff6ab) will decrease coverage by 0.08%.
The diff coverage is 74.07%.

❗ Current head 0efd202 differs from pull request most recent head eb22c76. Consider uploading reports for the commit eb22c76 to get more accurate results

@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
- Coverage   69.42%   69.34%   -0.09%     
==========================================
  Files          23       26       +3     
  Lines         942      985      +43     
==========================================
+ Hits          654      683      +29     
- Misses        288      302      +14     
Impacted Files Coverage Δ
src/Hydraulic/sources.jl 0.00% <0.00%> (ø)
src/Hydraulic/utils.jl 81.81% <81.81%> (ø)
src/Hydraulic/components.jl 100.00% <100.00%> (ø)
src/Thermal/utils.jl 90.00% <0.00%> (ø)
src/Blocks/continuous.jl 98.17% <0.00%> (ø)
src/Thermal/HeatTransfer/sensors.jl 100.00% <0.00%> (ø)
src/Thermal/HeatTransfer/sources.jl 100.00% <0.00%> (ø)
src/Thermal/HeatTransfer/ideal_components.jl 100.00% <0.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@ValentinKaisermayer
Copy link
Contributor Author

Works fine with smaller solver tolerance:
hydraulic

@ChrisRackauckas
Copy link
Member

Conflicts.

Yes. looks like a standard numerical instability due to large dts.

@dodoplus
Copy link

dodoplus commented Jul 2, 2022

@ValentinKaisermayer just curious: why are you modeling changes in density due to pressure but ignore temperature entirely? E.g. for water, 10K change in temperature is more significant than 10MPa change in pressure.

@ValentinKaisermayer
Copy link
Contributor Author

Because this library is supposed to model fluid systems where the change in temperature is negligible. This allows to avoid stream connectors all together. However, if this is an insufficient assumption for the modeling needs at hand, a ThermoFluid domain is needed, i.e. #87.

WSM and Simscape have such a library.

@ValentinKaisermayer ValentinKaisermayer marked this pull request as ready for review September 3, 2022 17:46
@ValentinKaisermayer
Copy link
Contributor Author

I guess this is obsolete with #159

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.

3 participants