~fluidity-core/fluidity/excise-fldecomp

« back to all changes in this revision

Viewing changes to manual/configuring_fluidity.tex

  • Committer: Mark Filipiak
  • Date: 2012-08-13 11:42:30 UTC
  • mfrom: (4003.1.23 dev-trunk)
  • Revision ID: mjf@staffmail.ed.ac.uk-20120813114230-wzoyf2gi4p4oxeh4
Merge in of the latest trunk.  To try to cure non-flredecomp tests that are passing at EPCC but failing in buildbot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
719
719
 
720
720
When configuring ocean problems (or single material/single phase fluids
721
721
problems), only one \option{/material\_phase} is required.  Multi-material
722
 
and multi-phase problems will require one \option{/material\_phase} for each
 
722
and multiphase problems will require one \option{/material\_phase} for each
723
723
phase or material in the problem.
724
724
 
725
725
Note that you must give each of your material phases a name.
1184
1184
\index{conjugate gradient}
1185
1185
\index{multigrid}
1186
1186
\index{PETSc}
1187
 
As described in Section \ref{ND_Linear_solvers}, for the solution of large sparse linear systems, the so called iterative methods are usually employed. These methods avoid having to explicitly construct the inverse of the matrix, which is generally dense and therefore costly to compute (both in memory and computer time). FLUIDITY is linked to PETSc: a suite of data structures and routines for the scalable (parallel) solution of scientific applications modelled by partial differential equations.  It employs the MPI standard for parallelism. FLUIDITY therefore supports any iterative method provided by the PETSc library (http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-dev/docs/manualpages/KSP/KSPType.html --- available methods may depend on the PETSc library installed on your system). Examples include Conjugate Gradient (CG), GMRES and FGMRES (Flexible GMRES). Some options are explicitly listed under \option{solver/iterative\_method}, for example CG: \option{solver/iterative\_method::cg}, whereas others can be selected entering the name of the chosen scheme in \option{solver/iterative\_method}.
 
1187
As described in Section \ref{ND_Linear_solvers}, for the solution of large sparse linear systems, the so called iterative methods are usually employed. These methods avoid having to explicitly construct the inverse of the matrix, which is generally dense and therefore costly to compute (both in memory and computer time). FLUIDITY is linked to PETSc: a suite of data structures and routines for the scalable (parallel) solution of scientific applications modelled by partial differential equations.  It employs the MPI standard for parallelism. FLUIDITY therefore supports any iterative method provided by the PETSc library (http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-dev/docs/manualpages/KSP/KSPType.html --- available methods may depend on the PETSc library installed on your system). Examples include Conjugate Gradient (CG), GMRES and FGMRES (Flexible GMRES). Some options are explicitly listed under \option{solver/iterative\_method}, for example CG: \option{solver/iterative\_method::cg}, whereas 
 
1188
others can be selected entering the name of the chosen scheme in \option{solver/iterative\_method}.
1188
1189
 
1189
1190
\subsection{Preconditioner}
1190
1191
\index{linear solvers!preconditioners}
1266
1267
 
1267
1268
\subsubsection{Linear fluid EOS}
1268
1269
\index{equation of state!linear}
1269
 
The density is a linear function of temperature and salinity:
 
1270
The density is a linear function of temperature, salinity and any number of generic scalar fields:
1270
1271
\begin{equation}
1271
 
  \rho=\rho_0 \left(1-\alpha(T-T_0)+\beta (S-S_0)\right),
 
1272
  \rho=\rho_0 \left(1-\alpha(T-T_0)+\beta (S-S_0) - \gamma (F - F_0) \right),
1272
1273
\end{equation}
1273
 
where $\rho_0, \alpha, T_0, \beta$ and $S_0$ are set by the following 
 
1274
where $\rho_0, \alpha, T_0, \beta, S_0, \gamma$ and $F_0$ are set by the following 
1274
1275
options:
1275
1276
\begin{description}
1276
1277
\item \option{\ldots/linear/reference\_density} sets $\rho_0$
1278
1279
\item \option{\ldots/linear/temperature\_dependency/reference\_temperature} sets $T_0$
1279
1280
\item \option{\ldots/linear/salinity\_dependency/salinity\_contraction\_coefficient} sets $\beta$
1280
1281
\item \option{\ldots/linear/salinity\_dependency/reference\_salinity} sets $S_0$
 
