Modelica.Thermal.FluidHeatFlow.Examples.Utilities

Utility models for examples

Information


This package contains utility components used for the test examples.
Main Authors:

Anton Haumer
Technical Consulting & Electrical Engineering
A-3423 St.Andrae-Woerdern, Austria
email: a.haumer@haumer.at

Dr. Christian Kral
Austrian Institute of Technology, AIT
Giefinggasse 2
A-1210 Vienna, Austria

Copyright © 1998-2010, Modelica Association, Anton Haumer and Austrian Institute of Technology, AIT.

This Modelica package is free software and the use is completely at your own risk; it can be redistributed and/or modified under the terms of the Modelica License 2. For license conditions (including the disclaimer of warranty) see Modelica.UsersGuide.ModelicaLicense2 or visit http://www.modelica.org/licenses/ModelicaLicense2.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

NameDescription
Modelica.Thermal.FluidHeatFlow.Examples.Utilities.DoubleRamp DoubleRamp Ramp going up and down


Modelica.Thermal.FluidHeatFlow.Examples.Utilities.DoubleRamp Modelica.Thermal.FluidHeatFlow.Examples.Utilities.DoubleRamp

Ramp going up and down

Modelica.Thermal.FluidHeatFlow.Examples.Utilities.DoubleRamp

Information


Block generating the sum of two ramps.

Extends from Modelica.Blocks.Interfaces.SO (Single Output continuous control block).

Parameters

TypeNameDefaultDescription
Realoffset Offset of ramps
TimestartTime StartTime of 1st ramp [s]
Timeinterval Interval between end of 1st and beginning of 2nd ramp [s]
Ramp 1
Realheight_1 Height of ramp
Timeduration_1 Duration of ramp [s]
Ramp 2
Realheight_2 Height of ramp
Timeduration_2 Duration of ramp [s]

Connectors

TypeNameDescription
output RealOutputyConnector of Real output signal

Modelica definition

model DoubleRamp "Ramp going up and down"
  extends Modelica.Blocks.Interfaces.SO;
  parameter Real offset(start=1) "Offset of ramps";
  parameter Modelica.SIunits.Time startTime(start=0.2) "StartTime of 1st ramp";
  parameter Modelica.SIunits.Time interval(start=0.2) 
    "Interval between end of 1st and beginning of 2nd ramp";
  parameter Real height_1(start=-1) "Height of ramp";
  parameter Modelica.SIunits.Time duration_1(min=Modelica.Constants.small, start=0.2) 
    "Duration of ramp";
  parameter Real height_2(start=1) "Height of ramp";
  parameter Modelica.SIunits.Time duration_2(min=Modelica.Constants.small, start=0.2) 
    "Duration of ramp";

  Modelica.Blocks.Math.Add add;
  Modelica.Blocks.Sources.Ramp ramp1(
    final height=height_1,
    final duration=duration_1,
    final startTime=startTime,
    final offset=offset);
  Modelica.Blocks.Sources.Ramp ramp2(
    final height=height_2,
    final duration=duration_2,
    final startTime=startTime + duration_1 + interval,
    final offset=0);
equation 
  connect(ramp1.y, add.u1);
  connect(ramp2.y, add.u2);
  connect(add.y, y);
end DoubleRamp;

Automatically generated Fri Nov 12 16:31:43 2010.