From 723d7b30d139d1ff9deb8a0a6c623c2fca44a1e7 Mon Sep 17 00:00:00 2001 From: Vasyl Skorych Date: Wed, 17 Jan 2024 16:11:16 +0100 Subject: [PATCH 1/3] build: Fix build in older MSVC versions --- ModelsAPI/BaseStream.cpp | 6 ++++-- ModelsAPI/MultidimensionalGrid.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ModelsAPI/BaseStream.cpp b/ModelsAPI/BaseStream.cpp index 5e0461da..87b9cd0e 100644 --- a/ModelsAPI/BaseStream.cpp +++ b/ModelsAPI/BaseStream.cpp @@ -1605,7 +1605,8 @@ void CBaseStream::SaveToFile(CH5Handler& _h5File, const std::string& _path) m_grid.SaveToFile(_h5File, _h5File.CreateGroup(_path, StrConst::H5GroupDistrGrid)); // overall properties - _h5File.WriteData(_path, StrConst::Stream_H5OverallKeys, E2I(MapKeys(m_overall))); + // NOTE: template argument deduction for E2I does not work here for msvc 19.24 and lower, therefore - explcicite argument + _h5File.WriteData(_path, StrConst::Stream_H5OverallKeys, E2I(MapKeys(m_overall))); const std::string groupOveralls = _h5File.CreateGroup(_path, StrConst::Stream_H5GroupOveralls); size_t iOverall = 0; for (auto& [type, param] : m_overall) @@ -1615,7 +1616,8 @@ void CBaseStream::SaveToFile(CH5Handler& _h5File, const std::string& _path) } // phases - _h5File.WriteData(_path, StrConst::Stream_H5PhaseKeys, E2I(MapKeys(m_phases))); + // NOTE: template argument deduction for E2I does not work here for msvc 19.24 and lower, therefore - explcicite argument + _h5File.WriteData(_path, StrConst::Stream_H5PhaseKeys, E2I(MapKeys(m_phases))); const std::string groupPhases = _h5File.CreateGroup(_path, StrConst::Stream_H5GroupPhases); size_t iPhase = 0; for (auto& [state, phase] : m_phases) diff --git a/ModelsAPI/MultidimensionalGrid.cpp b/ModelsAPI/MultidimensionalGrid.cpp index 8eadb5bf..9b342dde 100644 --- a/ModelsAPI/MultidimensionalGrid.cpp +++ b/ModelsAPI/MultidimensionalGrid.cpp @@ -448,7 +448,8 @@ void CMultidimensionalGrid::SaveToFile(const CH5Handler& _h5File, const std::str // number of grid dimensions _h5File.WriteAttribute(_path, StrConst::DGrid_H5AttrGridsNum, static_cast(m_grids.size())); // grid types for all dimensions - _h5File.WriteData(_path, StrConst::DGrid_H5GridType, E2I(GetGridsTypes())); + // NOTE: template argument deduction for E2I does not work here for msvc 19.24 and lower, therefore - explcicite argument + _h5File.WriteData(_path, StrConst::DGrid_H5GridType, E2I(GetGridsTypes())); // save each grid dimension for (size_t i = 0; i < m_grids.size(); ++i) switch (m_grids[i]->GridType()) From 50244bea66a810b92db268854053c4043922282b Mon Sep 17 00:00:00 2001 From: Vasyl Skorych Date: Thu, 1 Feb 2024 16:46:11 +0100 Subject: [PATCH 2/3] build: Clean old docs before build --- DyssolInstallers/Documentation/build_docs.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DyssolInstallers/Documentation/build_docs.ps1 b/DyssolInstallers/Documentation/build_docs.ps1 index 06fce08a..959af7e8 100644 --- a/DyssolInstallers/Documentation/build_docs.ps1 +++ b/DyssolInstallers/Documentation/build_docs.ps1 @@ -14,8 +14,9 @@ if ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64") { exit $lastexitcode } -# remove old install directory -Remove-Item -Recurse -Force $install_path -ErrorAction Ignore +# remove old build and install directory +Remove-Item -Recurse -Force $build_path\doc -ErrorAction Ignore +Remove-Item -Recurse -Force $install_path\share\Dyssol\docs -ErrorAction Ignore # create build and install directories if (!(Test-Path $build_path)) { From 83f8178a72fbaa7434f4b3f272a3e27b3f1f06f3 Mon Sep 17 00:00:00 2001 From: Vasyl Skorych Date: Mon, 5 Feb 2024 14:15:57 +0100 Subject: [PATCH 3/3] docs: Add mass flows equations for Screen unit --- Documentation/003_models/unit_screen.rst | 61 +++++++++++++++---- .../004_development/models_development.rst | 2 +- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/Documentation/003_models/unit_screen.rst b/Documentation/003_models/unit_screen.rst index 661672e7..c6aabca9 100644 --- a/Documentation/003_models/unit_screen.rst +++ b/Documentation/003_models/unit_screen.rst @@ -11,12 +11,12 @@ Screen unit is designed for classification of input material into two fractions :align: center -In Dyssol, 4 models are available to describe the screen grade efficiency: +There are several models available to describe the screen grade efficiency: - - Plitt's model - - Molerus & Hoffmann model - - Probability model - - Teipel / Hennig model + - :ref:`sec.units.screen.plitt` + - :ref:`sec.units.screen.molerus_hoffmann` + - :ref:`sec.units.screen.probability` + - :ref:`sec.units.screen.teipel_hennig` In the following figure, several grade efficiency curves for different parameters of separations sharpness are shown. @@ -24,12 +24,40 @@ In the following figure, several grade efficiency curves for different parameter .. image:: ../static/images/003_models/splitter-alpha.png :width: 500px - :alt: splitter + :alt: splitter-alpha :align: center | -.. _label-screenPlitt: +The output mass flows are calculated as follows: + +.. math:: + + \dot{m}_{out,c} = \dot{m}_{in}\sum\limits_{i}G(x_i)w_{in,i} + +.. math:: + + \dot{m}_{out,f} = \dot{m}_{in}\left(1-\sum\limits_{i}G(x_i)w_{in,i}\right) + + +.. note:: Notations: + ++------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| Symbol | Units | Description | ++==============================+==================+=============================================================================================================================+ +| :math:`\dot{m}_{out,c}` | [kg/s] | Mass flow at the coarse output | ++------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :math:`\dot{m}_{out,f}` | [kg/s] | Mass flow at the fine output | ++------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :math:`\dot{m}_{in}` | [kg/s] | Feed mass flow | ++------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :math:`G(x_i)` | [kg/kg] | Grade efficiency: mass fraction of material of size class :math:`i` in the feed that leaves the screen in the coarse stream | ++------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| :math:`w_{in,i}` | [kg/kg] | Mass fraction of material of size class :math:`i` in the feed | ++------------------------------+------------------+-----------------------------------------------------------------------------------------------------------------------------+ + + +.. _sec.units.screen.plitt: Plitt's model ^^^^^^^^^^^^^ @@ -43,9 +71,9 @@ This model is described using the following equation: .. note:: Notations applied in the models: - :math:`G(x_i)` – grade efficiency: mass fraction of material within the size class :math:`i` in the feed (:math:`\dot{m}_{i,input}`) that leaves the screen in the coarse stream (:math:`\dot{m}_{i,coarse}`) + :math:`G(x_i)` – grade efficiency - :math:`x_{cut}` – cut size of the classification model in meter + :math:`x_{cut}` – cut size of the classification model :math:`\alpha` – sharpness of separation @@ -73,6 +101,8 @@ This model is described using the following equation: | +.. _sec.units.screen.molerus_hoffmann: + Molerus & Hoffmann model ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -85,7 +115,7 @@ This model is described using the following equation: .. note:: Notations applied in the models: - :math:`G(x_i)` – grade efficiency: mass fraction of material within the size class :math:`i` in the feed that leaves the screen in the coarse stream + :math:`G(x_i)` – grade efficiency :math:`x_{cut}` – cut size of the classification model @@ -115,6 +145,8 @@ This model is described using the following equation: | +.. _sec.units.screen.probability: + Probability model ^^^^^^^^^^^^^^^^^ @@ -127,7 +159,7 @@ This model is described using the following equation: .. note:: Notations applied in this model: - :math:`G(x_i)` – grade efficiency: mass fraction of material within the size class :math:`i` in the feed that leaves the screen in the coarse stream + :math:`G(x_i)` – grade efficiency :math:`x_i` – size of a particle @@ -155,10 +187,13 @@ This model is described using the following equation: .. seealso:: + Radichkov, R.; Müller, T.; Kienle, A.; Heinrich, S.; Peglow, M.; Mörl, L.: A numerical bifurcation analysis of continuous fluidized bed spray granulation with external product classification, Chemical Engineering and Processing 45, 2006, pp. 826–837. | +.. _sec.units.screen.teipel_hennig: + Teipel / Hennig model ^^^^^^^^^^^^^^^^^^^^^ @@ -166,12 +201,12 @@ This model is described using the following equation: .. math:: - G(x_i) = \left( 1- \left( 1 + 3 \cdot \left( \dfrac{x_i}{x_{cut}} \right)^{\left(\dfrac{x_i}{x_{cut}} + \alpha \right)\cdot \beta} \right)^{-1/2} \right) \cdot (1 - a) + a + G(x_i) = \left( 1- \left( 1 + 3 \cdot \left( \dfrac{x_i}{x_{cut}} \right)^{\left(\dfrac{x_i}{x_{cut}} + \alpha \right)\cdot \beta} \right)^{-1/2}\right) \cdot (1 - a) + a .. note:: Notations applied in the models: - :math:`G(x_i)` – grade efficiency: mass fraction of material within the size class :math:`i` in the feed that leaves the screen in the coarse stream + :math:`G(x_i)` – grade efficiency :math:`x_{cut}` – cut size of the classification model diff --git a/Documentation/004_development/models_development.rst b/Documentation/004_development/models_development.rst index 85d1932d..643d623c 100644 --- a/Documentation/004_development/models_development.rst +++ b/Documentation/004_development/models_development.rst @@ -1494,7 +1494,7 @@ Now you need the following steps: ``THoldupToCoarse`` – to transform holdup into the output of coarse material. All elements NOT on diagonal are zero. The value :math:`1-G(x_i)` of classe :math:`i` locates at position :math:`(i,i)`. - Here also fractions of mass streams of coarse and fines outlets must be calculated according to the grade efficiency :math:`G(x_i)`. The :ref:`screen unit of Plitt's model ` can be used as a reference. + Here also fractions of mass streams of coarse and fines outlets must be calculated according to the grade efficiency :math:`G(x_i)`. The screen unit of :ref:`sec.units.screen.plitt` can be used as a reference. - Copy the holdup to the output streams: copy all parameters of the holdup into the both outlet streams using function ``CopyFromHoldup`` and set their new mass flows, calculated by the :abbr:`DAE (Differential-algebraic equation)` solver in ``_pVars[2]``. This calculated mass must be previously scaled according to the grade efficiency :math:`G(x_i)`.