imod.wq.ParallelKrylovTransportSolver#
- class imod.wq.ParallelKrylovTransportSolver(max_iter=1, inner_iter=50, cclose=1e-06, relax=0.98, partition='uniform', solver='bicgstab', preconditioner='ilu', debug=False, load_balance_weight=None)[source]#
The Parallel Krylov Transport Solver is used for parallel solving of the transport model.
- Parameters:
max_iter (int) – is the maximum number of outer iterations (MXITER); it should be set to an integer greater than one (1) only when a nonlinear sorption isotherm is included in simulation.
inner_iter (int) – is the maximum number of inner iterations (INNERIT); a value of 30-50 should be adequate for most problems.
cclose (float, optional) – is the convergence criterion in terms of relative concentration; a real value between 10-4 and 10-6 is generally adequate. Default value: 1.0e-6.
relax (float, optional) – is the relaxation parameter used. Usually, RELAX = 1.0, but for some problems a value of 0.99, 0.98, or 0.97 will reduce the number of iterations required for convergence. Default value: 0.98.
partition ({"uniform", "rcb"}, optional) – Partitioning option (PARTOPT). “uniform” partitions the model domain into equally sized subdomains. “rcb” (Recursive Coordinate Bisection) uses a 2D pointer grid with weights to partition the model domain. Default value: “uniform”.
solver ({"bicgstab", "gmres", "gcr"}, optional) – Flag indicating the linear solver to be used (ISOLVER). Default value: “bicgstab”
preconditioner ({"ilu"}, optional) – Flag inicating the preconditioner to be used (NPC). Devault value: “ilu”.
debug ({True, False}, optional) – Debug option. Default value: False
load_balance_weight (xarray.DataArray, optional) –
2D grid with load balance weights, used when partition = “rcb” (Recursive Coordinate Bisection). If None (default), then the module will create a load balance grid by summing active cells over layers: (ibound != 0).sum(“layer”)
Note that even though the iMOD-SEAWAT helpfile states .idf is accepted, it is not. This load balance grid should be a .asc file (without a header). Formatting is done as follows: pd.DataFrame(load_balance_weight.values).to_csv(path, sep=’t’, header=False, index=False, float_format = “%8.2f”)
- __init__(max_iter=1, inner_iter=50, cclose=1e-06, relax=0.98, partition='uniform', solver='bicgstab', preconditioner='ilu', debug=False, load_balance_weight=None)[source]#
Methods
__init__
([max_iter, inner_iter, cclose, ...])from_file
(path, **kwargs)Loads an imod-wq package from a file (currently only netcdf and zarr are supported).
isel
()save
(directory)Overloaded method to write .asc instead of .idf.
sel
()