pdom.Simulate¶
-
class
pdom.Simulate(config_file, out_folder=None, data_file=None, overwrites=None, resolution=250)¶ Class to simulation different degradation models
Parameters: - config_file (str, Path) – .ini file to load
- out_folder (str, Path, optional) – folder to save the results
- data_file (str, Path, optional) – .json file containing experimental data
- overwrites (dict, optional) – overwrite settings from the config file
- resolution (int, optional) – time resolution for data export
-
cfg= None¶ the simulation configuration created with
pdom.data.Parameterfrom the config file.
-
rhs_bonds(t, N_flat, k, N_shape)¶ Right-hand site for multi species model excess_bonds.
Calculate the derivative for a given concentration profile.
Parameters: - N_flat (ndarray) – number of molecules | 3-dim flattened
- t (float) – time (not used)
- k (ndarray) – simulation constants (\(k_{\mathrm{ads}}\), \(k_{\mathrm{des}}\), \(k_{\mathrm{reac}}\))
- N_shape (tuple) – original shape of N
- first dimension of N corresponds to the number of Carbon atoms
carbon_count=index+1 - second dimension of N corresponds to the number of excess bonds
excess_bonds=index max(excess_bonds) < max(carbon_count)N[:, :, 0]is the number of molecules on the surfaceN[:, :, 1]is the number of molecules in solution- the simulation constants must have the shape
(3, max(excess_bonds)+1, max(carbon_count))
Returns: first derivative Return type: ndarray
-
rhs_multi(t, N_flat, k, N_shape)¶ Right-hand site for multi species models fragmentation and incremental.
Calculate the derivative for a given concentration profile.
Parameters: - N_flat (ndarray) – number of molecules | 2-dim flattened
- t (float) – time (not used)
- k (ndarray) – simulation constants (\(k_{\mathrm{ads}}\), \(k_{\mathrm{des}}\), \(k_{\mathrm{reac}}\))
- N_shape (tuple) – original shape of N
- first dimension of N corresponds to the number of Carbon atoms
carbon_count=index+1 N[:, 0]is the number of molecules on the surfaceN[:, 1]is the number of molecules in solution- the simulation constants must have the shape
(3, max(carbon_count))
Returns: first derivative Return type: ndarray
-
rhs_single(t, N, k)¶ Right-hand site for single species model.
Calculate the derivative for a given concentration profile.
Parameters: - N (ndarray) – number of molecules | 1-dim
- t (float) – time (not used)
- k (ndarray) – simulation constants (\(k_{\mathrm{ads}}\), \(k_{\mathrm{des}}\), \(k_{\mathrm{reac}}\))
N[0]is the number of molecules on the surfaceN[1]is the number of molecules in solution
Returns: first derivative Return type: ndarray