- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » New medium
New medium
New medium
Hi everybody, I just want to know how I can create a new medium model using the template medium package. I create an easy model with a mass flow source, a pipe and a fixed boundary:
model Fluid
inner Modelica.Fluid.System system annotation(
Placement(visible = true, transformation(origin = {-106, 86}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package NewMedium =
Modelica.Media.Interfaces.PartialMedium, diameter = 5e-2, length = 10) annotation(
Placement(visible = true, transformation(origin = {-90, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Sources.MassFlowSource_T boundary(nPorts = 1) annotation(
Placement(visible = true, transformation(origin = {-154, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Modelica.Fluid.Sources.FixedBoundary boundary1(nPorts = 1) annotation(
Placement(visible = true, transformation(origin = {-30, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
equation
connect(boundary.ports[1], pipe.port_a) annotation(
Line(points = {{-144, 10}, {-100, 10}, {-100, 10}, {-100, 10}}, color = {0, 127, 255}));
connect(pipe.port_b, boundary1.ports[1]) annotation(
Line(points = {{-80, 10}, {-40, 10}, {-40, 10}, {-40, 10}}, color = {0, 127, 255}));
annotation(
uses(Modelica(version = "3.2.2")));
end Fluid;
I want to use a fluid with prescribed density, dynamic viscosity ecc... What do I have to use for creating this new medium?
Thanks
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » New medium