User Tools

Site Tools


tutorial_-_time_events_-_monthly_max

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
tutorial_-_time_events_-_monthly_max [2020/10/12 19:50]
erik
tutorial_-_time_events_-_monthly_max [2023/03/10 13:48]
dmytroh
Line 9: Line 9:
   * A [[min max|Min/Max]] block which records the soil concentration.   * A [[min max|Min/Max]] block which records the soil concentration.
  
-==== Create time point ==== +**Create time point** 
-   +  - Create a [[time point]] block  
-  - Create a time point block  +  - Edit the block.  
-  - In the values screen, click the **Settings** button. Change the **Mode** to **Day of month**. +  - In the **Properties** screen  
-  - Enter the value 1 as the **Timepoint** in the table+    - change the name to "Month_time_point".  
 +  - In the **Values** screen  
 +    - Ensure that the **Dimension** is **Scalar** 
 +    - Click the **Settings** button.  
 +    - Change the **Mode** to **Day of month**. 
 +    - Enter the value 1 as the **Timepoint** in the table, which indicates the 1st of each month.
   - Close the window   - Close the window
        
 +**Create event**
 +  - Create a [[time event]] block
 +  - Edit the block.
 +  - In the **Properties** screen 
 +    - change the name to "Month_event".
 +  - In the **Values** screen 
 +    - Ensure that the **Dimension** is **Scalar**
 +    - select **Month_time_point** and click the **>** button.
 +  - Close the window
  
-  +**Create min/max** 
- +  - Create a [[min/max]] block 
- +  - Edit the block 
-This tutorial gives some examples of how to model events that occur at specific time points in simulation.  +  - In the **Properties** screen, change the name to **Monthly_max** 
- +  - In the **Values** screen  
-==== Base model ==== +    - Enter the name _Soil_ in the **Target expression** column 
- +    Select _Month_event_ in the **Reset** column 
-All examples are based on the following base model, which calculates a dummy value we can use for our event experiments. You can download the model from {{ :base_event_model.eco |here}} +  - Close the window
- +
-1. Edit [[simulation settings]]. Set +
- +
-  * **Time unit**: Days +
-  * **Time mode**: Time +
-  * **Start time**: 0.0 +
-  * **End time**: 100.0 +
-  * **Start date**:2000-01-01 +
- +
-  * **Output options**: Produce additional output +
-  * **Time points**: from start to end with a 1.0 increment +
- +
-2. Create a material named //Poison// with the unit //mg//. +
- +
-3. Create two compartments //Sky// and //Soil//. Set the initial condition for //Sky// to be **500** (mg) of **Poison**. +
- +
-4. Add a transfer from //Sky// to //Soil// and set its equation to //"30+sin(time/5)*20+cos(time/3+2)*10"//+
  
-5. Add transfer from //Soil// to //Sky// and set its equation to //"30+sin(time/3+2)*10+cos(time/7+3)*20"//+**Run simulation** 
 +  - Run a simulation, then plot **Soil** together with **Monthly max**.  
 +  - The plot should look like this:
  
-6. When run, the model will output a Sky and Soil concentration like this:+{{ :time_event_tutorial_monthly_max_plot.png?400 |}}
  
-{{ :time_event_tutorial_base_model_plot.png?400 |}}+You can download the solution {{ :monthly_max_model.eco |here}} 
  
-Continue with [[tutorial - time events - monthly max|Next]]+[[tutorial - time events|Previous]]  
 +[[tutorial - time events - monthly max with memory|Next]] 
  
 ===== See also ===== ===== See also =====
tutorial_-_time_events_-_monthly_max.txt · Last modified: 2023/03/15 09:36 by dmytroh