- Index
- » Programming
- » Modelica Language
- » access gamma (specific heat capcity...
Page Start Prev 1 Next End
access gamma (specific heat capcity ratio)
access gamma (specific heat capcity ratio)
Jun-18-12 20:05:19
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
Page Start Prev 1 Next End
- Index
- » Programming
- » Modelica Language
- » access gamma (specific heat capcity...
There are 0 guests and 0 other users also viewing this topic