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

access gamma (specific heat capcity ratio)

access gamma (specific heat capcity ratio)

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?

Thanks
JG

Code:

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))

.....

equation
gamma=Medium.isentropicExponent(port_a.ThermodynamicState)  //??????????????????
......
end test1

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