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

Stephane Popinet popinet at users.sf.net
Fri May 15 02:53:37 UTC 2009


The following commit has been merged in the upstream branch:
commit b8e43ae721be79b14140c50653638e28d34b3534
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Sun Feb 5 00:43:22 2006 +1100

    Updated spurious current test case
    
    darcs-hash:20060204134322-d4795-92ebde061292a1640d8f703d1b72f8ee2b02cb87.gz

diff --git a/test/spurious/spurious.gfs b/test/spurious/spurious.gfs
index c830ae5..818a005 100644
--- a/test/spurious/spurious.gfs
+++ b/test/spurious/spurious.gfs
@@ -2,11 +2,11 @@
 #
 # Description:
 #
-# A circular "bubble" of diameter $D=0.4$ is initialised in the middle of
-# the unit box. Surface tension is imposed on the interface. The exact
-# solution is given by Laplace's law: uniform zero velocity and a
-# pressure jump accross the interface exactly balancing the surface
-# tension force.
+# A circular "bubble" of diameter $D=0.8$ is initialised centered on
+# the top-left corner of the unit box. Surface tension is imposed on
+# the interface. The exact solution is given by Laplace's law: uniform
+# zero velocity and a pressure jump accross the interface exactly
+# balancing the surface tension force.
 #
 # This test case uses a continuum formulation for surface tension,
 # which induces numerical errors leading to a non-exact balance of
@@ -22,11 +22,6 @@
 # D/\mu^2$. The asymptotic value of $Ca$ is a measure of the accuracy
 # of the numerical scheme (the smaller the better).
 #
-# An annoying property of simple continuum formulations for surface
-# tension is that they are in effect of order 0 i.e. they do not
-# converge with resolution as demonstrated on figure
-# \ref{convergence}.
-#
 # \begin{figure}[htbp]
 # \caption{\label{vectors}Spurious currents at equilibrium for $La=12000$.}
 # \begin{center}
@@ -49,20 +44,23 @@
 # \begin{center}
 # \includegraphics[width=0.8\hsize]{convergence.eps}
 # \end{center}
+# \caption{Poor convergence of the capillary number with increased
+# resolution. The diameter is given in number of grid points.}
+# \label{convergence}
 # \end{figure}
 #
 # Author: St\'ephane Popinet
 # Command: sh spurious.sh spurious.gfs
-# Version: 0.6.4
+# Version: 0.9.0
 # Required files: spurious.sh vectors.gfv convergence.ref
 # Generated files: laplace.eps convergence.eps vectors.eps
 #
-1 2 GfsSimulation GfsBox GfsGEdge {} {
-  Time { end = TMAX dtmax = 1e-3 }
+1 0 GfsSimulation GfsBox GfsGEdge {} {
+  Time { end = TMAX dtmax = 2e-3 }
   Refine LEVEL
 
-  ApproxProjectionParams { tolerance = 1e-6 }
-  ProjectionParams { tolerance = 1e-6 }
+  ApproxProjectionParams { tolerance = 1e-6 nitermin = 1 }
+  ProjectionParams { tolerance = 1e-6 nitermin = 1 }
   AdvectionParams { scheme = none }
 
   VariableTracer {} T { scheme = vof }
@@ -78,8 +76,9 @@
   AdaptGradient { istep = 1 } { cmax = 1e-6 maxlevel = LEVEL } T1
 
   OutputSimulation { start = end } sim-LEVEL {}
-  OutputScalarNorm { istep = 1 } stdout { v = Velocity }
+  OutputScalarNorm { istep = 1 } { awk '{ print $3/(MU*0.8) " " $9*MU }' } { v = Velocity }
+}
+GfsBox {
+  top = Boundary
+  left = Boundary
 }
-GfsBox {}
-1 1 right
-1 1 top
diff --git a/test/spurious/spurious.sh b/test/spurious/spurious.sh
index 6539b06..2d36ddc 100755
--- a/test/spurious/spurious.sh
+++ b/test/spurious/spurious.sh
@@ -1,35 +1,33 @@
 if ! $donotrun; then
-    shapes ellipse | transform --scale 0.8 > circle.gts
+    shapes ellipse | transform --scale 1.6 | transform --tx -0.5 --ty 0.5 > circle.gts
     for La in 12000 1200 120; do
-	mu=`echo $La | awk '{print sqrt (0.4/$1)}'`
-	tmax=`echo $mu | awk '{print 1000.*$1*0.4}'`
-	if sed "s/LEVEL/5/g" < $1 |\
+	mu=`echo $La | awk '{print sqrt (0.8/$1)}'`
+	tmax=`echo $mu | awk '{print 1000.*$1*0.8}'`
+	if sed "s/LEVEL/6/g" < $1 |\
            sed "s/MU/$mu/g" |\
-           sed "s/TMAX/$tmax/g" | gerris2D - | awk -v mu=$mu -v D=0.4 '{
-             print $3/(mu*D) " " $9*mu;
-          }' > La\=$La; then :
+           sed "s/TMAX/$tmax/g" | gerris2D - > La\=$La; then :
 	else
 	    exit 1
 	fi
     done
 
     rm -f convergence
-    for level in 5 6 7; do
+    for level in 4 5 6; do
         La=12000
-        mu=`echo $La | awk '{print sqrt (0.4/$1)}'`
-	tmax=`echo $mu | awk '{print 1000.*$1*0.4}'`
+        mu=`echo $La | awk '{print sqrt (0.8/$1)}'`
+	tmax=`echo $mu | awk '{print 1000.*$1*0.8}'`
 	if sed "s/LEVEL/$level/g" < $1 |\
            sed "s/MU/$mu/g" |\
-           sed "s/TMAX/$tmax/g" | gerris2D - | awk -v mu=$mu -v level=$level -v D=0.4 '{ 
-             max = $9
-           }END{print D*2**level " " max*mu}' >> convergence; then :
+           sed "s/TMAX/$tmax/g" | gerris2D - | awk -v level=$level '{
+             max = $2
+           }END{print 0.8*2**level " " max}' >> convergence; then :
 	else
 	    exit 1
 	fi
     done
 fi
 
-if cat <<EOF | gfsview-batch2D sim-5 vectors.gfv ; then :
+if cat <<EOF | gfsview-batch2D sim-4 vectors.gfv ; then :
 Save vectors.eps { format = EPS line_width = 1 }
 EOF
 else
@@ -41,11 +39,13 @@ if cat <<EOF | gnuplot ; then :
     set output 'laplace.eps'
     set xlabel 'Tau'
     set ylabel 'Ca'
+    set logscale y
     plot 'La=120' w l, 'La=1200' w l, 'La=12000' w l
     set output 'convergence.eps'
     set xlabel 'D'
     set ylabel 'Ca'
     unset key
+    unset logscale
     plot [][0:]'convergence' w lp ps 3
 EOF
 else
@@ -55,7 +55,7 @@ fi
 if cat <<EOF | python ; then :
 from check import *
 from sys import *
-if (Curve('convergence',1,2) - Curve('convergence.ref',1,2)).max() > 1e-6:
+if (Curve('convergence',1,2) - Curve('convergence.ref',1,2)).max() > 1e-8:
     exit(1)
 EOF
 else
diff --git a/test/spurious/vectors.gfv b/test/spurious/vectors.gfv
index 2c1f6b3..76fe49a 100644
--- a/test/spurious/vectors.gfv
+++ b/test/spurious/vectors.gfv
@@ -20,7 +20,7 @@ Vectors {
   amax = 1
   cmap = Jet
 } U V {
-  scale = 1.2
+  scale = 1074
   use_scalar = 0
 }
 Isoline {

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list