Configuration

Simulation

To run the simulation pdom needs a couple of information from the user. For pdom, this data is saved in an .ini file. This ensures that the results of a simulation can always be accompanied by the parameters that created them.

A simple config for pdom looks like this:

simple.ini
[SIMULATION]
id = simple_degradation_methylene_blue
multi = False
fit = False
duration = 5 h

[SYSTEM]
concentration_solution = 0.08 mmol/L
k_ads = 9.0E-10 m/s
k_des = 1.0E-3 1/s
k_reac = 1.1E-2 1/s

[CATALYST]
concentration = 2.0 g/L
surface = 50 m^2/g
volume = 1e-3 m^3

[MOLECULE]
name = methylene blue
composition = C16H18S1N3
molar_volume = 226.6 Ang^3/molecule
molar_surface = 99.7 Ang^2/molecule
diffusion_model = s

The parameters are arranged in different sections. Not all sections need to exist for each simulation.

To create a new .ini file you can use the configuration tool of pdom.

$ pdom.config --out 'my_new.ini'

It will guide you through the process by collecting all relevant information. For the parameters of the initial molecule, it is helpful to look up its chemID in PubChem before you start the process. This enables the automatic gathering of the molecule parameters from this database.

Most of the time, the automatic process should suffice. But if you want to build your .ini file from scratch, take a look into the available Configuration settings.

Experimental data

To extract parameters, we need to compare experimental data to the simulation. This data needs to be provided in a structured way. For pdom we use a .json file. Depending on the type of fit you want to carry out, the available features differ slightly.

Adsorption-Desorption experiments

Adsorption-Desorption experiments in the dark are analyzed with the single-species model. As it is common to have multiple repetitions that are based on the same setup. pdom supports multiple time series in its fits. The initial concentration and time steps can be different between the series. Below are examples of such a data file.

ads_des_multi.json
{
  "time_series": [
    [
      [0, 10, 15, 30, 60, 120, 240], [0.000, 0.076, 0.143, 0.175, 0.199, 0.207, 0.209]
    ], [
      [0, 10, 15, 30, 60, 120, 240], [0.000, 0.251, 0.452, 0.570, 0.609, 0.637, 0.633]
    ], [
      [0, 10, 15, 30, 60, 120, 240], [0.000, 0.598, 0.750, 0.898, 0.998, 1.021, 1.020]
    ], [
      [0, 10, 15, 30, 60, 120, 240], [0.000, 0.700, 0.996, 1.248, 1.396, 1.415, 1.415]
    ]
  ],
  "time_series_meta": [
    {
      "unit": "min",
      "type": "t"
    },
    {
      "unit": "mo/mc",
      "factor": 1E-3,
      "type": "surface"
    }
  ],
  "initial_concentration": [5.0, 15.0, 25.0, 35.0],
  "initial_concentration_meta": {
    "unit": "mg/L",
    "type": "solution"
  }
}

Degradation experiments

For degradation experiments all time series have to start with the same initial concentration set in the .ini file. This is the data file from the example Degradation fit.

fit_reac_mutli.json
{
  "time_series": [
    [
      [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 25],
      [3.442, 2.847, 2.428, 2.229, 1.949, 1.801, 1.705, 1.535,
        1.315, 1.021, 0.9690, 0.8238, 0.5114, 0.2839, 0.1353]
    ], [
      [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 25],
      [3.505, 2.876, 2.586, 2.323, 2.242, 2.097, 1.781, 1.681,
        1.461, 1.249, 0.9543, 1.0852, 0.7665, 0.4324, 0.2368]
    ]
  ],
  "time_series_meta": [
    {
      "unit": "min",
      "type": "t"
    }, {
      "unit": "mg/L",
      "type": "solution"
    }
  ]
}

Multi species model

To compare multi-species model simulations to experiments, TOC (or NPOC) can be used. In general, the fit to TOC data is the last step in the experiment analytics. This fit is limited to a single TOC curve, due to the usually demanding experimental process. If multiple TOC experiments are available, the results should be average before simulation. As just one initial concentration is needed, it is taken from the .ini file.

This is the data file from the example TOC fit.

fit_toc.json
{
  "time_series": [
    [0, 60, 120, 180, 360],
    [12.6, 8.8, 6.78, 4.1, 2.77]
  ],
  "time_series_meta": [
    {
      "unit": "min",
      "type": "t"
    }, {
      "unit": "mg/L",
      "type": "toc"
    }
  ]
}

Configuration settings

SIMULATION

  • id → str
    default:example_mb
  • multi → bool
    default:True
    note:MULTI section needed if True
  • fit → bool
    default:False
    note:FIT section needed if True
  • duration → float
    default:5 h
    units:h, min, s
SOLVER
Relative and absolute tolerances for the LSODA solver
  • rtol → float
    default:1e-9
  • atol → float
    default:1e-5

ENVIRONMENT

  • temperature → float
    default:20 C
    units:K, C

CATALYST

  • concentration → float
    default:2.5 g/L
    units:g/m^3, g/L, mg/L
  • surface → float
    default:56e3 m^2/g
    units:m^2/g, cm^2/g
  • volume → float
    default:1e-3 m^3
    units:m^3, L, cm^3, mL

MOLECULE

  • name → str
    default:methylene blue
  • composition → chem_formula
    default:C16H18S1N3
  • excess_bonds → int
    default:14
  • molar_volume → float
    default:226.6 Ang^3/molecule
    units:Ang^3/molecule, nm^3/molecule, cm^3/mol
  • molar_surface → float
    default:99.7 Ang^2/molecule
    units:Ang^2/molecule, nm^2/molecule, m^2/molecule
  • diffusion_model → str
    default:s
    note:s: Stokes (default), wc: Wilke-Chang, hm: Hayduk-Minhas

SYSTEM

  • concentration_solution → float
    default:10 mg/L
    units:molecule/m^3, molecule/L, mol/m^3, mmol/L, M, mol/L, mo/mc, g/L, mg/L, g/m^3
  • concentration_surface → float
    default:0
    units:molecule/m^2, mol/m^2, g/m^2, mg/m^2
    note:if concentration_surface is not set system is considered in equilibrium (dark)
  • k_ads → float
    default:1E-9 m/s
    unit:m/s
  • k_des → float
    default:1E-3 1/s
    unit:1/s
  • k_reac → float
    default:1E-2 1/s
    unit:1/s
FIT
This section is just active if fit is True
  • type → str
    default:dark
    note:dark, reaction or toc
  • search → str
    default:relative
    note:minima search absolute, relative or relative_square
    note:does not apply to fit type toc
  • max_step → int
    default:100
    note:does not apply to fit type toc
MULTI
This section is just active if multi is True
  • split_model → str
    default:fragmentation
    note:incremental, fragmentation or excess_bonds
  • desorption_model → str
    default:weak
    note:weak or strong
  • TOC_estimation → str
    default:all
    note:all or volume
  • segment_export → str
    default:mass
    note:mass or molecule_count
MULTI_WEAK
This section is just active if desorption_model is set to weak. Just one value needed if k_des is set.
  • beta_0 → float
    default:-0.029 1/s
    unit:1/s
  • beta_1 → float
    default:0.8  1/s
    unit:1/s
MULTI_STRONG
This section is just active if desorption_model is set to strong
  • E_0 → float
    default:44.0 kJ/mol
    unit:kJ/mol
  • E_1 → float
    default:3.0 kJ/mol
    unit:kJ/mol
  • alpha_0 → float
    default:1.51e8 1/s
    unit:1/s
  • alpha_1 → float
    default:0.412