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

Stephane Popinet popinet at users.sf.net
Fri May 15 02:56:03 UTC 2009


The following commit has been merged in the upstream branch:
commit 4840ba8aa8f201b0667c8c670e2833c957c7931a
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Sat Jan 10 21:35:53 2009 +1100

    New 'hump' GfsRiver example
    
    darcs-hash:20090110103553-d4795-20a4f08262d18136da1ef5cc14e05b1eba590775.gz

diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index dc63ac0..59c8e89 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -9,7 +9,8 @@ EXAMPLES = \
 	tides \
 	ship \
 	garden \
-	dam
+	dam \
+	hump
 
 EXTRA_DIST = \
 	template.tex \
diff --git a/test/merging/levels.gfv b/doc/examples/hump/cells.gfv
similarity index 67%
copy from test/merging/levels.gfv
copy to doc/examples/hump/cells.gfv
index 52abaa9..cd4d75e 100644
--- a/test/merging/levels.gfv
+++ b/doc/examples/hump/cells.gfv
@@ -1,22 +1,19 @@
 # GfsView 2D
 View {
-  tx = 0 ty = 0
+  tx = -1.10977 ty = -0.473248
+  sx = 1 sy = 1 sz = 1
   q0 = 0 q1 = 0 q2 = 0 q3 = 1
-  fov = 30
+  fov = 17.1233
   r = 0.3 g = 0.4 b = 0.6
   res = 1
   lc = 0.001
   reactivity = 0.1
 }
