~ubuntu-branches/ubuntu/raring/rheolef/raring-proposed

« back to all changes in this revision

Viewing changes to doc/pusrman/stokes.tex

  • Committer: Package Import Robot
  • Author(s): Pierre Saramito, Pierre Saramito, Sylvestre Ledru
  • Date: 2012-05-14 14:02:09 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120514140209-dzbdlidkotyflf9e
Tags: 6.1-1
[ Pierre Saramito ]
* New upstream release 6.1 (minor changes):
  - support arbitrarily polynomial order Pk
  - source code supports g++-4.7 (closes: #671996)

[ Sylvestre Ledru ]
* update of the watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
\subsection*{Comments}
99
99
  The spaces and boundary conditions and grouped
100
100
  in specific functions, defined in file \file{cavity.icc}.
101
 
  This file is suitable for a future reusage.
 
101
  This file is suitable for a future re-usage.
102
102
  Next, forms are defined as usual, in file \file{stokes\_cavity.cc}.
103
103
 
104
 
\cindex{algorithm!conjugate gradient}%
 
104
\cindex{method!conjugate gradient algorithm}%
105
105
\cindex{preconditioner}%
106
106
\cindex{preconditioner!for Stokes problem}%
107
107
  The problem admits the following matrix form:
142
142
     man solver_abtbc
143
143
  \end{verbatim}
144
144
\clindex{solver}%
145
 
  When $d=2$, it is interessant to turn to direct methods and factorize
 
145
  When $d=2$, it is interesting to turn to direct methods and factorize
146
146
  the whole matrix of the linear system. As the pressure is defined up to a constant,
147
147
\cindex{Lagrange!multiplier}%
148
148
  the whole matrix is singular. By adding a Lagrange multiplier that impose 
149
 
  a nul average pressure value, the system becomes regular and the modified
150
 
  matrix can be inverted. Such a technic has already been presented 
 
149
  a null average pressure value, the system becomes regular and the modified
 
150
  matrix can be inverted. Such a technique has already been presented 
151
151
  in section~\ref{sec-neumann-laplace} for the Neumann-Laplace problem.
152
 
  Finaly, he choice between iterative and direct algorithm for the Stokes solver is
 
152
  Finally, he choice between iterative and direct algorithm for the Stokes solver is
153
153
  automatically done, regarding the geometry dimension.
154
154
 
155
155
\subsection*{How to run the program}
172
172
  \begin{verbatim}
173
173
      make stokes_cavity
174
174
  \end{verbatim}
175
 
  and enter the comands:
 
175
  and enter the commands:
176
176
  \begin{verbatim}
177
177
    mkgeo_grid -t 10 > square.geo
178
178
    ./stokes_cavity square > square.field
301
301
and you observe a discontinuous piecewise linear representation
302
302
of the approximate vorticity.
303
303
\cindex{singular solution}%
304
 
Also, the vorticity presents two sharp peacks at the upper corners
305
 
of the driven cavity: the vorticity is unbounded and the peacks will
 
304
Also, the vorticity presents two sharp peaks at the upper corners
 
305
of the driven cavity: the vorticity is unbounded and the peaks will
306
306
increase with mesh refinements. This singularity of the solution
307
307
is due to the boundary condition for the first component of the
308
308
velocity $u_0$ that jumps from zero to one at the corners.
321
321
  \end{verbatim}
322
322
In the previous command, the \code{-proj} option has been
323
323
used: since the 3D render has no support for discontinuous 
324
 
picewise linear fields, the P1-discontinuous field is transformed into a
 
324
piecewise linear fields, the P1-discontinuous field is transformed into a
325
325
P1-continuous one, thanks to a $L^2$ projection.
326
326
P1
327
327
The following command shows the second component of the vorticity vector,
328
 
roughtly similar to the bidimensionnal case.
 
328
roughly similar to the bidimensional case.
329
329
  \begin{verbatim}
330
330
    ./vorticity < cube.field | field -comp 1 - 
331
331
    ./vorticity < cube.field | field -comp 1 -proj -
344
344
\[
345
345
   {\bf curl}\,{\bf curl}\,\bpsi = -\Delta\bpsi + \nabla({\rm div}\,\bpsi)
346
346
\]
347
 
we obtain the following caracterization of $\bpsi$~:
 
347
we obtain the following characterization of $\bpsi$~:
348
348
\[
349
349
    \begin{array}{rccl}
350
350
        -\Delta \,\bpsi &=& {\bf curl} \, {\bf u} & \mbox{ in } \Omega, \\
409
409
\pindex{mayavi}
410
410
\fiindex{\file{.vtk} vtk file}
411
411
  The \code{-noclean -noexecute} options cause the creation of the \file{.vtk} file
412
 
  for the second componnt, without running the \code{mayavi} visualization.
 
412
  for the second component, without running the \code{mayavi} visualization.
413
413
  Next, in the \code{mayavi} window associated to the whole stream function, 
414
414
  select the \code{File/Load data/VTK file} menu and load \file{psi1.vtk}.
415
 
  Finaly, select the \code{Vizualize/Module/IsoSurface} menu.
 
415
  Finally, select the \code{Vizualize/Module/IsoSurface} menu.
416
416
  Observe that the 3D stream function is mainly represented by its second component.
417
417