Skip to content

Commit

Permalink
Update documentation and remove parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisb committed Dec 3, 2024
1 parent d319ff0 commit 2ea7c62
Show file tree
Hide file tree
Showing 18 changed files with 4 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ subsection void fraction
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.0001
set l2 lower bound = 0
end

# --------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ subsection void fraction
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.00000125
set l2 lower bound = 0
set l2 upper bound = 1
set bound void fraction = false
end

#---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ subsection void fraction
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.00001
set bound void fraction = false
set l2 lower bound = 0
set l2 upper bound = 1
end

#---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ subsection void fraction
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.00000125
set l2 lower bound = 0
set l2 upper bound = 1
set bound void fraction = false
end

#---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ subsection void fraction
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.00001
set bound void fraction = false
set l2 lower bound = 0
set l2 upper bound = 1
end

#---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ subsection void fraction
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.0005
set bound void fraction = false
end

#---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ subsection void fraction
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.0005
set bound void fraction = false
end

#---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ subsection void fraction
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.000005
set l2 lower bound = 0
set l2 upper bound = 1
set bound void fraction = false
end

#---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ subsection void fraction
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.00001
set bound void fraction = false
set l2 lower bound = 0
set l2 upper bound = 1
end

#---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ subsection void fraction
set qcm sphere equal cell volume = true
set read dem = true
set dem file name = dem
set bound void fraction = false
end

#---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ Void Fraction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since we are calculating the void fraction using the particle insertion of the DEM simulation, we set the ``mode`` to ``dem``. For this, we need to read the dem files which we already wrote using check-pointing. We, therefore, set the ``read dem`` to ``true`` and specify the prefix of the dem files to be dem.
We choose to use the quadrature centered method (`QCM <../../../theory/unresolved_cfd-dem/unresolved_cfd-dem.html>`_) to calculate the void fraction. For this, we specify the ``mode`` to be ``qcm``. We want the radius of our volume averaging sphere to be equal to the length of the element where the void fraction is being calculated. We don't want the volume of the sphere to be equal to the volume of the element.
For this, we set the ``qcm sphere equal cell volume`` equals to ``false``. Since we want to keep the mass conservative properties of the :math:`L^2` projection, we do not bound the void fraction and as such we set ``bound void fraction`` to ``false``. Unlike the other schemes, we do not smooth the void fraction as we usually do using the PCM and SPM void fraction schemes since QCM is continuous in time and space.
For this, we set the ``qcm sphere equal cell volume`` equals to ``false``. Unlike the other schemes, we do not smooth the void fraction as we usually do using the PCM and SPM void fraction schemes since QCM is continuous in time and space.

.. code-block:: text
Expand All @@ -283,7 +283,6 @@ For this, we set the ``qcm sphere equal cell volume`` equals to ``false``. Since
set qcm sphere equal cell volume = false
set read dem = true
set dem file name = dem
set bound void fraction = false
end
CFD-DEM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ The additional sections that define the VANS solver are the void fraction subsec
Void Fraction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since we are calculating the void fraction using the packed bed of the DEM simulation, we set the mode to ``dem``. For this, we need to read the dem files which we already wrote using check-pointing. We therefore set the read dem to ``true`` and specify the prefix of the ``dem`` files to be read. In order to ensure that our void fraction projection is bounded, we choose an upper bound limit of 1. We decide not to lower bound the void fraction and thus attributed a value of 0 to the L2 lower bound parameter. We now choose a smoothing factor for the void fraction as to reduce discontinuity which can lead to oscillations in the velocity. The factor we choose is around the square of twice the particle's diameter.
Since we are calculating the void fraction using the packed bed of the DEM simulation, we set the mode to ``dem``. For this, we need to read the dem files which we already wrote using check-pointing. We therefore set the read dem to ``true`` and specify the prefix of the ``dem`` files to be read. We now choose a smoothing factor for the void fraction as to reduce discontinuity which can lead to oscillations in the velocity. The factor we choose is around the square of twice the particle's diameter.

