Skip to content

Commit

Permalink
Deploying to gh-pages-v2 from @ d37c008 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisb committed Nov 21, 2024
1 parent 92c0082 commit 2fc4448
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ The forces are computed in order to obtain the drag and lift coefficients later
set calculate force = true
set calculate torque = false
set force name = force
set output precision = 10
set calculation frequency = 1
set output frequency = 1
end
Mesh
Expand Down Expand Up @@ -274,7 +271,7 @@ with :math:`p_{\infty}` the static pressure in the freestream (equal to 0 in thi
.. image:: image/cp_comparison.png


The important pressure at the leading edge of the airfoil is what allows the incoming flow to be deflected to the upper and lower surfaces. Then, if we look at the upper surface (be careful about the reversed y-axis) the adverse pressure gradient is visible. Then at the trailing edge, the mesh is not precise enough. This zone of high pressure gradient, though not physically accurate, do not invalidate the whole result.
The important pressure at the leading edge of the airfoil is what allows the incoming flow to be deflected to the upper and lower surfaces. Then, if we look at the upper surface (be careful about the reversed y-axis) the adverse pressure gradient is visible. Then at the trailing edge, the mesh is not precise enough. This zone of high pressure gradient, though not physically accurate, does not invalidate the whole result.


For angles of attack :math:`\alpha\geq 9°`, the vortices start to detach from the airfoil. It can be seen using the instantaneous velocity fields. The velocity fields for each angle of attack, at t = 40 seconds, are shown below:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ The ``mesh`` considered is a very basic rectangle, using the ``dealii`` grid typ
Multiphysics
~~~~~~~~~~~~~~

The ``multiphysics`` subsection enable to turn on (``true``) and off (``false``) the physics of interest. Here ``heat transfer`` and ``viscous dissipation`` must be set (see Bonuses for results without viscous dissipation).
The ``multiphysics`` subsection enables to turn on (``true``) and off (``false``) the physics of interest. Here ``heat transfer`` and ``viscous dissipation`` must be set (see Bonuses for results without viscous dissipation).

.. code-block:: text
Expand Down Expand Up @@ -156,13 +156,13 @@ Boundary Conditions

The ``boundary conditions`` are set for:

* the fluid dynamic in ``subsection boundary conditions``, with ``noslip`` at the left wall (``bc 0``) and a velocity of ``2`` in the y-direction at the right wall (``bc 1``),
* the heat transfer in ``subsection boundary conditions heat transfer``, with a ``convection`` imposed at the left wall (``bc 0``) with a heat transfer coefficient ``h = 0`` to represent an insulation condition, and an imposed ``temperature`` of ``80`` at the right wall.
* the fluid dynamic in ``subsection boundary conditions``, with ``noslip`` at the left wall (``bc 0``) and a velocity of ``2`` in the y-direction at the right wall (``bc 1``). The other walls (``bc 2`` and ``bc 3``) are set as ``outlet`` with a ``beta = 0`` to represent an open boundary condition.
* the heat transfer in ``subsection boundary conditions heat transfer``, with an imposed ``temperature`` of ``80`` at the right wall. All the other walls are set as ``noflux``.

.. code-block:: text
subsection boundary conditions
set number = 2
set number = 4
subsection bc 0
set id = 0
set type = noslip
Expand All @@ -177,19 +177,23 @@ The ``boundary conditions`` are set for:
set Function expression = 2
end
end
subsection bc 2
set id = 2
set type = outlet
set beta = 0
end
subsection bc 3
set id = 3
set type = outlet
set beta = 0
end
end
subsection boundary conditions heat transfer
set number = 2
set number = 4
subsection bc 0
set id = 0
set type = convection-radiation-flux
subsection h
set Function expression = 0
end
subsection Tinf
set Function expression = 0
end
set type = noflux
end
subsection bc 1
set id = 1
Expand All @@ -198,8 +202,18 @@ The ``boundary conditions`` are set for:
set Function expression = 80
end
end
subsection bc 2
set id = 2
set type = noflux
end
subsection bc 3
set id = 3
set type = noflux
end
end
.. note::
In lethe, beta = 1 is the default value for the ``outlet`` boundary condition. Beta acts as a penalizing factor for fluid entering the domain. Because the fluid will be forced to enter through one of the outlets, beta is set to 0.

-----------------------
Running the Simulation
Expand Down Expand Up @@ -336,7 +350,7 @@ Several adjustments have to be made in the `.prm` to turn the domain clockwise,
.. code-block:: text
subsection boundary conditions
set number = 2
set number = 4
subsection bc 0
set id = 2
set type = noslip
Expand All @@ -345,41 +359,47 @@ Several adjustments have to be made in the `.prm` to turn the domain clockwise,
set id = 3
set type = function
subsection u
set Function expression = 2
set Function expression = 0
end
subsection v
set Function expression = 0
set Function expression = 2
end
end
subsection bc 2
set id = 0
set type = outlet
set beta = 0
end
subsection bc 3
set id = 1
set type = outlet
set beta = 0
end
end
subsection boundary conditions heat transfer
set number = 4
subsection bc 2
subsection bc 0
set id = 2
set type = convection-radiation-flux
subsection h
set Function expression = 0
end
subsection Tinf
set Function expression = 0
end
set type = noflux
end
subsection bc 3
subsection bc 1
set id = 3
set type = temperature
subsection value
set Function expression = 80
end
end
subsection bc 2
set id = 0
set type = noflux
end
subsection bc 3
set id = 1
set type = noflux
end
end
.. important::
For the fluid ``boundary conditions``, we use ``set number = 2``, whereas for ``boundary conditions heat transfer`` we use ``set number = 4``. These two notations are perfectly equivalent, as the boundary conditions are ``none`` by default (or ``noflux`` in the case of heat transfer, see :doc:`../../../parameters/cfd/boundary_conditions_multiphysics`). However, it is important to make sure that:

* the index in ``subsection bc ..`` is coherent with the ``number`` set (if ``number = 2``, ``bc 0`` and ``bc 1`` are created but ``bc 2`` does not exist),
* the index in ``set id = ..`` is coherent with the ``id`` of the boundary in the mesh (here, the deal.II generated mesh).

----------------------------
Possibilities for Extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Features
- Simulates a solid-gas cylinder-shaped spouted bed

---------------------------
Files Used in This Example
Files Used in this Example
---------------------------

Both files mentioned below are located in the example's folder (``examples/unresolved-cfd-dem/gas-solid-spouted-cylinder-bed``).
Expand All @@ -25,13 +25,13 @@ Both files mentioned below are located in the example's folder (``examples/unres
Description of the Case
-----------------------

This example simulates the spouting of spherical particles in air in a cylinder. As noted in the example of `Gas-Solid Spouted Bed <../gas-solid-spouted-bed/gas-solid-spouted-bed.html>`_, we use ``lethe-particles`` to fill the bed with particles, and ``lethe-fluid-particles`` as the CFD-DEM solver.
This example simulates the spouting of spherical particles in a cylinder. As noted in the example of `Gas-Solid Spouted Bed <../gas-solid-spouted-bed/gas-solid-spouted-bed.html>`_, we use ``lethe-particles`` to fill the bed with particles, and ``lethe-fluid-particles`` as the unresolved CFD-DEM solver.

-------------------
DEM Parameter File
-------------------

Here, we will focus only on the parts that have been modified compared to `Gas-Solid Spouted Bed <../gas-solid-spouted-bed/gas-solid-spouted-bed.html>`_. It is also strongly recommended to visit `DEM parameters <../../../parameters/dem/dem.html>`_ for a detailed description on the concepts and physical meanings of the DEM parameters.
Here, we will focus only on the parts that have been modified compared to the `Gas-Solid Spouted Bed <../gas-solid-spouted-bed/gas-solid-spouted-bed.html>`_ example. It is also strongly recommended to visit the `DEM parameters <../../../parameters/dem/dem.html>`_ for a detailed description on the concepts and physical meanings of the DEM parameters.

Mesh
~~~~~
Expand All @@ -44,15 +44,15 @@ In this example, we are simulating a cylinder shaped spouted bed. We introduce t
:name: geometry
:height: 15cm

The geometry of the bed was created using `Pointiwise <../../../tools/pointwise/pointowise.html>`_, and the overview of created mesh is:
The geometry of the bed was created using `Pointwise <../../../tools/pointwise/pointwise.html>`_. An overview of the mesh is:

.. image:: images/mesh.png
:alt: The geometry and boundary conditions
:align: center
:name: mesh_ver
:height: 10cm

In unresolved CFD-DEM, the averaging volume used to calculate the void fraction needs to be large enough to contain several particles (>10). Since the averaging volume used in the quadrature-centred method is generally related to the cell volume, this introduces a limitation on the cell size. In general, the averaging volume, which in this case is controlled by the cell size, should be approximately three time larger than the diameter of the particles in order to get stable calculation.
In unresolved CFD-DEM, the averaging volume used to calculate the void fraction needs to be large enough to contain several particles (>10). Since the averaging volume used in the quadrature-centred method is generally related to the cell volume, this introduces a limitation on the cell size. In general, the averaging volume, which in this case is controlled by the cell size, should be approximately three times larger than the diameter of the particles in order to get stable calculation.

.. code-block:: text
Expand All @@ -67,7 +67,7 @@ where the file name includes the path to the mesh file. Here, we activate ``expa
Lagrangian Physical Properties
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The physical properties section is almost the same as the previous spouted bed example. Here, parameters for the gravity, the diameter, density, and the number of particles are modified. In this simulation, we use 100,000 particles with a 5 mm diameter.
In this simulation, we use 100,000 particles with a 5 mm diameter. The rest of the particle properties are relatively standard.

.. code-block:: text
Expand All @@ -78,13 +78,13 @@ The physical properties section is almost the same as the previous spouted bed e
set diameter = 0.005
set number = 100000
set density particles = 100
set young modulus particles = 10000000
set young modulus particles = 1e7
set poisson ratio particles = 0.25
set restitution coefficient particles = 0.97
set friction coefficient particles = 0.4
set rolling friction particles = 0.3
end
set young modulus wall = 10000000
set young modulus wall = 1e7
set poisson ratio wall = 0.25
set restitution coefficient wall = 0.33
set friction coefficient wall = 0.2
Expand All @@ -94,7 +94,7 @@ The physical properties section is almost the same as the previous spouted bed e
Insertion Info
~~~~~~~~~~~~~~~~~~~

The ``insertion info`` subsection manages the insertion of particles. The insertion box parameter is set so that it can fit in the cylinder.
The ``insertion info`` subsection manages the insertion of particles. The insertion box parameter is set so that it can fit within the cylinder.

.. code-block:: text
Expand All @@ -111,7 +111,7 @@ The ``insertion info`` subsection manages the insertion of particles. The insert
Floating Walls
~~~~~~~~~~~~~~~~~~~

When we pack the cylinder with particles, we need to keep them inside and prevent them from falling through the small inlet channel. To do so, we place a floating wall at the bottom of the cylinder, which is :math:`z = 0` plain, as in:
We place a floating wall at the bottom of the cylinder, which is at :math:`z = 0`, to ensure that the particles remain within the cylinder during the loading step.

.. code-block:: text
Expand All @@ -136,29 +136,29 @@ When we pack the cylinder with particles, we need to keep them inside and preven
---------------------------
Running the DEM Simulation
---------------------------
Launching the simulation is as simple as specifying the executable name and the parameter file. Assuming that the ``lethe-particles`` executable is within your path, the simulation can be launched in parallel as follows:
Assuming that the ``lethe-particles`` executable is within your path, the simulation can be launched in parallel as follows:

.. code-block:: text
:class: copy-button
mpirun -np 8 lethe-particles packing-particles.prm
.. note::
Running the packing should take approximately 10 hours on 8 cores using Intel(R) Core(TM) i7-9700K.
Running the packing should take approximately 10 minutes on 8 cores.

After the particles have been packed inside the square bed, we can move on to the fluid-particles simulation.
After the particles have been packed inside the bed, we can move on to the fluid-particles simulation.


-----------------------
CFD-DEM Parameter File
-----------------------

The CFD-DEM simulation is carried out using the packed bed previously generated. Here we will focus on the modified section as well. We recommend visiting `Unresolved CFD-DEM Parameters Guide <../../../parameters/unresolved-cfd-dem/unresolved-cfd-dem.html>`_ for a detailed description.
The CFD-DEM simulation is carried out using the packed bed previously generated. Here we will focus on the modified section as well. We recommend visiting the `Unresolved CFD-DEM Parameters Guide <../../../parameters/unresolved-cfd-dem/unresolved-cfd-dem.html>`_ for a detailed description.

Simulation Control
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The simulation is run for 5 seconds with a time step of 0.001 seconds. The time scheme and setting for output is shown as follows.
The simulation is run for 5 seconds with a time step of 0.001 seconds. The time scheme and setting for output is shown as follows:

.. code-block:: text
Expand Down Expand Up @@ -189,8 +189,7 @@ We set the inlet velocity to 2.5 m/s, and the background velocity to 0.5 m/s on
subsection boundary conditions
set time dependent = false
set number = 5
subsection bc 0 #outlet
set id = 3
set type = outlet
Expand Down Expand Up @@ -239,7 +238,7 @@ We set the inlet velocity to 2.5 m/s, and the background velocity to 0.5 m/s on
CFD-DEM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Here, we enable grad-div stabilization , and take the time derivative of the void fraction into account.
Here, we enable grad-div stabilization, and take the time derivative of the void fraction into account.

.. code-block:: text
Expand Down Expand Up @@ -267,20 +266,13 @@ Running the CFD-DEM Simulation

The simulation is run using the ``lethe-fluid-particles`` application. Assuming that the ``lethe-fluid-particles`` executable is within your path, the simulation can be launched as per the following command:

.. code-block:: text
:class: copy-button
lethe-fluid-particles gas-solid-spouted-cylinder-bed.prm
or in parallel (where 8 represents the number of processors)

.. code-block:: text
:class: copy-button
mpirun -np 8 lethe-particles gas-solid-spouted-cylinder-bed.prm
.. note::
Running the packing should take approximately 8 days on 8 cores using Intel(R) Core(TM) i7-9700K.
Running the packing should take approximately 5 days on 8 cores.

---------
Results
Expand All @@ -291,9 +283,7 @@ We briefly discuss the results that can be obtained from this example here.
Total Pressure Drop
~~~~~~~~~~~~~~~~~~~

Here, we show the simulated pressure drop.

This graph illustrates the variation of pressure drop from 1 second to 5 seconds. We can see the pressure oscillation which is caused by the bubbly state.
The following plot illustrates the variation of pressure drop from 1 second to 5 seconds. We can see the pressure oscillation which is caused by the bubbly state of the spouted bed.

.. image:: images/pressure_drop.png
:alt: Pressure drop as a function of time
Expand All @@ -302,7 +292,7 @@ This graph illustrates the variation of pressure drop from 1 second to 5 seconds

Visualization
~~~~~~~~~~~~~
The results are shown in an animation below. As seen, the bubbly flow can be observed on the right side. the color of the particles represents their IDs, allowing for the visualization of the mixing. On the left side, we show the fluid velocity field.
In the following animation, the bubbly flow can be observed on the right side. the color of the particles represents their IDs, allowing for the visualization of the mixing. On the left side, we show the fluid velocity field.

.. raw:: html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,6 @@ <h3>Forces<a class="headerlink" href="#forces" title="Link to this heading">#</a
set calculate force = true
set calculate torque = false
set force name = force
set output precision = 10
set calculation frequency = 1
set output frequency = 1
end
</pre></div>
</div>
Expand Down Expand Up @@ -649,7 +646,7 @@ <h2>Results and Discussion<a class="headerlink" href="#results-and-discussion" t
</div>
<p>with <span class="math notranslate nohighlight">\(p_{\infty}\)</span> the static pressure in the freestream (equal to 0 in this case), <span class="math notranslate nohighlight">\(\rho_{\infty}\)</span> the freestream fluid density, equal to the fluid density since we are solving an incompressible flow and <span class="math notranslate nohighlight">\(u_{\infty}\)</span> the freestream velocity of the fluid, equal to <code class="docutils literal notranslate"><span class="pre">1.0</span></code> in this case.</p>
<img alt="../../../_images/cp_comparison.png" src="../../../_images/cp_comparison.png" />
<p>The important pressure at the leading edge of the airfoil is what allows the incoming flow to be deflected to the upper and lower surfaces. Then, if we look at the upper surface (be careful about the reversed y-axis) the adverse pressure gradient is visible. Then at the trailing edge, the mesh is not precise enough. This zone of high pressure gradient, though not physically accurate, do not invalidate the whole result.</p>
<p>The important pressure at the leading edge of the airfoil is what allows the incoming flow to be deflected to the upper and lower surfaces. Then, if we look at the upper surface (be careful about the reversed y-axis) the adverse pressure gradient is visible. Then at the trailing edge, the mesh is not precise enough. This zone of high pressure gradient, though not physically accurate, does not invalidate the whole result.</p>
<p>For angles of attack <span class="math notranslate nohighlight">\(\alpha\geq 9°\)</span>, the vortices start to detach from the airfoil. It can be seen using the instantaneous velocity fields. The velocity fields for each angle of attack, at t = 40 seconds, are shown below:</p>
<img alt="../../../_images/instantaneous_velocity.png" src="../../../_images/instantaneous_velocity.png" />
<p>In order to retrieve the frequency of the vortex shedding, one can look at the fluctuations of <span class="math notranslate nohighlight">\(C_L\)</span>, as presented below for the case where <span class="math notranslate nohighlight">\(\alpha=15°\)</span> was considered:</p>
Expand Down
Loading

0 comments on commit 2fc4448

Please sign in to comment.