====== Tutorial 7 - Adding diffusion to the compartment model ====== ===== 4/5 ===== So far, so good. It is now time to add diffusion. As before, we begin with creating a compartment model. \\ **Editing the model structure** - Open the first model. Smile. - Connect //Layer_1// and //Layer_2// with a [[Transfer|Transfer]] block. Name the block “Diffusion_1_2”. - Connect //Layer_2// and //Layer_1// with a [[Transfer|Transfer]] block. Name the block “Diffusion_2_1”. - Connect //Layer_2// and //Layer_3// with a [[Transfer|Transfer]] block. Name the block “Diffusion_2_3”. - Connect //Layer_3// and //Layer_2// with a [[Transfer|Transfer]] block. Name the block “Diffusion_3_2”. - Connect //Layer_3// and //Out// with a [[Transfer|Transfer]] block. Name the block “Diffusion_3_Out”. \\ {{tutorial_7_5.png?600}} \\ **Assigning values**
  1. Edit //Diffusion_1_2//. Assign the expression “D/(R * dx2)” where:

    \\

    ^**Name**^**Type** ^**Unit** ^**Full Name** ^**Value/Expression**^ |D |Parameter|m2 year-1|Diffusion coefficient|1 |

    \\

  2. Assign the same [[expression|expression]] to all the diffusion [[Transfer|Transfer]] blocks.

  3. [[Running_simulations|Run a simulation]] and make a plot of //Flux_Out//. What has happened to the curve?

  4. Save the project.

\\ {{tutorial_7_6.png}} **Solution to this part** * {{tutorial:Solution_transport_3.eco?linkonly}} **Next** * [[Tutorial_7-Adding_Diffusion_to_the_Transport_Model|Adding Diffusion to the Transport Model (5/5)]] **Previous** * [[Tutorial_7-Creating_a_Transport_model|Creating a Transport model]] **References** * [[Tutorials|Back to Tutorials]] * [[start|Home]]