[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203

Stephane Popinet s.popinet at niwa.co.nz
Fri May 15 02:51:45 UTC 2009


The following commit has been merged in the upstream branch:
commit 51850f26e7911327fbb43d1e830313792df03f18
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date:   Fri Apr 1 16:04:31 2005 +1000

    New lid-driven cavity example
    
    darcs-hash:20050401060431-fbd8f-4abd4bbc52ca7c14c35770672e68419553cf1246.gz

diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 4d252d5..1965b71 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -1,7 +1,8 @@
 ## Process this file with automake to produce Makefile.in
 
 EXAMPLES = \
-	cylinder
+	cylinder \
+	lid
 
 EXTRA_DIST = \
 	template.tex \
diff --git a/doc/examples/lid/lid.gfs b/doc/examples/lid/lid.gfs
new file mode 100644
index 0000000..cb21d56
--- /dev/null
+++ b/doc/examples/lid/lid.gfs
@@ -0,0 +1,130 @@
+# Title: Lid-driven cavity at Re=1000
+#
+# Description:
+#
+# The classical lid-driven cavity test case.
+#
+# This example illustrates how to check for the convergence toward a
+# stationary solution of an initially time-dependent problem.
+#
+# The stationary solution obtained is illustrated on Figure \ref{velocity}.
+#
+# \begin{figure}[htbp]
+# \begin{center}
+# \includegraphics[width=0.8\hsize]{velocity.eps}
+# \end{center}
+# \caption{Norm of the velocity for the stationary regime.}
+# \label{velocity}
+# \end{figure}
+#
+# Velocity profiles are generated automatically and compared to the
+# benchmark results of Ghia et al. (J. Comp. Phys. 1982) on
+# Figures \ref{xprof} and \ref{yprof}.
+#
+# \begin{figure}[htbp]
+# \begin{center}
+# \includegraphics[width=0.8\hsize]{xprof.eps}
+# \end{center}
+# \caption{Vertical profile of the $x$-component of the velocity on
+# the centerline of the box.}
+# \label{xprof}
+# \end{figure}
+#
+# \begin{figure}[htbp]
+# \begin{center}
+# \includegraphics[width=0.8\hsize]{yprof.eps}
+# \end{center}
+# \caption{Horizontal profile of the $y$-component of the velocity on
+# the centerline of the box.}
+# \label{yprof}
+# \end{figure}
+#
+# Author: St\'ephane Popinet
+# Command: gerris2D lid.gfs
+# Version: 0.6.4
+# Required files: xprofile yprofile xprof.ghia yprof.ghia
+# Running time: 70 minutes
+# Generated files: xprof yprof xprof.eps yprof.eps velocity.eps
+#
+# The simulation domain has 1 GfsBox
+1 0 GfsSimulation GfsBox GfsGEdge {} {
+
+  # Stop the simulation at t = 300 if convergence has not been reached before
+  Time { end = 300 }
+
+  # Use an initial refinement of 7 levels (i.e. 2^7=128x128)
+  Refine 7
+
+  # Set a viscosity source term on the velocity vector with x-component U
+  # The Reynolds number is Re = L*U/Nu = 1*1/1e-3 = 1000
+  SourceViscosity {} U 1e-3
+
+  # Writes the time and timestep every 10 timesteps on standard output
+  OutputTime { istep = 10 } stderr
+
+  # Writes info about the convergence of the Poisson solver on standard output
+  OutputProjectionStats { istep = 10 } stderr
+
+  # Stops the simulation if the maximum of the absolute value of the
+  # difference between the current U field and the U field 10 timesteps
+  # before is smaller than 1e-4.
+  #
+  # Stores this difference in the DU field (this can be used for
+  # monitoring the convergence of the simulation).
+  EventStop { istep = 10 } U 1e-4 DU
+
+  # Pipes a bitmap PPM image representation of the velocity field at the end of the simulation
+  # into the ImageMagick converter "convert" to create the
+  # corresponding EPS file
+  OutputPPM { start = end } { convert -colors 256 ppm:- velocity.eps } {
+    v = Velocity
+  }
+
+  # At the end of the simulation, computes the values of the variables
+  # at the locations defined in files xprofile, yprofile and stores the
+  # results in files xprof, yprof
+  OutputLocation { start = end } xprof xprofile
+  OutputLocation { start = end } yprof yprofile
+
+  # At the end of the simulation calls the script generating the EPS
+  # files using gnuplot and files: xprof, yprof, xprof.ghia, yprof.ghia
+  EventScript { start = end } {
+    cat <<EOF | gnuplot
+    set term postscript eps
+    set output 'xprof.eps'
+    set xlabel 'Y'
+    set ylabel 'U'
+    plot [-0.5:0.5]'xprof.ghia' u 1:2 title "Ghia et al." w p ps 2 pt 9, 'xprof' u 3:6 w l title "Gerris"
+    set output 'yprof.eps'
+    set xlabel 'X'
+    set ylabel 'V'
+    plot [-0.5:0.5]'yprof.ghia' u 1:2 title "Ghia et al." w p ps 2 pt 9, 'yprof' u 2:7 w l title "Gerris"
+EOF
+  }
+
+  # Outputs profiling information at the end of the simulation to standard output
+  OutputTiming { start = end } stderr
+}
+GfsBox {
+
+  # Dirichlet boundary conditions for both components of the velocity on all sides:
+  # - non-slip (U = V = 0) on right, left and bottom boundaries
+  # - tangential velocity equal to 1 (U = 1) on top boundary
+
+  top = Boundary {
+    BcDirichlet U 1
+    BcDirichlet V 0
+  }
+  bottom = Boundary {
+    BcDirichlet U 0
+    BcDirichlet V 0
+  }
+  right = Boundary {
+    BcDirichlet U 0
+    BcDirichlet V 0
+  }
+  left = Boundary {
+    BcDirichlet U 0
+    BcDirichlet V 0
+  }
+}
diff --git a/doc/examples/lid/xprof.ghia b/doc/examples/lid/xprof.ghia
new file mode 100644
index 0000000..e038a95
--- /dev/null
+++ b/doc/examples/lid/xprof.ghia
@@ -0,0 +1,17 @@
+-0.327052 -0.383699
+-0.397406 -0.297251
+-0.217948 -0.27788
+-0.428914 -0.222276
+-0.43629 -0.201989
+-0.444335 -0.181701
+-0.046595 -0.106804
+0.001598 -0.060949
+-0.49933 -0.000882
+0.118733 0.057217
+0.235193 0.186849
+0.352315 0.333239
+0.45404 0.466401
+0.461386 0.511382
+0.469392 0.574884
+0.476719 0.659554
+0.5 0.999118
diff --git a/doc/examples/lid/xprofile b/doc/examples/lid/xprofile
new file mode 100644
index 0000000..9aa9885
--- /dev/null
+++ b/doc/examples/lid/xprofile
@@ -0,0 +1,101 @@
+0 -0.5 0
+0 -0.49 0
+0 -0.48 0
+0 -0.47 0
+0 -0.46 0
+0 -0.45 0
+0 -0.44 0
+0 -0.43 0
+0 -0.42 0
+0 -0.41 0
+0 -0.4 0
+0 -0.39 0
+0 -0.38 0
+0 -0.37 0
+0 -0.36 0
+0 -0.35 0
+0 -0.34 0
+0 -0.33 0
+0 -0.32 0
+0 -0.31 0
+0 -0.3 0
+0 -0.29 0
+0 -0.28 0
+0 -0.27 0
+0 -0.26 0
+0 -0.25 0
+0 -0.24 0
+0 -0.23 0
+0 -0.22 0
+0 -0.21 0
+0 -0.2 0
+0 -0.19 0
+0 -0.18 0
+0 -0.17 0
+0 -0.16 0
+0 -0.15 0
+0 -0.14 0
+0 -0.13 0
+0 -0.12 0
+0 -0.11 0
+0 -0.1 0
+0 -0.09 0
+0 -0.08 0
+0 -0.07 0
+0 -0.06 0
+0 -0.05 0
+0 -0.04 0
+0 -0.03 0
+0 -0.02 0
+0 -0.01 0
+0 0 0
+0 0.01 0
+0 0.02 0
+0 0.03 0
+0 0.04 0
+0 0.05 0
+0 0.06 0
+0 0.07 0
+0 0.08 0
+0 0.09 0
+0 0.1 0
+0 0.11 0
+0 0.12 0
+0 0.13 0
+0 0.14 0
+0 0.15 0
+0 0.16 0
+0 0.17 0
+0 0.18 0
+0 0.19 0
+0 0.2 0
+0 0.21 0
+0 0.22 0
+0 0.23 0
+0 0.24 0
+0 0.25 0
+0 0.26 0
+0 0.27 0
+0 0.28 0
+0 0.29 0
+0 0.3 0
+0 0.31 0
+0 0.32 0
+0 0.33 0
+0 0.34 0
+0 0.35 0
+0 0.36 0
+0 0.37 0
+0 0.38 0
+0 0.39 0
+0 0.4 0
+0 0.41 0
+0 0.42 0
+0 0.43 0
+0 0.44 0
+0 0.45 0
+0 0.46 0
+0 0.47 0
+0 0.48 0
+0 0.49 0
+0 0.5 0
diff --git a/doc/examples/lid/yprof.ghia b/doc/examples/lid/yprof.ghia
new file mode 100644
index 0000000..f2a4470
--- /dev/null
+++ b/doc/examples/lid/yprof.ghia
@@ -0,0 +1,17 @@
+-0.500577 0.00069404
+-0.43768 0.275621
+-0.429602 0.290847
+-0.421523 0.303994
+-0.406521 0.326826
+-0.343624 0.371038
+-0.273803 0.330015
+-0.265724 0.32307
+-0.000289 0.0252893
+0.304962 -0.318994
+0.359781 -0.427191
+0.40652 -0.515279
+0.445182 -0.392034
+0.45326 -0.336623
+0.461339 -0.277749
+0.46884 -0.214023
+0.5 -6.20706e-17
diff --git a/doc/examples/lid/yprofile b/doc/examples/lid/yprofile
new file mode 100644
index 0000000..cd3e5d1
--- /dev/null
+++ b/doc/examples/lid/yprofile
@@ -0,0 +1,101 @@
+-0.5 0 0
+-0.49 0 0
+-0.48 0 0
+-0.47 0 0
+-0.46 0 0
+-0.45 0 0
+-0.44 0 0
+-0.43 0 0
+-0.42 0 0
+-0.41 0 0
+-0.4 0 0
+-0.39 0 0
+-0.38 0 0
+-0.37 0 0
+-0.36 0 0
+-0.35 0 0
+-0.34 0 0
+-0.33 0 0
+-0.32 0 0
+-0.31 0 0
+-0.3 0 0
+-0.29 0 0
+-0.28 0 0
+-0.27 0 0
+-0.26 0 0
+-0.25 0 0
+-0.24 0 0
+-0.23 0 0
+-0.22 0 0
+-0.21 0 0
+-0.2 0 0
+-0.19 0 0
+-0.18 0 0
+-0.17 0 0
+-0.16 0 0
+-0.15 0 0
+-0.14 0 0
+-0.13 0 0
+-0.12 0 0
+-0.11 0 0
+-0.1 0 0
+-0.09 0 0
+-0.08 0 0
+-0.07 0 0
+-0.06 0 0
+-0.05 0 0
+-0.04 0 0
+-0.03 0 0
+-0.02 0 0
+-0.01 0 0
+0 0 0
+0.01 0 0
+0.02 0 0
+0.03 0 0
+0.04 0 0
+0.05 0 0
+0.06 0 0
+0.07 0 0
+0.08 0 0
+0.09 0 0
+0.1 0 0
+0.11 0 0
+0.12 0 0
+0.13 0 0
+0.14 0 0
+0.15 0 0
+0.16 0 0
+0.17 0 0
+0.18 0 0
+0.19 0 0
+0.2 0 0
+0.21 0 0
+0.22 0 0
+0.23 0 0
+0.24 0 0
+0.25 0 0
+0.26 0 0
+0.27 0 0
+0.28 0 0
+0.29 0 0
+0.3 0 0
+0.31 0 0
+0.32 0 0
+0.33 0 0
+0.34 0 0
+0.35 0 0
+0.36 0 0
+0.37 0 0
+0.38 0 0
+0.39 0 0
+0.4 0 0
+0.41 0 0
+0.42 0 0
+0.43 0 0
+0.44 0 0
+0.45 0 0
+0.46 0 0
+0.47 0 0
+0.48 0 0
+0.49 0 0
+0.5 0 0
diff --git a/doc/examples/template.tex b/doc/examples/template.tex
index 44e9d0a..4e0378a 100644
--- a/doc/examples/template.tex
+++ b/doc/examples/template.tex
@@ -41,6 +41,7 @@ The usefulness and quality of this document very much depend on the contribution
 
 \input{cylinder/cylinder.tex}
 \input{cylinder/heated/heated.tex}
+\input{lid/lid.tex}
 
 \section{How to write examples}
 \label{howto}

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list