yMMSL Example Model Documentation
Example yMMSL file containing a model
Note that many of these are optional, but they’re all used here to show what the format is capable of.
Model file: example_model.ymmsl
yMMSL version: v0.2
Models
Macro Micro Model
A basic macro-micro (time-scale separation) reaction-diffusion model
This model has two submodels, named macro and micro, that simulate the slow and fast dynamics respectively.
Macro
The macro (slow) model calls the micro model at each timestep
Ports
state_out: 1D array of float Outputs the state at every time step
update_in: 1D array of float Receives a state update at every time step
Operator |
Port Name |
|---|---|
O_I |
state_out |
S |
update_in |
Implementation: macro_model_program
Micro
The micro (fast) (sub)model runs repeatedly
Ports
init_in: 1D array of float Receives the system state on every run
final_out: 1D array of float Outputs a state update on every run
Operator |
Port Name |
|---|---|
F_INIT |
init_in |
O_F |
final_out |
Implementation: micro_model_program
Multiplicity: [5]
Conduits
macro.state_out: micro.init_in
micro.final_out: macro.update_in
Supported Settings
Parameter |
Type |
Description |
|---|---|---|
domain_grain |
float |
Spatial distance between grid cells (m) |
domain_extent |
float |
Size of the domain (m) |
timestep |
float |
Step to take while integrating time (s) |
total_time |
float |
Total time to simulate for (s) |
k |
float |
Reaction coefficient |
d |
float |
Diffusion coefficient |
For more information about the types: yMMSL documentation.