Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions ThermoPower/Examples.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ Casella</a>:<br>
extends Modelica.Icons.ExamplesPackage;

package Models
extends Modelica.Icons.Library;
extends Modelica.Icons.Package;
model HeatExchanger "Base class for heat exchanger fluid - gas"
constant Real pi=Modelica.Constants.pi;
replaceable package GasMedium =
Expand Down Expand Up @@ -1849,7 +1849,7 @@ Very simple plant model, providing boundary conditions to the <tt>HRB</tt> model
model DigitalPI
extends Modelica.Blocks.Interfaces.DiscreteBlock;
parameter Real Kp "Gain";
parameter Modelica.SIunits.Time Ti(min=0) "Integral time";
parameter Modelica.Units.SI.Time Ti(min=0) "Integral time";
parameter Real b(min=0) = 1 "Set-point weight (proportional action)";
parameter Real CSmax "Control signal saturation upper bound";
parameter Real CSmin "Control signal saturation lower bound";
Expand Down Expand Up @@ -2029,9 +2029,10 @@ Casella</a>:<br>
model OpenLoopSimulatorHtc
"Open-loop plant simulator with parameter computation"
extends OpenLoopSimulatorSS(Plant(Boiler(gamma_nom = gamma_unknown)));
parameter Modelica.SIunits.CoefficientOfHeatTransfer gamma_unknown(fixed = false, start = 150);
parameter Modelica.Units.SI.CoefficientOfHeatTransfer gamma_unknown(
fixed=false, start=150);
initial equation
Plant.GasOut.T = Modelica.SIunits.Conversions.from_degC(130);
Plant.GasOut.T =Modelica.Units.Conversions.from_degC(130);
annotation (Documentation(revisions="<html>
<ul>
<li><i>20 Sep 2013</i>
Expand Down Expand Up @@ -2489,19 +2490,18 @@ This package contains models of a simple Heat Recovery Boiler. Different simulat
model PrescribedSpeedPump "Prescribed speed pump"
replaceable package FluidMedium =
Modelica.Media.Interfaces.PartialTwoPhaseMedium;
parameter Modelica.SIunits.VolumeFlowRate q_nom[3]
parameter Modelica.Units.SI.VolumeFlowRate q_nom[3]
"Nominal volume flow rates";
parameter Modelica.SIunits.Height head_nom[3] "Nominal heads";
parameter Modelica.SIunits.Density rho0 "Nominal density";
parameter Modelica.SIunits.Conversions.NonSIunits.AngularVelocity_rpm n0
"Nominal rpm";
parameter Modelica.SIunits.Pressure nominalOutletPressure
parameter Modelica.Units.SI.Height head_nom[3] "Nominal heads";
parameter Modelica.Units.SI.Density rho0 "Nominal density";
parameter Modelica.Units.NonSI.AngularVelocity_rpm n0 "Nominal rpm";
parameter Modelica.Units.SI.Pressure nominalOutletPressure
"Nominal live steam pressure";
parameter Modelica.SIunits.Pressure nominalInletPressure
parameter Modelica.Units.SI.Pressure nominalInletPressure
"Nominal condensation pressure";
parameter Modelica.SIunits.MassFlowRate nominalMassFlowRate
parameter Modelica.Units.SI.MassFlowRate nominalMassFlowRate
"Nominal steam mass flow rate";
parameter Modelica.SIunits.SpecificEnthalpy hstart=1e5
parameter Modelica.Units.SI.SpecificEnthalpy hstart=1e5
"Fluid Specific Enthalpy Start Value";
parameter Boolean SSInit=false "Steady-state initialization";

Expand Down Expand Up @@ -2572,10 +2572,10 @@ This package contains models of a simple Heat Recovery Boiler. Different simulat
replaceable package Medium = Water.StandardWater constrainedby
Modelica.Media.Interfaces.PartialMedium "Medium model";
//Parameters
parameter Modelica.SIunits.Pressure p "Nominal inlet pressure";
parameter Modelica.SIunits.Volume Vtot=10
parameter Modelica.Units.SI.Pressure p "Nominal inlet pressure";
parameter Modelica.Units.SI.Volume Vtot=10
"Total volume of the fluid side";
parameter Modelica.SIunits.Volume Vlstart=0.15*Vtot
parameter Modelica.Units.SI.Volume Vlstart=0.15*Vtot
"Start value of the liquid water volume"
annotation (Dialog(tab="Initialisation"));
parameter Choices.Init.Options initOpt=system.initOpt
Expand All @@ -2586,18 +2586,18 @@ This package contains models of a simple Heat Recovery Boiler. Different simulat


//Variables
Modelica.SIunits.Density rhol "Density of saturated liquid";
Modelica.SIunits.Density rhov "Density of saturated steam";
Modelica.Units.SI.Density rhol "Density of saturated liquid";
Modelica.Units.SI.Density rhov "Density of saturated steam";
Medium.SaturationProperties sat "Saturation properties";
Medium.SpecificEnthalpy hl "Specific enthalpy of saturated liquid";
Medium.SpecificEnthalpy hv "Specific enthalpy of saturated vapour";
Modelica.SIunits.Mass M "Total mass, steam+liquid";
Modelica.SIunits.Mass Ml "Liquid mass";
Modelica.SIunits.Mass Mv "Steam mass";
Modelica.SIunits.Volume Vl(start=Vlstart) "Liquid volume";
Modelica.SIunits.Volume Vv "Steam volume";
Modelica.SIunits.Energy E "Internal energy";
Modelica.SIunits.Power Q "Thermal power";
Modelica.Units.SI.Mass M "Total mass, steam+liquid";
Modelica.Units.SI.Mass Ml "Liquid mass";
Modelica.Units.SI.Mass Mv "Steam mass";
Modelica.Units.SI.Volume Vl(start=Vlstart) "Liquid volume";
Modelica.Units.SI.Volume Vv "Steam volume";
Modelica.Units.SI.Energy E "Internal energy";
Modelica.Units.SI.Power Q "Thermal power";

//Connectors
Water.FlangeA steamIn(redeclare package Medium = Medium) annotation (
Expand Down
28 changes: 14 additions & 14 deletions ThermoPower/Gas.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2311,21 +2311,21 @@ This model extends the CombustionChamber Base model, with the definition of the
parameter String fileName="noName" "File where matrix is stored";
parameter TableTypes Table = TableTypes.matrix
"Selection of the way of definition of table matrix";
Modelica.Blocks.Tables.CombiTable2D Eta(
Modelica.Blocks.Tables.CombiTable2Ds Eta(
tableOnFile=if (Table == TableTypes.matrix) then false else true,
table=tableEta,
tableName=if (Table == TableTypes.matrix) then "NoName" else "tabEta",
fileName=if (Table == TableTypes.matrix) then "NoName" else fileName,
smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative)
annotation (Placement(transformation(extent={{-12,60},{8,80}}, rotation=0)));
Modelica.Blocks.Tables.CombiTable2D PressRatio(
Modelica.Blocks.Tables.CombiTable2Ds PressRatio(
tableOnFile=if (Table == TableTypes.matrix) then false else true,
table=tablePR,
tableName=if (Table == TableTypes.matrix) then "NoName" else "tabPR",
fileName=if (Table == TableTypes.matrix) then "NoName" else fileName,
smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative)
annotation (Placement(transformation(extent={{-12,0},{8,20}}, rotation=0)));
Modelica.Blocks.Tables.CombiTable2D Phic(
Modelica.Blocks.Tables.CombiTable2Ds Phic(
tableOnFile=if (Table == TableTypes.matrix) then false else true,
table=tablePhic,
tableName=if (Table == TableTypes.matrix) then "NoName" else "tabPhic",
Expand Down Expand Up @@ -2409,15 +2409,15 @@ This model adds the performance characteristics to the Compressor_Base model, by
Real N_T "Referred speed";
Real N_T_design "Referred design speed";
Real phic "Flow number";
Modelica.Blocks.Tables.CombiTable2D Phic(
Modelica.Blocks.Tables.CombiTable2Ds Phic(
tableOnFile=if (Table == TableTypes.matrix) then false else true,
table=tablePhic,
tableName=if (Table == TableTypes.matrix) then "NoName" else "tabPhic",
fileName=if (Table == TableTypes.matrix) then "NoName" else fileName,
smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative)
annotation (Placement(transformation(extent={{-10,10},{10,30}}, rotation=
0)));
Modelica.Blocks.Tables.CombiTable2D Eta(
Modelica.Blocks.Tables.CombiTable2Ds Eta(
tableOnFile=if (Table == TableTypes.matrix) then false else true,
table=tableEta,
tableName=if (Table == TableTypes.matrix) then "NoName" else "tabEta",
Expand Down Expand Up @@ -2498,7 +2498,7 @@ This model adds the performance characteristics to the Turbine_Base model, by me
Real N_T_design "Referred design speed";
Real phic "Flow number";

Modelica.Blocks.Tables.CombiTable2D Eta(
Modelica.Blocks.Tables.CombiTable2Ds Eta(
tableOnFile=if (Table == TableTypes.matrix) then false else true,
table=tableEta,
tableName=if (Table == TableTypes.matrix) then "NoName" else "tabEta",
Expand Down Expand Up @@ -2642,28 +2642,28 @@ This model adds the performance characteristics to the GTunit_base model, when o
parameter String fileName="noName" "File where matrix is stored";
parameter TableTypes Table = TableTypes.matrix
"Selection of the way of definition of table matrix";
Modelica.Blocks.Tables.CombiTable2D PowerOut(
Modelica.Blocks.Tables.CombiTable2Ds PowerOut(
tableOnFile=if (Table == TableTypes.matrix) then false else true,
table=tableHI,
tableName=if (Table == TableTypes.matrix) then "NoName" else "tabHI",
fileName=if (Table == TableTypes.matrix) then "NoName" else fileName,
smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative)
annotation (Placement(transformation(extent={{-12,36},{8,56}}, rotation=0)));
Modelica.Blocks.Tables.CombiTable2D PressRatio(
Modelica.Blocks.Tables.CombiTable2Ds PressRatio(
tableOnFile=if (Table == TableTypes.matrix) then false else true,
table=tablePR,
tableName=if (Table == TableTypes.matrix) then "NoName" else "tabPR",
fileName=if (Table == TableTypes.matrix) then "NoName" else fileName,
smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative)
annotation (Placement(transformation(extent={{-12,6},{8,26}}, rotation=0)));
Modelica.Blocks.Tables.CombiTable2D MassFlowRate(
Modelica.Blocks.Tables.CombiTable2Ds MassFlowRate(
tableOnFile=if (Table == TableTypes.matrix) then false else true,
table=tableW,
tableName=if (Table == TableTypes.matrix) then "NoName" else "tabW",
fileName=if (Table == TableTypes.matrix) then "NoName" else fileName,
smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative)
annotation (Placement(transformation(extent={{-10,-24},{10,-4}}, rotation=
0)));
annotation (Placement(transformation(extent={{-10,-24},{10,-4}}, rotation
=0)));
SI.Temperature Tsync
"temperature corresponding to omega referred in synchronous conditions";
equation
Expand Down Expand Up @@ -2727,7 +2727,7 @@ The packages Medium are redeclared and a mass balance determines the composition
Modelica.Mechanics.Rotational.Interfaces.Flange_a MechPort annotation (
Placement(transformation(extent={{78,6},{108,36}}, rotation=0)));
equation
n = Modelica.SIunits.Conversions.to_rpm(omega) "Rotational speed";
n =Modelica.Units.Conversions.to_rpm(omega) "Rotational speed";

// Mechanical boundary condition
phi = MechPort.phi;
Expand Down Expand Up @@ -3362,11 +3362,11 @@ This is the model-base of a Combustion Chamber, with a constant volume.
replaceable package Air = Modelica.Media.Interfaces.PartialMedium;
replaceable package Fuel = Modelica.Media.Interfaces.PartialMedium;
replaceable package Exhaust = Modelica.Media.Interfaces.PartialMedium;
parameter Modelica.SIunits.Pressure pstart "start pressure value"
parameter Modelica.Units.SI.Pressure pstart "start pressure value"
annotation (Dialog(tab="Initialisation"));
parameter Exhaust.Temperature Tstart "start temperature value"
annotation (Dialog(tab="Initialisation"));
parameter Modelica.SIunits.MassFraction Xstart[Air.nX]=Air.reference_X
parameter Modelica.Units.SI.MassFraction Xstart[Air.nX]=Air.reference_X
"start gas composition" annotation (Dialog(tab="Initialisation"));
constant Exhaust.AbsolutePressure pnom=1.013e5 "ISO reference pressure";
constant Air.Temperature Tnom=288.15 "ISO reference temperature";
Expand Down
Loading