1282
\item \option{\ldots/linear/generic\_scalar\_field\_dependency/expansion\_coefficient} sets $\gamma$
 
1283
\item \option{\ldots/linear/generic\_scalar\_field\_dependency/reference\_value} sets $T_0$
1281
1284
\end{description}
1282
1285
Note that for Boussinesq the reference density does not 
1283
1286
influence any of the terms in the 
1502
1505
q = (\kaptens\nabla c)\cdot\bmn,\quad \textrm{on}\quad \partial\Omega.
1503
1506
\end{equation*}
1504
1507
 
 
1508
\subsubsection{Robin}
 
1509
\index{boundary conditions!Robin}
 
1510
 
 
1511
A Robin boundary condition sets the diffusive flux term  $\vec{n}\cdot\tensor{\kappa}\cdot\grad c$ in weak form as:
 
1512
\begin{equation*}
 
1513
- \int_{\partial\Omega} \phi~\vec{n}\cdot\tensor{\kappa}\cdot\grad c =
 
1514
    \int_{\partial\Omega} \phi~h(c-c_{a}),
 
1515
\end{equation*}
 
1516
where $\phi$ is a test function (see section \ref{chap:numerical_discretisation}).
 
1517
The Robin condition is specified by assigning a value to the order zero $C_{0}$ and order one $C_{1}$ coefficient fields, where
 
1518
\begin{align}
 
1519
   C_{0} &= hc_{a}, \\
 
1520
   C_{1} &= h.
 
1521
\end{align}
 
1522
Currently, the Robin boundary condition is only available for Continuous Galerkin and Control Volume 
 
1523
spatial discretisations of a scalar field. 
 
1524
 
1505
1525
\subsubsection{Bulk formulae}\label{sec:bulk_formulae}
1506
1526
 
1507
1527
These boundary conditions can be used on:
2294
2314
Models with one prognostic velocity field per \option{material\_phase} are referred to as multiple phase models. The use of these multiple velocity fields permits the inter-penetration and interaction between different phases.
2295
2315
 
2296
2316
\subsubsection{Simulation requirements}
2297
 
In a multi-phase simulation, each \option{material\_phase} requires:
 
2317
In a multiphase simulation, each \option{material\_phase} requires:
2298
2318
\begin{itemize}
2299
2319
 \item an equation of state, and
2300
2320
 \item a PhaseVolumeFraction scalar field.
2309
2329
\alpha_N = 1 - \sum_{i=1}^{N-1}\alpha_i\textrm{.}
2310
2330
\end{equation}
2311
2331
 
2312
 
\subsubsection{Inter-phase interactions}
2313
 
Inter-phase interactions can be included under \option{../multiphase\_properties} in Diamond. Currently, \fluidity\ only supports fluid-particle drag between the continuous phase and dispersed phase(s), given by:
2314
 
\begin{equation}\label{eq:multiphase_drag_term}
 
2332
\subsubsection{Inter-phase momentum interaction}
 
2333
Currently, \fluidity\ only supports fluid-particle drag between the continuous phase and dispersed phase(s). This can be enabled by switching on the \option{/multiphase\_interaction/fluid\_particle\_drag} option in Diamond and specifying the drag correlation: Stokes, \cite{wen_yu_1966} or \cite{ergun1952}.
 
2334
 
 
2335
The drag force using the Stokes drag correlation is given by:
 
2336
\begin{equation}\label{eq:stokes_drag_force}
2315
2337
\mathbf{F}_D = \frac{3\ \alpha_p\ C_D\ \alpha_f\ \rho_f\ |\mathbf{u}_f-\mathbf{u}_p|\ (\mathbf{u}_f-\mathbf{u}_p)}{4\ d},
2316
2338
\end{equation}
2317
2339
where $f$ and $p$ denote the fluid (i.e. continuous) and particle (i.e. dispersed) phases respectively, and $d$ is the diameter of a single particle in the dispersed phase. The drag coefficient $C_D$ is defined as:
2318
 
\begin{equation}\label{eq:drag_coefficient}
 
