Skip to content

Commit

Permalink
Merge branch 'master' into dem_encapsulate-load-balancing
Browse files Browse the repository at this point in the history
blaisb authored Jul 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents c04646a + 21b7d0f commit e61262c
Showing 52 changed files with 264 additions and 317 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,13 @@
All notable changes to the Lethe project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/).


## [Master] - 2024-07-20

### Fixed

- MINOR The ratio of the critical Rayleigh time step was wrong in CFD-DEM and was modified as done in DEM. [#1203](https://github.com/chaos-polymtl/lethe/pull/1203)

## [Master] - 2024-07-18

### Changed
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Running on 1 MPI rank(s)...
DEM time-step is 2.34951% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
350 particles are in the simulation
DEM time-step is 2.61468% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
350 particles are in the simulation
Number of active cells: 8
Number of degrees of freedom: 144
Volume of triangulation: 0.00125
---------------------------------------------------------------
Initializing DEM parameters
Warning: expansion of particle-wall contact list is disabled.
This feature is useful in geometries with concave boundaries.
Finished initializing DEM parameters
DEM time-step is 2e-05 s
Initializing DEM parameters
Warning: expansion of particle-wall contact list is disabled.
This feature is useful in geometries with concave boundaries.
Finished initializing DEM parameters
DEM time-step is 2e-05 s
--------------
Void Fraction
--------------

*******************************************************************************
Transient iteration: 1 Time: 0.001 Time step: 0.001 CFL: 0
Transient iteration: 1 Time: 0.001 Time step: 0.001 CFL: 0
*******************************************************************************
--------------
Void Fraction
@@ -30,7 +30,7 @@ DEM
----
DEM contact search at dem step 0
DEM contact search at dem step 1
Finished 50 DEM iterations
Finished 50 DEM iterations
---------------------------------------------------------------
Global continuity equation error: 2.803e-09 s^-1
Max local continuity error: 7.07295e-08 s^-1
@@ -44,140 +44,86 @@ Void Fraction
-------------------------------
Volume-Averaged Fluid Dynamics
-------------------------------
----
DEM
----
DEM contact search at dem step 1
Finished 50 DEM iterations
---------------------------------------------------------------
Global continuity equation error: -1.26904e-09 s^-1
Max local continuity error: 7.28588e-07 s^-1

**********************************************************************************
Transient iteration: 3 Time: 0.003 Time step: 0.001 CFL: 0.000149645
**********************************************************************************
--------------
Void Fraction
--------------
-------------------------------
Volume-Averaged Fluid Dynamics
-------------------------------
----
DEM
----
DEM contact search at dem step 1
Finished 50 DEM iterations
---------------------------------------------------------------
Global continuity equation error: 3.9841e-09 s^-1
Max local continuity error: 1.05602e-06 s^-1

**********************************************************************************
Transient iteration: 4 Time: 0.004 Time step: 0.001 CFL: 0.000224447
**********************************************************************************
--------------
Void Fraction
--------------
-------------------------------
Volume-Averaged Fluid Dynamics
-------------------------------
----
DEM
----
DEM contact search at dem step 1
Finished 50 DEM iterations
---------------------------------------------------------------
Global continuity equation error: 1.16336e-09 s^-1
Max local continuity error: 1.41713e-06 s^-1

**********************************************************************************
Transient iteration: 5 Time: 0.005 Time step: 0.001 CFL: 0.000299344
**********************************************************************************
--------------
Void Fraction
--------------
-------------------------------
Volume-Averaged Fluid Dynamics
-------------------------------
print_from_processor_0
8
[deal.II intermediate Patch<3,3>]
7
0 0 0 0.05 0 0 0 0.0625 0 0.05 0.0625 0 0 0 0.05 0.05 0 0.05 0 0.0625 0.05 0.05 0.0625 0.05
4294967295 4294967295 4294967295 1 4294967295 4294967295
0 0 0 0.05 0 0 0 0.0625 0 0.05 0.0625 0 0 0 0.05 0.05 0 0.05 0 0.0625 0.05 0.05 0.0625 0.05
4294967295 4294967295 4294967295 1 4294967295 4294967295
0 1
0
1 8
4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4


[deal.II intermediate Patch<3,3>]
7
0 0.0625 0 0.05 0.0625 0 0 0.125 0 0.05 0.125 0 0 0.0625 0.05 0.05 0.0625 0.05 0 0.125 0.05 0.05 0.125 0.05
4294967295 4294967295 0 2 4294967295 4294967295
0 0.0625 0 0.05 0.0625 0 0 0.125 0 0.05 0.125 0 0 0.0625 0.05 0.05 0.0625 0.05 0 0.125 0.05 0.05 0.125 0.05
4294967295 4294967295 0 2 4294967295 4294967295
1 1
0
1 8
4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4


[deal.II intermediate Patch<3,3>]
7
0 0.125 0 0.05 0.125 0 0 0.1875 0 0.05 0.1875 0 0 0.125 0.05 0.05 0.125 0.05 0 0.1875 0.05 0.05 0.1875 0.05
4294967295 4294967295 1 3 4294967295 4294967295
0 0.125 0 0.05 0.125 0 0 0.1875 0 0.05 0.1875 0 0 0.125 0.05 0.05 0.125 0.05 0 0.1875 0.05 0.05 0.1875 0.05
4294967295 4294967295 1 3 4294967295 4294967295
2 1
0
1 8
4 4 4 4 4 4 4 4
3 3 3 3 3 3 3 3


[deal.II intermediate Patch<3,3>]
7
0 0.1875 0 0.05 0.1875 0 0 0.25 0 0.05 0.25 0 0 0.1875 0.05 0.05 0.1875 0.05 0 0.25 0.05 0.05 0.25 0.05
4294967295 4294967295 2 4 4294967295 4294967295
0 0.1875 0 0.05 0.1875 0 0 0.25 0 0.05 0.25 0 0 0.1875 0.05 0.05 0.1875 0.05 0 0.25 0.05 0.05 0.25 0.05
4294967295 4294967295 2 4 4294967295 4294967295
3 1
0
1 8
4 4 4 4 4 4 4 4
2 2 2 2 2 2 2 2


[deal.II intermediate Patch<3,3>]
7
0 0.25 0 0.05 0.25 0 0 0.3125 0 0.05 0.3125 0 0 0.25 0.05 0.05 0.25 0.05 0 0.3125 0.05 0.05 0.3125 0.05
4294967295 4294967295 3 5 4294967295 4294967295
0 0.25 0 0.05 0.25 0 0 0.3125 0 0.05 0.3125 0 0 0.25 0.05 0.05 0.25 0.05 0 0.3125 0.05 0.05 0.3125 0.05
4294967295 4294967295 3 5 4294967295 4294967295
4 1
0
1 8
4 4 4 4 4 4 4 4
3 3 3 3 3 3 3 3


[deal.II intermediate Patch<3,3>]
7
0 0.3125 0 0.05 0.3125 0 0 0.375 0 0.05 0.375 0 0 0.3125 0.05 0.05 0.3125 0.05 0 0.375 0.05 0.05 0.375 0.05
4294967295 4294967295 4 6 4294967295 4294967295
0 0.3125 0 0.05 0.3125 0 0 0.375 0 0.05 0.375 0 0 0.3125 0.05 0.05 0.3125 0.05 0 0.375 0.05 0.05 0.375 0.05
4294967295 4294967295 4 6 4294967295 4294967295
5 1
0
1 8
4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4


[deal.II intermediate Patch<3,3>]
7
0 0.375 0 0.05 0.375 0 0 0.4375 0 0.05 0.4375 0 0 0.375 0.05 0.05 0.375 0.05 0 0.4375 0.05 0.05 0.4375 0.05
4294967295 4294967295 5 7 4294967295 4294967295
0 0.375 0 0.05 0.375 0 0 0.4375 0 0.05 0.4375 0 0 0.375 0.05 0.05 0.375 0.05 0 0.4375 0.05 0.05 0.4375 0.05
4294967295 4294967295 5 7 4294967295 4294967295
6 1
0
1 8
4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4


[deal.II intermediate Patch<3,3>]
7
0 0.4375 0 0.05 0.4375 0 0 0.5 0 0.05 0.5 0 0 0.4375 0.05 0.05 0.4375 0.05 0 0.5 0.05 0.05 0.5 0.05
4294967295 4294967295 6 4294967295 4294967295 4294967295
0 0.4375 0 0.05 0.4375 0 0 0.5 0 0.05 0.5 0 0 0.4375 0.05 0.05 0.4375 0.05 0 0.5 0.05 0.05 0.5 0.05
4294967295 4294967295 6 4294967295 4294967295 4294967295
7 1
0
1 8
4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4


0
@@ -186,7 +132,7 @@ print_from_processor_0
DEM
----
DEM contact search at dem step 1
Finished 50 DEM iterations
Finished 50 DEM iterations
---------------------------------------------------------------
Global continuity equation error: -8.07686e-10 s^-1
Max local continuity error: 1.81029e-06 s^-1
Global continuity equation error: -2.28117e-09 s^-1
Max local continuity error: 6.96484e-07 s^-1
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ subsection simulation control
set output frequency = 0
set log frequency = 1
set startup time scaling = 0.6
set time end = 0.005
set time end = 0.002
set time step = 0.001
end

@@ -51,7 +51,7 @@ subsection model parameters
subsection adaptive sparse contacts
set enable adaptive sparse contacts = true
set enable particle advection = true
set granular temperature threshold = 1e-4
set granular temperature threshold = 5e-4
set solid fraction threshold = 0.1
end
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 2.186842813% of Rayleigh time step
DEM time-step is 2.433653979% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
10000 particles are in the simulation
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 16.41771423% of Rayleigh time step
DEM time-step is 18.27064813% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
1 particles are in the simulation
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 2.186842813% of Rayleigh time step
DEM time-step is 2.433653979% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
10000 particles are in the simulation
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 16.41771423% of Rayleigh time step
DEM time-step is 18.27064813% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
1 particles are in the simulation
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 4.74073% of Rayleigh time step
DEM time-step is 5.13612% of Rayleigh time step
Reading DEM checkpoint
Finished reading DEM checkpoint
2 particles are in the simulation
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 2 MPI rank(s)...
DEM time-step is 3.28354% of Rayleigh time step
DEM time-step is 3.65413% of Rayleigh time step
Number of active cells: 40
Number of degrees of freedom: 656
Volume of triangulation: 0.00108
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Running on 1 MPI rank(s)...
DEM time-step is 16.41771423% of Rayleigh time step
DEM time-step is 18.27064813% of Rayleigh time step
Number of active cells: 25
Number of degrees of freedom: 192
Volume of triangulation: 0.001
Original file line number Diff line number Diff line change
@@ -300,7 +300,7 @@ where the final value of :math:`x_r` is :math:`2.893`. We notice from the graph

.. image:: image/Reynolds100-error-analysis.png

The reference value used in the error analysis is taken from Erturk (2008) `[1] <https://doi.org/10.1016/j.compfluid.2007.09.003>`_.
The reference value used in the error analysis is taken from Erturk (2008) [#erturk2008]_.


Higher Reynolds Number (:math:`Re=1000`)
@@ -324,11 +324,11 @@ Validation and Comparison
Reattachment Length
~~~~~~~~~~~~~~~~~~~

In this section, the solutions obtained with Lethe are compared with data that can be found in the scientific literature (Erturk (2008) `[1] <https://doi.org/10.1016/j.compfluid.2007.09.003>`_, Armaly and al. (1983) `[2] <https://doi.org/10.1017/S0022112083002839>`_ and Velivelli and Bryden (2015) `[3] <https://doi.org/10.1016/j.advengsoft.2014.11.006>`_). Several studies include datasets of :math:`x_r/h = f(Re)` (reattachment length) either experimentally or numerically. The next figure illustrates some of them in comparison with *Lethe*.
In this section, the solutions obtained with Lethe are compared with data that can be found in the scientific literature (Erturk (2008) [#erturk2008]_, Armaly and al. (1983) [#armaly1983]_ and Velivelli and Bryden (2015) [#velivelli2015]_). Several studies include datasets of :math:`x_r/h = f(Re)` (reattachment length) either experimentally or numerically. The next figure illustrates some of them in comparison with *Lethe*.

.. image:: image/xr-comparison.png

First, the results provided by Lethe are identical or so to all of the three selected studies for low Reynolds numbers (:math:`Re \leq 400`). After that point, both results form *Lethe* and from Erturk (2008) `[1] <https://doi.org/10.1016/j.compfluid.2007.09.003>`_ diverge from the experimental data of Armaly and al. (1983) `[2] <https://doi.org/10.1017/S0022112083002839>`_. According to `[1] <https://doi.org/10.1016/j.compfluid.2007.09.003>`_, this error is due to 3D effects that are more potent as the flow becomes more and more turbulent. Furthermore, there is also a less significant but clearly noticeable error between *Lethe* and Erturk (2008) `[1] <https://doi.org/10.1016/j.compfluid.2007.09.003>`_: the fact that certain tolerances have been set higher for higher Reynolds number cases might have underestimated the reattachment length. Also, first order elements have been used throughout the whole simulation process. Using second order elements for velocity, for instance, could yield better results for higher Reynolds numbers, however, at a higher computational cost. The following table illustrates the error at :math:`Re = 600` for first and second order velocity elements.
First, the results provided by Lethe are identical or so to all of the three selected studies for low Reynolds numbers (:math:`Re \leq 400`). After that point, both results form *Lethe* and from Erturk (2008) [#erturk2008]_ diverge from the experimental data of Armaly and al. (1983) [#armaly1983]_. According to [#erturk2008]_, this error is due to 3D effects that are more potent as the flow becomes more and more turbulent. Furthermore, there is also a less significant but clearly noticeable error between *Lethe* and Erturk (2008) [#erturk2008]_: the fact that certain tolerances have been set higher for higher Reynolds number cases might have underestimated the reattachment length. Also, first order elements have been used throughout the whole simulation process. Using second order elements for velocity, for instance, could yield better results for higher Reynolds numbers, however, at a higher computational cost. The following table illustrates the error at :math:`Re = 600` for first and second order velocity elements.

+---------------+----------------+----------------+
| Order | :math:`x_r/h` | Error |
@@ -369,11 +369,11 @@ Possibilities for Extension
References
----------

`[1] <https://doi.org/10.1016/j.compfluid.2007.09.003>`_ E. Erturk, “Numerical solutions of 2-D steady incompressible flow over a backward-facing step, Part I: High Reynolds number solutions,” *Comput. Fluids*, vol. 37, no. 6, pp. 633–655, Jul. 2008, doi: 10.1016/j.compfluid.2007.09.003.
.. [#erturk2008] \E. Erturk, “Numerical solutions of 2-D steady incompressible flow over a backward-facing step, Part I: High Reynolds number solutions,” *Comput. Fluids*, vol. 37, no. 6, pp. 633–655, Jul. 2008, doi: `10.1016/j.compfluid.2007.09.003 <https://doi.org/10.1016/j.compfluid.2007.09.003>`_\.
`[2] <https://doi.org/10.1017/S0022112083002839>`_ B. F. Armaly, F. Durst, J. C. F. Pereira, and B. Schönung, “Experimental and theoretical investigation of backward-facing step flow,” *J. Fluid Mech.*, vol. 127, pp. 473–496, Feb. 1983, doi: 10.1017/S0022112083002839.
.. [#armaly1983] \B. F. Armaly, F. Durst, J. C. F. Pereira, and B. Schönung, “Experimental and theoretical investigation of backward-facing step flow,” *J. Fluid Mech.*, vol. 127, pp. 473–496, Feb. 1983, doi: `10.1017/S0022112083002839 <https://doi.org/10.1017/S0022112083002839>`_\.
`[3] <https://doi.org/10.1016/j.advengsoft.2014.11.006>`_ A. C. Velivelli and K. M. Bryden, “Domain decomposition based coupling between the lattice Boltzmann method and traditional CFD methods – Part II: Numerical solution to the backward facing step flow,” *Adv. Eng. Softw.*, vol. 82, pp. 65–74, Apr. 2015, doi: 10.1016/j.advengsoft.2014.11.006.
.. [#velivelli2015] \A. C. Velivelli and K. M. Bryden, “Domain decomposition based coupling between the lattice Boltzmann method and traditional CFD methods – Part II: Numerical solution to the backward facing step flow,” *Adv. Eng. Softw.*, vol. 82, pp. 65–74, Apr. 2015, doi: `10.1016/j.advengsoft.2014.11.006 <https://doi.org/10.1016/j.advengsoft.2014.11.006>`_\.
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ All files mentioned below are located in the example's folder (``examples/incomp
-----------------------
Description of the Case
-----------------------
We simulate the flow around a fixed cylinder with a constant upstream fluid velocity. The following schematic describes the geometry with its relevant quantities (taken from the article by Blais *et al.* `[1] <https://doi.org/10.1016/j.compchemeng.2015.10.019>`_):
We simulate the flow around a fixed cylinder with a constant upstream fluid velocity. The following schematic describes the geometry with its relevant quantities (taken from the article by Blais *et al.* [#blais2016]_):

.. image:: images/geometry-description.png
:alt: The geometry
@@ -283,4 +283,4 @@ Possibilities for Extension
Reference
----------

`[1] <https://doi.org/10.1016/j.compchemeng.2015.10.019>`_ B. Blais, M. Lassaigne, C. Goniva, L. Fradette, and F. Bertrand, “A semi-implicit immersed boundary method and its application to viscous mixing,” *Comput. Chem. Eng.*, vol. 85, pp. 136–146, Feb. 2016, doi: 10.1016/j.compchemeng.2015.10.019.
.. [#blais2016] \B. Blais, M. Lassaigne, C. Goniva, L. Fradette, and F. Bertrand, “A semi-implicit immersed boundary method and its application to viscous mixing,” *Comput. Chem. Eng.*, vol. 85, pp. 136–146, Feb. 2016, doi: `10.1016/j.compchemeng.2015.10.019 <https://doi.org/10.1016/j.compchemeng.2015.10.019>`_\.
Loading

0 comments on commit e61262c

Please sign in to comment.