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

Stephane Popinet popinet at users.sf.net
Fri May 15 02:55:40 UTC 2009


The following commit has been merged in the upstream branch:
commit fb914fac3f855ebb27527f9d77c28b92f351ce3a
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Fri Aug 1 12:47:02 2008 +1000

    Explicit viscosity lid-driven cavity test case
    
    darcs-hash:20080801024702-d4795-1342af9ba78a004db33e293f8db69377435bb899.gz

diff --git a/test/lid/lid.gfs b/test/lid/explicit/explicit.gfs
similarity index 58%
copy from test/lid/lid.gfs
copy to test/lid/explicit/explicit.gfs
index 680df43..9432001 100644
--- a/test/lid/lid.gfs
+++ b/test/lid/explicit/explicit.gfs
@@ -1,45 +1,13 @@
-# Title: Lid-driven cavity at Re=1000
+# Title: Lid-driven cavity at Re=1000 (explicit scheme)
 #
 # 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]
-# \caption{\label{velocity}Norm of the velocity for the stationary regime.}
-# \begin{center}
-# \includegraphics[width=0.8\hsize]{velocity.eps}
-# \end{center}
-# \end{figure}
-#
-# Velocity profiles are generated automatically and compared to the
-# benchmark results of Ghia et al. \cite{ghia82} on
-# Figures \ref{xprof} and \ref{yprof}.
-#
-# \begin{figure}[htbp]
-# \caption{\label{xprof}Vertical profile of the $x$-component of the velocity on
-# the centerline of the box.}
-# \begin{center}
-# \includegraphics[width=0.8\hsize]{xprof.eps}
-# \end{center}
-# \end{figure}
-#
-# \begin{figure}[htbp]
-# \caption{\label{yprof}Horizontal profile of the $y$-component of the velocity on
-# the centerline of the box.}
-# \begin{center}
-# \includegraphics[width=0.8\hsize]{yprof.eps}
-# \end{center}
-# \end{figure}
+# Same test case but with an explicit scheme for the viscous term.
 #
 # Author: St\'ephane Popinet
-# Command: sh lid.sh lid.gfs
-# Version: 0.6.4
-# Required files: lid.sh xprofile yprofile xprof.ghia yprof.ghia
+# Command: sh lid.sh explicit.gfs
+# Version: 1.3.0
+# Required files: lid.sh
 # Running time: 70 minutes
 # Generated files: xprof yprof xprof.eps yprof.eps velocity.eps
 #
@@ -54,8 +22,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
-  SourceDiffusion {} U 1e-3
-  SourceDiffusion {} V 1e-3
+  SourceViscosityExplicit 1e-3
 
   # Stops the simulation if the maximum of the absolute value of the
   # difference between the current U field and the U field 10 timesteps
@@ -77,8 +44,8 @@
   # 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
+  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
@@ -88,11 +55,11 @@
     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:7 w l title "Gerris"
+    plot [-0.5:0.5]'../xprof.ghia' u 1:2 title "Ghia et al." w p ps 2 pt 9, 'xprof' u 3:7 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:8 w l title "Gerris"
+    plot [-0.5:0.5]'../yprof.ghia' u 1:2 title "Ghia et al." w p ps 2 pt 9, 'yprof' u 2:8 w l title "Gerris"
 EOF
   }
 }
diff --git a/test/lid/explicit/lid.sh b/test/lid/explicit/lid.sh
new file mode 100644
index 0000000..19a4ef4
--- /dev/null
+++ b/test/lid/explicit/lid.sh
@@ -0,0 +1,19 @@
+if ! $donotrun; then
+    if gerris2D $1; then :
+    else
+	exit 1
+    fi
+fi
+
+if cat <<EOF | python ; then :
+from check import *
+from sys import *
+print (Curve('xprof',3,7) - Curve('../xprof.ghia',1,2)).normi()
+print (Curve('yprof',2,8) - Curve('../yprof.ghia',1,2)).normi()
+if (Curve('xprof',3,7) - Curve('../xprof.ghia',1,2)).normi() > 2.1e-2 or \
+   (Curve('yprof',2,8) - Curve('../yprof.ghia',1,2)).normi() > 2e-2:
+    exit(1)
+EOF
+else
+   exit 1
+fi
diff --git a/test/template.tex b/test/template.tex
index 40a313c..874d20b 100644
--- a/test/template.tex
+++ b/test/template.tex
@@ -67,6 +67,7 @@ branch only.
 \section{Navier-Stokes}
 
 \input{lid/lid.tex}
+\input{lid/explicit/explicit.tex}
 \input{poiseuille/poiseuille.tex}
 \input{couette/couette.tex}
 \input{kinetic/kinetic.tex}

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list