TransientReactiveTransport¶
- class TransientReactiveTransport(*args, **kwargs)[source]¶
Bases:
openpnm.algorithms.ReactiveTransport.ReactiveTransport
A subclass of ReactiveTransport for transient/steady-state simulations
- Parameters
network (OpenPNM Network object) – The Network with which this algorithm is associated.
project (OpenPNM Project object) – Either a Network or a Project must be specified.
Notes
This subclass performs steady and transient simulations of transport phenomena with reactions when source terms are added. It supports 3 time discretization schemes; ‘steady’ to perform a steady-state simulation, and ‘implicit’ (fast, 1st order accurate) and ‘cranknicolson’ (slow, 2nd order accurate) both for transient simulations.
- results(times=None, **kwargs)[source]¶
Fetches the calculated quantity from the algorithm and returns it as an array.
- Parameters
times (scalar, ND-array, list of scalars, None, or string) – Time steps to be returned. The default value is None which results in returning all time steps. If times is a scalar, only the corresponding time step is returned. If times is an ND-array or a list of scalars, time steps in the provided array or list are returned. If times is ‘final’ or ‘actual’, the current value of the quantity is returned.
t_precision (integer) – The time precision (number of decimal places). Default value is 12.
Notes
The keyword steps is interpreted in the same way as times.
- run(t=None)[source]¶
Builds ‘A’ matrix of the steady system of equations to be used at each time step to build transient ‘A’ and ‘b’. Imposes the initial conditions and stores the initial field. Initialize transient ‘A’, ‘b’, and source term (if present) and finally calls the transient solver.
- Parameters
t (scalar) – The time to start the simulation from. If no time is specified, the simulation starts from ‘t_initial’ defined in the settings.