Skip to content

Commit

Permalink
Changed medium model in Modelica.Fluid.Examples.Tanks.TanksWithOverfl…
Browse files Browse the repository at this point in the history
…ow to improve numerical robustness

git-svn-id: https://svn.modelica.org/projects/Modelica/trunk@9084 7ce873d0-865f-4ce7-a662-4bb36ea78beb
  • Loading branch information
casella committed Feb 26, 2016
1 parent 0bd87bd commit 1aca4c0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Modelica/Fluid/Examples/Tanks.mo
Expand Up @@ -106,7 +106,8 @@ package Tanks "Library demonstrating the usage of the tank model"
extends Modelica.Icons.Example;
import Modelica.Fluid;
Modelica.Fluid.Vessels.OpenTank upperTank(
redeclare package Medium = Modelica.Media.Water.StandardWater,
redeclare package Medium =
Modelica.Media.CompressibleLiquids.LinearColdWater,
height=20,
level_start=2,
crossArea=0.2,
Expand All @@ -117,18 +118,20 @@ package Tanks "Library demonstrating the usage of the tank model"
10)})
annotation (Placement(transformation(extent={{-40,20},{0,60}})));
Modelica.Fluid.Sources.MassFlowSource_T massFlowRate(nPorts=1,
redeclare package Medium = Modelica.Media.Water.StandardWater,
redeclare package Medium =
Modelica.Media.CompressibleLiquids.LinearColdWater,
m_flow=0.2,
use_m_flow_in=true)
annotation (Placement(transformation(extent={{-60,-40},{-40,-20}})));
inner Modelica.Fluid.System system(energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
annotation (Placement(transformation(
extent={{-150,-112},{-130,-92}})));
Modelica.Fluid.Sensors.Pressure pressure(redeclare package Medium =
Modelica.Media.Water.StandardWater) annotation (Placement(
Modelica.Media.CompressibleLiquids.LinearColdWater) annotation (Placement(
transformation(extent={{40,16},{60,36}})));
Modelica.Fluid.Pipes.StaticPipe pipe(
redeclare package Medium = Modelica.Media.Water.StandardWater,
redeclare package Medium =
Modelica.Media.CompressibleLiquids.LinearColdWater,
diameter=0.02,
height_ab=-20,
length=200) annotation (Placement(transformation(
Expand All @@ -138,7 +141,8 @@ package Tanks "Library demonstrating the usage of the tank model"

Modelica.Fluid.Vessels.OpenTank lowerTank(
height=20,
redeclare package Medium = Modelica.Media.Water.StandardWater,
redeclare package Medium =
Modelica.Media.CompressibleLiquids.LinearColdWater,
level_start=2,
crossArea=1,
nPorts=2,
Expand All @@ -158,7 +162,8 @@ package Tanks "Library demonstrating the usage of the tank model"
Modelica.Blocks.Sources.Constant m_flow_on(k=2)
annotation (Placement(transformation(extent={{-140,-60},{-120,-40}})));
Modelica.Fluid.Pipes.StaticPipe overflow(
redeclare package Medium = Modelica.Media.Water.StandardWater,
redeclare package Medium =
Modelica.Media.CompressibleLiquids.LinearColdWater,
diameter=0.02,
length=200,
height_ab=-20)
Expand Down

0 comments on commit 1aca4c0

Please sign in to comment.