User Tools

Site Tools


tutorial_3-creating_vector_and_matrix_parameters

Tutorial 3 - Creating vector and matrix parameters

3/4

Creating materials

Like in Tutorial 2-Creating a compartment model, we will use Materials to model the contaminants. Open the Materials window and create the following Materials:

NameFull name Symbol
NO Nitrogen Oxide NO
SO_2Sulphur DioxideSO2


Changing parameter dimensions

If you open the Index lists window you will see a list of all available index lists. The index lists are expanded by clicking the ”+” symbol. As you see there are indices for all transfers, compartments and materials.

Screenshot

These index lists can be used to create Parameters that are material, compartment or transfer dependent. This makes it, for example, possible for you to create one parameter which is used in many different Transfers. Depending on in which object it is used, Ecolego will use a corresponding value found in the parameter.


Creating input

The input parameter is a simple material-dependent vector.

  1. Open the Blocks window if it is not already open.

  2. Right-click the input parameter, and choose Edit from the pop-up menu.

  3. Select the Values tab. Change dimension to “1 dependency”.

  4. Set the drop-down list that appears to “Materials”.

  5. Assign the following values:

    MaterialsValue
    NO 10
    SO2 20
  6. Close the window by clicking Ok


Creating ic

The ic Parameter is used as the initial condition for both Compartments. It is a matrix parameter with different values for different compartments and different materials.

  1. Right-click the ic parameter, and choose Edit from the pop-up menu.

  2. Select the Values tab. Change dimension to “2 dependencies”.

  3. Set the first dependency to to “Materials”.

  4. Set the second dependency to “Compartments”.

  5. Assign the following values:

    MaterialsCompartmentValue
    NO Upper_Soil 1000
    SO2 Upper_Soil 1000
    NO Lower_Soil 10
    SO2 Lower_Soil 100
  6. Close the window by clicking Ok


Creating a sub-set index list for TC

The Transfers Index list has one index for each Transfer in the model. It thus have the following indices:


Deposition
Upper_to_Lower
Lower_to_Sink


The parameter TC is only used for the two Transfers Upper_to_Lower and Lower_to_Sink. If we assign the Transfers index list to TC, we would have to put a “dummy”-value for Deposition, as the parameter is not used there. Instead we can create a sub-set of the Transfers Index list which does not include Deposition, and use it for TC.

  1. Open the Index lists window

  2. Right-click the Transfers index list and choose New | Sub-set from the pop-up menu.

  3. A new Index list is added to the list named “Transfers_Sub_Set”. Right-click it and select Edit from the pop-up menu.

  4. Select the Properties tab and change the name to “Soil fluxes”.

  5. Select the Values tab. Unselect the “Deposition” index.

  6. Close the window by pressing Ok

  7. Open the Blocks window.

  8. Right-click the TC parameter, and choose Edit from the pop-up menu.

  9. Select the Values tab. Change dimension to “2 dependencies”.

  10. Set the first dependency to “Materials”.

  11. Set the second dependency to “Soil fluxes”.

  12. Assign the following values:

    MaterialsSoil fluxes Value
    NO Upper_to_Lower0.005
    SO2 Upper_to_Lower0.03
    NO Lower_to_Sink 0.13
    SO2 Lower_to_Sink 0.07
  13. Close the window by clicking Ok


Next

Previous

References

tutorial_3-creating_vector_and_matrix_parameters.txt · Last modified: 2023/03/22 16:51 by dmytroh