Homepage

Editing values

Overview

Most blocks require specific information, such as equations, initial conditions or parameter values. When you edit a block, these are entered in the Values tab. In most cases, the values tab contains a table which lists all the information asked for by the block.

Editing values

Drop downThe drop down menu is presented when the block has more than one dependency, as it is then not possible to display all the information using two dimensions.
Transposes the table (swaps rows for columns). Only works when the block has at least one dependency. When the block has more than two dependencies, the dependencies and headers are "rotated" as described below.
When selected, all available properties will be displayed in the table, when unchecked all but the most important properties are hidden.
When selected, rows and columns for default values are hidden. This is makes sense for parameters, where you typically always have different values for different contaminants, whereas it makes less sense for expressions where the equation is typically the same for all contaminants.
When selected, only default values are displayed. For expressions, clicking this button will provide more space to enter a long equation.

Dimension

Blocks in Ecolego can have different dimensions. This allows blocks to have dependencies - the most common being material dependence. This way parameter values for different substances can be grouped inside the same block.

No dependencies

Editing values

The picture above shows the editing window of a parameter with no dependencies. Each attribute, or type of value, is listed as a row in the table. Note that less important value types have been hidden by de-selecting the button.

One dependency

By selecting 1 Dependency from the dropdown list, the table changes:

Editing values

A new drop down menu appears next to the dependency menu, from which the dependency can be selected. Dependencies are defined by index lists and by default a material dependency is selected. The table now displays one row for each index in the index list, including a row for the default value (see below). Each column displays a specific attribute.

The rows and columns can be swapped in order to transpose the table:

Editing values

The default value can be used in order to specify values which apply to all indices (materials in the example below). The default value will be applied to all values for which no explicit value has been set, and are coloured blue.

Editing values

Two dependencies

For a block with two dependencies, the table changes yet again:

Editing values

The dependencies can be swapped by clicking on the <> button between their corresponding drop down lists. The table cannot display all data; a drop-down list appears from which you select the attribute to display.

Clicking the button no longer transposes the table, but rotates the headers of the table. This way the attributes can be displayed as rows and the dependency as a drop down list.

HeaderBeforeBecomes
Drop-downAttributesMaterials
RowsPopulationAttributes
ColumnsMaterialsPopulation

For a block with two dependencies, there are not only one default value per attribute but several. This way you can specify a default value for all indices or the default value for a specific index. A default value given for the last dependency will override a default value for the first dependency, which in turns overrides the default value given for all indices.

Three dependencies

Editing values

Another drop down list will now be displayed for the last dependency. This drop down list contains all indices of the last dependency, as well as a default index.

It might seem impossible to end up in a situation where all these dimensions and default values are required. However, when writing expressions, the dependencies are often determined by the parameters used in the expression.

Example: Three dependencies

Assume a model where a couple of compartments correspond to volumes of contaminated soil: TopSoil, MidSoil and DeepSoil. The compartments are material dependent.

A parameter Volume is created which is compartment dependent:

IndexValue (m3)
TopSoil200
MidSoil300
DeepSoil600

An expression Concentration is created in order to calculate the concentrations of the three compartments and store them in a single block. The equation is the mass of each compartment x the volume of each compartment. Concentration thus has two dependencies: material and compartment. The equation will be the same for all materials, but different for the compartments.

-Default-ChloroformBenzo(a)Pyrene
-Default-
TopSoilTopSoil/VolumeTopSoil/VolumeTopSoil/Volume
MidSoilMidSoil/VolumeMidSoil/VolumeMidSoil/Volume
DeepSoilDeepSoil/VolumeDeepSoil/VolumeDeepSoil/Volume

The model is now properly vectorized. New contaminants can be added without having to change any equations.

However, we would like to investigate how the model behaved if the volumes of the soil change over time. A lookup table is created named VolumeOverTime. A scenario is created called Time changing volumes and the dimension of the Concentration expression is changed to three where the new dependency is Scenarios. For the scenario Time changing volumes the equations are changed so that:

For the -default- scenario

Scenario: -Default--Default-ChloroformBenzo(a)Pyrene
-Default-
TopSoilTopSoil/VolumeTopSoil/VolumeTopSoil/Volume
MidSoilMidSoil/VolumeMidSoil/VolumeMidSoil/Volume
DeepSoilDeepSoil/VolumeDeepSoil/VolumeDeepSoil/Volume

For the time changing volumes scenario:

Scenario: Time changing volumes-Default-ChloroformBenzo(a)Pyrene
-Default-
TopSoilTopSoil/VolumeOverTimeTopSoil/VolumeOverTimeTopSoil/VolumeOverTime
MidSoilMidSoil/VolumeOverTimeMidSoil/VolumeOverTimeMidSoil/VolumeOverTime
DeepSoilDeepSoil/VolumeOverTimeDeepSoil/VolumeOverTimeDeepSoil/VolumeOverTime

We have now seen an example of where three dimensions where used, and where the default values where applied for different dependencies.