This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorial_-_time_events_-_monthly_max [2020/10/12 19:49] erik created |
tutorial_-_time_events_-_monthly_max [2023/03/15 09:36] (current) dmytroh |
||
---|---|---|---|
Line 7: | Line 7: | ||
* A [[Time point]] block which allows us to specify the first day of each month | * A [[Time point]] block which allows us to specify the first day of each month | ||
* A [[Time event]] which will fire events based on the time point block | * A [[Time event]] which will fire events based on the time point block | ||
- | * A [[minmax|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** |
- | | + | |
- | 1. Create a time point block | + | |
- | | + | - In the **Properties** |
- | | + | - change the name to " |
- | | + | - In the **Values** screen |
+ | - Ensure that the **Dimension** is **Scalar** | ||
+ | - Click the **Settings** button. | ||
+ | - Change the **Mode** to **Day of month**. | ||
+ | | ||
+ | | ||
+ | **Create event** | ||
+ | - Create a [[time event]] block | ||
+ | - Edit the block. | ||
+ | - In the **Properties** screen | ||
+ | - change the name to " | ||
+ | - 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 | ||
+ | - In the **Properties** screen, change the name to **Monthly_max** | ||
+ | - In the **Values** screen | ||
+ | - Enter the name _Soil_ in the **Target expression** column | ||
+ | - Select _Month_event_ in the **Reset** column | ||
+ | - Close the window | ||
+ | **Run a simulation** | ||
+ | - Run a simulation, then plot **Soil** together with **Monthly max**. | ||
+ | - The plot should look like this: | ||
- | This tutorial gives some examples of how to model events that occur at specific time points in a simulation. | + | {{ : |
- | ==== Base model ==== | + | You can download the solution {{ : |
- | 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 {{ : | + | [[tutorial |
- | + | [[tutorial - time events - monthly max with memory|Next]] | |
- | 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 //" | + | |
- | + | ||
- | 5. Add a transfer from //Soil// to //Sky// and set its equation to //" | + | |
- | + | ||
- | 6. When run, the model will output a Sky and Soil concentration like this: | + | |
- | + | ||
- | {{ : | + | |
- | + | ||
- | Continue with [[tutorial - time events - monthly max|Next]] | + | |
===== See also ===== | ===== See also ===== |