====== 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** - Create a new project by clicking the {{:New24.png|New}} button on the [[Menu_bar#Toolbar|toolbar]] or by selecting **File | New** from the [[Menu_bar|Menu bar]]. - Create a [[Source_Sink|Source/Sink]] block. Name it “Source”. - Create three [[Compartment|Compartment]] blocks. Name them //“Layer_1”//, //“Layer_2”// and //“Layer_3”//. - Create a [[Source_Sink|Source/Sink]] block. Name it “Out”. - Create an [[Expression|Expression]] block. Name it “Flux_Out”. - Connect //Source// and //Layer_1// with a [[Transfer|Transfer]] block. Name the block “Input”. - Connect //Layer_1// and //Layer_2// with a [[Transfer|Transfer]] block. Name the block “Advection_1_2”. - Connect //Layer_2// and //Layer_3// with a [[Transfer|Transfer]] block. Name the block “Advection_2_3”. - Connect //Layer_3// and //Out// with a [[Transfer|Transfer]] block. Name the block “Advection_3_Out”. \\ {{tutorial_7_1.png}} \\ \\ **Assigning values**
  1. Edit the //Input// [[Transfer|Transfer]] block. Enter the value “1.0” in the equation field.

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

    \\

    ^Name ^Type ^Unit ^Value/Expression^Full Name ^ |v |parameter |m year-1|2 |Advection velocity | |R |parameter |- |0.5 |Retardation coefficient | |dx |expression|m |length/N |Layer thickness | |length|parameter |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|Blocks window]] and choose **Edit**.)\\ \\

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

  4. Edit the [[Expression|Expression]] block //Flux_Out//. Enter the equation “Layer_3 * Advection_3_Out”.

  5. Edit the [[simulation_settings|simulation settings]] by clicking the {{:SimulationSettings24.png}} button. Set the end time to 10 years.{{tutorial_7_2.png}}

  6. [[Running_simulations|Run a simulation]] and make a plot of the simulation output //Flux_Out//.

    \\

    {{tutorial_7_3.png}}

    \\

  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** * {{solution_transport_1.eco}} **Next** * [[Tutorial_7-Creating_a_Transport_model|Creating a Transport model (3/5)]] **Previous** * [[tutorial_7-Transport|Transport]] **References** * [[Tutorials|Back to Tutorials]] * [[start|Home]]