metroscope-modeling-library
metroscope-modeling-library copied to clipboard
Add H2 into our fuel media
Goal
This PR shows how to add H2 to our current fuel media. We can either merge it and it will be a breaking change but require a limited amount of work, simply add one equation, saying that H2 fraction is zero, or we can just close it and leave it as a how to add a different species in our fuel.
I am sure that I made the changes correctly because I made a temporary variable to compute LHV directly, instead of using HHV, and I found the same result when varying H2 proportion :
Units.SpecificEnthalpy LHV = HHV - 2202.92069 * X_fuel_H*1e4 "J/kg can be assigned in component modifiers";
Units.SpecificEnthalpy LHV_test = (lhv_mass_H2*X_fuel_H2 + lhv_mass_CH4*X_fuel_CH4 + lhv_mass_C2H6*X_fuel_C2H6 + lhv_mass_C3H8*X_fuel_C3H8 + lhv_mass_C4H10*X_fuel_C4H10_n_butane)*1e6;
Type of change
- [ ] Bugfix
- [x] New feature
- [ ] Refactoring change
- [ ] Release & Version Update (don't forget to change the version number in
package.mo)
Will it break anything in previous models ?
- [x] Breaking change (If yes, make sure to point it out in the changelog)
- [ ] Non-Breaking change
Checklist
- [ ] I have added the appropriate tags, reviewers, projects (and detailed the size and priority of my PR) and linked issues to this PR
- [ ] I have performed a self-review of my own code
- [ ] I have checked that all existing tests pass
- [ ] I have checked that my work is compatible with OpenModelica
- [ ] I have added/updated tests that prove my development works and does not break anything.
- [ ] I have made corresponding changes or additions to the documentation (in Notion documentation)
- [ ] I have added corresponding entries to the Changelog
- [ ] I have checked for conflicts with target branch, and merged/rebased in consequence
You can also fill these out after creating the PR, but make sure to check them all before submitting your PR for review.