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

Incompressible CoolProp tests do not compile #96

Open
bilderbuchi opened this issue Sep 27, 2023 · 3 comments
Open

Incompressible CoolProp tests do not compile #96

bilderbuchi opened this issue Sep 27, 2023 · 3 comments

Comments

@bilderbuchi
Copy link
Collaborator

bilderbuchi commented Sep 27, 2023

On the OM test suite, the tests Test.CoolProp.Incompressible.IncompressibleCoolPropMedium and Test.CoolProp.Incompressible.IncompressibleCoolPropMixture does not compile with

[/home/hudson/saved_omc/libraries/.openmodelica/libraries/ExternalMedia 4.0.0/Media/IncompressibleCoolPropMedium.mo:49:5-49:76:writable] Error: Variable R not found in scope BaseProperties.

Because IncompressibleCoolPropMedium extends from Modelica.Media.Interfaces.PartialMedium (and not from ExternalMedia.BaseClasses.ExternalTwoPhaseMedium), I'm pretty sure

R = Modelica.Constants.small "Gas constant (of mixture if applicable)";
should be R_s, not R. Possibly this was overlooked in the MSL 3->4 transition?
I dont know if this needs further fixes elsewhere.

@bilderbuchi bilderbuchi changed the title IncompressibleCoolPropMixture test does not compile Incompressible CoolProp tests do not compile Sep 27, 2023
@carowjp
Copy link

carowjp commented Dec 12, 2023

If line 49 is corrected to R_s then the next error is:

Translation Error [ExternalMedia.Media.IncompressibleCoolPropMedium: 60:7-60:44]: Type mismatch for positional argument 3 in ExternalMedia.Test.CoolProp.Incompressible.IncompressibleCoolPropMixture.Fluid.density_pTX(X=varProps.Xi). The argument has type: Real[1] / expected type: Real[2]

@ibeyers
Copy link

ibeyers commented Jun 5, 2024

Exchanging X[xN] for X[:] in every mass fraction input resolved this for me.

so in every function of ExternalMedia.Media.IncompressibleCoolPropMedium I changed the line to:
input MassFraction X[:] "Mass fractions";

@bilderbuchi
Copy link
Collaborator Author

bilderbuchi commented Jun 6, 2024

That is weird though, as that test has substanceNames={"LiBr|calc_transport=1|debug=1000","dummyToMakeBasePropertiesWork"}, so that has size 2, so Modelica.Media.Interfaces.PartialMedium.nS should be 2, so the nX beside that should also be 2, but seems to be 1 for some reason?

@casella do you know what could be going on here?

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

No branches or pull requests

3 participants