diff --git a/BUILD-LINUX.md b/BUILD-LINUX.md index abf22276d..5e2600628 100644 --- a/BUILD-LINUX.md +++ b/BUILD-LINUX.md @@ -48,11 +48,14 @@ sudo apt -y install liblapack3 liblapack-dev libblas3 libblas-dev - Open a terminal and change to `CADET/build` - If using MKL, execute `export MKLROOT=/opt/intel/mkl` -- Using standard LAPACK: Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" ../` +- To compile: + - Using standard LAPACK: Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" ../` - - Using MKL (sequential): Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" -DBLA_VENDOR=Intel10_64lp_seq ../` + - Using MKL (sequential): Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" -DBLA_VENDOR=Intel10_64lp_seq ../` - - Using MKL (parallel): Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" -DBLA_VENDOR=Intel10_64lp ../` + - Using MKL (parallel): Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" -DBLA_VENDOR=Intel10_64lp ../` -- Execute `make` -- Execute `make install` +- To build: + - Execute `make` +- To install: + - Execute `make install` diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index dfaf4259f..a9ec35b9e 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -8,12 +8,14 @@ * Andreas Püttmann (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany): Parameter sensitivities, Jacobians via AD, AD techniques (block- & band-compression) * [Samuel Leweke](https://github.com/sleweke) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany): Complete rewrite of v3.0 from scratch, build system, code & framework design and architecture, Matlab interface, file format, frontends (MEX, CLI), domain decomposition (multi-unit systems), reactions, 2D general rate model (paid by GE Healthcare), multiple particle types (paid by GE Healthcare) * [William Heymann](https://github.com/immudzen) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany): Networks of unit operations, compiler flag optimization -Salah Azzouzi (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany): Core-shell particles (paid by GE Healthcare) +* Salah Azzouzi (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany): Core-shell particles (paid by GE Healthcare) * [Johannes Schmölder](https://github.com/schmoelder) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany) * [Jayghosh Rao](https://github.com/jayghoshter) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany) * [Jazib Hassan](https://github.com/jazib-hassan-juelich) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany) -* [Jan Breuer](https://github.com/jbreue16) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany) +* [Jan Breuer](https://github.com/jbreue16) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany): Spatial DG discretizations (LRM, LRMP, GRM) * [Ronald Jäpel](https://github.com/ronald-jaepel) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany) +* [Hannah Lanzrath](https://github.com/hannahlanzrath) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany) +* [Antonia Berger](https://github.com/AntoniaBerger) (Forschungszentrum Juelich GmbH, IBG-1: Biotechnology, Juelich, Germany) ## Funding Acknowledgement diff --git a/README.rst b/README.rst index 22d66434a..91f232270 100644 --- a/README.rst +++ b/README.rst @@ -15,8 +15,8 @@ CADET - **Website (including documentation):** https://cadet.github.io - **Forum:** https://forum.cadet-web.de -- **Source:** https://github.com/modsim/cadet -- **Bug reports:** https://github.com/modsim/cadet/issues +- **Source:** https://github.com/cadet/cadet-core +- **Bug reports:** https://github.com/cadet/cadet-core/issues - **Demo:** https://www.cadet-web.de - **Newsletter:** https://cadet-web.de/newsletter/ @@ -55,22 +55,10 @@ Therefore, we kindly ask that any publications or projects leveraging the capabi - Püttmann, A.; Schnittert, S.; Naumann, U.; von Lieres, E.: `Fast and accurate parameter sensitivities for the general rate model of column liquid chromatography `_, Computers and Chemical Engineering **56** (2013), 46–57. -**Selected applications:** - -- Heymann, W.; Glaser, J.; Schlegel, F.; Johnson, W.; Rolandi, P.; von Lieres, E.: `Advanced score system and automated search strategies for parameter estimation in mechanistic chromatography modeling `_, Journal of Chromatography A **1661** (2022): 462693. - -- He, Q.-L.; Leweke, S.; von Lieres, E.: `Efficient numerical simulation of simulated moving bed chromatography with a single-column solver `_, Computers and Chemical Engineering **111** (2018), 183–198. - -- Freier, L.; von Lieres, E.: `Robust multi-objective global optimization of stochastic processes with a case study in gradient elution chromatography `_, Biotechnology Journal **13,1** (2018), 1700257. - -- Freier, L.; von Lieres, E.: [Multi-objective global optimization (MOGO): `Algorithm and case study in gradient elution chromatography `_, Biotechnology Journal **12,7** (2017), 1600613. - -- Diedrich, J.; Heymann, W.; Leweke, S.; Kunert, C.; Johnson, W.; Hunt, S.; Todd, B.; von Lieres, E.: `Multi-state steric mass-action model and case study on complex high loading behavior of mAb on ion exchange tentacle resin `_, Journal of Chromatography A **1525** (2017), 60–70. - -- Püttmann, A.; Schnittert, S.; Leweke, S.; von Lieres, E.: `Utilizing algorithmic differentiation to efficiently compute chromatograms and parameter sensitivities `_, Chemical Engineering Science, **139** (2016), 152–162. - Additionally, to ensure reproducibility of your work, we recommend citing the zenodo doi corresponding to the specific CADET release that you used. +Selected applications that demonstrate the capabilities and use-cases of CADET are highlighted in the `documentation `_. + Ongoing Development ------------------- @@ -79,7 +67,7 @@ We do our best to provide you with a stable API. However, CADET is actively deve Bugs ---- -Please report any bugs that you find `here `_. Or, even better, fork the repository on `GitHub `_ and create a pull request (PR) with the fix. +Please report any bugs that you find `here `_. Or, even better, fork the repository on `GitHub `_ and create a pull request (PR) with the fix. Donations --------- @@ -90,11 +78,11 @@ Donations License ------- -Released under GPL v3. License (see `LICENSE.txt `_):: +Released under GPL v3. License (see `LICENSE.txt `_):: Acknowledgments --------------- -Please refer to the `list of contributors `_ who helped building and funding this project. +Please refer to the `list of contributors `_ who helped building and funding this project. Copyright (C) 2004-2024 CADET Authors diff --git a/doc/README.md b/doc/README.md index bc3717077..8a82e81ab 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,7 +1,7 @@ ## CADET Documentation -To build the documentation locally, install sphinx and other dependencies by running +To build the documentation locally, in the `doc` folder, install sphinx and other dependencies by running ``` pip install -r requirements.txt diff --git a/doc/developer_guide/_images/architecture_libcadet_classes.png b/doc/developer_guide/_images/architecture_libcadet_classes.png index d03f219ce..e2e79ae28 100644 Binary files a/doc/developer_guide/_images/architecture_libcadet_classes.png and b/doc/developer_guide/_images/architecture_libcadet_classes.png differ diff --git a/doc/index.rst b/doc/index.rst index fb1b7907d..789dceb75 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -79,12 +79,30 @@ Donations Citing ------ -To cite CADET please use the following publication: +Citing +------------ +The development of CADET has been a collaborative effort, with multiple dedicated individuals contributing their expertise to create a powerful and versatile open-source software tool. +Countless hours of hard work have been invested to provide the scientific community with a valuable resource. +As an open-source project, CADET relies on the support and recognition from users and researchers to thrive. +Therefore, we kindly ask that any publications or projects leveraging the capabilities of CADET acknowledge its creators and their contributions by citing an adequate selection of our publications. + +**General:** + +- Leweke, S.; von Lieres, E.: `Chromatography Analysis and Design Toolkit (CADET) `_, Computers and Chemical Engineering **113** (2018), 274–294. + +- von Lieres, E.; Andersson, J.: `A fast and accurate solver for the general rate model of column liquid chromatography `_, Computers and Chemical Engineering **34,8** (2010), 1180–1191. + +**Numerics:** + +- Breuer, J. M.; Leweke, S.; Schmölder, J.; Gassner, G.; von Lieres, E.: `Spatial discontinuous Galerkin spectral element method for a family of chromatography models in CADET `_, Computers and Chemical Engineering **177** (2023), 108340. + +- Leweke, S.; von Lieres, E.: `Fast arbitrary order moments and arbitrary precision solution of the general rate model of column liquid chromatography with linear isotherm `_, Computers and Chemical Engineering **84** (2016), 350–362. + +- Püttmann, A.; Schnittert, S.; Naumann, U.; von Lieres, E.: `Fast and accurate parameter sensitivities for the general rate model of column liquid chromatography `_, Computers and Chemical Engineering **56** (2013), 46–57. + +Additionally, to ensure reproducibility of your work, we recommend citing the `zenodo doi `_ corresponding to the specific CADET release that you used. -* Leweke, S.; von Lieres, E.: `Chromatography Analysis and Design Toolkit (CADET) `_, Computers and Chemical Engineering 113 (2018), 274–294. -* Püttmann, A.; Schnittert, S.; Leweke, S.; von Lieres, E.: `Utilizing algorithmic differentiation to efficiently compute chromatograms and parameter sensitivities `_, Chemical Engineering Science, 139 (2016), 152–162. -* Püttmann, A.; Schnittert, S.; Naumann, U.; von Lieres, E.: `Fast and accurate parameter sensitivities for the general rate model of column liquid chromatography `_, Computers and Chemical Engineering 56,13 (2013), 46-57. -* von Lieres, E.; Andersson, J.: `A fast and accurate solver for the general rate model of column liquid chromatography `_, Computers and Chemical Engineering 34,8 (2010), 1180–1191. +Selected applications that demonstrate the capabilities and use-cases of CADET are highlighted `here `_. Acknowledgments --------------- diff --git a/doc/interface/flux_reconstruction.rst b/doc/interface/flux_reconstruction.rst index 5e56477eb..dd864a528 100644 --- a/doc/interface/flux_reconstruction.rst +++ b/doc/interface/flux_reconstruction.rst @@ -1,4 +1,4 @@ -.. _flux_restruction_methods: +.. _flux_reconstruction_methods: Flux reconstruction methods =========================== diff --git a/doc/interface/parameter_dependencies.rst b/doc/interface/parameter_dependencies.rst index c632de17a..862801ff4 100644 --- a/doc/interface/parameter_dependencies.rst +++ b/doc/interface/parameter_dependencies.rst @@ -73,7 +73,108 @@ Here, :math:`p_{dep}` is the dependent parameter and :math:`p_{on}` is the param Parameter-State Dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Currently, the dependence of surface diffusion on the particle liquid salt component is the only available parameter-state dependence. + Group /input/model/unit_XXX --------------------------- -Parameter-State Dependencies are not fully implemented yet. +``PAR_SURFDIFFUSION_DEP`` + + Parameter dependence of :math:`\texttt{PAR_SURFDIFFUSION}` on the particle liquid salt component (i.e. component with index 0). Valid dependencies are: + + - :math:`\texttt{NONE}` Original parameter is used unmodified. + - :math:`\texttt{LIQUID_SALT_EXPONENTIAL}` Original parameter is modified by exponential law of liquid phase salt concentration. + - :math:`\texttt{LIQUID_SALT_POWER}` Original parameter is modified by power law of liquid phase salt concentration. + - :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}` Original parameter is modified by colloidal binding affinity based on liquid phase salt concentration. + + Optional: If left out, no parameter dependence is assumed and the original surface diffusion coefficients are used unmodified. + + ================ ========================================= + **Type:** string **Length:** :math:`1 / \texttt{NPARTYPE}` + ================ ========================================= + +``PAR_SURFDIFFUSION_EXPFACTOR`` + + Factor :math:`\texttt{p1}` in exponential law particle surface diffusion relation + :math:`D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} exp \left(p_{2, i, m} c_{0}^{p} \right)`, where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient. + Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_EXPONENTIAL}`. + + ================ ========================= =================================== + **Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NBOUND}` + ================ ========================= =================================== + + ``PAR_SURFDIFFUSION_EXPFACTOR`` + :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` + where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and + :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. + Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. + + ================ ============================= =================================== + **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` + ================ ============================= =================================== + +``PAR_SURFDIFFUSION_EXPARGMULT`` + + Factor :math:`\texttt{p2}` in exponential law particle surface diffusion relation + :math:`D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} exp \left(p_{2, i, m} c_{0}^{p} \right)` + where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient. Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_EXPONENTIAL}`. + + ================ ============================= =================================== + **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` + ================ ============================= =================================== + +``PAR_SURFDIFFUSION_POWFACTOR`` + + Factor :math:`\texttt{p1}` in power law particle surface diffusion relation + :math:`D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} \left( c_{0}^{p} \right)^{p_{2, i, m}}` + where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient. Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_POWER}`. + + ================ ========================= =================================== + **Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NBOUND}` + ================ ========================= =================================== + +``PAR_SURFDIFFUSION_POWEXP`` + + Fjactor :math:`\texttt{p2}` in power law particle surface diffusion relation + :math:`D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} \left( c_{0}^{p} \right)^{p_{2, i, m}}` + where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient. Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_POWER}`. + + ================ ============================= =================================== + **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` + ================ ============================= =================================== + +``PAR_SURFDIFFUSION_LOGKEQFACTOR`` + + Factor :math:`\texttt{p1}` in colloidal affinity law particle surface diffusion relation + :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` + where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and + :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. + Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. + + ================ ============================= =================================== + **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` + ================ ============================= =================================== + +``PAR_SURFDIFFUSION_LOGKEQEXP`` + + Factor :math:`\texttt{p2}` in colloidal affinity law particle surface diffusion relation + :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` + where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and + :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. + Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. + + ================ ============================= =================================== + **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` + ================ ============================= =================================== + +``PAR_SURFDIFFUSION_LOGKEQCONST`` + + Factor :math:`\texttt{p3}` in colloidal affinity law particle surface diffusion relation + :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` + where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and + :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. + Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. + + ================ ============================= =================================== + **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` + ================ ============================= =================================== diff --git a/doc/interface/spatial_discretization_methods.rst b/doc/interface/spatial_discretization_methods.rst index 453b4b2fc..d0b9e8be4 100644 --- a/doc/interface/spatial_discretization_methods.rst +++ b/doc/interface/spatial_discretization_methods.rst @@ -8,39 +8,38 @@ Group /input/model/unit_XXX/discretization/SPATIAL_METHOD - Details on the metho CADET offers two spatial discretization methods: Finite Volumes (FV) and Discontinuous Galerkin (DG). While both methods approximate the same solution to the underlying models, they may differ in terms of computational performance. -Generally, FV can be more performant for small problem sizes and solutions with steep gradients, while DG excels for large problem sizes and smooth solutions. +Generally, FV can perform better for small problem sizes and solutions with steep gradients, while DG excels for large problem sizes and smooth solutions. -In the following, we give a brief introduction to the numerical theory that is most relevant for the computational performance of the methods. -Based on that theory and our experience, we give advice on which method to use in which scenario, how to identify the more performant method, and how to specify the discretization parameters. -For a comprehensive description on the FV and DG methods as they are implemented in CADET, we refer to our publications on `CADET-FV `_ and `CADET-DG `_. +In the following, we give a brief introduction to the numerical theory w.r.t. the computational performance of the methods. +Based on that theory and our experience, we give advice on which method to use in which scenario, how to identify the computationally best performing method, and how to specify discretization parameters. +For a comprehensive description of the FV and DG variants that are implemented in CADET, we refer to our publications on `CADET-FV `_ and `CADET-DG `_. Discrete system size -------------------- -Numerical methods discretize the continuous (here: spatial) domain of the equations into a finite set of discrete points. -Then, a system of equations is formulated for those points, and both system size and number of unknowns / degrees of freedom (DoF) are given by the number of discrete points. -This system can be linear or non-linear, depending on the method (this will become important again in the section on smooth solutions). -The wall clock time to compute the solution depends on the system size and, thus, on the number of discrete points. -Conversely, the numerical solution is more accurate with more discrete points. -Thus, we trade computation time for approximation accuracy by specifying the parameters that determine the number of discrete points. -For the FV scheme, the number of axial discrete points in the column is given by the number of volume cells ``NCOL``. -For the DG scheme, the number of axial discrete points in the column is given by the number of polynomial interpolation nodes (= ``POLYDEG`` + 1) times the number of DG elements ``NELEM``. -The LRMP and GRM additionally consider particle equations that are also discretized. -In the spatially discretized equations, a single particle is incorporated at each axial discrete point, which increases the total number of DOF per axial point, especially for the GRM where particles are fully resolved. -The parameters for the GRM particle discretization are given for FV in ``NPAR`` and for DG in ``PAR_POLYDEG`` and ``PAR_NELEM``. +FV and DG discretize the continuous spatial domain of the partial differential algebraic equations (PDAE) into a finite set of discrete points. +Then, a system of (semi-discrete) equations is formulated on those points, resulting in a system of ordinary differential algebraic equations (ODAE). +The system size and number of unknowns, are also referred to as degrees of freedom (DoF), is given by the number of (spatial) discrete points (times the number of components for multi-component systems). + +The numerical solution becomes more accurate with more discrete points used, but the compute time required to solve the equations also increases. +That is, we trade compute time for approximation accuracy. + +For the FV method, the number of axial discrete points in the column is specified by the number of volume cells ``NCOL``. +For the DG method, the number of axial discrete points in the column is specified by the number of polynomial interpolation nodes (= ``POLYDEG`` + 1) times the number of DG elements ``NELEM``. +The GRM additionally comprises a transport equation along the radial coordinate of the particles which is also spatially discretized and the particle discrete points are correspondingly given by ``NPAR`` for FV and for DG via ``PAR_POLYDEG`` and ``PAR_NELEM``. Order of convergence -------------------- The computational performance of a numerical method depends on its theoretical order of convergence. -The order of convergence refers to the rate at which the method's approximation approaches the exact solution under refinement of the spatial grid. +The order of convergence refers to the rate at which the numerical approximation approaches the exact solution under refinement of the spatial grid. +Consequently, higher order methods often require less spatial discrete points to compute an approximation of the desired accuracy and can thus be computationally more efficient. -A higher-order method can be faster than a low-order method: -Imagine a high- and a low-order method's approximation to exhibit similarly bad approximation accuracy due to a coarse spatial resolution. -Refining the grid for both methods by the same number of discrete points improves the approximation accuracy of the higher-order method more than the other one. -Thus, the low-order method requires more DOFs and ultimately more compute time to compute a solution of the same accuracy. +The theoretical order of convergence for the CADET-FV method is globally limited to 2. +It is locally (except column boundaries) limited to 3, with an improved order of up to 5 for smooth solutions, and can be varied by specifying the parameters described in the :ref:`flux_reconstruction_methods` section. +For the CADET-DG method, the theoretical order of convergence is :math:`N_d + 1` with :math:`N_d` denoting the polynomial degree, and can thus be user-defined by specifying the field ``POLYDEG`` (and ``PAR_POLYDEG`` for the particles in the GRM). -The theoretical order of convergence is an asymptotic property, however. +The theoretical order of convergence is an asymptotic property, i.e. holds for infinite refinements, but can be numerivcally observed for finite refinements as well. Having the exact solution, we can compute an experimental order of convergence (EOC) via the formula .. math:: @@ -50,43 +49,42 @@ Having the exact solution, we can compute an experimental order of convergence ( EOC_k = \frac{log(\varepsilon_{k+1} / \varepsilon_{k}) }{log(n_{k} / n_{k+1})}, \end{aligned} -with :math:`\varepsilon_{k}` and :math:`n_{k}` denoting some error norm and the degrees of freedom of the kth approximation. +with :math:`\varepsilon_{k}` and :math:`n_{k}` denoting some error norm and the degrees of freedom of the $k$th approximation. The EOC approaches the theoretical order of convergence for :math:`k \rightarrow \infty` but is typically lower for underresolved problems. -High-order methods typically suffer from start-off problems, i.e. they typically won't exhibit their high order until the grid is fine enough and a certain accuracy is already reached. -That is, increasing the number of discrete points from, e.g., 2 to 4 typically does not improve the solution according to the theoretical order of convergence but by a much smaller EOC. -The EOC is highly problem-dependent, and it is generally unknown when a high-order method will actually be faster than a lower-order method. -Experience shows that higher-order methods work well for smooth solutions. +High-order methods typically do typically not exhibit their theoretical order on very coarse grids. +That is, increasing the number of discrete points from, e.g., 2 to 4 does often not improve the solution according to the theoretical order of convergence but by a much smaller EOC. + +For smooth solutions, we typically observe an EOC of around 2.5 for the default CADET-FV method and around :math:`N_d` for the CADET-DG method. +To our experience, DG with :math:`N_d>6` does usually not realize an EOC of :math:`>6` for approximation errors within engineering tolerances, i.e. higher rates are achieved only for excessively small error tolerances that are not relevant for most applications. +We thus recommend to choose :math:`3 \leq N_d \leq 5` for the DG method. -The theoretical order of convergence for the CADET-FV scheme is fixed at 2. -For the CADET-DG scheme, it is :math:`N_d + 1` with :math:`N_d` denoting the polynomial degree, and can thus be user-defined by specifying the field ``POLYDEG`` (and ``PAR_POLYDEG`` for the GRM). -As a convergence order of :math:`\gt 6` is hardly realized within the approximation error of engineering tolerance (due to start-off problems), we recommend a maximum polynomial order of 5. -As the FV scheme oftentimes yields an EOC of around 2.5 and is computationally more enhanced (less arithmetic operations per DOF and customized factorization) than the DG code, we recommend a polynomial degree of at least 3 to top this. +One could still think that the higher the order of the method, the better the performance, but that is unfortunately not generally true, as the numerical solver performance can strongly depend on the smoothness of the approximated solution. Smooth solutions ---------------- -Smoothness in functions is characterized by the absence of sudden changes, reflected in the continuity and differentiability of the function and its derivatives. +The smoothness of a function indicates the absence of sudden changes, reflected in the continuity and differentiability of the function and its derivatives. In numerical simulation, smoothness indicators are often based on derivatives or moments of the solution. -That is, strong gradients and high frequencies are used to identify non-smooth parts of the solution. +That is, the occurrence of strong gradients and high frequencies are used to identify non-smooth parts of the solution. Godunov's order barrier theorem shows why the concept of smoothness plays a crucial role in the deployment of numerical methods. It states that linear high-order methods that are monotonous are at most first-order accurate. Linear higher-order (:math:`\gt 1`) methods thus suffer from artificial oscillations at non-smooth parts of the solution, specifically at discontinuities and strong gradients. -Some higher-order methods, such as CADET-FV (2nd order), contain a non-linear mechanism to suppress these oscillations. -The non-linear WENO mechanism employed in CADET-FV can be fine-tuned via the fields specified here :ref:`flux_restruction_methods`. -Unfortunately, non-linear higher-order methods (order :math:`\geq 3`) are either not applicable (e.g., undefined boundary treatment) or have other shortcomings, such as more highly problem-dependent parameters. +Some higher-order methods, such as the FV variants implemented in CADET, contain a non-linear mechanism to suppress these oscillations. +The non-linear WENO mechanism employed in CADET-FV can be fine-tuned via the parameters specified in the :ref:`flux_reconstruction_methods` section. +Unfortunately, non-linear higher-order methods (here :math:`\geq 3`) are either not applicable (e.g., undefined boundary treatment) or have other shortcomings, such as parameters whose optimal values can be highly proplem-specific. -CADET-DG is a linear high-order method (arbitrary order) and thus exhibits oscillatory behaviour at strong gradients, which increases the approximation error and results in a smaller EOC for lower resolutions. -As strong gradients are a local phenomena that can be captured by employing more discrete points, DG becomes more performant again for higher resolutions. +The DG variant that is implemented in CADET is a linear high-order method (arbitrary order) and can thus exhibit oscillatory behaviour at strong gradients, which increases the approximation error and results in a smaller EOC for lower resolutions. +Since strong gradients are local phenomena which can be captured by employing more discrete points, DG performs better again for higher spatial resolutions. This, however, might happen after the engineering error tolerance is by far surpassed. -Hence, CADET-FV as a stabilized lower-order method can be more performant, depending on the setting. -The DG scheme reduces its oscillatory behaviour by adding artificial numerical dispersion at element interfaces. -Thus, the use of a lower polynomial degree and more elements is recommended for rather non-smooth problems. +Hence, CADET-FV as a stabilized lower-order method can perform better, depending on the smoothness of the approximated solution. +The DG method reduces its oscillatory behaviour by adding artificial numerical dispersion at element interfaces. +Thus, the use of a lower polynomial degree and more elements is recommended for non-smooth solutions. In Chromatography, mathematical discontinuities never happen, as there are always some dispersive effects in reality. Chromatography models, however, allow for discontinuities if dispersion parameters are set to zero. -Moreover, steep and self-sharpening concentration fronts might appear due to binding. -Binding models that might cause self-sharpening concentration fronts are often associated with competitive Langmuir type isotherms for components with differently strong binding properties. -Nonetheless, a lot of chromatography settings yield rather smooth concentration profiles, for which DG is the better choice in terms of computational performance. +Moreover, steep and self-sharpening concentration fronts might appear due to competitive adsorption. +Examples that can cause self-sharpening concentration fronts are often associated with competitive Langmuir type isotherms for components with differently strong binding properties. +Nonetheless, many chromatography settings yield rather smooth concentration profiles, for which DG is the better choice in terms of computational performance. Recommendations on the choice of spatial discretization methods --------------------------------------------------------------- @@ -94,21 +92,21 @@ Recommendations on the choice of spatial discretization methods We recommend the FV method for - Small problem sizes, e.g., low spatial resolution with the LRM -- Problems with strong gradients, e.g., no or low dispersion and bindings that create sharp fronts -- Bindings that mathematically require positive values or exhibit strange behaviour with negative concentration values +- Problems with strong gradients, e.g., no or low dispersion and binding model parameters that create sharp fronts +- Binding models that mathematically require positive values or exhibit strange behaviour with negative concentration values We recommend the DG method for -- Large problem sizes, e.g., high resolutions and more complex models (i.e. the LRMP and specifically the GRM) -- Smooth problems, e.g., sufficient dispersion +- Large problem sizes, e.g., high spatial resolutions and more complex models (i.e. the LRMP and specifically the GRM) +- Smooth problems, i.e., sufficient band broadening Recommendations on DG discretization parameters ----------------------------------------------- - Employ an axial polynomial degree between 3 and 5 -- Select a lower axial polynomial degree for non smooth tendency and employ more elements instead. Converse choice for smooth problems -- Adjust the DG particle polynomial degree to control approximation accuracy; leave the number of elements at one. Make exceptions if very steep gradients occur inside the particles or when specific parts of the particle domain are more interesting (here, you can resolve more interesting parts by a user-defined spacing of multiple elements) -- The field ``EXACT_INTEGRATION`` specifies the DG polynomial integration method. The default value of 0 (collocation DG) is expected to be slightly more performant in most settings +- Select a lower axial polynomial degree for approximating functions that tend to be less smooth and employ more elements instead. Converse choice for smooth problems +- Adjust the DG particle polynomial degree to control approximation accuracy; leave the number of elements at one. Make exceptions if very steep gradients occur inside the particles or when specific regions of the particle domain are more interesting (the spatial resolution of certain regions can be refined by a user-defined spacing of multiple elements) +- The field ``EXACT_INTEGRATION`` specifies the DG polynomial integration method. The default value of $0$ (collocation DG) is expected to be slightly more performant in most settings Refinement strategy ------------------- @@ -116,6 +114,7 @@ Refinement strategy A common problem in numerical simulation is that the number of discrete points required to yield an accurate approximation within a specific tolerance is unknown. We thus recommend determining the approximation error via comparison with a refined reference approximation. Both the theoretical order of convergence and the EOC can be used to estimate the required number of discrete points. +An EOC that is significantly lower than the theoretical order indicates that the problem is numerically underresolved. Note on DG solution vector -------------------------- diff --git a/doc/interface/unit_operations/2d_general_rate_model.rst b/doc/interface/unit_operations/2d_general_rate_model.rst index ab81c7eb5..43fa62af0 100644 --- a/doc/interface/unit_operations/2d_general_rate_model.rst +++ b/doc/interface/unit_operations/2d_general_rate_model.rst @@ -284,9 +284,9 @@ For information on model equations, refer to :ref:`2d_general_rate_model_model`. **Unit:** :math:`\mathrm{m}_{\mathrm{MP}}^{2}\,\mathrm{s}^{-1}` - ================ ========================= ======================================================== - **Type:** double **Range:** :math:`\geq 0` **Length:** see :math:`\texttt{PAR_DIFFUSION_MULTIPLEX}` - ================ ========================= ======================================================== + ================ ====================== ======================================================== + **Type:** double **Range:** :math:`> 0` **Length:** see :math:`\texttt{PAR_DIFFUSION_MULTIPLEX}` + ================ ====================== ======================================================== ``PAR_DIFFUSION_MULTIPLEX`` diff --git a/doc/interface/unit_operations/general_rate_model.rst b/doc/interface/unit_operations/general_rate_model.rst index 354718226..996dc42f0 100644 --- a/doc/interface/unit_operations/general_rate_model.rst +++ b/doc/interface/unit_operations/general_rate_model.rst @@ -232,9 +232,9 @@ For information on model equations, refer to :ref:`general_rate_model_model`. **Unit:** :math:`\mathrm{m}_{\mathrm{MP}}^{2}\,\mathrm{s}^{-1}` - ================ ========================= ======================================================== - **Type:** double **Range:** :math:`\geq 0` **Length:** see :math:`\texttt{PAR_DIFFUSION_MULTIPLEX}` - ================ ========================= ======================================================== + ================ ====================== ======================================================== + **Type:** double **Range:** :math:`> 0` **Length:** see :math:`\texttt{PAR_DIFFUSION_MULTIPLEX}` + ================ ====================== ======================================================== ``PAR_DIFFUSION_MULTIPLEX`` @@ -275,141 +275,7 @@ For information on model equations, refer to :ref:`general_rate_model_model`. ``PAR_SURFDIFFUSION_DEP`` - Parameter dependence of :math:`\texttt{PAR_SURFDIFFUSION}`. Valid dependencies are: - - - :math:`\texttt{NONE}` Original parameter is used unmodified. - - :math:`\texttt{LIQUID_SALT_EXPONENTIAL}` Original parameter is modified by exponential law of liquid phase salt concentration. - - :math:`\texttt{LIQUID_SALT_POWER}` Original parameter is modified by power law of liquid phase salt concentration. - - :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}` Original parameter is modified by colloidal binding affinity based on liquid phase salt concentration. - - Optional: If left out, no parameter dependence is assumed and the original surface diffusion coefficients are used unmodified. - - - ================ ========================================= - **Type:** string **Length:** :math:`1 / \texttt{NPARTYPE}` - ================ ========================================= - -``PAR_SURFDIFFUSION_EXPFACTOR`` - - Factor :math:`\texttt{p1}` in exponential law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} exp \left(p_{2, i, m} c_{0}^{p} \right)` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient. Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_EXPONENTIAL}`. - - ================ ========================= =================================== - **Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NBOUND}` - ================ ========================= =================================== - -``PAR_SURFDIFFUSION_EXPARGMULT`` - - Factor :math:`\texttt{p2}` in exponential law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} exp \left(p_{2, i, m} c_{0}^{p} \right)` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient. Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_EXPONENTIAL}`. - - ================ ============================= =================================== - **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` - ================ ============================= =================================== - -``PAR_SURFDIFFUSION_POWFACTOR`` - - Factor :math:`\texttt{p1}` in power law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} \left( c_{0}^{p} \right)^{p_{2, i, m}}` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient. Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_POWER}`. - - ================ ========================= =================================== - **Type:** double **Range:** :math:`\geq 0` **Length:** :math:`\texttt{NBOUND}` - ================ ========================= =================================== - -``PAR_SURFDIFFUSION_POWEXP`` - - Fjactor :math:`\texttt{p2}` in power law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} \left( c_{0}^{p} \right)^{p_{2, i, m}}` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient. Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_POWER}`. - - ================ ============================= =================================== - **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` - ================ ============================= =================================== - -``PAR_SURFDIFFUSION_LOGKEQFACTOR`` - - Factor :math:`\texttt{p1}` in colloidal affinity law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and - :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. - Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. - - ================ ============================= =================================== - **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` - ================ ============================= =================================== - -``PAR_SURFDIFFUSION_LOGKEQEXP`` - - Factor :math:`\texttt{p2}` in colloidal affinity law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and - :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. - Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. - - ================ ============================= =================================== - **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` - ================ ============================= =================================== - -``PAR_SURFDIFFUSION_LOGKEQCONST`` - - Factor :math:`\texttt{p3}` in colloidal affinity law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and - :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. - Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. - - ================ ============================= =================================== - **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` - ================ ============================= =================================== - -``PAR_SURFDIFFUSION_POWFACTOR`` - - Factor :math:`\texttt{p4}` in colloidal affinity law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and - :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. - Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. - - ================ ============================= =================================== - **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` - ================ ============================= =================================== - -``PAR_SURFDIFFUSION_POWEXP`` - - Factor :math:`\texttt{p5}` in colloidal affinity law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and - :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. - Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. - - ================ ============================= =================================== - **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` - ================ ============================= =================================== - - ``PAR_SURFDIFFUSION_EXPFACTOR`` - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and - :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. - Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. - - ================ ============================= =================================== - **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` - ================ ============================= =================================== - -``PAR_SURFDIFFUSION_POWEXP`` - - Factor :math:`\texttt{p5}` in colloidal affinity law particle surface diffusion relation - :math:`D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]` - where :math:`\tilde{D}_{s, i, m}` is the original surface diffusion coefficient and - :math:`k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}`. - Only required if :math:`\texttt{PAR_SURFDIFFUSION_DEP}` is :math:`\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}`. - - ================ ============================= =================================== - **Type:** double **Range:** :math:`\mathbb{R}` **Length:** :math:`\texttt{NBOUND}` - ================ ============================= =================================== + Parameter dependence of :math:`\texttt{PAR_SURFDIFFUSION}`, please refer to :ref:`parameter_dependencies`, section parameter-state dependencies, for more information. ``VELOCITY`` @@ -484,10 +350,11 @@ Group /input/model/unit_XXX/discretization - UNIT_TYPE - GENERAL_RATE_MODEL Spatial discretization - Numerical Methods ------------------------------------------ -CADET offers two spatial discretization methods: Finite Volumes (FV) and Discontinuous Galerkin (DG). Only the input fields for the chosen method need to be specified. +CADET offers two spatial discretization methods: Finite Volumes (FV) and Discontinuous Galerkin (DG). Each method has it's own set of input fields. While both methods approximate the same solution to the same underlying model, they may differ in terms of computational performance. -Generally, FV is more performant for solutions with steep gradients or discontinuities, while DG excels for rather smooth solutions. -We note that DG is only faster in the sense that less spatial discrete points are required to achieve the same accuracy as FV. For the same number of discrete points, DG will be slower, but more accurate. +With our currently implemented variants of FV and DG, FV perform better for solutions with steep gradients or discontinuities, while DG can be much faster for rather smooth solutions. +For the same number of discrete points, DG will generally be slower but often more accurate. + For further information on the choice of discretization methods and their parameters, see :ref:`spatial_discretization_methods`. ``SPATIAL_METHOD`` @@ -573,7 +440,7 @@ Finite Volumes (Default) **Type:** int **Range:** :math:`\{0, 1\}` **Length:** 1 ============= =========================== ============= -For further discretization parameters, see also :ref:`flux_restruction_methods` (FV specific)), and :ref:`non_consistency_solver_parameters`. +For further discretization parameters, see also :ref:`flux_reconstruction_methods` (FV specific)), and :ref:`non_consistency_solver_parameters`. Discontinuous Galerkin ---------------------- diff --git a/doc/interface/unit_operations/lumped_rate_model_with_pores.rst b/doc/interface/unit_operations/lumped_rate_model_with_pores.rst index ace7b4c2b..8ac99c96f 100644 --- a/doc/interface/unit_operations/lumped_rate_model_with_pores.rst +++ b/doc/interface/unit_operations/lumped_rate_model_with_pores.rst @@ -249,10 +249,11 @@ For information on model equations, refer to :ref:`lumped_rate_model_with_pores_ Spatial discretization - Numerical Methods ------------------------------------------ -CADET offers two spatial discretization methods: Finite Volumes (FV) and Discontinuous Galerkin (DG). Only the input fields for the chosen method need to be specified. +CADET offers two spatial discretization methods: Finite Volumes (FV) and Discontinuous Galerkin (DG). Each method has it's own set of input fields. While both methods approximate the same solution to the same underlying model, they may differ in terms of computational performance. -Generally, FV is more performant for solutions with steep gradients or discontinuities, while DG excels for rather smooth solutions. -We note that DG is only faster in the sense that less spatial discrete points are required to achieve the same accuracy as FV. For the same number of discrete points, DG will be slower, but more accurate. +With our currently implemented variants of FV and DG, FV perform better for solutions with steep gradients or discontinuities, while DG can be much faster for rather smooth solutions. +For the same number of discrete points, DG will generally be slower but often more accurate. + For further information on the choice of discretization methods and their parameters, see :ref:`spatial_discretization_methods`. ``SPATIAL_METHOD`` @@ -314,7 +315,7 @@ Finite Volumes (Default) **Type:** double **Range:** :math:`\geq 0` **Length:** 1 ================ ========================= ============= -For further discretization parameters, see also :ref:`flux_restruction_methods` (FV specific)), and :ref:`non_consistency_solver_parameters`. +For further discretization parameters, see also :ref:`flux_reconstruction_methods` (FV specific)), and :ref:`non_consistency_solver_parameters`. Discontinuous Galerkin diff --git a/doc/interface/unit_operations/lumped_rate_model_without_pores.rst b/doc/interface/unit_operations/lumped_rate_model_without_pores.rst index 5afc37821..e32c9b33d 100644 --- a/doc/interface/unit_operations/lumped_rate_model_without_pores.rst +++ b/doc/interface/unit_operations/lumped_rate_model_without_pores.rst @@ -155,10 +155,11 @@ Group /input/model/unit_XXX/discretization - UNIT_TYPE = LUMPED_RATE_MODEL_WITHO Spatial discretization - Numerical Methods ------------------------------------------ -CADET offers two spatial discretization methods: Finite Volumes (FV) and Discontinuous Galerkin (DG). Only the input fields for the chosen method need to be specified. +CADET offers two spatial discretization methods: Finite Volumes (FV) and Discontinuous Galerkin (DG). Each method has it's own set of input fields. While both methods approximate the same solution to the same underlying model, they may differ in terms of computational performance. -Generally, FV is more performant for solutions with steep gradients or discontinuities, while DG excels for rather smooth solutions. -We note that DG is only faster in the sense that less spatial discrete points are required to achieve the same accuracy as FV. For the same number of discrete points, DG will be slower, but more accurate. +With our currently implemented variants of FV and DG, FV perform better for solutions with steep gradients or discontinuities, while DG can be much faster for rather smooth solutions. +For the same number of discrete points, DG will generally be slower but often more accurate. + For further information on the choice of discretization methods and their parameters, see :ref:`spatial_discretization_methods`. ``SPATIAL_METHOD`` @@ -188,7 +189,7 @@ Finite Volumes (Default) **Type:** string **Range:** :math:`\texttt{WENO}` **Length:** 1 ================ ================================ ============= -For further discretization parameters, see also :ref:`flux_restruction_methods` (FV specific)), and :ref:`non_consistency_solver_parameters`. +For further discretization parameters, see also :ref:`flux_reconstruction_methods` (FV specific)), and :ref:`non_consistency_solver_parameters`. Discontinuous Galerkin diff --git a/doc/interface/unit_operations/radial_flow_models.rst b/doc/interface/unit_operations/radial_flow_models.rst index 4bc99053a..9fdac5fc9 100644 --- a/doc/interface/unit_operations/radial_flow_models.rst +++ b/doc/interface/unit_operations/radial_flow_models.rst @@ -106,4 +106,4 @@ Accordingly, the following specifications can be left out for radial flow models **Type:** string **Range:** :math:`\texttt{NONE}` **Length:** 1 ================ ================================ ============= -Parameters specified under :ref:`flux_restruction_methods` can also be ignored. \ No newline at end of file +Parameters specified under :ref:`flux_restruction_methods` can also be ignored. diff --git a/doc/modelling/binding/freundlich_ldf.rst b/doc/modelling/binding/freundlich_ldf.rst index 4351ce196..b5a24a07d 100644 --- a/doc/modelling/binding/freundlich_ldf.rst +++ b/doc/modelling/binding/freundlich_ldf.rst @@ -14,7 +14,7 @@ This variant of the model is based on the linear driving force approximation (se No interaction between the components is considered when the model has multiple components. One of the limitation of this isotherm is the first order Jacobian :math:`\left(\frac{dq^*}{dc_p}\right)` tends to infinity as :math:`c_{p} \rightarrow 0` for :math:`n>1`. To address this issue an approximation of isotherm is considered near the origin. -This approximation matches the isotherm in such a way that :math:`q=0` at :math:`c_p=0` and also matches the first derivative of the istotherm at :math:`c_p = \epsilon`, where :math:`\epsilon` is a very small number, for example :math:`1e-14`. +This approximation matches the isotherm in such a way that :math:`q=0` at :math:`c_p=0` and also matches the first derivative of the istotherm at :math:`c_p = \varepsilon`, where :math:`\varepsilon` is a very small number, for example :math:`1e-14`. The form of approximation and its derivative is given below for :math:`c_p < \varepsilon` and :math:`n>1`: .. math:: @@ -38,7 +38,7 @@ where :math:`\alpha_0=0` and :math:`\alpha_1` and :math:`\alpha_2` are determine \alpha_2 = \frac{1-n}{n}k_f \varepsilon^{\frac{1-2 n}{n}} \end{aligned} -This approximation can be used for any pore phase cocentration :math:`c_p < \epsilon` given :math:`n>1`. +This approximation can be used for any pore phase cocentration :math:`c_p < \varepsilon` given :math:`n>1`. For the case, when :math:`n \le 1` no special treament near the origin is required. For more information on model parameters required to define in CADET file format, see :ref:`freundlich_ldf_config`. diff --git a/doc/modelling/unit_operations/general_rate_model.rst b/doc/modelling/unit_operations/general_rate_model.rst index b6dd3b6ff..071177948 100644 --- a/doc/modelling/unit_operations/general_rate_model.rst +++ b/doc/modelling/unit_operations/general_rate_model.rst @@ -72,7 +72,7 @@ Consider a column of length :math:`L>0` filled with spherical beads of (possibly &+ f_{\text{react},i}^\ell\left(c^\ell\right). \end{aligned} -Here, :math:`c^\ell_i\colon \left[0, T_{\text{end}}\right] \times [0, L] \rightarrow \mathbb{R}^{\geq 0}` denotes the concentration in the interstitial column volume, :math:`c^p_{j,i}\colon \left[0, T_{\text{end}}\right] \times [0, L] \times [r_{c,j}, r_{p,j}] \rightarrow \mathbb{R}^{\geq 0}` the liquid phase concentration in the beads, :math:`k_{f,j,i}` the film diffusion coefficient, :math:`D_{\text{ax},i}` the dispersion coefficient, :math:`u` the interstitial velocity, :math:`d_j` the volume fraction of particle type :math:`j`, and :math:`\beta_c = \varepsilon_c / (1 - \varepsilon_c)` the column phase ratio, where :math:`\varepsilon_c` is the column porosity (ratio of interstitial volume to total column volume). +Here, :math:`c^\ell_i\colon \left[0, T_{\text{end}}\right] \times [0, L] \rightarrow \mathbb{R}^{\geq 0}` denotes the concentration in the interstitial column volume, :math:`c^p_{j,i}\colon \left[0, T_{\text{end}}\right] \times [0, L] \times [r_{c,j}, r_{p,j}] \rightarrow \mathbb{R}^{\geq 0}` the liquid phase concentration in the beads, :math:`k_{f,j,i}\geq 0` the film diffusion coefficient, :math:`D_{\text{ax},i}\geq 0` the dispersion coefficient, :math:`u\in\mathbb{R}` the interstitial velocity, :math:`d_j > 0` the volume fraction of particle type :math:`j`, and :math:`\frac{1}{\beta_c} = (1 - \varepsilon_c) / \varepsilon_c` the column phase ratio, where :math:`\varepsilon_c\in (0,1]` is the column porosity (ratio of interstitial volume to total column volume). If reactions are considered, the term :math:`f_{\text{react},i}^\ell\left(c^\ell\right)` represents the net change of concentration :math:`c_i` due to reactions involving component :math:`i`. Danckwerts boundary conditions :cite:`Danckwerts1953` are applied to inlet and outlet of the column: @@ -106,7 +106,7 @@ In the liquid phase of the porous beads (see :numref:`ModelGRMColumn`) the mass \end{aligned} -where :math:`c^s_{j,i,m_{j,i}}\colon \left[0, T_{\text{end}}\right] \times [0,L] \times [r_{c,j}, r_{p,j}] \rightarrow \mathbb{R}^{\geq 0}` denotes the solid phase concentration of the :math:`i`\ th component’s :math:`m_{j,i}`\ th bound state in the beads of :math:`j`\ th type, :math:`D_{p,j,i}` the effective diffusion coefficient in the beads, :math:`D_{s,j,i}` the surface diffusion coefficient, :math:`F_{\text{acc},j,i} \in [0,1]` the pore accessibility factor, and :math:`\varepsilon_{p,j}` the particle porosity (ratio of pore volume to total bead volume). +where :math:`c^s_{j,i,m_{j,i}}\colon \left[0, T_{\text{end}}\right] \times [0,L] \times [r_{c,j}, r_{p,j}] \rightarrow \mathbb{R}^{\geq 0}` denotes the solid phase concentration of the :math:`i`\ th component’s :math:`m_{j,i}`\ th bound state in the beads of :math:`j`\ th type, :math:`D_{p,j,i}>0` the effective diffusion coefficient in the beads, :math:`D_{s,j,i}\geq 0` the surface diffusion coefficient, :math:`F_{\text{acc},j,i}\geq 0 \in [0,1]` the pore accessibility factor, and :math:`\varepsilon_{p,j}\in (0,1]` the particle porosity (ratio of pore volume to total bead volume). The inner bead radius :math:`r_{c,j} \in [0, r_{p,j})` is assumed to be :math:`0` by default, but can be positive in order to account for core-shell particles that have an impermeable core. Reaction terms in liquid and solid phase are collected in :math:`f_{\text{react},j,i}^p( c_j^p, c_j^s)` and :math:`f_{\text{react},j,i}^s(c_j^p, c_j^s)`, respectively. @@ -302,7 +302,7 @@ The radial flow GRM describes transport of solute molecules through the intersti The main assumptions are: -- The shells of the column are homogenous in terms of interstitial volume, fluid flow, and distribution of components. +- The cylindrical shells of the column are homogenous in terms of interstitial volume, fluid flow, and distribution of components. Thus, only one spatial coordinate in radial direction :math:`\rho` is needed and axial transport is neglected in the column bulk volume. - The bead radii :math:`r_{p}` are much smaller than the column radius :math:`\mathrm{P}-\mathrm{P}_c`, with :math:`\mathrm{P}` and :math:`\mathrm{P}_c` being the inner and outer column radius respectively, and the column length :math:`L`. @@ -314,33 +314,33 @@ The main assumptions are: Consider a hollow (double walled) column with inner column diameter :math:`\mathrm{P}_c>0` and outer diameter :math:`\mathrm{P}>\mathrm{P}_c`, filled with spherical beads of (possibly) multiple types with radius :math:`r_{p,j} \ll L` (see :numref:`ModelGRMColumn`), where :math:`j` is the particle type index. The mass balance in the interstitial column volume is described by .. math:: - :label: ModelRadialColumn + :label: ModelRadialColumnGRM \begin{aligned} \frac{\partial c^\ell_i}{\partial t} = -\frac{u}{\rho} \frac{\partial c^\ell_i}{\partial \rho} + D_{\text{rad},i} \frac{1}{\rho} \frac{\partial}{\partial \rho} \left(\rho \frac{\partial c^\ell_i}{\partial \rho} \right) &- \frac{1}{\beta_c} \sum_j d_j \frac{3}{r_{p,j}} k_{f,j,i} \left[ c^\ell_i - c^p_{j,i}(\cdot, \cdot, r_{p,j}) \right] \\ &+ f_{\text{react},i}^\ell\left(c^\ell\right). \end{aligned} -Here, :math:`c^\ell_i\colon \left[0, T_{\text{end}}\right] \times [\mathrm{P}_c, \mathrm{P}] \rightarrow \mathbb{R}^{\geq 0}` denotes the concentration in the interstitial column volume, :math:`c^p_{j,i}\colon \left[0, T_{\text{end}}\right] \times [P_c, P] \times [r_{c,j}, r_{p,j}] \rightarrow \mathbb{R}^{\geq 0}` the liquid phase concentration in the beads, :math:`k_{f,j,i}` the film diffusion coefficient, :math:`D_{\text{rad},i}` the dispersion coefficient, :math:`u` the interstitial velocity, :math:`d_j` the volume fraction of particle type :math:`j`, and :math:`\beta_c = \varepsilon_c / (1 - \varepsilon_c)` the column phase ratio, where :math:`\varepsilon_c` is the column porosity (ratio of interstitial volume to total column volume). +Here, :math:`c^\ell_i\colon \left[0, T_{\text{end}}\right] \times [\mathrm{P}_c, \mathrm{P}] \rightarrow \mathbb{R}^{\geq 0}` denotes the concentration in the interstitial column volume, :math:`c^p_{j,i}\colon \left[0, T_{\text{end}}\right] \times [P_c, P] \times [r_{c,j}, r_{p,j}] \rightarrow \mathbb{R}^{\geq 0}` the liquid phase concentration in the beads, :math:`k_{f,j,i}\geq 0` the film diffusion coefficient, :math:`D_{\text{rad},i}\geq 0` the dispersion coefficient, :math:`u>0` the interstitial velocity, :math:`d_j>0` the volume fraction of particle type :math:`j`, and :math:`\beta_c = \varepsilon_c / (1 - \varepsilon_c)` the column phase ratio, where :math:`\varepsilon_c\in(0,1)` is the column porosity (ratio of interstitial volume to total column volume). If reactions are considered, the term :math:`f_{\text{react},i}^\ell\left(c^\ell\right)` represents the net change of concentration :math:`c_i` due to reactions involving component :math:`i`. Danckwerts boundary conditions :cite:`Danckwerts1953` are applied to inlet and outlet of the column: .. math:: - :label: BCOutlet + :label: BCOutletRadial \begin{aligned} u c_{\text{in},i}(t) &= u c^\ell_i(t,0) - D_{\text{rad},i} \frac{\partial c^\ell_i}{\partial \rho}(t, 0) & \forall t > 0, \end{aligned} .. math:: - :label: BCInlet + :label: BCInletRadial \begin{aligned} \frac{\partial c^\ell_i}{\partial \rho}(t, \mathrm{P}) &= 0 & \forall t > 0. \end{aligned} -Note that the outlet boundary condition Eq. :eq:`BCOutlet` is also known as “do nothing” or natural outflow condition. +Note that the outlet boundary condition Eq. :eq:`BCOutletRadial` is also known as “do nothing” or natural outflow condition. The complementing mass transport and binding equations for the liquid and solid phases of the porous beads are described by the same equations as for the axial GRM. diff --git a/doc/modelling/unit_operations/lumped_rate_model_with_pores.rst b/doc/modelling/unit_operations/lumped_rate_model_with_pores.rst index b6877d069..dd091e233 100644 --- a/doc/modelling/unit_operations/lumped_rate_model_with_pores.rst +++ b/doc/modelling/unit_operations/lumped_rate_model_with_pores.rst @@ -8,6 +8,7 @@ The particle phase :math:`c^p_j` is still there, but no mass transfer happens ex Hence, the model equations are given by .. math:: + :label: ModelColumnGRM \begin{aligned} \frac{\partial c^\ell_i}{\partial t} &= -u \frac{\partial c^\ell_i}{\partial z} + D_{\text{ax},i} \frac{\partial^2 c^\ell_i}{\partial z^2} - \frac{1}{\beta_c} \sum_{j} d_j \frac{3}{r_{p,j}} k_{f,j,i}\left[ c^\ell_i - c^p_{j,i} \right] + f_{\text{react},i}^\ell\left(c^\ell\right), @@ -73,12 +74,13 @@ The main assumptions are: Consider a hollow (double walled) column with inner column diameter :math:`\mathrm{P}_c>0` and outer diameter :math:`\mathrm{P}>\mathrm{P}_c`, filled with spherical beads of (possibly) multiple types with radius :math:`r_{p,j} \ll L` (see :numref:`ModelGRMColumn`), where :math:`j` is the particle type index. The mass balance in the interstitial column volume is described by .. math:: + :label: ModelRadialColumnGRM \begin{aligned} \frac{\partial c^\ell_i}{\partial t} &= -\frac{u}{\rho} \frac{\partial c^\ell_i}{\partial \rho} + D_{\text{rad},i} \frac{1}{\rho} \frac{\partial}{\partial \rho} \left( \rho \frac{\partial c^\ell_i}{\partial \rho} \right) - \frac{1}{\beta_c} \sum_{j} d_j \frac{3}{r_{p,j}} k_{f,j,i}\left[ c^\ell_i - c^p_{j,i} \right] + f_{\text{react},i}^\ell\left(c^\ell\right), \end{aligned} -The equations are complemented by Eq. :ref:`ModelParticleLRMP` and the Danckwerts boundary conditions :cite:`Danckwerts1953` +The equations are complemented by Eq. :eq:`ModelParticleLRMP` and the Danckwerts boundary conditions :cite:`Danckwerts1953` .. math:: diff --git a/doc/modelling/unit_operations/lumped_rate_model_without_pores.rst b/doc/modelling/unit_operations/lumped_rate_model_without_pores.rst index bc959603d..438cd5802 100644 --- a/doc/modelling/unit_operations/lumped_rate_model_without_pores.rst +++ b/doc/modelling/unit_operations/lumped_rate_model_without_pores.rst @@ -17,6 +17,7 @@ The phase ratio is denoted by :math:`\beta_t = \varepsilon_t / (1 - \varepsilon_ The model equations are given by .. math:: + :label: ModelColumnLRM \begin{aligned} \frac{\partial c^\ell_i}{\partial t} + \frac{1}{\beta_t} \frac{\partial}{\partial t} \sum_{m_i} c^s_{i,m_i} &= -u \frac{\partial c^\ell_i}{\partial z} + D_{\text{ax},i} \frac{\partial^2 c^\ell_i}{\partial z^2} + f_{\text{react},i}^\ell\left( c^\ell, c^s \right) + \frac{1}{\beta_t} f_{\text{react},i}^s\left( c^\ell, c^s \right), @@ -73,7 +74,7 @@ The main assumptions are: Consider a hollow (double walled) column with inner column diameter :math:`\mathrm{P}_c>0` and outer diameter :math:`\mathrm{P}>\mathrm{P}_c`, filled with spherical beads. The mass balance in the interstitial column volume is described by .. math:: - :label: ModelRadialColumn + :label: ModelRadialColumnLRM \begin{aligned} \frac{\partial c^\ell_i}{\partial t} + \frac{1}{\beta_t} \frac{\partial}{\partial t} \sum_{m_i} c^s_{i,m_i} &= -\frac{u}{\rho} \frac{\partial c^\ell_i}{\partial \rho} + D_{\text{rad},i} \frac{1}{\rho} \frac{\partial}{\partial \rho} \left( \rho \frac{\partial c^\ell_i}{\partial \rho} \right) + f_{\text{react},i}^\ell\left( c^\ell, c^s \right) + \frac{1}{\beta_t} f_{\text{react},i}^s\left( c^\ell, c^s \right), diff --git a/doc/publications.md b/doc/publications.md new file mode 100644 index 000000000..22db96e46 --- /dev/null +++ b/doc/publications.md @@ -0,0 +1,28 @@ + +**General CADET-Core:** + +- Leweke, S.; von Lieres, E.: `Chromatography Analysis and Design Toolkit (CADET) `_, Computers and Chemical Engineering **113** (2018), 274�294. + +- von Lieres, E.; Andersson, J.: `A fast and accurate solver for the general rate model of column liquid chromatography `_, Computers and Chemical Engineering **34,8** (2010), 1180�1191. + +**CADET-Core numerics:** + +- Breuer, J. M.; Leweke, S.; Schm�lder, J.; Gassner, G.; von Lieres, E.: `Spatial discontinuous Galerkin spectral element method for a family of chromatography models in CADET `_, Computers and Chemical Engineering **177** (2023), 108340. + +- Leweke, S.; von Lieres, E.: `Fast arbitrary order moments and arbitrary precision solution of the general rate model of column liquid chromatography with linear isotherm `_, Computers and Chemical Engineering **84** (2016), 350�362. + +- P�ttmann, A.; Schnittert, S.; Naumann, U.; von Lieres, E.: `Fast and accurate parameter sensitivities for the general rate model of column liquid chromatography `_, Computers and Chemical Engineering **56** (2013), 46�57. + +**Selected applications and use-cases of CADET-Core:** + +- Heymann, W.; Glaser, J.; Schlegel, F.; Johnson, W.; Rolandi, P.; von Lieres, E.: `Advanced score system and automated search strategies for parameter estimation in mechanistic chromatography modeling `_, Journal of Chromatography A **1661** (2022): 462693. + +- He, Q.-L.; Leweke, S.; von Lieres, E.: `Efficient numerical simulation of simulated moving bed chromatography with a single-column solver `_, Computers and Chemical Engineering **111** (2018), 183�198. + +- Freier, L.; von Lieres, E.: `Robust multi-objective global optimization of stochastic processes with a case study in gradient elution chromatography `_, Biotechnology Journal **13,1** (2018), 1700257. + +- Freier, L.; von Lieres, E.: [Multi-objective global optimization (MOGO): `Algorithm and case study in gradient elution chromatography `_, Biotechnology Journal **12,7** (2017), 1600613. + +- Diedrich, J.; Heymann, W.; Leweke, S.; Kunert, C.; Johnson, W.; Hunt, S.; Todd, B.; von Lieres, E.: `Multi-state steric mass-action model and case study on complex high loading behavior of mAb on ion exchange tentacle resin `_, Journal of Chromatography A **1525** (2017), 60�70. + +- P�ttmann, A.; Schnittert, S.; Leweke, S.; von Lieres, E.: `Utilizing algorithmic differentiation to efficiently compute chromatograms and parameter sensitivities `_, Chemical Engineering Science, **139** (2016), 152�162.