diff --git a/Formation/OTRERA_formation/Models/Test_Media.mo b/Formation/OTRERA_formation/Models/Test_Media.mo new file mode 100644 index 0000000..c0a9ea0 --- /dev/null +++ b/Formation/OTRERA_formation/Models/Test_Media.mo @@ -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; \ No newline at end of file diff --git a/Formation/OTRERA_formation/Models/Test_replaceable_media.mo b/Formation/OTRERA_formation/Models/Test_replaceable_media.mo new file mode 100644 index 0000000..07b10e6 --- /dev/null +++ b/Formation/OTRERA_formation/Models/Test_replaceable_media.mo @@ -0,0 +1,8 @@ +within OTRERA_formation.Models; + +model Test_replaceable_media + Test_Media test_Media(T = 623.15, p = 1.4e7, redeclare package Medium = Modelica.Media.Water.WaterIF97_R1pT) annotation( + Placement(transformation(origin = {2, 6}, extent = {{-10, -10}, {10, 10}}))); +equation + +end Test_replaceable_media; \ No newline at end of file diff --git a/Formation/OTRERA_formation/Models/package.order b/Formation/OTRERA_formation/Models/package.order index 93793e7..1e6027b 100644 --- a/Formation/OTRERA_formation/Models/package.order +++ b/Formation/OTRERA_formation/Models/package.order @@ -1 +1,5 @@ Coupled_model +Coupled_model_prescribed +Coupled_model_prescribed_variable +Test_Media +Test_replaceable_media