Input data#
Input data must be passed to the fragmentmnp.FragmentMNP
model class. Examples are given in the fragmentmnp.examples
module:
>>> from fragmentmnp.examples import minimal_data, full_data
>>> minimal_data
{'initial_concs': [42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0], 'density': 1380, 'k_frag': 0.01}
>>> full_data
{'initial_concs': [42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0], 'density': 1380, 'k_frag': 0.01,
'theta_1': 0.0, 'k_diss': 0.0, 'k_diss_gamma': 1.0}
The minimal_data
contains only required variables, whilst full_data
includes variables that have defaults. Here we take a look at the schema for this data dict.
Note
In previous versions of the model, the variables theta_1
, k_frag_tau
and k_diss_gamma
were used to scale the size and time dependence of the fragmentation and dissolution rate constants k_frag
and k_diss
. These have been replaced with a more flexible regressions and new parameters, as detailed belowed.
initial_concs
Required, list of positive floats with length equal to
n_size_classes
, units: kg/m3.The intial mass concentration in each model size class.
initial_concs_diss
Required, float, units: kg/m3.
The intial mass concentration in the dissolved fraction.
density
Required, float, units: kg/m3.
The density of the polymer being modelled.
k_frag
,k_diss
Required, float or dict, units: s-1.
Either a scalar or dictionary of regression parameters. If a scalar is provided, the fragmentation (
k_frag
) or dissolution (k_diss
) rate will be constant in time and across particle surface areas. If a dictionary is provided, the rate will follow the time and surface area dependence according to the parameters provided. See Fragmentation and dissolution rates for more details.
Warning
The 2D k_frag
array generated by the model has been transposed compared to previous versions of the model. k_frag
now has the shape (n_size_classes, n_timesteps)
rather than (n_timesteps, n_size_classes)
.
fsd_beta
Optional, float, default: 0.
\(\beta\) is an empirical parameter that controls the dependence of the fragment size distribution
fsd
on particle diameter. The split of fragmented mass amongst daughter size classes is scaled as \(\propto d^\beta\), where \(d\) is the particle diameter. Thus, if \(\beta = 0\) (the default), there is an even split amongst daughter size classes, if \(\beta < 0\), a greater proportion of the mass goes to smaller size classes, and if \(\beta > 0\), a greater proportion of the mass goes to larger size classes. See Fragment size distribution for more information on the fragment size distribution matrix.
Units
Strictly speaking, the FRAGMENT-MNP model is unit-agnostic. As long as the units of data specified in input data are consistent, then the units of variables output by the model will match these. For example, if you specify initial_concs
and density
with units of mg/m3, then output concentrations will be in mg/m3. Notably, it is worth making sure that your rate constants (k_frag
and k_diss
) follow the same units as your model timestep dt
. Unless you have good reason not to (e.g. very long timesteps), we strongly recommend using SI units to avoid mistakes.