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 51 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 removed the request for review from FWuellhorst July 29, 2024 13:28
@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 👍




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

Copy link
Member Author

@DaJansenGit DaJansenGit Dec 16, 2024

Choose a reason for hiding this comment

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

The output is only based on nominal conditions but exists for multiple setups, because TSup_nominal and TRet_nominal are input parameters. As the data is behind the calculation is pre calculated anway, we can also put this data into the .sdf file. Removed the font issues with commit 07db990

"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?

Copy link
Member Author

@DaJansenGit DaJansenGit Dec 16, 2024

Choose a reason for hiding this comment

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

adressed with 07db990

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

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed with 479ad5a

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, much better, fixed with 8fb8bc0

AixLib/Systems/package.order Outdated Show resolved Hide resolved
DaJansenGit added a commit that referenced this pull request Dec 16, 2024
…re is no information where they are coming from #1443
DaJansenGit added a commit that referenced this pull request Dec 16, 2024
# Conflicts:
#	AixLib/Fluid/BoilerCHP/BaseClasses/PartialHeatGenerator.mo
#	AixLib/package.mo
@DaJansenGit DaJansenGit force-pushed the issue1147_GenericBoiler branch from b4c8a03 to 70b9fe0 Compare December 16, 2024 15:13
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