From 2830dd6c0914a217d7e862cf64350256545e3fd1 Mon Sep 17 00:00:00 2001 From: Thomas Roy Date: Wed, 15 May 2024 12:13:58 -0700 Subject: [PATCH] more flow solver details and numerical considerations --- docs/source/user_guide/fluid_solver.rst | 60 ++++++++++++++++++------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/docs/source/user_guide/fluid_solver.rst b/docs/source/user_guide/fluid_solver.rst index 0ffa150..60fead5 100644 --- a/docs/source/user_guide/fluid_solver.rst +++ b/docs/source/user_guide/fluid_solver.rst @@ -28,7 +28,11 @@ 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:: @@ -36,16 +40,16 @@ where all quantities have been nondimensionalized, and :math:`\mathrm{Re}` is th 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 ----------------------------- @@ -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 ------------------- @@ -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.