[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
s.popinet at niwa.co.nz
Fri May 15 02:51:52 UTC 2009
The following commit has been merged in the upstream branch:
commit 07f81a134f3f16a5bec9586fb813ca1eaf67d9ca
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date: Fri May 27 12:16:26 2005 +1000
Preliminary restructuring of Euler test cases
darcs-hash:20050527021626-fbd8f-51a69229425da186e7e7a79d8e64a31b9eb3b776.gz
diff --git a/test/euler/reference2D/periodic.xmgr b/test/euler/reference2D/periodic.xmgr
index 35ed830..a7b41df 100644
--- a/test/euler/reference2D/periodic.xmgr
+++ b/test/euler/reference2D/periodic.xmgr
@@ -7,11 +7,15 @@
@hardcopy device 1
@description "order.sh"
@description "1 2 GfsDomain GfsBox GfsGEdge {} {"
- at description " GfsTime { end = 0.5 }"
- at description " GfsRefine 7"
- at description " GModule periodic_flow"
- at description " GfsInitNonStationary {}"
- at description " GfsOutputNonStationaryError { start = end } stdout"
+ at description " Time { end = 0.5 }"
+ at description " Refine 7"
+ at description " Init {} {"
+ at description " U = (1. - 2.*cos (2.*M_PI*x)*sin (2.*M_PI*y))"
+ at description " V = (1. + 2.*sin (2.*M_PI*x)*cos (2.*M_PI*y))"
+ at description " }"
+ at description " OutputErrorNorm { start = end } xstdout { v = U } {"
+ at description " s = (1. - 2.*cos (2.*M_PI*(x - t))*sin (2.*M_PI*(y - t)))"
+ at description " }"
@description "}"
@description "GfsBox { pid = 0 }"
@description "1 1 right"
diff --git a/test/euler/reference2D/periodic_convective.xmgr b/test/euler/reference2D/periodic_convective.xmgr
index 2668f82..5be83ce 100644
--- a/test/euler/reference2D/periodic_convective.xmgr
+++ b/test/euler/reference2D/periodic_convective.xmgr
@@ -7,14 +7,18 @@
@hardcopy device 1
@description "order.sh"
@description "1 2 GfsDomain GfsBox GfsGEdge {} {"
- at description " GfsAdvectionParams {"
+ at description " AdvectionParams {"
@description " flux = gfs_face_velocity_convective_flux"
@description " }"
- at description " GfsTime { end = 0.5 }"
- at description " GfsRefine 7"
- at description " GModule periodic_flow"
- at description " GfsInitNonStationary {}"
- at description " GfsOutputNonStationaryError { start = end } stdout"
+ at description " Time { end = 0.5 }"
+ at description " Refine 7"
+ at description " Init {} {"
+ at description " U = (1. - 2.*cos (2.*M_PI*x)*sin (2.*M_PI*y))"
+ at description " V = (1. + 2.*sin (2.*M_PI*x)*cos (2.*M_PI*y))"
+ at description " }"
+ at description " OutputErrorNorm { start = end } xstdout { v = U } {"
+ at description " s = (1. - 2.*cos (2.*M_PI*(x - t))*sin (2.*M_PI*(y - t)))"
+ at description " }"
@description "}"
@description "GfsBox { pid = 0 }"
@description "1 1 right"
diff --git a/test/euler/scripts/boundaries.sh b/test/euler/scripts/boundaries.sh
index fff750d..7d77ab6 100755
--- a/test/euler/scripts/boundaries.sh
+++ b/test/euler/scripts/boundaries.sh
@@ -10,64 +10,58 @@ PATH=$PATH:../../poisson:../../../tools:..
cd boundaries
/bin/sh -c "shapes almgren > boundaries.gts"
-cat <<EOF > boundaries.sim
+cat <<EOF | gerris2D -
1 0 GfsSimulation GfsBox GfsGEdge {} {
- GfsTime { end = 0 }
- GfsApproxProjectionParams {
+ Time { end = 0 }
+ ApproxProjectionParams {
tolerance = 1e-6
}
- GfsRefine 7
+ Refine 7
GtsSurfaceFile boundaries.gts
- GfsInitFlowConstant {} { U = 1 }
- GfsOutputSimulation { start = end } boundaries_128.sim {
+ Init {} { U = 1 }
+ OutputSimulation { start = end } boundaries_128.gfs {
variables = U,V,P
}
}
-GfsBox { left = GfsBoundaryInflowConstant 1 right = GfsBoundaryOutflow }
+GfsBox { left = BoundaryInflowConstant 1 right = BoundaryOutflow }
EOF
-rm -f boundaries_128.sim
-gerris2D boundaries.sim
-cat <<EOF > boundaries.sim
+cat <<EOF | gerris2D -
1 0 GfsSimulation GfsBox GfsGEdge {} {
- GfsTime { end = 0 }
- GfsApproxProjectionParams {
+ Time { end = 0 }
+ ApproxProjectionParams {
tolerance = 1e-6
}
- GfsRefine 8
+ Refine 8
GtsSurfaceFile boundaries.gts
- GfsInitFlowConstant {} { U = 1 }
- GfsOutputSimulation { start = end } boundaries_256.sim {
+ Init {} { U = 1 }
+ OutputSimulation { start = end } boundaries_256.gfs {
variables = U,V,P
}
}
-GfsBox { left = GfsBoundaryInflowConstant 1 right = GfsBoundaryOutflow }
+GfsBox { left = BoundaryInflowConstant 1 right = BoundaryOutflow }
EOF
-rm -f boundaries_256.sim
-gerris2D boundaries.sim
-cat <<EOF > boundaries.sim
+cat <<EOF | gerris2D -
1 0 GfsSimulation GfsBox GfsGEdge {} {
- GfsTime { end = 0 }
- GfsApproxProjectionParams {
+ Time { end = 0 }
+ ApproxProjectionParams {
tolerance = 1e-6
}
- GfsRefine 9
+ Refine 9
GtsSurfaceFile boundaries.gts
- GfsInitFlowConstant {} { U = 1 }
- GfsOutputSimulation { start = end } boundaries_512.sim {
+ Init {} { U = 1 }
+ OutputSimulation { start = end } boundaries_512.gfs {
variables = U,V,P
}
}
-GfsBox { left = GfsBoundaryInflowConstant 1 right = GfsBoundaryOutflow }
+GfsBox { left = BoundaryInflowConstant 1 right = BoundaryOutflow }
EOF
-rm -f boundaries_512.sim
-gerris2D boundaries.sim
-error256=`gfscompare2D -n -v boundaries_256.sim boundaries_512.sim U 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error128=`gfscompare2D -n -v boundaries_128.sim boundaries_256.sim U 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error256full=`gfscompare2D -f 7 -n -v boundaries_256.sim boundaries_512.sim U 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error128full=`gfscompare2D -f 7 -n -v boundaries_128.sim boundaries_256.sim U 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error256=`gfscompare2D -n -v boundaries_256.gfs boundaries_512.gfs U 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error128=`gfscompare2D -n -v boundaries_128.gfs boundaries_256.gfs U 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error256full=`gfscompare2D -f 7 -n -v boundaries_256.gfs boundaries_512.gfs U 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error128full=`gfscompare2D -f 7 -n -v boundaries_128.gfs boundaries_256.gfs U 2>&1 | awk '{if ($1 == "total") print $0;}'`
cat <<EOF
% command: boundaries.sh
@@ -111,10 +105,10 @@ cat <<EOF
\end{table}
EOF
-error256=`gfscompare2D -n -v boundaries_256.sim boundaries_512.sim V 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error128=`gfscompare2D -n -v boundaries_128.sim boundaries_256.sim V 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error256full=`gfscompare2D -f 7 -n -v boundaries_256.sim boundaries_512.sim V 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error128full=`gfscompare2D -f 7 -n -v boundaries_128.sim boundaries_256.sim V 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error256=`gfscompare2D -n -v boundaries_256.gfs boundaries_512.gfs V 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error128=`gfscompare2D -n -v boundaries_128.gfs boundaries_256.gfs V 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error256full=`gfscompare2D -f 7 -n -v boundaries_256.gfs boundaries_512.gfs V 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error128full=`gfscompare2D -f 7 -n -v boundaries_128.gfs boundaries_256.gfs V 2>&1 | awk '{if ($1 == "total") print $0;}'`
cat <<EOF
diff --git a/test/euler/scripts/channel.sh b/test/euler/scripts/channel.sh
index cd6d8b6..00877b4 100755
--- a/test/euler/scripts/channel.sh
+++ b/test/euler/scripts/channel.sh
@@ -10,82 +10,76 @@ PATH=$PATH:../../poisson:../../../tools:..
cd channel
/bin/sh -c "shapes channel | transform --revert --scale 4 --tx 1.5 > channel.gts"
-cat <<EOF > channel.sim
+cat <<EOF | gerris2D - > log128
4 3 GfsSimulation GfsBox GfsGEdge {} {
- GfsTime { end = 1 }
- GfsRefine 5
+ Time { end = 1 }
+ Refine 5
GtsSurfaceFile channel.gts
- GfsInitFlowConstant {} { U = 1 }
- GfsOutputSolidStats {} stdout
- GfsOutputTime { istep = 10 } stdout
- GfsOutputProjectionStats { istep = 10 } stdout
- GfsOutputSimulation { start = end } channel_128.sim {
+ Init {} { U = 1 }
+ OutputSolidStats {} stdout
+ OutputTime { istep = 10 } stdout
+ OutputProjectionStats { istep = 10 } stdout
+ OutputSimulation { start = end } channel_128.gfs {
variables = U,V
}
}
-GfsBox { left = GfsBoundaryInflowConstant 1 }
+GfsBox { left = BoundaryInflowConstant 1 }
GfsBox {}
GfsBox {}
-GfsBox { right = GfsBoundaryOutflow }
+GfsBox { right = BoundaryOutflow }
1 2 right
2 3 right
3 4 right
EOF
-rm -f channel_128.sim
-gerris2D channel.sim > log128
-cat <<EOF > channel.sim
+cat <<EOF | gerris2D - > log256
4 3 GfsSimulation GfsBox GfsGEdge {} {
- GfsTime { end = 1 }
- GfsRefine 6
+ Time { end = 1 }
+ Refine 6
GtsSurfaceFile channel.gts
- GfsInitFlowConstant {} { U = 1 }
- GfsOutputSolidStats {} stdout
- GfsOutputTime { istep = 10 } stdout
- GfsOutputProjectionStats { istep = 10 } stdout
- GfsOutputSimulation { start = end } channel_256.sim {
+ Init {} { U = 1 }
+ OutputSolidStats {} stdout
+ OutputTime { istep = 10 } stdout
+ OutputProjectionStats { istep = 10 } stdout
+ OutputSimulation { start = end } channel_256.gfs {
variables = U,V
}
}
-GfsBox { left = GfsBoundaryInflowConstant 1 }
+GfsBox { left = BoundaryInflowConstant 1 }
GfsBox {}
GfsBox {}
-GfsBox { right = GfsBoundaryOutflow }
+GfsBox { right = BoundaryOutflow }
1 2 right
2 3 right
3 4 right
EOF
-rm -f channel_256.sim
-gerris2D channel.sim > log256
-cat <<EOF > channel.sim
+cat <<EOF | gerris2D - > log512
4 3 GfsSimulation GfsBox GfsGEdge {} {
- GfsTime { end = 1 }
- GfsRefine 7
+ Time { end = 1 }
+ Refine 7
GtsSurfaceFile channel.gts
- GfsInitFlowConstant {} { U = 1 }
- GfsOutputSolidStats {} stdout
- GfsOutputTime { istep = 10 } stdout
- GfsOutputProjectionStats { istep = 10 } stdout
- GfsOutputSimulation { start = end } channel_512.sim {
+ Init {} { U = 1 }
+ OutputSolidStats {} stdout
+ OutputTime { istep = 10 } stdout
+ OutputProjectionStats { istep = 10 } stdout
+ OutputSimulation { start = end } channel_512.gfs {
variables = U,V
}
}
-GfsBox { left = GfsBoundaryInflowConstant 1 }
+GfsBox { left = BoundaryInflowConstant 1 }
GfsBox {}
GfsBox {}
-GfsBox { right = GfsBoundaryOutflow }
+GfsBox { right = BoundaryOutflow }
1 2 right
2 3 right
3 4 right
EOF
-rm -f channel_512.sim
-gerris2D channel.sim > log512
-error256=`gfscompare2D -n -v channel_256.sim channel_512.sim U 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error128=`gfscompare2D -n -v channel_128.sim channel_256.sim U 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error256full=`gfscompare2D -f 5 -n -v channel_256.sim channel_512.sim U 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error128full=`gfscompare2D -f 5 -n -v channel_128.sim channel_256.sim U 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error256=`gfscompare2D -n -v channel_256.gfs channel_512.gfs U 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error128=`gfscompare2D -n -v channel_128.gfs channel_256.gfs U 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error256full=`gfscompare2D -f 5 -n -v channel_256.gfs channel_512.gfs U 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error128full=`gfscompare2D -f 5 -n -v channel_128.gfs channel_256.gfs U 2>&1 | awk '{if ($1 == "total") print $0;}'`
cat <<EOF
% command: channel.sh
@@ -129,10 +123,10 @@ cat <<EOF
\end{table}
EOF
-error256=`gfscompare2D -n -v channel_256.sim channel_512.sim V 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error128=`gfscompare2D -n -v channel_128.sim channel_256.sim V 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error256full=`gfscompare2D -f 5 -n -v channel_256.sim channel_512.sim V 2>&1 | awk '{if ($1 == "total") print $0;}'`
-error128full=`gfscompare2D -f 5 -n -v channel_128.sim channel_256.sim V 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error256=`gfscompare2D -n -v channel_256.gfs channel_512.gfs V 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error128=`gfscompare2D -n -v channel_128.gfs channel_256.gfs V 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error256full=`gfscompare2D -f 5 -n -v channel_256.gfs channel_512.gfs V 2>&1 | awk '{if ($1 == "total") print $0;}'`
+error128full=`gfscompare2D -f 5 -n -v channel_128.gfs channel_256.gfs V 2>&1 | awk '{if ($1 == "total") print $0;}'`
cat <<EOF
diff --git a/test/euler/scripts/merging.sh b/test/euler/scripts/merging.sh
index 98b0715..5f40563 100755
--- a/test/euler/scripts/merging.sh
+++ b/test/euler/scripts/merging.sh
@@ -18,7 +18,7 @@ while test $# -gt 0; do
case $1 in
--convective)
- convective="GfsAdvectionParams {
+ convective="AdvectionParams {
flux = gfs_face_velocity_convective_flux
}"
;;
@@ -39,79 +39,79 @@ mkdir merging/run3
tmax=4.0
cd merging/run1
-cat <<EOF > merging.sim
+cat <<EOF > merging.gfs
1 0 GfsSimulation GfsBox GfsGEdge {} {
- GfsTime { end = $tmax }
+ Time { end = $tmax }
$convective
- GfsRefine {
+ Refine {
double r = sqrt (x*x + y*y);
return r < 0.03125 ? 10 : r < 0.0625 ? 9 : r < 0.125 ? 8 : r < 0.25 ? 7 : 6;
}
- GfsInitVorticity {} {
+ InitVorticity {} {
double gaussian (double xo, double yo, double scale) {
return 2.*M_PI*exp (- 2.*((x - xo)*(x - xo) + (y - yo)*(y - yo))/(scale*scale));
}
return gaussian (0, 0.01, 0.01) + gaussian (0, -0.01, 0.01);
}
- GfsOutputTime { istep = 1 } stdout
- GfsOutputScalarNorm { istep = 1 } stdout { v = Divergence }
- GfsOutputProjectionStats { istep = 1 } stdout
- GfsOutputSimulation { step = 0.2 } sim-%3.1f {}
- GfsOutputTiming { start = end } stdout
+ OutputTime { istep = 1 } stdout
+ OutputScalarNorm { istep = 1 } stdout { v = Divergence }
+ OutputProjectionStats { istep = 1 } stdout
+ OutputSimulation { step = 0.2 } sim-%3.1f {}
+ OutputTiming { start = end } stdout
}
GfsBox {}
EOF
-gerris2D merging.sim > log
+gerris2D merging.gfs > log
cd ../run2
-cat <<EOF > merging.sim
+cat <<EOF > merging.gfs
1 0 GfsSimulation GfsBox GfsGEdge {} {
- GfsTime { end = $tmax }
+ Time { end = $tmax }
$convective
- GfsRefine {
+ Refine {
double r = sqrt (x*x + y*y);
return r < 0.03125 ? 11 : r < 0.0625 ? 10 : r < 0.09375 ? 9 : r < 0.125 ? 8 : r < 0.25 ? 7 : 6;
}
- GfsInitVorticity {} {
+ InitVorticity {} {
double gaussian (double xo, double yo, double scale) {
return 2.*M_PI*exp (- 2.*((x - xo)*(x - xo) + (y - yo)*(y - yo))/(scale*scale));
}
return gaussian (0, 0.01, 0.01) + gaussian (0, -0.01, 0.01);
}
- GfsOutputTime { istep = 1 } stdout
- GfsOutputScalarNorm { istep = 1 } stdout { v = Divergence }
- GfsOutputProjectionStats { istep = 1 } stdout
- GfsOutputSimulation { step = 0.2 } sim-%3.1f {}
- GfsOutputTiming { start = end } stdout
+ OutputTime { istep = 1 } stdout
+ OutputScalarNorm { istep = 1 } stdout { v = Divergence }
+ OutputProjectionStats { istep = 1 } stdout
+ OutputSimulation { step = 0.2 } sim-%3.1f {}
+ OutputTiming { start = end } stdout
}
GfsBox {}
EOF
-gerris2D merging.sim > log
+gerris2D merging.gfs > log
cd ../run3
-cat <<EOF > merging.sim
+cat <<EOF > merging.gfs
1 0 GfsSimulation GfsBox GfsGEdge {} {
- GfsTime { end = $tmax }
+ Time { end = $tmax }
$convective
- GfsRefine {
+ Refine {
double r = sqrt (x*x + y*y);
return r < 0.03125 ? 12 : r < 0.046875 ? 11 : r < 0.0625 ? 10 : r < 0.09375 ? 9 : r < 0.125 ? 8 : r < 0.25 ? 7 : 6;
}
- GfsInitVorticity {} {
+ InitVorticity {} {
double gaussian (double xo, double yo, double scale) {
return 2.*M_PI*exp (- 2.*((x - xo)*(x - xo) + (y - yo)*(y - yo))/(scale*scale));
}
return gaussian (0, 0.01, 0.01) + gaussian (0, -0.01, 0.01);
}
- GfsOutputTime { istep = 1 } stdout
- GfsOutputScalarNorm { istep = 1 } stdout { v = Divergence }
- GfsOutputProjectionStats { istep = 1 } stdout
- GfsOutputSimulation { step = 0.2 } sim-%3.1f {}
- GfsOutputTiming { start = end } stdout
+ OutputTime { istep = 1 } stdout
+ OutputScalarNorm { istep = 1 } stdout { v = Divergence }
+ OutputProjectionStats { istep = 1 } stdout
+ OutputSimulation { step = 0.2 } sim-%3.1f {}
+ OutputTiming { start = end } stdout
}
GfsBox {}
EOF
-gerris2D merging.sim > log
+gerris2D merging.gfs > log
cd ..
uerror=`mktemp /tmp/uerror.XXXXXX`
diff --git a/test/euler/scripts/report.sh b/test/euler/scripts/report.sh
index 38f94d7..8cdaad1 100755
--- a/test/euler/scripts/report.sh
+++ b/test/euler/scripts/report.sh
@@ -78,10 +78,10 @@ for file in $1; do
params=`echo $command | awk '{
print substr ($1, 1, index ($1, ".sh") - 1);
}'`
- xmgr -hardcopy -noask -eps -device 2 -printfile figures/$sname.eps -p parameters/$params.par $file $testfile > /dev/null 2>&1
+ xmgrace -hardcopy -noask -hdevice EPS -printfile figures/$sname.eps -p parameters/$params.par $file $testfile > /dev/null 2>&1
echo "\\begin{figure}" >> $texfile.tex
echo "\\begin{center}" >> $texfile.tex
- echo "\\psfig{file=figures/$sname.eps, height=\\hsize, angle=270}" >> $texfile.tex
+ echo "\\psfig{file=figures/$sname.eps, width=\\hsize}" >> $texfile.tex
echo "\\end{center}" >> $texfile.tex
esname=`echo $sname | awk 'BEGIN{FS=""}{for (i = 1; i <= NF; i++)if($i=="_")printf("\\\_"); else printf("%s", $i);}'`
echo "\\caption{$esname: {\tt $command}}" >> $texfile.tex
@@ -118,4 +118,5 @@ echo "\\end{document}" >> $texfile.tex
latex -interaction=nonstopmode $texfile.tex > /dev/null 2>&1
latex -interaction=nonstopmode $texfile.tex > /dev/null 2>&1
dvips $texfile.dvi -o $texfile.ps > /dev/null 2>&1
-rm -f $texfile.log $texfile.aux $texfile.dvi
+rm -f $texfile.log $texfile.aux $texfile.dvi $texfile.lof $texfile.toc $texfile.tex
+
diff --git a/test/euler/stationary1/stationary1.gfs b/test/euler/stationary1/stationary1.gfs
new file mode 100644
index 0000000..9ad508d
--- /dev/null
+++ b/test/euler/stationary1/stationary1.gfs
@@ -0,0 +1,49 @@
+# Title: Estimation of the numerical viscosity
+#
+# Description:
+#
+# \begin{figure}[htbp]
+# \begin{center}
+# \includegraphics[width=0.8\hsize]{divmax.eps}
+# \end{center}
+# \end{figure}
+#
+# \begin{figure}[htbp]
+# \begin{center}
+# \includegraphics[width=0.8\hsize]{divL2.eps}
+# \end{center}
+# \end{figure}
+#
+# \begin{figure}[htbp]
+# \begin{center}
+# \includegraphics[width=0.8\hsize]{kinetic.eps}
+# \end{center}
+# \end{figure}
+#
+# \begin{figure}[htbp]
+# \begin{center}
+# \includegraphics[width=0.8\hsize]{reynolds.eps}
+# \end{center}
+# \end{figure}
+#
+# Author: St\'ephane Popinet
+# Command: sh stationary1.sh
+# Version: 0.6.4
+# Required files: stationary1.sh
+# Running time: 3 minutes
+# Generated files: divmax.eps reynolds.eps divL2.eps kinetic.eps
+#
+1 2 GfsSimulation GfsBox GfsGEdge {} {
+ Time { end = 2 }
+ Refine LEVEL
+ Init {} {
+ U = (- cos (2.*M_PI*x)*sin (2.*M_PI*y))
+ V = (sin (2.*M_PI*x)*cos (2.*M_PI*y))
+ }
+ OutputScalarNorm { istep = 1 } divLEVEL { v = Divergence }
+ OutputScalarSum { istep = 1 } kineticLEVEL { v = Velocity2 }
+ OutputScalarSum { istep = 1 } stdout { v = Velocity2 }
+}
+GfsBox {}
+1 1 right
+1 1 top
diff --git a/test/euler/stationary1/stationary1.sh b/test/euler/stationary1/stationary1.sh
new file mode 100644
index 0000000..75f8c63
--- /dev/null
+++ b/test/euler/stationary1/stationary1.sh
@@ -0,0 +1,36 @@
+rm -f reynolds
+
+for level in 5 6 7; do
+ sed "s/LEVEL/$level/" < stationary1.gfs | gerris2D - | awk -v m=1 -v level=$level '{
+ time = $3
+ ke = $5
+ if (time == 0)
+ ke0 = ke;
+ }END{
+ a = -log(ke/ke0)/time
+ nu = a/(4.*(2.*m*3.14159265359)^2)
+ print level " " 1./nu
+ }' >> reynolds
+done
+
+cat <<EOF | gnuplot
+ set term postscript eps
+ set output 'divmax.eps'
+ set xlabel 'Time'
+ set ylabel 'Divergence Max'
+ plot [0:2]'div5' u 3:9 t "5" w l, 'div6' u 3:9 t "6" w l, 'div7' u 3:9 t "7" w l
+ set output 'divL2.eps'
+ set ylabel 'Divergence L2'
+ plot [0:2]'div5' u 3:7 t "5" w l, 'div6' u 3:7 t "6" w l, 'div7' u 3:7 t "7" w l
+ set output 'kinetic.eps'
+ set ylabel 'Kinetic energy'
+ plot [0:2]'kinetic5' u 3:5 t "5" w l, 'kinetic6' u 3:5 t "6" w l, 'kinetic7' u 3:5 t "7" w l
+ set output 'reynolds.eps'
+ set xlabel 'Level'
+ set ylabel 'Effective Reynolds number'
+ set nokey
+ set logscale y
+ plot 'reynolds' u 1:2 w lp
+EOF
+
+rm -f div? kinetic? reynolds
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list