Coder Social home page Coder Social logo

opensimhub / openhpl Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 8.0 34.8 MB

The OpenHPL is an open-source hydropower library that consists of hydropower unit models and is modelled using Modelica.

Home Page: https://openhpl.opensimhub.org

License: Mozilla Public License 2.0

Modelica 77.42% TeX 16.99% Python 1.82% Motoko 3.77%
hydropower modelica-library open-source

openhpl's People

Contributors

boerrebj avatar dietmarw avatar hellb0rg avatar pandeysudan27 avatar tbeu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openhpl's Issues

Update the User's guide with the changes done to naming in the 2.0.0 release

There have been major updates to the naming conventions in the 2.0.0 release of OpenHPL. As usual, there was not enough time to also recreate the User's Guide document. So this is a leftover from #9.

One idea would actually be to convert the User's Guide from an external document to add it to the internal ´OpenHPL.UsersGuide`.

References to undefined connectors

Here:

connect(load.y, aggregate.u) annotation (

there are many references to undefined connectors:

Error: OpenHPL.Tests.HPElasticKPPenstockCompres [23:3-23:3] Unknown identifier reservoir.n.
Error: OpenHPL.Tests.HPElasticKPPenstockCompres [22:3-22:3] Unknown identifier intake.n.
Error: OpenHPL.Tests.HPElasticKPPenstockCompres [21:3-21:3] Unknown identifier surgeTank.n.
Error: OpenHPL.Tests.HPElasticKPPenstockCompres [20:3-20:3] Unknown identifier penstockKP.n.
Error: OpenHPL.Tests.HPElasticKPPenstockCompres [19:3-19:3] Unknown identifier turbine.n.
Error: OpenHPL.Tests.HPElasticKPPenstockCompres [18:3-18:3] Unknown identifier discharge.n.
Error: OpenHPL.Tests.HPElasticKPPenstockCompres [16:3-16:3] Unknown identifier aggregate.P_in.
Error: OpenHPL.Tests.HPElasticKPPenstockCompres [15:3-15:3] Unknown identifier aggregate.u.

Many other models in OpenHPL.Tests seem to have the same/similar issue.

Create an isolated valve model

Having a valve model would make it more obvious to create simple waterway models without the need for turbines. Though currently the general Turbine model is nothing else than a valve with some signals connected to it "to get rid" of the used energy.

Now a valve model could then be extended to become what the current Turbine model represents.

Improve the "FittingType"

The component OpenHPL.Waterway.Fitting allows to set the fitting type to either "Reduction" or "Expansion" in addition to be able to define the two different diameters. This basically means that one can for example define an expansion for a diameter that becomes smaller.
This should be improved and the expansion and reduction type should be automatically determined based on the given diameters.

Coding convention needs to be improved

The coding convention for Descriptive Strings is that it should start with UpperCase, for example, parameter Modelica.SIunits.Height H = 120 "vertical component of the length of the surge shaft" needs to be replaced with parameter Modelica.SIunits.Height H = 120 "Vertical component of the length of the surge shaft" .
Also, the commenting style of using //// should be improved with // for single line and /* (multiline comment)*/ .

Naming convention for ports needs to be improved

The documentation and parameters always refer to inlet and outlet but also to D_1 and D_2. In addition the connectors are named p and n which adds even more confusion.
The naming should be cleaned up and should use index i and o instead, throughout the library.

Many executable models refer to unaccessible data files

Please check the OpenModelica test report on the library. There are 21 models failing during the simulation stage because of errors of this kind

Not possible to open file "C:/Users/liubomyr/OneDrive/Documents/PhD/HydroCord/Servo_pos.txt":
No such file or directory

I would suggest to retrieve those files from Liubomyr's OneDrive account, put them under the Resources directory of the library, and access them via the modelica:// URI and loadFile utility function.

Missing source files of png images

PNG images should ideally be replaced by SVG images. That way we don't have to maintain 2 versions of the same image.

  • besad.png
  • darcyf.png
  • darcyf_zoomed.png
  • ghosts.png
  • kp.png
  • penstock.png
  • pipe.png
  • SharpOrificeSurgeTank.png
  • simplegen.png
  • surgepic.png
  • ThrottleValveSurgeTank.png
  • turbinepic.png

@pandeysudan27 could you see if you can get hold of pdfs that can be converted to SVGs or recreate them if not possible?

Rename the "Constants" base record

The library contains a set of global parameters that are defined in the model "Contants" and need to be instantiated for all models under the name "Const". Now the naming is rather unfortunate since we are talking about (mainly) parameters and not constants. So the name should reflect this. I propose to change the name to Parameters and instances getting the default name para.

HPSimple_Francis_GridGen example fails to simulate

Trying to run the example (HPSimple_Francis_GridGen) causes a crash.

After some digging around it seems to be due to the initial powerflow data in the order2 generator.
The values appear to be in Watts, but the fields take values that are in MW as illustrated in the image below.

Reducing these values to 16 and 11 respectively seems to solve the problem.

image

use of "abstract" classes

@boerrebj: Abstract classes (partial classes in Modelica terminology) are useful for collecting common parts of multiple detailed models. As
an example,

  • AbstractPipe basis class for both rigid water column pipe as well as elastic
    water pipe
  • AbstractValve basis class for different types of valves
  • AbstractTurbine basis class for different turbine types

Are some executable models in the library broken?

Please check the OpenModelica old frontend test report on the library. There are many models failing during the code generation phase. I understand the library was developed using OpenModelica/OMEdit, so those models should in principle work.

Maybe they were broken during the library development and left like that because of lack of maintenance and proper CI monitoring. I would suggest to check them out thoroughly and either fix them or remove them from the library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.