2340
\begin{equation}\label{eq:stokes_drag_coefficient}
2319
2341
C_D = \frac{24}{\mathrm{Re}},
2320
2342
\end{equation}
2321
2343
with
2324
2346
\end{equation}
2325
2347
Note that $\mu_f$ denotes the isotropic viscosity of the fluid (i.e. continuous) phase.
2326
2348
 
2327
 
Within a dispersed phase, entering a value for $d$ in the \option{../multiphase\_properties/particle\_diameter} option enables fluid-particle interaction between itself and the continuous phase.
 
2349
With the drag correlation by \cite{wen_yu_1966}, $\mathbf{F}_D$ and $C_D$ become:
 
2350
\begin{equation}\label{eq:wen_yu_drag_force}
 
2351
\mathbf{F}_D = \frac{3\ \alpha_p\ C_D\ \alpha_f\ \rho_f\ |\mathbf{u}_f-\mathbf{u}_p|\ (\mathbf{u}_f-\mathbf{u}_p)}{4\ d\alpha_f^{2.7}},
 
2352
\end{equation}
 
2353
\begin{equation}\label{eq:wen_yu_drag_coefficient}
 
2354
C_D = \frac{24}{\mathrm{Re}}\left(1.0 + 0.15\mathrm{Re}^{0.687}\right).
 
2355
\end{equation}
 
2356
In contrast to the Stokes drag correlation, the \cite{wen_yu_1966} drag correlation is more suitable for larger particle Reynolds number flows. 
 
2357
 
 
2358
For dense multiphase flows with $\alpha_p > 0.2$, the drag correlation by \cite{ergun1952} is often the most appropriate:
 
2359
\begin{equation}\label{eq:ergun_drag_force}
 
2360
\mathbf{F}_D = \left(150\frac{\alpha_p^2\mu_f}{\alpha_f d_p^2} + 1.75\frac{\alpha_p\rho_f|\mathbf{u}_f-\mathbf{u}_p|}{d_p}\right)\left(\mathbf{u}_f-\mathbf{u}_p\right).
 
2361
\end{equation}
 
2362
 
 
2363
Note that within each dispersed phase, a value for $d$ must be specified in \option{../multiphase\_properties/particle\_diameter} regardless of which drag correlation is used.
 
2364
 
 
2365
\subsubsection{Inter-phase energy interaction}
 
2366
This subsection considers compressible multiphase flow simulations where each phase has its own InternalEnergy field. Users can choose to include the inter-phase heat transfer term by \cite{gunn1978}, denoted $Q$ in Section \ref{sec:multiphase_equations}, on the RHS of each internal energy equation:
 
2367
 
 
2368
\begin{equation}\label{eq:gunn_heat_transfer_term}
 
2369
Q = \frac{6 k \alpha_p \mathrm{Nu}_p}{d_p^2}\left(\frac{e_f}{C_f} - \frac{e_p}{C_p}\right),
 
2370
\end{equation}
 
2371
where 
 
2372
\begin{equation}
 
2373
\mathrm{Nu}_p = \left(7 - 10\alpha_f + 5\alpha_f^2\right)\left(1 + 0.7\mathrm{Re}_p^{0.2}\mathrm{Pr}^{\frac{1}{3}}\right) + \left(1.33 - 2.4\alpha_f + 1.2\alpha_f^2\right)\mathrm{Re}_p^{0.7}\mathrm{Pr}^{\frac{1}{3}},
 
2374
\end{equation}
 
2375
\begin{equation}
 
2376
 \mathrm{Pr} = \frac{C_f \gamma \mu_f}{k},
 
2377
\end{equation}
 
2378
and
 
2379
\begin{equation}
 
2380
 \mathrm{Re} = \frac{\rho_f d_p |\mathbf{u}_f-\mathbf{u}_p|}{\mu_f},
 
2381
\end{equation}
 
2382
are the Nusselt, Prandtl and Reynolds number respectively. $C_i$ denotes the specific heat of phase i at constant volume, and $k$ denotes the effective conductivity of the fluid phase; these must be specified in \option{../multiphase\_properties/effective\_conductivity} and \option{../multiphase\_properties/specific\_heat}. Note that we have written the above in terms of internal energy (rather than temperature) by dividing $e_i$ by the specific heat at constant volume.
 
