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
  • Index
  • » Users
  • » ea7v
  • » Profile

Posts

Posts

Jul-27-21 14:10:22
Category: Programming

Hello everyone, I am having some problems to call the Specific Heat Capacity of my working fluid that in this case is Hydrogen, I can't call it using the Pressure or either the Temeperature, if someone could help me please, thanks in advance.

Here is my code

import Modelica.SIunits;

  package Hyd
    extends ExternalMedia.Media.CoolPropMedium(
      mediumName="hydrogen",
      substanceNames={"hydrogen"},
      inputChoice=ExternalMedia.Common.InputChoice.pT);
  end Hyd;

SIunits.SpecificHeatCapacity cp_in;//[J/kg*K]
Hyd.AbsolutePressure Pb_0;
Hyd.Temperature Tin;
Hyd.SaturationProperties sat9,sat10;

Equation
sat9=Hyd.setSat_T(Tin);
sat10=Hyd.setSat_p(Pb_0);
cp_in=Hyd.specificHeatCapacityCp(sat9);//[J/kg*K]
cp_in=Hyd.specificHeatCapacityCp(sat10);//[J/kg*K]

ERROR
For equation
cp_in = specificHeatCapacityCp_Unique8(
sat10);
found in class Bunkering_Green_Fuels.Hydrogen_STS, declaration window at line 1118.

For equation
cp_in = specificHeatCapacityCp_Unique8(
sat10);
found in class Bunkering_Green_Fuels.Hydrogen_STS, declaration window at line 1118.
Non-matching record for
argument number 1, state = sat10, in
specificHeatCapacityCp_Unique8(
sat10)
record state
  Real T "not found in other";
  Real a "not found in other";
  Real beta "not found in other";
  Real cp "not found in other";
  Real cv "not found in other";
  Real d "not found in other";
  Real ddhp "not found in other";
  Real ddph "not found in other";
  Real eta "not found in other";
  Real h "not found in other";
  Real kappa "not found in other";
  Real lambda "not found in other";
  Real p "not found in other";
  Integer phase "not found in other";
  Real s "not found in other";
end state;
record RightHandSide
  Real Tsat "not found in other";
  Real dTp "not found in other";
  Real ddldp "not found in other";
  Real ddvdp "not found in other";
  Real dhldp "not found in other";
  Real dhvdp "not found in other";
  Real dl "not found in other";
  Real dv "not found in other";
  Real hl "not found in other";
  Real hv "not found in other";
  Real psat "not found in other";
  Real sigma "not found in other";
  Real sl "not found in other";
  Real sv "not found in other";
end RightHandSide;

The function is declared as:
function specificHeatCapacityCp_Unique8
input ExternalMedia.Media.BaseClasses.ExternalTwoPhaseMedium.ThermodynamicState state ;
output Modelica.Media.Interfaces.Types.SpecificHeatCapacity cp := 1000.0 "Specific heat capacity at constant pressure";
end specificHeatCapacityCp_Unique8;

Thanks a lot...

Hello everyone,
I am new in Dymola and I am having some problems to calculate some properties of my working fluid (methane), is there a way to define the saturation temperature, latent heat of vaporization, density, in function of the Pressure and Quality (Q=0 liquid, Q=1vapor) as in this example :

# Saturated vapor enthalpy of Water at 1 atm in J/kg
In [4]: H_V = PropsSI('H','P',101325,'Q',1,'Water'); print(H_V)
2675529.3255007486

# Saturated liquid enthalpy of Water at 1 atm in J/kg
In [5]: H_L = PropsSI('H','P',101325,'Q',0,'Water'); print(H_L)
419057.7330940691

Hello everyone, I am working with Dymola 2017 and I have some files saved in Dymola 2021 version, does anybody knows how can I open them in version 2017? or I have to create a new package and models?
Thanks in advance

Hello everyone, I am working with Dymola 2017 and I have some files saved in Dymola 2021 version, does anybody knows how can I open them in version 2017? or I have to create a new package and models?
Thanks in advance

Hello to everyone, I am trying to do a simulation about the transfert of methane (replacing the LNG) from one closed tank to another at almost the same conditions, using a pump an a valve before arriving the second tank; my errors are apparently the initial conditions and the compiler, I am using the Medium Methane_Coolprop.
I will add some screen captures.
If anyone could give me an advice or solution please, thanks in advance.



Screen-capture.pdf

  • Index
  • » Users
  • » ea7v
  • » Profile
You are here: