Скачиваний:
21
Добавлен:
25.04.2015
Размер:
1.28 Mб
Скачать

11 Using Profiles in models

77

11 Using Profiles in models

When you create model it often happens that parameters in the model are not constant, but instead are in the form of time-series. This could for example be a load profile on a display case in a supermarket.

To easily be able to include such profiles in your model, WinDali has a helper-tool called Profile Editor you can use to create profiles, and a corresponding Pascal unit called CmjsProfile.pas you can include in your model to use the profiles.

11.1 Generating profiles

When you execute the Profile Editor application, the following window appears:

You start by selecting the duration of the profile (when you simulate the profile will be looped) and by specifying the interval you want to provide data for.

When you press <Generate> you will see the following:

WinDali

Morten Juel Skovrup

78 11 Using Profiles in models

Note that now a table is created where you can enter values for the profile (in percent of a value you specify when you include the profile in a model), and that the profile will automatically be shown in the plot.

When you have entered the values, press <Save> to save the profile.

The format of a profile file is a simple ASCII file with the four first lines specifying the profile duration and the time interval:

The first line is equal to:

0:If duration is one minute

1:If duration is one hour

2:If duration is one day

3:If duration is one week

4:If duration is one month

5:If duration is one year

The second line is always equal to 1 (reserved for future use)

The third line is equal to

0:If time interval is given in seconds

1:If time interval is given in minutes

2:If time interval is given in hours

3:If time interval is given in days

4:If time interval is given in weeks

5:If time interval is given in months

The fourth line is equal to the specified time interval.

The rest of the file is just the entered percent-values – one value on each line.

WinDali

Morten Juel Skovrup

11 Using Profiles in models

79

11.2 Using profiles in a model

Included in the demos is a modeified example of the "Cooling of Block" example, where a profile is used for the ambient temperature. This demo illustrates several points:

Using an Action button to open a file from your model

Changing the caption of an Info-label

Loading and using a profile

Using OnSaveSettings and OnLoadSettings to store information in files created from within the model.

When you use profiles then remember to:

1.Create the profile object in SetupProblem

2.Initialize the profile in PreCalc

The profile-object uses a linear interpolation to find profile values at each time step. If you want to improve this the change the code in CmjsProfile.pas located in the \Lib directory.

WinDali

Morten Juel Skovrup

Соседние файлы в папке Model and programs
  • #
    25.04.201512 б17heatrecoverysystem.LoadPrf
  • #
    25.04.2015249.28 Кб17heatrecoverysystem.set
  • #
    25.04.201537.38 Кб20Model help.doc
  • #
    25.04.2015509 б18SimIntPlt.cnt
  • #
    25.04.201562.07 Кб17SimIntPlt.hlp
  • #
    25.04.20151.28 Mб21WinDali.pdf