2383
 
 
2384
To include this term, switch on the \option{/multiphase\_interaction/heat\_transfer} option in Diamond.
2328
2385
 
2329
2386
\subsubsection{Current limitations}
2330
2387
\begin{itemize}
2331
 
 \item Boussinesq and fully compressible multi-phase simulations are not yet supported.
 
2388
 \item Boussinesq multiphase simulations are not yet supported.
2332
2389
 \item The momentum equation for each \option{material\_phase} can only be discretised in non-conservative form.
2333
2390
 \item The stress term must be in tensor form, and only works with an isotropic viscosity.
2334
 
 \item \option{bassi\_rebay} and \option{compact\_discontinuous\_galerkin} are currently the only DG viscosity schemes available for multi-phase flow simulations.
 
2391
 \item \option{bassi\_rebay} and \option{compact\_discontinuous\_galerkin} are currently the only DG viscosity schemes available for multiphase flow simulations.
2335
2392
 \item Discontinuous \option{PhaseVolumeFraction} fields are not yet supported.
2336
 
 \item The Pressure field only supports \option{continuous\_galerkin} and \option{control\_volume} discretisations.
2337
 
 \item Prescribed velocity fields cannot yet be used in multi-phase simulations.
 
2393
 \item For compressible multiphase flow simulations, the Pressure field only supports a \option{continuous\_galerkin} discretisation.
 
2394
 \item Prescribed velocity fields cannot yet be used in multiphase simulations.
2338
2395
 \item Fluid-particle drag can currently only support one continuous (i.e. fluid) phase.
2339
2396
\end{itemize}
2340
2397
 
2377
2434
 
2378
2435
This section describes how to configure \fluidity to simulate single phase incompressible Darcy flow.
2379
2436
 
2380
 
First, the \option{Porosity} and \option{Permeability} fields found under the option element \option{/porous\_media} require configuring. Both fields can be either \option{prescribed} or \option{diagnostic}. The \option{Permeability} field can be either a \option{scalar\_field} or a \option{vector\_field}. The \option{Porosity} field will only be used in the transport of scalar fields and the metric tensor. The \option{Permeability} field will only be used in forming the absorption coefficient in the Darcy velocity equation. The use of these two fields should be considered when selecting their associated mesh. If \option{Porosity} is to be included in the transport of scalar fields (and the metric tensor) that are discretised using control volumes, due to the way this method is coded, the mesh associated with the \option{Porosity} must be either element wise (meaning discontinuous order zero) or the same order as field to be transported. It is therefore recommended that the \option{Porosity} field always be associated with a mesh that is discontinuous order zero. It is recommended that the \option{Permeability} field also be associated with a mesh that is discontinuous order zero, due to the recommended Darcy velocity - pressure element pair (being p0p1cv or p0p1 with the continuity tested with the p1 control volume dual space)
 
2437
First, the \option{Porosity} and \option{Permeability} fields found under the option element \option{/porous\_media} require configuring. Both fields can be either \option{prescribed} or \option{diagnostic}. The \option{Permeability} field can be either a \option{scalar\_field} or a \option{vector\_field}. The \option{Porosity} field will only be used in the transport of scalar fields and the metric tensor. The \option{Permeability} field will only be used in forming the absorption coefficient in the Darcy velocity equation. The use of these two fields should be considered when selecting their associated mesh. If \option{Porosity} is to be included in the transport of scalar fields (and the metric tensor) that are discretised using control volumes, due to the way this method is coded, the mesh associated with the \option{Porosity} must be either element wise (meaning discontinuous order zero) or the same order as field to be transported. It is therefore recommended that the \option{Porosity} field always be 
 
2438
associated with a mesh that is discontinuous order zero. It is recommended that the \option{Permeability} field also be associated with a mesh that is discontinuous order zero, due to the recommended Darcy velocity - pressure element pair (being p0p1cv or p0p1 with the continuity tested with the p1 control volume dual space)
2381
2439
 
2382
2440
Second, the prognostic \option{Velocity} vector field of the (only) phase is now taken to be the Darcy velocity \ref{sec:porous_media_darcy_flow_equations}. There is no option to select Darcy flow but this can be achieved via a careful selection of the \option{Velocity} field options tree given by:
2383
2441
\begin{itemize}