Saarland University
Lehrstuhl für Automatisierungstechnik

Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
> acess gamma (isentropic exponent of a media)
post Jun 18 2012, 05:18 PM
Post #1


Group: Members
Posts: 3
Joined: 26-March 12
Member No.: 625,852

Hi everyone:

I am wondering how can I access the gamma (ratio of heat capacity) for water using Modelica.Media? Can somebody give me an example of the syntax? I am attaching a pseudo-code of what I am trying to achieve?



model test1

  replaceable package Medium = Modelica.Media.Water.StandardWater constrainedby

    Modelica.Media.Interfaces.PartialMedium "Medium model";

Modelica.SIunits.RatioOfSpecificHeatCapacities gamma;

Modelica.Fluid.Interfaces.FluidPort_a port_a(   redeclare package Medium = Medium,   m_flow(min=if allowFlowReversal then -Constants.inf else 0))

Modelica.Fluid.Interfaces.FluidPort_b port_b(    redeclare package Medium = Medium,    m_flow(min=if allowFlowReversal then -Constants.inf else 0))



gamma=Medium.isentropicExponent(port_a.ThermodynamicState)  //??????????????????


end test1
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


Lo-Fi Version Time is now: 15th November 2019 - 08:34 PM