Skip to content

Commit

Permalink
Update and proofread bubble examples (#1380)
Browse files Browse the repository at this point in the history
Description
Update rising and static bubble examples.
  • Loading branch information
hepap authored Nov 21, 2024
1 parent 56975c3 commit add8558
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ sufficiently smooth, as explained in the :doc:`../static-bubble/static-bubble` e
Physical Properties
~~~~~~~~~~~~~~~~~~~~

We define two fluids here simply by setting the number of fluids to be :math:`2`.
In ``subsection fluid 0``, we set the density and the kinematic viscosity for the phase associated with a VOF indicator of :math:`0`.
A similar procedure is done for the phase associated with a VOF indicator of :math:`1` in ``subsection fluid 1``. Then a ``fluid-fluid`` type of ``material interaction`` is added to specify the ``surface tension model``. In this case, it is set to ``constant`` with the ``surface tension coefficient`` :math:`\sigma` set to :math:`24.5`.
Expand Down Expand Up @@ -190,7 +191,7 @@ Mesh
~~~~

We start off with a rectangular mesh that spans the domain defined by the corner points situated at the origin and at point
:math:`[1,2]`. The first :math:`1,2` couple defines that number of initial grid subdivisions along the length and height of the rectangle.
:math:`(1,2)`. The first :math:`1,2` couple defines that number of initial grid subdivisions along the length and height of the rectangle.
This makes our initial mesh composed of perfect squares. We proceed then to redefine the mesh globally six times by setting
``set initial refinement = 6``.

Expand Down Expand Up @@ -282,12 +283,12 @@ contains the simulation results. The results for the barycenter position and vel
.. image:: images/ymean-t.png
:alt: ymean_t
:align: center
:width: 500
:width: 600

.. image:: images/bubble-rise-velocity.png
:alt: bubble_rise_velocity
:align: center
:width: 500
:width: 600

Animation of the rising bubble example:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 7 additions & 8 deletions doc/source/examples/multiphysics/static-bubble/static-bubble.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ Time integration is handled by a 1st order backward differentiation scheme (BDF1
Multiphysics
~~~~~~~~~~~~

The ``multiphysics`` subsection enables to turn on `(true)`
and off `(false)` the physics of interest. Here ``VOF`` is chosen. The ``surface tension force`` are enabled in the VOF subsection.
The ``multiphysics`` subsection enables to turn on (``true``) and off (``false``) the physics of interest. Here ``VOF`` is chosen. The ``surface tension force`` are enabled in the VOF subsection.


.. code-block:: text
Expand All @@ -103,8 +102,8 @@ The computational domain is defined by a square with opposite corners located at
Initial Conditions
~~~~~~~~~~~~~~~~~~

In the ``initial conditions`` subsection, the initial velocity and initial position of the droplet are defined. The droplet is initially
defined as a circle with a radius :math:`R= 0.5` in the center of the defined computational domain at :math:`(x,y)=(0.0, 0.0)`. We enable the use of a projection step with diffusion in the subsection ``projection step`` to ensure that the initial phase distribution is sufficiently smooth and avoid a staircase representation of the interface. This projection step is implemented in the same way as described in section :ref:`Normal and curvature computations`. We refer to the parameter guide :doc:`../../../../parameters/cfd/initial_conditions` for more details.
In the ``initial conditions`` subsection, the initial velocity and initial position of the droplet are imposed. The droplet is initially
defined as a circle with a radius :math:`R= 0.5` in the center of the computational domain :math:`(x,y)=(0.0, 0.0)`. We enable the use of a projection step with diffusion in the subsection ``projection step`` to ensure that the initial phase distribution is sufficiently smooth and avoid a staircase representation of the interface. This projection step is implemented in the same way as described in section :ref:`Normal and curvature computations`. We refer the reader to the parameter guide :doc:`../../../../parameters/cfd/initial_conditions` for more details.

.. code-block:: text
Expand Down Expand Up @@ -141,7 +140,7 @@ The surface tension force computation is enabled in the ``VOF`` subsection. The
.. tip::

The phase fraction gradient filter value (:math:`\eta_n = \alpha h^2`) and curvature filter value (:math:`\eta_\kappa = \beta h^2`) must be small values larger than 0. We recommend the following procedure to choose a proper value for these parameters:
The phase fraction gradient filter value :math:`\left(\eta_n = \alpha h^2\right)` and curvature filter value :math:`\left(\eta_\kappa = \beta h^2\right)` must be small values larger than 0. We recommend the following procedure to choose a proper value for these parameters:

1. Enable ``output auxiliary fields`` to write filtered phase fraction gradient and filtered curvature fields.
2. Choose a value close to 1, for example, the default values :math:`\alpha = 4` and :math:`\beta = 1`.
Expand All @@ -152,7 +151,7 @@ The surface tension force computation is enabled in the ``VOF`` subsection. The
Physical Properties
~~~~~~~~~~~~~~~~~~~

The ``density`` and the ``kinematic viscosity`` of the two fluids involved in this example are set in the subsection ``physical properties``. To neglect buoyancy, the density of both fluids is set to :math:`10.0`. And, the kinematic viscosity is set to :math:`0.1` in both cases. Finally, a ``fluid-fluid`` type of material interaction is added to specify the ``surface tension model``. In this case, it is set to ``constant`` with the ``surface tension coefficient`` :math:`\sigma` set to :math:`1.0`.
The ``density`` and the ``kinematic viscosity`` of the two fluids involved in this example are set in the subsection ``physical properties``. To neglect buoyancy, the density of both fluids is set to :math:`10.0`. The kinematic viscosity is set to :math:`0.1` for both fluids. Finally, a ``fluid-fluid`` type of material interaction is added to specify the ``surface tension model``. In this case, it is set to ``constant`` with the ``surface tension coefficient`` :math:`\sigma` set to :math:`1.0`.

.. code-block:: text
Expand Down Expand Up @@ -182,7 +181,7 @@ The ``density`` and the ``kinematic viscosity`` of the two fluids involved in th
Analytical Solution
~~~~~~~~~~~~~~~~~~~

As presented in the section :ref:`Surface tension force`, the analytical solution for this case is zero for the velocity and the pressure drop is given by :math:`\Delta p = \sigma \kappa` whit :math:`\kappa = 1/R`. For :math:`\sigma = 1.0` and :math:`R=0.5`, we have :math:`\Delta p = 2.0`.
As presented in the section :ref:`Surface tension force`, the analytical solution for this case is zero for the velocity and the pressure drop is given by :math:`\Delta p = \sigma \kappa` with :math:`\kappa = 1/R`. For :math:`\sigma = 1.0` and :math:`R=0.5`, we have :math:`\Delta p = 2.0`.

When providing the analytical solution in the ``analytical solution`` subsection and setting the parameter ``enable`` to ``true``, we can monitor the :math:`\mathcal{L}^2` norm of the error on the velocity and pressure fields. They are outputted in the file specified in the parameter ``filename``.

Expand Down Expand Up @@ -244,7 +243,7 @@ Mesh Convergence Study

While the filters presented in section :ref:`Normal and curvature computations` allow to decrease the magnitude of the parasitic currents, it can be seen from the previous results that they don't completely disappear. It is, therefore, interesting to see if they vanish with a mesh refinement by performing a space convergence study on their magnitude.

Four levels of refinement are studied (6 to 9) by changing the parameter ``initial refinement`` in the ``mesh`` subsection. The :math:`\mathcal{L}^2` norm of the error on the velocity at 3 seconds is selected as the verification metric. The following figure shows that the scheme reaches nearly an order of accuracy of 2 in space.
Four levels of refinement are studied (6 to 9) by changing the parameter ``initial refinement`` in the ``mesh`` subsection. The :math:`\mathcal{L}^2` norm of the error on the velocity at 6 seconds is selected as the verification metric. The following figure shows that the scheme reaches an order of accuracy of 1 in space, which is expected due to the irregularity of the solution.

.. image:: images/mesh-convergence-study-order.png

Expand Down
8 changes: 8 additions & 0 deletions examples/multiphysics/static-bubble/static-bubble.prm
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ subsection analytical solution
end
end

#---------------------------------------------------
# Stabilization
#---------------------------------------------------

subsection stabilization
set vof dcdd stabilization = false
end

#---------------------------------------------------
# FEM
#---------------------------------------------------
Expand Down

0 comments on commit add8558

Please sign in to comment.