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

initial implementation of BoilerGeneric and Example #1443

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

DaJansenGit
Copy link
Member

This includes the first model of the new ModularEnergySystems models (see #1147)

Before merge we want to solve all todos listed in #1439

@FelixStege
Copy link
Contributor

I looked roughly over the code and saw some issues regarding the naming convention. I am mentioning them here so that you can consider them in your further development.

You use "Nom" as an abbreviation in some models (e.g., in NominalFuelConsumption). In a lot of other models, we use "nominal" (also mentioned at the bottom of the wiki). Additionally, in NominalFuelConsumption the naming for dTNom is confusing when you also have dTNominal.
Another thing is the order of the variable names (use m_flow_rel instead of rel_m_flow).

@ebc-aixlib-bot
Copy link
Contributor

Thank you for making a Pull Request to AixLib!

Our CI pipeline will help you finalize your contribution.
Here's what is typically checked:

  • HTML syntax of your models, primarily in your documentation.
  • Adherence to the naming convention in all changed files.
  • Ability to check all models.
  • Ability to simulate all models, if they are examples.
  • If your contribution changes existing reference results.

If HTML errors occur, I will fix the issues using a separate pull request.
For the other checks, I will post the results here: https://rwth-ebc.github.io/AixLib/issue1147_GenericBoiler/index.html

Tips to fix possible naming violations:

  • Stick to the naming guidelines, e.g. Namespace Requirements
  • Do all paramaters, variables, models, etc. have a description?
  • Use absolute paths to classes! -> AixLib.Fluid.HeatExchangers.Radiator - Avoid: HeatExchangers.Radiator

If all CI stages pass and you have addressed possible naming violations, please consider the following:

  • Use "group" and "tab" annotations to achieve a good visualization window.
  • Use units consistently.
  • Instantiate the replaceable medium package as:
    replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium model";
    instead of using a full media model like AixLib.Media.Water directly.
  • Never using absolute paths to files (e.g., C: or D:). Replace them with modelica://AixLib/....
  • Ensure your documentation is helpful and concise.
  • Make sure icons are clear. Please avoid using images!
  • Stick to 80 characters per line, as long as it makes sense.
  • Add or modify examples for new or revised models.
  • Include a simulate-and-plot script as a regression test for new models.
    How? Follow the documentation here: https://github.com/ibpsa/modelica-ibpsa/wiki/Unit-Tests#how-to-include-models-as-part-of-the-unit-tests
    Tip: To create the initial script, you can use Dymolas script generator, explained here: https://www.claytex.com/tech-blog/how-to-use-a-plot-script/)

Once you have addressed these points, you can assign a reviewer.
Although this process may seem tedious, ensuring CI passes allows the reviewer to focus
their time on the actual modeling rather than syntax and unintended breakages caused by your changes.

If you have any questions or issues, please tag a library developer.
Once again, thank you for your valuable contribution!

@DaJansenGit DaJansenGit marked this pull request as ready for review July 29, 2024 13:24
@DaJansenGit DaJansenGit requested review from FWuellhorst and removed request for FelixStege and FWuellhorst July 29, 2024 13:24
@DaJansenGit DaJansenGit requested review from FWuellhorst and removed request for FWuellhorst July 30, 2024 11:24
@DaJansenGit
Copy link
Member Author

DaJansenGit commented Jul 30, 2024

  • Let's check the naming violations listed here against the guidelines and correct if needed

Copy link
Contributor

@FWuellhorst FWuellhorst left a comment

Choose a reason for hiding this comment

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

Find my comments below based on the git diff, I will look into the models itself once these points are addressed 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Resource files should be under Resources




Modelica.Blocks.Sources.RealExpression ReturnTemp(y=TRet_nominal)
Copy link
Contributor

Choose a reason for hiding this comment

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

retTem?

Copy link
Contributor

Choose a reason for hiding this comment

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

I wont check further naming convention, please adhere to the errors in the .txt

@@ -0,0 +1,163 @@
within AixLib.Fluid.BoilerCHP.BaseClasses;
model DesignOperation "Operating for design conditions"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get the doc

<p><span style=\"font-family: Arial;\">The nominal adiabatic efficiency (reference is the higher heating value (includes vaporization enthalpy)) comes from the SDF and depends on:</span></p>
<ul>
<li><span style=\"font-family: Arial;\">Nominal return temperature (TColdNom)</span></li>
<li><span style=\"font-family: Arial;\">Nominale temperature difference (TColdNom-THotNom)</span></li>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use a parameter if it is only the nominal value?
Also, check Arial font

"Design return temperature" annotation (Dialog(group="Design"),Evaluate=false);


package Medium=AixLib.Media.Water;
Copy link
Contributor

Choose a reason for hiding this comment

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

replaceable as usual?

@@ -12,4 +12,4 @@ statistics-simulation=
}
time=[0e+00, 1.2e+03]
TSet.y=[3.531499938964844e+02, 3.531499938964844e+02]
combinedHeatPower.senTHot.T=[2.931499938964844e+02, 3.247222900390625e+02, 3.337673950195312e+02, 3.406928405761719e+02, 3.459860534667969e+02, 3.500254211425781e+02, 3.531043701171875e+02, 3.554481506347656e+02, 3.57231201171875e+02, 3.585867309570312e+02, 3.596168518066406e+02, 3.60399169921875e+02, 3.609931030273438e+02, 3.614440002441406e+02, 3.617863464355469e+02, 3.62046142578125e+02, 3.622433166503906e+02, 3.623928833007812e+02, 3.625064086914062e+02, 3.625924987792969e+02, 3.626578369140625e+02, 3.627074279785156e+02, 3.627449951171875e+02, 3.627735290527344e+02, 3.62795166015625e+02, 3.628115844726562e+02, 3.628240661621094e+02, 3.6283349609375e+02, 3.628406677246094e+02, 3.628460998535156e+02, 3.628502197265625e+02, 3.51466796875e+02, 3.426469116210938e+02, 3.359141540527344e+02, 3.307493286132812e+02, 3.267692260742188e+02, 3.236861572265625e+02, 3.212864990234375e+02, 3.194056701660156e+02, 3.179310913085938e+02, 3.168027648925781e+02, 3.159405212402344e+02, 3.152824096679688e+02, 3.147796630859375e+02, 3.143954162597656e+02, 3.141017456054688e+02, 3.138772583007812e+02, 3.137058410644531e+02, 3.135748596191406e+02, 3.134747009277344e+02, 3.133981323242188e+02, 3.133395385742188e+02, 3.132947082519531e+02, 3.132605895996094e+02, 3.132345886230469e+02, 3.132146911621094e+02, 3.131994323730469e+02, 3.25228790283203e+02, 3.348995056152344e+02, 3.422317810058594e+02, 3.477757568359375e+02, 3.519564208984375e+02, 3.551002197265625e+02, 3.574575805664062e+02, 3.592198791503906e+02, 3.605324401855469e+02, 3.615051879882812e+02, 3.622214660644531e+02, 3.62744873046875e+02, 3.631228637695312e+02, 3.633914489746094e+02, 3.63577880859375e+02, 3.637023010253906e+02, 3.637803039550781e+02, 3.63823486328125e+02, 3.638405151367188e+02, 3.638379516601562e+02, 3.638207397460938e+02, 3.637925109863281e+02, 3.637561950683594e+02, 3.637138366699219e+02, 3.636670532226562e+02, 3.636170349121094e+02, 3.635645751953125e+02, 3.635104064941406e+02, 3.63455078125e+02, 3.517401123046875e+02, 3.426918029785156e+02, 3.358100280761719e+02, 3.305563659667969e+02, 3.265324096679688e+02, 3.234400024414062e+02, 3.210558166503906e+02, 3.192101135253906e+02, 3.17780517578125e+02, 3.166877746582031e+02, 3.158526306152344e+02, 3.152152404785156e+02, 3.147283630371094e+02, 3.143562622070312e+02, 3.140718078613281e+02]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do these change?

Comment on lines +2 to +3
model heatingCurve
"Flow temperature control (power control) with heating curve"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use the existing one?

parameter Integer k=2 "number of consumers";
package MediumWater = AixLib.Media.Water;

ModularBoiler modularBoiler(
Copy link
Contributor

Choose a reason for hiding this comment

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

Full paths

parameter Boolean hasPump=true "Model includes a pump"
annotation (choices(checkBox=true), Dialog(descriptionLabel=true, group="System setup"));
parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal=50000
"Thermal dimension power"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nominal heat flow rate?

@@ -1,4 +1,5 @@
HeatPumpSystems
HydraulicModules
ModularAHU
ModularEnergySystems
Copy link
Contributor

Choose a reason for hiding this comment

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

This only contains the Boiler, and AHU, Hydraulics, and HeatPump are also energy systems and modular.

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.

6 participants