-Squares {
+Cells {
   r = 0 g = 0 b = 0
   shading = Constant
-  maxlevel = 8
+  maxlevel = -1
 } {
   n.x = 0 n.y = 0 n.z = 1
   pos = 0
-} Level {
-  amin = 1
-  amax = 1
-  cmap = Jet
 }
diff --git a/doc/examples/hump/hump.gfs b/doc/examples/hump/hump.gfs
new file mode 100644
index 0000000..589454a
--- /dev/null
+++ b/doc/examples/hump/hump.gfs
@@ -0,0 +1,104 @@
+# Title: Small amplitude solitary wave interacting with a parabolic hump
+#
+# Description:
+#
+# This test case was proposed by LeVeque (JCP, 1998) as a check for
+# the accuracy of hydrostatic balance for the Saint-Venant equations
+# with variable topography. A solitary wave of small amplitude is
+# generated by an initial discontinuity on the left-hand-side of the
+# domain and moves past a parabolic hump creating complex focusing and
+# diffraction (Figure \ref{hump}). Any inaccuracy in hydrostatic
+# balance will clearly affect the solution given the small amplitude
+# of the initial perturbation.
+#
+# \begin{figure}[htbp]
+# \caption{\label{hump}Animation of the topography (coloured) and free
+# surface (white). The vertical scale is exagerated.}
+# \begin{center}
+# \htmladdnormallinkfoot{\includegraphics[width=0.6\hsize]{hump.eps}}{hump.mpg}
+# \end{center}
+# \end{figure}
+#
+# Figure \ref{evolution} illustrates the free surface and
+# corresponding adaptive mesh evolution. This figure agrees well with
+# the results reported by
+# \htmladdnormallinkfoot{LeVeque}{http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.5450}
+# using a non-adaptive high-resolution Godunov method (Figure 7, right
+# column, note that the resolution of the results by LeVeque is
+# slightly larger: $600\times 300$ compared to $512\times 256$ here).
+#
+# \begin{figure}[htbp]
+# \caption{\label{evolution}Evolution of the free surface and adaptive mesh.}
+# \begin{center}
+# \begin{tabular}{cc}
+# \includegraphics[width=0.5\hsize]{iso-0.6.eps} &
+# \includegraphics[width=0.5\hsize]{cells-0.6.eps} \\
+# \multicolumn{2}{c}{$t = 0.6$} \\
+# \includegraphics[width=0.5\hsize]{iso-0.9.eps} &
+# \includegraphics[width=0.5\hsize]{cells-0.9.eps} \\
+# \multicolumn{2}{c}{$t = 0.9$} \\
+# \includegraphics[width=0.5\hsize]{iso-1.2.eps} &
+# \includegraphics[width=0.5\hsize]{cells-1.2.eps} \\
+# \multicolumn{2}{c}{$t = 1.2$} \\
+# \includegraphics[width=0.5\hsize]{iso-1.5.eps} &
+# \includegraphics[width=0.5\hsize]{cells-1.5.eps} \\
+# \multicolumn{2}{c}{$t = 1.5$} \\
+# \includegraphics[width=0.5\hsize]{iso-1.8.eps} &
+# \includegraphics[width=0.5\hsize]{cells-1.8.eps} \\
+# \multicolumn{2}{c}{$t = 1.8$}
+# \end{tabular}
+# \end{center}
+# \end{figure}
+#
+# Author: St\'ephane Popinet
+# Command: gerris2D hump.gfs | gfsview2D hump.gfv | ppm2mpeg > hump.mpg
+# Version: 1.3.1
+# Required files: hump.gfv isolines.gfv cells.gfv
+# Running time: 10 minutes
+# Generated files: cells-0.6.eps cells-1.2.eps cells-1.8.eps iso-0.9.eps iso-1.5.eps cells-0.9.eps cells-1.5.eps iso-0.6.eps iso-1.2.eps iso-1.8.eps hump.eps hump.mpg
+#
+# Recenter the reference box on (0.5,0.5) (rather than the default (0,0))
+2 1 GfsRiver GfsBox GfsGEdge { x = 0.5 y = 0.5 } {
+    Refine 8
+    Init {} {
+	# Parabolic hump
+	Zb = 0.8*exp(-5.*(x - 0.9)*(x - 0.9) - 50.*(y - 0.5)*(y - 0.5))
+	# Initial free surface and perturbation
+	P = (0.05 < x && x < 0.15 ? 1.01 : 1) - Zb
+    }
+    PhysicalParams { g = 1 }
+    AdvectionParams { cfl = 0.5 }
+    AdaptGradient { istep = 1 } { 
+	cmax = 1e-4
+	cfactor = 2
+	maxlevel = 8
+	minlevel = 6
+    } (P + Zb)
+    Time { end = 1.8 }
+    OutputTime { istep = 10 } stderr
+    OutputSimulation { istep = 10 } stdout
+    EventScript { istep = 10 } { echo "Save stdout { width = 640 height = 480 }" }
+    OutputSimulation { start = 0.6 step = 0.3 } sim-%g.gfs
+    EventScript { start = end } {
+	for i in 0.6 0.9 1.2 1.5 1.8; do
+	    echo "Save stdout { format = EPS line_width = 0.2 }" | \
+		gfsview-batch2D sim-$i.gfs isolines.gfv > iso-$i.eps
+	    echo "Save stdout { format = EPS line_width = 0.2 }" | \
+		gfsview-batch2D sim-$i.gfs cells.gfv > cells-$i.eps
+	done
+	echo "Save stdout { width = 1280 height = 960 }" | \
+	    gfsview-batch2D sim-0.9.gfs hump.gfv | convert ppm:- hump.eps
+    }
+}
+# "open" boundary conditions on all boundaries
+GfsBox {
+    left = Boundary { BcNeumann U 0 }
+    top = Boundary { BcNeumann V 0 }
+    bottom = Boundary { BcNeumann V 0 }
+}
+GfsBox {
+    right = Boundary { BcNeumann U 0 }
+    top = Boundary { BcNeumann V 0 }
+    bottom = Boundary { BcNeumann V 0 }
+}
+1 2 right
diff --git a/doc/examples/ship/comparison.gfv b/doc/examples/hump/hump.gfv
similarity index 59%
copy from doc/examples/ship/comparison.gfv
copy to doc/examples/hump/hump.gfv
index 7fe0f51..84a6fcd 100644
--- a/doc/examples/ship/comparison.gfv
+++ b/doc/examples/hump/hump.gfv
@@ -1,42 +1,41 @@
-# GfsView 3D
+# GfsView 2D
 View {
-  tx = -0.373912 ty = -0.501871
-  sx = 1 sy = 1 sz = 3
-  q0 = 0 q1 = 0 q2 = 0 q3 = 1
-  fov = 5.77964
-  r = 1 g = 1 b = 1
+  tx = -1.12721 ty = 0.409038
+  sx = 1 sy = 1 sz = 1
+  q0 = 0.44512 q1 = 0.14796 q2 = 0.310734 q3 = 0.826693
+  fov = 16.0939
+  r = 0.3 g = 0.4 b = 0.6
   res = 1
   lc = 0.001
   reactivity = 0.1
 }
-VOF {
+Linear {
   r = 1 g = 1 b = 1
   shading = Constant
   maxlevel = -1
 } {
   n.x = 0 n.y = 0 n.z = 1
   pos = 0
-} Z {
-  amin = 0 min = -0.005
-  amax = 0 max = 0.005
+} P {
+  amin = 1
+  amax = 1
   cmap = Jet
-} T {
+} (P+Zb-1)*20 {
   reversed = 0
-  use_scalar = 1
-  draw_edges = 0
+  use_scalar = 0
 }
-Solid {
+Linear {
   r = 1 g = 1 b = 1
   shading = Constant
   maxlevel = -1
 } {
   n.x = 0 n.y = 0 n.z = 1
   pos = 0
-} Velocity {
+} Zb {
   amin = 1
   amax = 1
   cmap = Jet
-} {
+} Zb/2-0.9 {
   reversed = 0
-  use_scalar = 0
+  use_scalar = 1
 }
diff --git a/doc/examples/rt/rt.gfv b/doc/examples/hump/isolines.gfv
similarity index 78%
copy from doc/examples/rt/rt.gfv
copy to doc/examples/hump/isolines.gfv
index 4edfb6c..7708f1e 100644
--- a/doc/examples/rt/rt.gfv
+++ b/doc/examples/hump/isolines.gfv
@@ -1,28 +1,30 @@
 # GfsView 2D
 View {
-  tx = -0.0838119 ty = -0.501667
+  tx = -1.10977 ty = -0.473248
   sx = 1 sy = 1 sz = 1
   q0 = 0 q1 = 0 q2 = 0 q3 = 1
-  fov = 55.2206
+  fov = 17.1233
   r = 0.3 g = 0.4 b = 0.6
   res = 1
   lc = 0.001
   reactivity = 0.1
 }
-VOF {
+Isoline {
   r = 0 g = 0 b = 0
   shading = Constant
   maxlevel = -1
 } {
   n.x = 0 n.y = 0 n.z = 1
   pos = 0
-} P {
+} P+Zb {
   amin = 1
   amax = 1
   cmap = Jet
-} T {
+} 0 {
   reversed = 0
-  use_scalar = 0
+  use_scalar = 1
+} {
+  n = 30
 }
 Boundaries {
   r = 0 g = 0 b = 0
diff --git a/doc/examples/template.tex b/doc/examples/template.tex
index 4879e5b..8098749 100644
--- a/doc/examples/template.tex
+++ b/doc/examples/template.tex
@@ -60,9 +60,10 @@ The usefulness and quality of this document very much depend on the contribution
 
 \input{tides/tides.tex}
 
-\section{Non-linear shallow-water}
+\section{Saint-Venant (non-linear shallow-water)}
 
 \input{dam/dam.tex}
+\input{hump/hump.tex}
 
 \section{Waves}
 

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list