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

Add massFraction function to Media library #4243

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

dzimmer
Copy link
Contributor

@dzimmer dzimmer commented Jan 3, 2024

This is a second pull request replacing #3825 which attempted to resolve #3650.
#3825 should be discarded and archived consequently.

This pull request is based on the most recent master of the MSL and I have taken the critic of #3825 into account:

  • The comments now speak of "mass fractions" instead of "mass fraction" in order to be consistent with the otther comments
  • I have extended the examples of ModelicaTest to include calls of this function at 3 examples to cover the pureSubstance case as well as the reduced and non-reduced Mixture case.

The added function is till called massFraction not massFractions for the following reasons:

  • to be consistent with the outputType
  • to be compatible with the ThermoFluidStream implementation already using this function
  • to be compatible with the XRG extensions to their media where they have implemented it.

The following changes are included in the pull request.

  • implemented massFraction for partialPureSubstance
  • implemented massFraction for PartialMixtureMedium
  • added 3 test cases for ModeliceTest covering pure / reduced mixture / non-reduced mixture

- implemented massFraction for partialPureSubstance
- implemented massFraction for PartialMixtureMedium
- added 3 test cases for ModeliceTest covering pure / reduced mixture / non-reduced misture
@CLAassistant
Copy link

CLAassistant commented Jan 3, 2024

CLA assistant check
All committers have signed the CLA.

@dzimmer dzimmer changed the title - added partial massFraction to partialMedium add massFraction function to Media library Jan 3, 2024
@dzimmer dzimmer marked this pull request as ready for review January 3, 2024 13:25
@beutlich beutlich added the L: Media Issue addresses Modelica.Media label Jan 4, 2024
Modelica/Media/package.mo Outdated Show resolved Hide resolved
@beutlich beutlich changed the title add massFraction function to Media library Add massFraction function to Media library Jan 4, 2024
Accepted suggestion

Co-authored-by: Thomas Beutlich <modelica@tbeu.de>
Modelica/Media/package.mo Outdated Show resolved Hide resolved
@hubertus65 hubertus65 merged commit 99f4996 into modelica:master Jan 9, 2024
2 checks passed
@beutlich beutlich removed the request for review from casella January 9, 2024 08:10
@beutlich beutlich added this to the MSL4.1.0 milestone Jan 9, 2024
@casella
Copy link
Contributor

casella commented Jan 9, 2024

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: Media Issue addresses Modelica.Media
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modelica Media Interface is information incomplete w.r.t. independent mass fractions
7 participants