Files
MODELICA/Formation/OTRERA_formation/Models/Test_Media.mo

20 lines
544 B
Plaintext

within OTRERA_formation.Models;
model Test_Media
replaceable package Medium = Modelica.Media.Air.MoistAir constrainedby Modelica.Media.Interfaces.PartialMedium annotation(choicesAllMatching = true) ;
//USER DEFINED PARAMETERS
parameter Modelica.Units.SI.Temperature T = 573.15 ;
parameter Modelica.Units.SI.Pressure p = 155e5 ;
//INTERNAL VARIABLES
Medium.ThermodynamicState state ;
Medium.Density d ;
//IMPORTED COMPONENTS
equation
state = Medium.setState_pTX(p=p,T=T);
d = Medium.density(state) ;
end Test_Media;