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 package runs in OpenModelica but not Dymola #101

Open
aagarami opened this issue Feb 5, 2024 · 0 comments
Open

Incompressible package runs in OpenModelica but not Dymola #101

aagarami opened this issue Feb 5, 2024 · 0 comments

Comments

@aagarami
Copy link

aagarami commented Feb 5, 2024

I am using ExternalMedia.Media.IncompressibleCoolPropMedium to define a water/ethylene-glycol mixture (AEG). A defined substance and subsequent test of it works in OpenModelica but not Dymola.
//
package MyAEG "CoolProp model of Water-EthyleneGlycol"
extends ExternalMedia.Media.IncompressibleCoolPropMedium(
mediumName = "MyAEG",
substanceNames = {"AEG[0.5]"},
ThermoStates = Modelica.Media.Interfaces.Choices.IndependentVariables.pT,
Temperature(start = 0 + 273.15));
//ExternalMedia.Media.IncompressibleCoolPropMedium
//Modelica.Media.Interfaces.PartialMedium
end MyAEG;
//
model Test_AEG
//Medium//
replaceable package medium = MyAEG constrainedby Modelica.Media.Interfaces.PartialMedium;
//Parameters//
parameter Modelica.Units.SI.Temperature T = -30 + 273.15 "Temperature";
parameter Modelica.Units.SI.Pressure P1 = 101325 "Pressure";
//States//
medium.ThermodynamicState state_A = medium.setState_pT(p = P1, T = T);
equation
//T = medium.temperature_ph(p = P1, h = h1);
//x = medium.vapourQuality(state_A);
end Test_AEG;
Error shown in Dymola only:
Class or component 'criticalTemperature' not found in constraining class of FluidConstants externalFluidConstants
File: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 18
Component context: ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.externalFluidConstants
Component declared as FluidConstants externalFluidConstants in Modelica.Media.Interfaces.PartialMedium
Attempted modification in ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.
Near file: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 2
Definition missing in Modelica.Media.Interfaces.Types.Basic.FluidConstants.
Class or component 'criticalPressure' not found in constraining class of FluidConstants externalFluidConstants
File: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 18
Component context: ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.externalFluidConstants
Component declared as FluidConstants externalFluidConstants in Modelica.Media.Interfaces.PartialMedium
Attempted modification in ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.
Near file: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 2
Definition missing in Modelica.Media.Interfaces.Types.Basic.FluidConstants.
Class or component 'criticalMolarVolume' not found in constraining class of FluidConstants externalFluidConstants
File: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 18
Component context: ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.externalFluidConstants
Component declared as FluidConstants externalFluidConstants in Modelica.Media.Interfaces.PartialMedium
Attempted modification in ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.
Near file: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 2
Definition missing in Modelica.Media.Interfaces.Types.Basic.FluidConstants.
Class or component 'acentricFactor' not found in constraining class of FluidConstants externalFluidConstants
File: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 18
Component context: ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.externalFluidConstants
Component declared as FluidConstants externalFluidConstants in Modelica.Media.Interfaces.PartialMedium
Attempted modification in ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.
Near file: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 2
Definition missing in Modelica.Media.Interfaces.Types.Basic.FluidConstants.
Class or component 'triplePointTemperature' not found in constraining class of FluidConstants externalFluidConstants
File: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 18
Component context: ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.externalFluidConstants
Component declared as FluidConstants externalFluidConstants in Modelica.Media.Interfaces.PartialMedium
Attempted modification in ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.
Near file: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 2
Definition missing in Modelica.Media.Interfaces.Types.Basic.FluidConstants.
Class or component 'triplePointPressure' not found in constraining class of FluidConstants externalFluidConstants
File: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 18
Component context: ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.externalFluidConstants
Component declared as FluidConstants externalFluidConstants in Modelica.Media.Interfaces.PartialMedium
Attempted modification in ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.
Near file: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 2
Definition missing in Modelica.Media.Interfaces.Types.Basic.FluidConstants.
Class or component 'meltingPoint' not found in constraining class of FluidConstants externalFluidConstants
File: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 18
Component context: ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.externalFluidConstants
Component declared as FluidConstants externalFluidConstants in Modelica.Media.Interfaces.PartialMedium
Attempted modification in ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.
Near file: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 2
Definition missing in Modelica.Media.Interfaces.Types.Basic.FluidConstants.
Class or component 'normalBoilingPoint' not found in constraining class of FluidConstants externalFluidConstants
File: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 18
Component context: ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.externalFluidConstants
Component declared as FluidConstants externalFluidConstants in Modelica.Media.Interfaces.PartialMedium
Attempted modification in ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.
Near file: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 2
Definition missing in Modelica.Media.Interfaces.Types.Basic.FluidConstants.
Class or component 'dipoleMoment' not found in constraining class of FluidConstants externalFluidConstants
File: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 18
Component context: ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.externalFluidConstants
Component declared as FluidConstants externalFluidConstants in Modelica.Media.Interfaces.PartialMedium
Attempted modification in ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.
Near file: C:/Users/s141301/Documents/Dymola/ExternalMedia/Media/BaseClasses/ExternalTwoPhaseMedium.mo, line 2
Definition missing in Modelica.Media.Interfaces.Types.Basic.FluidConstants.

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

1 participant