.. code-block:: text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ The additional sections for the CFD-DEM simulations are the void fraction subsec
Void Fraction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since we are calculating the void fraction using the packed bed of the DEM simulation, we set the mode to "dem". For this, we need to read the dem files which we already wrote using check-pointing. We, therefore, set the read dem to "true" and specify the prefix of the dem files to be dem. In order to ensure that our void fraction projection is bounded, we choose an upper bound limit of 1. We decide not to lower bound the void fraction and thus attributed a value of 0 to the L2 lower bound parameter. We now choose a smoothing factor for the void fraction to reduce discontinuity which can lead to oscillations in the velocity. The factor we choose is around the square of twice the particle's diameter.
Since we are calculating the void fraction using the packed bed of the DEM simulation, we set the mode to "dem". For this, we need to read the dem files which we already wrote using check-pointing. We, therefore, set the read dem to "true" and specify the prefix of the dem files to be dem. We now choose a smoothing factor for the void fraction to reduce discontinuity which can lead to oscillations in the velocity. The factor we choose is around the square of twice the particle's diameter.

.. code-block:: text
Expand All @@ -317,9 +317,6 @@ Since we are calculating the void fraction using the packed bed of the DEM simul
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0.000005
set l2 lower bound = 0
set l2 upper bound = 1
set bound void fraction = false
end
CFD-DEM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ Void Fraction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since we are calculating the void fraction using the packed bed of the DEM simulation, we set the ``mode`` to ``dem``. For this, we need to read the dem files which we already wrote using check-pointing. We, therefore, set the ``read dem`` to ``true`` and specify the prefix of the dem files to be dem. We choose to use the quadrature centered method (QCM) to calculate the void fraction. This method does not require smoothing the void fraction as it is space and time continuous. For this simulation, we use a reference sphere having the same volume as the mesh elements as the averaging volume to calculate the void fraction.
For this, we specify the ``mode`` to be ``qcm``. We want the volume of the volume averaging sphere to be equal to the volume of the element. For this, we set the ``qcm sphere equal cell volume`` equals to ``true``. Since we want to keep the mass conservative properties of the :math:`L^2` projection, we do not bound the void fraction and as such we set ``bound void fraction`` to ``false``.
For this, we specify the ``mode`` to be ``qcm``. We want the volume of the volume averaging sphere to be equal to the volume of the element. For this, we set the ``qcm sphere equal cell volume`` equals to ``true``.

