ViewVC logotype

Annotation of /trunk/doc/user/levelsetmodel.tex

Parent Directory Parent Directory | Revision Log Revision Log

Revision 2148 - (hide annotations)
Wed Dec 10 04:57:35 2008 UTC (13 years, 8 months ago) by lgraham
File MIME type: application/x-tex
File size: 6526 byte(s)
Updated the LevelSet class section in the Models chapter. The section is contained in a .tex file at the moment to avoid conflict.

1 lgraham 2148 \section{Level Set Method}
2 lgraham 2138
3 lgraham 2148 The Level Set Method is used for tracking interfaces between two different types of fluids, which may have different physical parameter values for density or viscosity. The interface is represented by a signed distance function, $\phi(x)$, where the isocontour at $\phi(x)=0$ is used to defined the interface. A point in the domain can then be determined on which side of the interface it resides, based on the local sign of $\phi(x)$; for example positive $\phi(x)$ on one side of the interface and negative $\phi(x)$ on the other. Parameters values such as density and viscosity can then be defined for the two different mediums. The Level Set Method consists of two procedures, the advection and reinitialization of the signed distance function, $\phi$. The LevelSet class can be used in conjunction with the StokesProblemCartesian class for solving computational fluid dynamics problems involving the tracking of the interface. The advantage of the Level Set Method is that it can be used to track surfaces that break apart or intersect. Also, the Level Set Method avoids the need for remeshing, which is required by the Lagrangian-Eulerian (ALE) method. An example of using the Level Set Method is described in the tutorial Chapter, Section \ref{LEVELSET CHAP}.
5 lgraham 2138 \subsection{Solution Method}
7 lgraham 2148 The displacement of the interface at the zero isocontour of $\phi(x)$ is calculated each time-step by using the velocity field. This is achieved my solving the advection equation:
8     %
9     \begin{equation}
10     \frac{\partial \phi}{\partial t} + \vec{v} \cdot \nabla \phi = 0,
11     \label{ADVECTION MODELS}
12     \end{equation}
13     %
14     where $\vec{v}$ is the velocity field. The advection equation is solved using a Taylor-Galerkin scheme with the presence of diffusion; by expanding $\phi$ into a Taylor series:
15     %
16     \begin{equation}
17     \phi^{+} \simeq \phi^{-} + dt\frac{\partial \phi^{-}}{\partial t} + \frac{dt^2}{2}\frac{\partial^{2}\phi^{-}}{\partial t^{2}},
19     \end{equation}
20     %
21     then by inserting
22     %
23     \begin{equation}
24     \frac{\partial \phi^{-}}{\partial t} = - \vec{v} \cdot \nabla \phi^{-},
26     \end{equation}
27     %
28     and
29     %
30     \begin{equation}
31     \frac{\partial^{2} \phi^{-}}{\partial t^{2}} = \frac{\partial}{\partial t}(-\vec{v} \cdot \nabla \phi^{-}) = \vec{v}\cdot \nabla (\vec{v}\cdot \nabla \phi^{-}),
32     \label{SECOND ORDER MODELS}
33     \end{equation}
34     %
35     into Equation (\ref{TAYLOR EXPANSION MODELS}), the calculation of the level set function is given by:
36     %
37     \begin{equation}
38     \phi^{+} = \phi^{-} - dt\vec{v}\cdot \nabla \phi^{-} + \frac{dt^2}{2}\vec{v}\cdot \nabla (\vec{v}\cdot \nabla \phi^{-}).
40     \end{equation}
42     If $\nabla \cdot \vec{v}=0$ is assumed, then the calculation of the second order derivatives in Equation (\ref{TAYLOR GALERKIN MODELS}) can be avoided.
44     As the computation of the distance function progresses, it becomes distorted, and so it needs to be updated in order to stay regular \cite{SUSSMAN1994}. This process is known as the reinitialization procedure. The aim is to iteratively find a solution to the reinitialization equation:
45     %
46     \begin{equation}
47     \frac{\partial \psi}{\partial \tau} + sign(\phi)(1 - \nabla \psi) = 0.
49     \end{equation}
50     %
51     where $\psi$ shares the same level set with $\phi$, $\tau$ is pseudo time, and $sign(\phi)$ is the smoothed sign function. This equation is solved to meet the definition of the level set function, $\lvert \nabla \psi \rvert = 1$; the normalization condition. Equation (\ref{REINITIALISATION MODELS}) can be rewritten in a similar form to the advection equation:
52     %
53     \begin{equation}
54     \frac{\partial \psi}{\partial \tau} + \vec{w} \cdot \nabla \psi = sign(\phi),
56     \end{equation}
57     %
58     where
59     %
60     \begin{equation}
61     \vec{w} = sign(\phi)\frac{\nabla \psi}{|\nabla \psi|}.
63     \end{equation}
64     %
65     $\vec{w}$ is the characteristic velocity pointing outward from the free surface. Equation (\ref{REINITIALISATION2 MODELS}) can be solved by a similar technique to what was used in the advection step, using the Taylor-Galerkin procedure.
66     When the distance function, $\phi$, is calculated, the physical parameters, density and viscosity, are updated using the sign of $\phi$. The region along the interface is assumed to be of finite thickness of $\alpha h$, where $h$ is the size of the elements in the computational mesh and $\alpha$ is a smoothing parameter. The parameters are updated by the following expression:
67     %
68     \begin{equation}
69     P =
70     \left \{ \begin{array}{l}
71     P\hackscore{1} \hspace{5cm} where \ \ \psi < - \alpha h \\
72     P\hackscore{2} \hspace{5cm} where \ \ \psi > \alpha h \\
73     (P\hackscore{2} - P\hackscore{1}) \psi/2\alpha h + (P\hackscore{1} + P\hackscore{2})/2 \ \ \ \ \ \ where \ \ |\psi| < \alpha h.
74     \end{array}
75     \right.
77     \end{equation}
78     %
79     where the subscripts $1$ and $2$ denote the different fluids.
82 lgraham 2138 \subsection{Functions}
84     \begin{classdesc}{LevelSet}{domain, func, reinit\_max, reinit\_each, tolerance, smooth}
85 lgraham 2148 opens the LevelSet \index{Level Set} on the \Domain domain. \var{func} defines the initial Level Set function representing the interface between two fluids. \var{reinit\_max} sets the maximum number of iterations to satisfy the normal condition, $|\nabla \phi|=1$, during the reinitialization of the Level Set function. \var{reinit\_each} sets the frequency of reinitialization for a number of time-steps. \var{tolerance} sets the convergence tolerance to satisfy the normal condition during the reinitialization of the Level Set function. \var{smooth} sets the bandwidth of size 2$\alpha h$ along the interface to smooth the physical parameters of density and viscosity; $h$ is the size of the elements in the mesh and $\alpha$ is the smoothing parameter, usually set to 1.
86 lgraham 2138 \end{classdesc}
88     \begin{methoddesc}[LevelSet]{update\_parameter}{par1, par2}
89 lgraham 2148 updates the physical parameters using the sign of $\phi$. \var{par1} and \var{par2} are the physical parameter values for fluid1 and fluid2 respectively. Usually this method is called twice during each time-step to update the density and viscosity of the two fluids.
90 lgraham 2138 \end{methoddesc}
92     \begin{methoddesc}[LevelSet]{update\_phi}{vel, dt, t\_step}
93 lgraham 2148 updates the Level Set function. It performs the advection and reinitialization procedures. \var{vel} is the velocity field of the fluid domain, \var{dt} is the time-step size, and \var{t\_step} is the current time-step to determine when to reinitialize.
94 lgraham 2138 \end{methoddesc}

  ViewVC Help
Powered by ViewVC 1.1.26