# Ecolego Wiki

### Site Tools

tutorial_7-creating_a_transport_the_old_fashioned_way

# Tutorial 7 - Creating a transport the old fashioned way

## 2/5

The transport block is notoriously hard to “debug”. Therefore it is advised that a classic compartment model is built prior to using the transport block so that the results from the transport block can be verified. We will start with only advection, and later add the diffusion transfers.

Creating the model structure

1. Create a new project by clicking the button on the Toolbar or by selecting File | New from the Menu bar.
2. Create a Source/Sink block. Name it “Source”.
3. Create three Compartment blocks. Name them “Layer_1”, “Layer_2” and “Layer_3”.
4. Create a Source/Sink block. Name it “Out”.
5. Create an Expression block. Name it “Flux_Out”.
6. Connect Source and Layer_1 with a Transfer block. Name the block “Input”.
7. Connect Layer_1 and Layer_2 with a Transfer block. Name the block “Advection_1_2”.
8. Connect Layer_2 and Layer_3 with a Transfer block. Name the block “Advection_2_3”.
9. Connect Layer_3 and Out with a Transfer block. Name the block “Advection_3_Out”.

Assigning values

1. Edit the Input Transfer block. Enter the value “1.0” in the expression field.

2. Edit the Advection_1_2 Transfer block. Enter the expression “v/(R * dx)” where:

Name Type Unit Value/ExpressionFull Name
v parameter m year-12 Advection velocity
R parameter - 0.5 Retardation coefficient
dx expressionm length/N Layer thickness
lengthparameter m 10 Total depth
N parameter - 3 Number of discretizations

(Hint: To enter values for Value/Expression and Full Name simply right-click the parameter in the Blocks window and choose Edit.)

3. Enter the same equation “v/(R * dx)” for the Transfer blocks Advection_2_3 and Advection_3_Out.

4. Edit the Expression block Flux_Out. Enter the equation “Layer_3 * Advection_3_Out”.

5. Edit the simulation settings by clicking the button. Set the end time to 10 years.

6. Run a simulation and make a plot of the simulation output Flux_Out.

7. Save the project with a name that will make you happy, as it is possible you will open this project many times again.

In the next step you will try to replicate the results from this model using a transport block.

Solution to this part

Next

Previous

References