.. code-block:: text
Expand All @@ -316,7 +316,6 @@ For this, we specify the ``mode`` to be ``qcm``. We want the volume of the volum
set qcm sphere equal cell volume = true
set read dem = true
set dem file name = dem
set bound void fraction = false
end
CFD-DEM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,6 @@ We choose the `particle centroid method (PCM) <../../../parameters/unresolved-cf
set l2 smoothing factor = 2.8387584e-5
end
.. note::
Note that void fraction is not bound in this case. The size of the particles used in this example forces us to use a very coarse mesh. Bounding void fraction would lead to instability in the present case.
CFD-DEM
~~~~~~~~~~
Expand Down
5 changes: 0 additions & 5 deletions doc/source/parameters/unresolved-cfd-dem/void-fraction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ In this subsection, all parameters required for the calculation of the void frac
set read dem = true
set dem file name = dem
set l2 smoothing factor = 0
set l2 lower bound = 0
set l2 upper bound = 1
set bound void fraction = false
set particle refinement factor = 0
end
Expand All @@ -38,8 +35,6 @@ If the ``mode`` chosen is ``pcm``, then the void fraction is calculated using th
* The ``read dem`` allows us to read an already existing dem simulation result which can be obtained from checkpointing the Lethe-DEM simulation. This is important as the `lethe-fluid-vans` solver requires reading an initial dem triangulation and particle information to simulate flows in the presence of particles.
* The ``dem_file_name`` parameter specifies the prefix of the dem files that must be read.
* The ``l2 smoothing factor`` is a smoothing length used for smoothing the L2 projection of the void fraction to avoid sharp discontinuities which can lead to instabilities in the simulation.
* The ``l2 lower bound`` and ``l2 upper bound`` are the minimum and maximum values around which the void fraction is bounded. This is important especially for upper bounds as the void fraction can sometimes slightly exceed a value of 1 when projected.
* The ``bound void fraction`` parameter determines whether or not to bound the void fraction between the lower and upper bounds specified in the previous two parameters. As the void fraction is calculated and then projected using L2 projection, it can sometimes exceeds the maximum value of 1. In order to prevent this, we use an active set method to bound the void fraction.
* The ``qcm sphere diameter`` allows us to fix the diameter of all reference spheres in the simulation to a given value. If this option is used (a value other than 0 is specified), it overrides the default calculation of the size of the sphere and sets its diameter to the value specified.
* The ``qcm sphere equal cell volume`` determines whether or not we want to use a reference sphere with the same volume as the element in which it is located. If it is disabled, then each sphere will have a radius equal to the size of the element in which it is located. This parameter is important only when the ``qcm sphere diameter`` is not used or is set to 0.
* The ``particle refinement factor`` is only required for the ``spm``. It allows to determine the number of pseudo-particles that we want to divide our particle into. By default, it is set to 0 refinements, and results in no refinement of the original meshed particle (division into 7 particles in 3D). Every additional refinement results in a :math:`2^{dim}` times more particles. The figure below shows how the number of pseudo-particles change with every refinement. Every cell in the particle mesh represents a pseudo-particle in the satellite point method.
Expand Down
3 changes: 0 additions & 3 deletions include/fem-dem/parameters_cfd_dem.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@ namespace Parameters
VoidFractionMode mode;
Functions::ParsedFunction<dim> void_fraction;
bool read_dem;
bool bound_void_fraction;
std::string dem_file_name;
double l2_smoothing_factor;
double l2_lower_bound;
double l2_upper_bound;
unsigned int particle_refinement_factor;
double qcm_sphere_diameter;
bool qcm_sphere_equal_cell_volume;
Expand Down
16 changes: 0 additions & 16 deletions source/fem-dem/parameters_cfd_dem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ namespace Parameters
"false",
Patterns::Bool(),
"Define particles using a DEM simulation results file.");
prm.declare_entry(
"bound void fraction",
"false",
Patterns::Bool(),
"Boolean for the bounding of the void fraction using an active set method.");
prm.declare_entry("dem file name",
"dem",
Patterns::FileName(),
Expand All @@ -35,14 +30,6 @@ namespace Parameters
"0.000001",
Patterns::Double(),
"The smoothing factor for void fraction L2 projection");
prm.declare_entry("l2 lower bound",
"0.36",
Patterns::Double(),
"The lower bound for void fraction L2 projection");
prm.declare_entry("l2 upper bound",
"1",
Patterns::Double(),
"The upper bound for void fraction L2 projection");
prm.declare_entry(
"particle refinement factor",
"0",
Expand Down Expand Up @@ -82,11 +69,8 @@ namespace Parameters
prm.leave_subsection();

read_dem = prm.get_bool("read dem");
bound_void_fraction = prm.get_bool("bound void fraction");
dem_file_name = prm.get("dem file name");
l2_smoothing_factor = prm.get_double("l2 smoothing factor");
l2_lower_bound = prm.get_double("l2 lower bound");
l2_upper_bound = prm.get_double("l2 upper bound");
particle_refinement_factor = prm.get_integer("particle refinement factor");
qcm_sphere_diameter = prm.get_double("qcm sphere diameter");
qcm_sphere_equal_cell_volume = prm.get_bool("qcm sphere equal cell volume");
Expand Down

0 comments on commit 2ea7c62

Please sign in to comment.