Skip to content

Commit

Permalink
more flow solver details and numerical considerations
Browse files Browse the repository at this point in the history
  • Loading branch information
tlroy committed May 15, 2024
1 parent 7d57a66 commit 2830dd6
Showing 1 changed file with 45 additions and 15 deletions.
60 changes: 45 additions & 15 deletions docs/source/user_guide/fluid_solver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,28 @@ The nondimensional version is
- \frac{1}{\mathrm{Re}}\nabla^2 \mathbf u + \mathbf u \cdot \nabla \mathbf u + \nabla p = 0,
where all quantities have been nondimensionalized, and :math:`\mathrm{Re}` is the Reynolds number. In both cases, we also have the incompressibility condition
where all quantities have been nondimensionalized, and :math:`\mathrm{Re}=
\frac{\bar {\mathbf u} L}{\nu}` is the Reynolds number, where :math:`L` is the
characteristic length.

In both cases, we also have the incompressibility condition

.. math::
\nabla \cdot \mathbf{u} = 0.
Physical parameters are passed as a
:py:class:`dict` in the ``fluid_params`` argument.
Specifically, for the dimensional version, the user must pass the following keys:

For the dimensional version, the user must pass the following keys:
* ``"density"``: :math:`\rho`

* ``"density"``
* ``"dynamic viscosity"`` or ``"kinematic viscosity"``: :math:`\mu` and :math:`\nu`, respectively

* ``"dynamic viscosity"`` or ``"kinematic viscosity"``

To use the nondimensional version, the user must pass the following key:

* ``"Reynolds number"``
* ``"Reynolds number"``: :math:`\mathrm{Re}`

Navier-Stokes-Brinkman Solver
-----------------------------
Expand All @@ -61,33 +65,35 @@ The dimensional version of the momentum equation is
-\nabla\cdot\left(\nu_\mathrm{eff} \nabla\mathbf u \right)+ \mathbf u \cdot \nabla \mathbf u + \frac{1}{\rho} \nabla p + \nu K^{-1} \mathbf u = 0,
where :math:`\nu_\mathrm{eff}` is the effective viscosity in the porous medium,
and :math:`K`, its permeability. The inverse permeability can be provided
directly in cases where it is zero in some regions, i.e. liquid-only regions.
It is common to take :math:`\nu_\mathrm{eff}=\nu` for simplicity (the default
here).
and :math:`K`, its permeability. It is also common to use the effective dynamic
viscosity :math:`\mu_\mathrm{eff} = \nu_\mathrm{eff} \rho`

The inverse permeability :math:`K^{-1}` can be provided directly in cases where
it is zero in some regions, i.e. liquid-only regions. It is common to take
:math:`\nu_\mathrm{eff}=\nu` for simplicity (the default here).

The nondimensional implementation currently assume :math:`\nu_\mathrm{eff}=\nu`
and :math:`K>0`, such that
and :math:`K^{-1}>0`, such that


.. math::
- \frac{1}{\mathrm{Re}}\nabla^2 \mathbf u + \mathbf u \cdot \nabla \mathbf u + \nabla p + \frac{1}{\mathrm{Re}\mathrm{Da}} \mathbf u = 0,
where all quantities have been nondimensionalized and :math:`\mathrm{Da}` is the Darcy number.
where all quantities have been nondimensionalized and
:math:`\mathrm{Da}=\frac{K}{L^2}` is the Darcy number.

In addition to the parameters provided for Navier-Stokes, the physical
parameters below must be provided.

For the dimensional version, the user must also pass the following keys:

* ``"permeability"`` or ``"inverse permeability"``
* ``"permeability"`` or ``"inverse permeability"``: :math:`K` and :math:`K^{-1}`, respectively

* Optional: ``"effective kinematic viscosity"`` or ``"effective dynamic viscosity"``
* Optional: ``"effective kinematic viscosity"`` or ``"effective dynamic viscosity"``: :math:`\nu_\mathrm{eff}` and :math:`\mu_\mathrm{eff}`, respectively

To use the nondimensional version, the user must also pass the following key:

* ``"Darcy number"``
* ``"Darcy number"``: :math:`\mathrm{Da}`

Boundary conditions
-------------------
Expand All @@ -110,3 +116,27 @@ keys.

* ``"outlet pressure"``: Sets outlet pressure, :math:`p = p_\mathrm{out}`,
which is passed in ``fluid_params`` as ``"outlet pressure"``.

Numerical considerations
------------------------

The discretization is done using Taylor-Hood elements (piecewise linear
pressure, piecewise quadratic velocity), which satisfy the inf-sup condition.

To achieve convergence other than at low a Reynolds number, it may be required
to do continuation on the parameter so that Newton's method has better initial
guesses. This can be done for example, by passing the Reynolds number as a
:class:`firedrake.constant.Constant`, and assigning a larger value after each
solve.

The highest Reynolds number that can be provided is dictated by the validity of
the steady-sate assumption. Indeed, as the Reynolds number increases, steady
flow becomes unstable. The critical Reynolds number at which transient effects
occur is problem dependent, typically somewhere within
:math:`10^2<\mathrm{Re}<10^4`.

For the Darcy number, using a very small value (:math:`\mathrm{Da}\sim
10^{-6}`) can be used to simulate a nearly impermeable wall, which is commonly
done in topology optimization. For smaller values, convergence issues can
arise. Reversly, as :math:`\mathrm{Da}\to\infty`, we simply recover
Navier-Stokes.

0 comments on commit 2830dd6

Please sign in to comment.