morphogen.coupling.oxidation

Thermal oxidation of polymers: the closed-loop mechanistic scheme, homogeneous (thin films) or limited by the diffusion of oxygen (thick samples).

The scheme of Colin, Verdu and co-workers, with the rate constants that Ernault et al. (2019) identified on a DGEBA/IPDA epoxy at 110 °C in air (their Tables 1 and 2):

POOH -> 2 P + P=O + V k1 (hydroperoxide decomposition) P + O2 -> POO k2 POO + PH -> POOH + P k3 (propagation, consumes the sites PH) P + P -> inactive products k4 POO + P -> inactive products k5 POO + POO -> inactive + g6 P=O + O2 k6

P=O (amides here, followed by FTIR) traces the oxidation. In thick samples oxygen enters by Fick’s law, d[O2]/dt = D d2[O2]/dz2 - k2 [P][O2] + k6 [POO]^2, at the concentration S p (Henry) on the exposed faces: the oxidized layer is a few hundred micrometres thick. Concentrations in mol/l, times in seconds, lengths in metres.

In a microstructure (oxidation_field()): the same scheme in every voxel of an image, each phase with its own constants (a polymer that oxidizes, an inert phase that lets oxygen through, an impermeable one: fibres, fillers), oxygen diffusing between the voxels from the exposed faces of the image. As in morphogen.coupling.diffusion, the activity of oxygen u (its partial pressure at equilibrium, [O2] = S u) is continuous across the interfaces and the flux between two voxels goes through the harmonic mean of their permeabilities D S:

d[X]/dt = r_X([P], [POO], …, [O2]) (the five species that do not move) S du/dt = div(D S grad u) + r_O2, u = p on the exposed faces.

The radicals live for milliseconds and the oxidation for thousands of hours: the system is integrated by the implicit one-step method TR-BDF2 (a trapezoidal stage and a backward difference, second order, L-stable; Bank et al. 1985) with its embedded error estimate for the steps (Hosea & Shampine 1996). Each Newton iteration eliminates the five local species voxel by voxel (their 5 x 5 blocks), which leaves one symmetric system for the oxygen of all the voxels, (diag(V S s) + a K) du = b with K the conductances of the faces and s the local Schur complements, solved by conjugate gradients (a sparse factorization for small images): the cost of a step grows as the number of voxels, in one, two or three dimensions.

class morphogen.coupling.oxidation.ClosedLoopOxidation(k1: float = 1e-05, k2: float = 1000000.0, k3: float = 2.25, k4: float = 25000000000.0, k5: float = 22500000000.0, k6: float = 2000.0, gamma6: float = 0.5, ph0: float = 5.8, pooh0: float = 0.001, solubility: float = 2.3e-07, diffusivity: float = 7.3e-13, pressure: float = 21278.25)[source]

Bases: object

Rate constants (s^-1, l mol^-1 s^-1), initial concentrations (mol/l) and oxygen transport (solubility mol l^-1 Pa^-1, diffusivity m^2/s, partial pressure Pa) of the closed-loop scheme; the defaults are those of Ernault et al. (2019) for DGEBA/IPDA at 110 °C in air.

property surface_oxygen: float

[O2] = S p at equilibrium with the atmosphere (Henry’s law).

rates(y: ndarray) → ndarray[source]

Reaction rates of the species SPECIES (rows of y), oxygen included.

initial(n: int = 1, oxygen: float = 0.0) → ndarray[source]
thin_film(times) → dict[str, ndarray][source]

Homogeneous oxidation (oxygen at its surface concentration everywhere): concentrations of the species at times (s).

profile(thickness: float, times, *, nodes: int = 61) → dict[str, ndarray][source]

Diffusion-limited oxidation of a plate of thickness (m) exposed on both faces: depth (m, from a face to the middle) and the concentrations of the species (times x nodes) at times (s). Method of lines on a uniform grid of half the plate (zero flux in the middle), stiff integration (Radau).

oxidized_layer(depth, amide, fraction: float = 0.1) → float[source]

Thickness of the oxidized layer: the depth where the amide concentration falls to fraction of its value at the surface (linear interpolation).

morphogen.coupling.oxidation.TOLERANCES = (1e-15, 1e-12, 1e-09, 1e-07, 1e-09, 1e-09)

Absolute tolerances of the species (mol/l) in the steps of oxidation_field(): the radicals are scarce (1e-11 to 1e-7 mol/l), the others are not

morphogen.coupling.oxidation.DIRECT_LIMIT = 512

Voxels up to which the oxygen of a Newton iteration is solved by a sparse factorization; preconditioned conjugate gradients beyond

class morphogen.coupling.oxidation.OxidationField(times: ndarray, fields: dict[str, ndarray], steps: int)[source]

Bases: object

The oxidation of an image: the concentrations of the species (fields: name -> array (times,) + shape, mol/l; zero in the phases that hold none) at the times (s), and the number of steps of the integration.

tracer(species: str = 'PO', time: int = -1) → ndarray[source]

The field of a species at an output time (by default the oxidation products at the last one): the tracer of morphogen.coupling.ageing. graded_materials().

morphogen.coupling.oxidation.oxidation_field(image, schemes, times, *, exposed=('x-', 'x+'), pressure: float | None = None, unit: float = 1.0, periodic=None, rtol: float = 0.0001, max_steps: int = 20000, progress=None) → OxidationField[source]

The thermal oxidation of the phases of an image (see the module): the concentrations of the species in its voxels at times (s).

schemes: a ClosedLoopOxidation for every phase, or a mapping phase -> scheme, each with the constants of its polymer and its transport of oxygen; a phase without reactive sites (ph0 = pooh0 = 0) lets oxygen through and does not oxidize, and a phase mapped to None is impermeable and inert (fibres, fillers). Oxygen enters through the exposed faces of the image ("x-", "x+", …), held at the partial pressure (Pa; by default that of the schemes, which must then agree); the other faces are impermeable, or periodic in a periodic image. The image is stored in air: its oxygen starts at equilibrium with the atmosphere. unit: the unit of length of the image in metres (1e-6 for micrometres). rtol: the relative tolerance of the time steps. progress: a function called with the fraction of the last time reached, after each step.