feat : init Media
This commit is contained in:
20
Formation/OTRERA_formation/Models/Test_Media.mo
Normal file
20
Formation/OTRERA_formation/Models/Test_Media.mo
Normal file
@@ -0,0 +1,20 @@
|
||||
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 ;
|
||||
Modelica.Units.SI.Density d ;
|
||||
|
||||
//IMPORTED COMPONENTS
|
||||
|
||||
equation
|
||||
state = Medium.setState_pTX(p=p,T=T);
|
||||
d = Medium.density(state) ;
|
||||
|
||||
|
||||
end Test_Media;
|
||||
Reference in New Issue
Block a user