[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:54:30 UTC 2009
The following commit has been merged in the upstream branch:
commit 32178583287d1880fff7bdce10f89943e95d9a88
Author: Stephane Popinet <popinet at users.sf.net>
Date: Wed Aug 22 14:14:41 2007 +1000
Updated spurious currents test case
darcs-hash:20070822041441-d4795-4dc5b43f2b93070d3e0a3af008efcc4870b9f9ee.gz
diff --git a/test/spurious/convergence.ref b/test/spurious/convergence.ref
index 2ec27af..a44b9bc 100644
--- a/test/spurious/convergence.ref
+++ b/test/spurious/convergence.ref
@@ -1,4 +1,5 @@
-12.8 3.752e-04 4.243e-03
-25.6 6.877e-05 9.211e-04
-51.2 2.062e-05 3.736e-04
-102.4 5.996e-06 1.609e-04
+6.4 3.527e-02 2.461e-01
+12.8 3.795e-04 4.307e-03
+25.6 1.063e-04 1.449e-03
+51.2 2.155e-05 5.775e-04
+102.4 9.624e-06 3.564e-04
diff --git a/test/spurious/kconvergence.ref b/test/spurious/kconvergence.ref
new file mode 100644
index 0000000..845192a
--- /dev/null
+++ b/test/spurious/kconvergence.ref
@@ -0,0 +1,5 @@
+6.4 0.05632 0.15016
+12.8 0.0029284 0.012996
+25.6 0.0004916 0.003084
+51.2 7.828e-05 0.0007016
+102.4 1.0732e-05 0.0001356
diff --git a/test/spurious/spurious.gfs b/test/spurious/spurious.gfs
index 2d2a937..bb61c82 100644
--- a/test/spurious/spurious.gfs
+++ b/test/spurious/spurious.gfs
@@ -18,10 +18,15 @@
#
# The convergence is obtained for a wide range of Laplace numbers
# $La=\sigma\rho D/\mu^2$, as illustrated on Figure \ref{laplace}.
+# Correspondingly, convergence of the curvature to a constant value is
+# also obtained at all Laplace numbers as illustrated on Figure
+# \ref{curvature}.
#
# Figure \ref{convergence} illustrates the convergence of the error on
# the droplet shape as a function of resolution for a Laplace number
-# of 12000.
+# of 12000. Both the shape error and the relative error on the
+# equilibrium curvature value illustrated on Figure
+# \ref{kconvergence} show close to second-order convergence.
#
# \begin{figure}[htbp]
# \caption{\label{laplace}Evolution of the amplitude of the capillary currents
@@ -34,6 +39,16 @@
# \end{figure}
#
# \begin{figure}[htbp]
+# \caption{\label{curvature}Evolution of the standard deviation of the
+# value of the curvature along the interface as a function of
+# non-dimensional time $\tau=t\mu/D^2$ for the range of Laplace
+# numbers indicated in the legend.}
+# \begin{center}
+# \includegraphics[width=0.8\hsize]{curvature.eps}
+# \end{center}
+# \end{figure}
+#
+# \begin{figure}[htbp]
# \caption{\label{convergence}Convergence of the error on the equilibrium shape of the
# droplet with resolution. The diameter is given in number of grid
# points.}
@@ -42,11 +57,20 @@
# \end{center}
# \end{figure}
#
+# \begin{figure}[htbp]
+# \caption{\label{kconvergence}Convergence of the relative error on the
+# equilibrium curvature value with resolution. The diameter is given
+# in number of grid points.}
+# \begin{center}
+# \includegraphics[width=0.8\hsize]{kconvergence.eps}
+# \end{center}
+# \end{figure}
+#
# Author: St\'ephane Popinet
# Command: sh spurious.sh spurious.gfs
# Version: 1.0.0
-# Required files: spurious.sh convergence.ref
-# Generated files: laplace.eps convergence.eps
+# Required files: spurious.sh convergence.ref kconvergence.ref
+# Generated files: laplace.eps curvature.eps convergence.eps kconvergence.eps
#
1 0 GfsSimulation GfsBox GfsGEdge {} {
Time { end = TMAX }
@@ -71,11 +95,17 @@
OutputSimulation { start = end } stdout { depth = LEVEL }
OutputScalarNorm { istep = 1 } {
- awk '{ print MU*$3/(0.8*0.8) " " $9*sqrt(0.8) }' > La-LAPLACE-LEVEL
+ awk '{ print MU*$3/(0.8*0.8), $9*sqrt(0.8) }' > La-LAPLACE-LEVEL
} { v = Velocity }
OutputScalarNorm { istep = 1 } {
- awk '{ print MU*$3/(0.8*0.8) " " $5 " " $7 " " $9 }' > E-LAPLACE-LEVEL
+ awk '{ print MU*$3/(0.8*0.8), $5, $7, $9 }' > E-LAPLACE-LEVEL
} { v = (Tref - T) }
+ OutputScalarStats { istep = 1 } {
+ awk '{ print MU*$3/(0.8*0.8), $5, $7, $9, $11 }' > K-LAPLACE-LEVEL
+ } { v = (K - 2.50771) }
+ OutputScalarNorm { istep = 1 } {
+ awk '{ print MU*$3/(0.8*0.8), $5, $7, $9 }' > EK-LAPLACE-LEVEL
+ } { v = (T > 0 && T < 1 ? K - 2.5 : 0) }
}
GfsBox {
top = Boundary
diff --git a/test/spurious/spurious.sh b/test/spurious/spurious.sh
index dc8e543..47efddc 100755
--- a/test/spurious/spurious.sh
+++ b/test/spurious/spurious.sh
@@ -14,9 +14,8 @@ if ! $donotrun; then
fi
done
- rm -f convergence
La=12000
- for level in 4 6 7; do
+ for level in 3 4 6 7; do
mu=`echo $La | awk '{print sqrt (0.8/$1)}'`
tmax=`echo $mu | awk '{print 0.8*0.8/$1}'`
if sed "s/LEVEL/$level/g" < $1 |\
@@ -29,16 +28,26 @@ if ! $donotrun; then
exit 1
fi
done
- for level in 4 5 6 7; do
- if awk -v level=$level < E-$La-$level '{
+fi
+
+rm -f convergence kconvergence
+La=12000
+for level in 3 4 5 6 7; do
+ if awk -v level=$level < E-$La-$level '{
max2 = $3
maxi = $4
- }END{print 0.8*2**level " " max2 " " maxi}' >> convergence; then :
- else
- exit 1
- fi
- done
-fi
+ }END{print 0.8*2**level, max2, maxi}' >> convergence; then :
+ else
+ exit 1
+ fi
+ if awk -v level=$level < EK-$La-$level '{
+ max2 = $3
+ maxi = $4
+ }END{print 0.8*2**level, max2/2.5, maxi/2.5}' >> kconvergence; then :
+ else
+ exit 1
+ fi
+done
if cat <<EOF | gnuplot ; then :
set term postscript eps color lw 3 solid 20
@@ -47,21 +56,37 @@ if cat <<EOF | gnuplot ; then :
set ylabel 'U(D/sigma)^1/2'
set logscale y
plot 'La-120-5' w l t "La=120", 'La-1200-5' w l t "La=1200", 'La-12000-5' w l t "La=12000"
+ set output 'curvature.eps'
+ set ylabel 'Curvature standard deviation'
+ plot 'K-120-5' u 1:4 w l t "La=120", 'K-1200-5' u 1:4 w l t "La=1200", 'K-12000-5' u 1:4 w l t "La=12000"
set output 'convergence.eps'
set xlabel 'D'
set ylabel 'Shape error'
set logscale x
- plot [10:120]'convergence' u 1:2 w lp t "RMS" ps 3, 'convergence' u 1:3 w lp t "Max" ps 3, 0.2/(x*x) t "Second order"
+ plot [5:120]'convergence' u 1:2 w lp t "RMS" ps 3, 'convergence' u 1:3 w lp t "Max" ps 3, 0.2/(x*x) t "Second order"
+ set output 'kconvergence.eps'
+ set ylabel 'Relative curvature error'
+ set logscale x
+ plot [5:120]'kconvergence' u 1:3 w lp t "" ps 3, 0.6/(x*x) t "Second order"
EOF
else
exit 1
fi
+for f in La-120-5 La-1200-5 La-12000-5; do
+ if awk '{ last = $2; }END{if (last > 1e-10) exit (1);}' < $f; then :
+ else
+ exit 1
+ fi
+done
+
if cat <<EOF | python ; then :
from check import *
from sys import *
if (Curve('convergence',1,3) - Curve('convergence.ref',1,3)).max() > 1e-6:
exit(1)
+if (Curve('kconvergence',1,3) - Curve('kconvergence.ref',1,3)).max() > 1e-6:
+ exit(1)
EOF
else
exit 1
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list