Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Simulation failed with external Media (CoolProp)

Simulation failed with external Media (CoolProp)

Hello,

i would like to use Methane (CH4) for my fluid model. But not the Ideal Gas from NASA Glenn coefficient because i need to simulate temperatures below 200K.

When i open Dymola (Version 2017 with Modelica Version 3.2.2) first i load the following packages:
ExternalMedia, CoolProp2Modelica, MediaTwoPhaseMixture and ThermCycle.

I´m now using a simple fluid model. The "System" and the "closed Volume" from SML and select the "Methane - CoolProp - TC" Medium.

When i run the Model "Check" everything is fine. But when i try to start the Simulation i get following failures:

Translation of Tankh1:

The DAE has 70 scalar unknowns and 70 scalar equations.
The initial conditions for variables of type Real are not fully specified.
Dymola has selected default initial conditions.
Assuming fixed start value for the continuous states:
volume.medium.h(start = volume.h_start)
volume.medium.p(start = volume.p_start)
Statistics
Selected continuous time states
Compilation of Tankh1 failed. See Simulation tab for more information.
Note: There were translation errors that might explain the problem.
Failed
ERROR: 1 error was found
WARNING: 1 warning was issued



I have choosed the "ThermoStates" "Modelica.Media.Interfaces.Choices.IndependentVariables.T" in the Medium.

Could you please help me or give me a hint. Here is the code for my Modell:

model Tankh1
  inner Modelica.Fluid.System system
    annotation (Placement(transformation(extent={{-78,-88},{-58,-68}})));
  Modelica.Fluid.Vessels.ClosedVolume volume(
    redeclare package Medium = ThermoCycle.Media.Methane (ThermoStates=Modelica.Media.Interfaces.Choices.IndependentVariables.T),

    portsData={Modelica.Fluid.Vessels.BaseClasses.VesselPortsData(diameter=0.1)},
    V=50) annotation (Placement(transformation(extent={{-18,14},{2,34}})));
equation

  annotation (uses(Modelica(version="3.2.2")));
end Tankh1;



Thank you very much current/smile

Attached are two screenshots and the code of all used classes.

Failure.pdf

Attachments:
There are 0 guests and 0 other users also viewing this topic
You are here: