Module: Molecular Diffusivity Tensor Calculation ()

WARNING: this feature is only available for Windows platform.

Description:

The Molecular Diffusivity Tensor Calculation module computes one or several lines of the effective molecular diffusivity tensor.

Note: see about system requirements and hardware platform availability.

Aknowledgments

This module was developed in collaboration with Dominique Bernard, Research Director at ICMCB-CNRS (Pessac, France).

Theoritical details

Some general elements about molecular diffusivity are exposed in . The tensorial problem is closed by imposing periodic boundary conditions to the unknows and the geometry. As a consequence, no concentration can be imposed, in contrast to experiment simulation.

Physical constraints

Only one fluid phase and one solid phase are considered for this calculation: the module takes a label image as input, but each label of the image has to be part either of the solid phase or of the fluid phase. The diffusion coefficient of the solid phase is assumed to be zero. The rate of reaction of the solid is also assumed to be zero: there is no reaction occuring at the fluid-solid interface. The fluid phase is filled with a solvent and there is no flow. The diffusion of only one species is considered.

Computational aspects and results

As the computation can be rather long, it is left to the user to select either one or several lines of the effective molecular diffusivity tensor.

If less than three directions are selected, the corresponding tensor lines are stored in separate tables of a spreadsheet. Each line of the spreadsheet represents a single computation of the properties. The columns contain:

If all the three directions are selected, the full tensor is computed and the eigenvalues and vectors are also stored in the same spreadsheet with suffix .DTensor.Spreadsheet. For each full tensor computation, three lines appear in the spreadsheet. In that case, the columns contain:

Units and dimensions

The effective molecular diffusivity tensor is dimensionless.

Problems and solutions

What does this error dialog mean?

Figure 1: Example of error dialog at the end of a computation.

This dialog usually appears at the end of a computation and means that something went wrong during the computation. The solver did not reach the convergence target in the indicated number of iterations. There can be mainly two reasons to explain that problem.

First, the number of iterations is not large enough. It can be detected when the performed number of iterations equals the maximal number set as parameter. The maximal limit should be increased in the parameters of the modules. For large data volumes, the default value might be too small.

The other reason is more difficult to identify. When the discretization of the volume is too rough, the solver can start oscillating locally. One value is locally perturbed and each iteration modifies it consequently with respect to its absolute value. This value can be very small but the error is computed on relative variation between two time steps. For example, a value of at iteration number 1 and at iteration 2 varied by between these two iterations. The value is very small, probably negligible for the final result, but the error remains large.

Several solutions can be tested to address these issues:

Connections:

Data [required]
The input must be a Label Field.

ROI [optional]
This is a Region Of Interest, meaning that the computation will only take into account the volume contained in the ROI.

Initial Concentration Field [optional]
The connected field is used as initial solution of the problem. It means that the result of a previous computation can be reused to restart this computation from where it ended. It can be useful if the computation was interrupted before the targeted error value was reached. The connected field must have the same dimensions and voxel size as the data set. Otherwise, it will not be used for initializing the solution.

Ports:

Options

This checkbox allows overwriting (checked) / creating new outputs (unchecked) when a computation ends.

Pore Space

This port lists all the materials or labels contained in the connected Label Field. It allows selecting which labels or values must be considered as fluid for the computation. By default, the material named Exterior or the value 0 is selected.

Transport Direction

This option allows the user to define which line of the molecular diffusivity tensor to compute. Separate computations will be performed for each direction specified. If all the three directions are selected, the full tensor is computed.

Spreadsheet

This port selects where the next result must appear. If "append result" is selected, the next result is appended in the connected spreadsheet to the last created table corresponding to the species transport direction of this computation. If "new spreadsheet" is selected, the result is stored in a new spreadsheet. If no spreadsheet is connected, a new one is created.

Outputs

If one of the check boxes is selected, the corresponding output will appear in the Project View at the end of the computation. The first check box stands for the resulting concentration perturbation field (namely the vector referenced in the ). Source term or closure variable should be used to mathematically describe it. It is not selected by default.

If the second checkbox is checked, a spreadsheet with suffix .DTensor.Error.Spreadsheet is added to the Project View. It contains the estimation of the error (or convergence criterion) at each iteration, for each computation (depending on how many directions are selected).

Note: the deviation field is automatically created as output of the module if the computation was aborted or did not converge. The created field can be connected as an input of the module, so that the computed values can be used as initial solution of the problem (see above for more details).

hxportgroup Advanced Settings

Advanced Settings

This port sets whether the additional options for fine tuning the module are visible (ON) or hidden (OFF). The options that appear when switching ON are considered to be expert options, which should not require modification in most cases.

Refining Coefficient

Only appears when "show advanced settings" from port Options is checked. The refining coefficient can be used to artificially oversample an image, by simply dividing all the voxels by an integer value. This method gives better precision concerning the evaluation of the unknowns. It can be useful to increase it when the throats in the porous materials are very small (few voxels wide). It is an integer value, which must be strictly greater than 0. The slider is limited to 2 to avoid an accidental increase of this value, which would imply a heavy increase of unknown numbers, though a dramatic drop in computation time.

Relative Tolerance

Only appears when "show advanced settings" from port Options is checked. An iterative resolution with conjugate gradient and ILU preconditioner is used to solve the Fick equation system for the diffusivity computation (please refer to for more details). The convergence criterion used here is the relative decrease in the residual -norm. For convenience, the convergence criterion will often be simply called "error" in the GUI, spreadsheets and Console messages. Convergence is considered to be obtained at iteration if , where and is the linear system to solve. is the relative tolerance set in this port. It is a floating point value which must be greater than 0 and for which a default value of 10 is suggested.

Iterations

Only appears when "show advanced settings" from port Options is checked. The maximum number of iterations to compute is used to be sure that the computation loop will end even if the convergence criterion cannot be attained because of numerical approximation problems.

Expose

This checkbox stands for the refined image. The output that is shown in the Project View is the refined subvolume used for the computation. It means that the output field fits in the ROI if it is defined or has the same dimensions as the input data. It also means that the output field is oversampled by the factor indicated in the refining coefficient option.