409
409
switching on the option: \option{\ldots/at\_first\_timestep}
411
411
\subsubsection{Steady state}
412
It is possible to run fludity until it converges to a steady state; this is sometimes useful for initialising a problem. In order to do this, switch on \option{/timestepping/steady\_state} and set a tolerance.
412
It is possible to run \fluidity until it converges to a steady state; this is sometimes useful for initialising a problem. In order to do this, switch on \option{/timestepping/steady\_state} and set a tolerance.
414
414
\subsection{Physical parameters}
415
415
These options control global physical quantities.
901
901
\option{conservative\_advection} option is applicable to all discretisation
902
902
types. See chapter \ref{chap:numerical_discretisation} for details.
904
For each field, the spatial discretisations can be selcted using
904
For each field, the spatial discretisations can be selected using
905
905
\option{\ldots/prognostic/spatial\_discretisation}. Once selected a number
906
906
of other options will open underneath this option.
1123
1123
\index{conjugate gradient}
1124
1124
\index{multigrid}
1126
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 modeled 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}.
1126
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}.
1128
1128
\subsection{Preconditioner}
1129
1129
\index{linear solvers!preconditioners}
1419
1419
For control volume discretisations only this options prevents the field fluxing from the boundary.
1421
\subsubsection{Flux}
1422
\index{boundary conditions!flux}
1424
For control volume discretisations only, this option allows a given flux $h$ of field $c$ through the boundary. In other words, we have
1426
\frac{\partial c}{\partial t} = h
1421
1429
\subsubsection{Free surface}
1422
1430
\index{boundary conditions!free surface}
1423
1431
\index{free surface!boundary condition}
1486
1494
\item \option{\ldots/tidal/variable\_name\_amplitude},
1487
1495
\item \option{\ldots/tidal/variable\_name\_phase}
1489
respectively. Finally, the constituet should be selected from the list under:
1497
respectively. Finally, the constituent should be selected from the list under:
1490
1498
\begin{itemize}
1491
1499
\item \option{\ldots/tidal/name}.
1493
A separate tidal boundary consition needs to be set for each constituent.
1501
A separate tidal boundary condition needs to be set for each constituent.
1495
1503
\index{boundary conditions!NEMO data}
1496
1504
\option{\ldots/NEMO\_data} will set the field according to a specified NEMO
1903
1911
For each field present in the simulation there are up to two options that should be set. The first
1904
1912
is the interpolation method that should be used to transfer the values of a field from the old to the new mesh.
1905
Second, in order to form the error metic by which the mesh is adapted, the user must set which fields
1913
Second, in order to form the error metric by which the mesh is adapted, the user must set which fields
1906
1914
should form the error metric and how the error for that field should be calculated.
1908
1916
\subsubsection{Interpolation method} \label{sec:config_adapt_interp}
1910
1918
For each prognostic field in the current state, an interpolation type must be set. These can be set by selecting an
1911
1919
option \option{\ldots/prognostic/<interpolation type>} where \texttt{<interpolation type>} is one of:
1912
1920
\begin{itemize}
1913
\item Consistent interpolation - the default and quick inteprolation method, but is non-conservative and dissipative.
1921
\item Consistent interpolation - the default and quick interpolation method, but is non-conservative and dissipative.
1914
1922
\item Pseudo-consistent interpolation - not recommended at present.
1915
1923
\item Galerkin interpolation - Conservative and non-dissipative, but requires the construction of a supermesh \citep{farrell2009a,farrell2010a}
1916
1924
\item Grandy interpolation - Conservative, but highly diffusive. See \citet{grandy1999}.
1919
1927
For some fields, such as Pressure and Velocity other interpolation methods are available.
1921
For diagnostic and prescribed fields an inteprolation method is not required. However, if an output dump
1922
occurs immeadiately following a mesh adapt, diagnostic fields may not have correct values depending
1929
For diagnostic and prescribed fields an interpolation method is not required. However, if an output dump
1930
occurs immediately following a mesh adapt, diagnostic fields may not have correct values depending
1923
1931
on the method by which they are calculated. In these instances, it is worth setting an interpolation type
1924
1932
for these fields which will ensure that the values are set correctly before an output dump occurs.
1949
1957
The second step for configuring adaptivity is to set up the fields that are to form the error metric used
1950
1958
to adapt the mesh. For each field that should be considered when forming the metric the option
1951
\option{\ldots/adaptivity\_options} needs to be enabled. The error bound is set as seperate fields within
1959
\option{\ldots/adaptivity\_options} needs to be enabled. The error bound is set as separate fields within
1952
1960
state, so for Temperature, for example, the acceptable error is stored an a field called
1953
1961
TemperatureInterpolationErrorBound. There are two methods available for calculating the error, absolute and relative.
1954
1962
Both have similar options in which the InterpolationErrorBound field can be set as with any other prescribed field.
1958
1966
For relative interpolation error bounds a tolerance value also has to be set under \newline
1959
1967
\option{\ldots/adaptivity\_options/relative\_measure/tolerance}. This value prevents division by zero
1960
and should be set to a small enough number that the field can effecivtly be considered zero at this value.
1968
and should be set to a small enough number that the field can effectively be considered zero at this value.
1962
1970
\subsection{General adaptivity options}
1963
1971
\label{sect:configuring_fluidity_adaptivity_options}
1987
1995
\section{Multiple material/phase models} \label{sec:config_multimatph}
1989
This section contains advice on setting up simulations with multiple material\_phase options. This enables related fields to be grouped together into related materials or phases. For example a prognostic scalar field in one material\_phase will be advected using the Velocity from that material\_phase while a prognostic scalar field in another material\_phase will be advected according to the Velocity in its material\_phase.
1997
This section contains advice on setting up simulations with multiple material\_phase options. This enables related fields to be grouped together into related materials or phases. For example a prognostic scalar field in one material\_phase will be advected using the Velocity field from that material\_phase, while a prognostic scalar field in another material\_phase will be advected according to the Velocity field in its material\_phase.
1991
1999
We refer to two typical scenarios: a \emph{multiple material} model and a \emph{multiple phase} model. A multiple phase model is one in which the Velocity field in each material\_phase is in some way independent of the velocities in the other material\_phases. This means that scalar fields (for example phase volume fractions) in each material\_phase are advected independently. A multiple material model is one in which the Velocity field is shared between all material\_phases so that all scalar fields are advected similarly.
1993
\subsection{Multiple phase models}
1995
It is not currently possible to model problems with multiple prognostic velocity fields although the options system has been designed with this in mind for the future.
1997
2001
\subsection{Multiple material models}
1999
2003
Models with a single prognostic velocity field that is shared between material\_phases (using the \option{aliased} field type) are referred to as multiple material models. These are generally used to describe systems of nearly immiscible materials with different material properties contained within the same domain. This section focusses on this type of multiple material\_phase simulation.
2001
2005
In a multiple material simulation each material\_phase requires:
2002
2006
\begin{itemize}
2003
\item an equation of state
2004
\item a MaterialVolumeFraction scalar field
2007
\item an equation of state, and
2008
\item a MaterialVolumeFraction scalar field.
2007
2011
The equation of state provides the density properties of the material described in the current material\_phase. For incompressible simulations a linear equation of state is used, which only requires a reference density:\\
2050
2054
where $\tensor{\mu}$ is the bulk viscosity and $\tensor{\mu}^i$ is the individual material's viscosity. To use this it is necessary to activate a MaterialViscosity field in every material\_phase with a nonzero viscosity. Additionally the Viscosity field underneath the prognostic Velocity must be activated and set to the \option{bulk\_viscosity} diagnostic algorithm.
2056
\subsection{Multiple phase models}
2057
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.
2059
\subsubsection{Simulation requirements}
2060
In a multi-phase simulation, each \option{material\_phase} requires:
2062
\item an equation of state, and
2063
\item a PhaseVolumeFraction scalar field.
2066
As per multi-material simulations, the equation of state provides the density properties of the phase described in the current \option{material\_phase}. For incompressible simulations a linear equation of state is used, which only requires a reference density:\\
2067
\option{\ldots/equation\_of\_state/fluids/linear/reference\_density}\\
2070
For an $N$ phase problem, $N$ material\_phases are required and hence $N$ PhaseVolumeFractions, $\alpha_i, i = 1, \ldots, N$, and $N$ equations of state. Just as in multi-material simulations, only $N-1$ of the PhaseVolumeFraction fields, $\alpha_i, i = 1, \ldots, N-1$, need be prognostic. The final PhaseVolumeFraction field, $\alpha_N$, should always be set to \option{diagnostic}, as it can be recovered using the internal algorithm:
2072
\alpha_N = 1 - \sum_{i=1}^{N-1}\alpha_i\textrm{.}
2075
\subsubsection{Inter-phase interactions}
2076
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:
2077
\begin{equation}\label{eq:multiphase_drag_term}
2078
\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},
2080
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:
2081
\begin{equation}\label{eq:drag_coefficient}
2082
C_D = \frac{24}{\mathrm{Re}},
2085
\begin{equation}\label{eq:particle_reynolds_number}
2086
\mathrm{Re} = \frac{\alpha_f\ \rho_f\ d\ |\mathbf{u}_f-\mathbf{u}_p|}{\mu_f}.
2088
Note that $\mu_f$ denotes the isotropic viscosity of the fluid (i.e. continuous) phase.
2090
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.
2092
\subsubsection{Current limitations}
2094
\item Boussinesq and fully compressible multi-phase simulations are not yet supported.
2095
\item The momentum equation for each \option{material\_phase} can only be discretised in non-conservative form.
2096
\item The \option{bassi\_rebay} and \option{compact\_discontinuous\_galerkin} are currently the only DG viscosity schemes available for multi-phase flow simulations.
2097
\item Discontinuous \option{PhaseVolumeFraction} fields are not yet supported.
2098
\item The Pressure field only supports a continuous Galerkin discretisation.
2099
\item Prescribed velocity fields cannot yet be used in multi-phase simulations.
2100
\item Fluid-particle drag can currently only support one continuous (i.e. fluid) phase.
2053
2104
\section{Compressible fluid model}
2054
2105
\index{compressible fluid model}
2063
2114
\begin{itemize}
2064
2115
\item The value for the atmospheric pressure can be added by switching on \option{\ldots/atmospheric\_pressure}, otherwise a default of zero is used.
2065
2116
\item A Poisson pressure equation should not be used to calculate a first guess, therefore \\* \option{\ldots/scheme/poisson\_pressure\_solution} should be set to $never$.
2066
\item \option{\ldots/scheme/use\_compressible\_projection\_method} shuold be selected, so the calculated pressure satisfies the continuity equation and the EOS.
2117
\item \option{\ldots/scheme/use\_compressible\_projection\_method} should be selected, so the calculated pressure satisfies the continuity equation and the EOS.
2069
2120
\subsection{Density options}