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

Stephane Popinet s.popinet at niwa.co.nz
Fri May 15 02:52:52 UTC 2009


The following commit has been merged in the upstream branch:
commit 204605ff00f13d57d523621906ef2f367e785f6a
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date:   Tue Oct 11 10:21:03 2005 +1000

    Couette flow test case
    
    darcs-hash:20051011002103-fbd8f-c67ae063c1a461125744a3af8e9a0c4c80584b78.gz

diff --git a/test/Makefile.am b/test/Makefile.am
index a48a4d4..e38a1e6 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -13,7 +13,8 @@ TESTDIRS = \
 	capwave \
 	waves \
 	geo \
-	lid
+	lid \
+	couette
 
 EXTRA_DIST = \
 	template.tex \
diff --git a/test/couette/couette.gfs b/test/couette/couette.gfs
new file mode 100644
index 0000000..ecd7c54
--- /dev/null
+++ b/test/couette/couette.gfs
@@ -0,0 +1,80 @@
+# Title: Creeping Couette flow of Generalised Newtonian fluids
+#
+# Description:
+#
+# Following \cite{vola2004}, we solve for the 2D creeping flow between
+# two coaxial cylinders. The inner cylinder rotates at a constant
+# speed. The outer cylinder is fixed. The viscosity is a function of
+# the second principal invariant of the shear strain rate tensor:
+# $$|D|=\sqrt{\sum_{i,j}D_{ij}D_{ij}}$$
+# where $D_{ij}=(\partial_iu_j+\partial_ju_i)/2$.
+#
+# We use a general Herschel-Bulkley formulation of the form:
+# $$\mu(|D|)={\tau_y\over 2|D|}+\mu|D|^{N-1},$$ where $\tau_y$ is the
+# yield stress. The solutions obtained for the stationary tangential
+# velocity profiles for Newtonian, Power law ($N=0.5$),
+# Herschel-Bulkley ($\mu=0.0672$, $\tau_y=0.12$, $N=0.5$) and Bingham
+# ($\mu=1$, $\tau_y=10$, $N=1$) fluids are illustrated on Figure
+# \ref{prof}, together with the analytical solutions given by
+# \cite{bird87}.
+#
+# The Bingham fluid case is a particularly severe test of the
+# diffusion solver, as the outer part of the fluid ring ($r>0.35$)
+# behaves likes a rigid body attached to the outer boundary.
+#
+# \begin{figure}[htbp]
+# \begin{center}
+# \includegraphics[width=\hsize]{prof.eps}
+# \end{center}
+# \caption{Tangential velocity as a function of radial position for
+# various Generalised Newtonian fluids.}
+# \label{prof}
+# \end{figure}
+#
+# Author: St\'ephane Popinet
+# Command: sh couette.sh couette.gfs
+# Version: 0.8.0
+# Required files: couette.sh profile prof-0.ref prof-1.ref prof-2.ref prof-3.ref
+# Running time: 32 minutes
+# Generated files: prof.eps
+#
+1 0 GfsSimulation GfsBox GfsGEdge {} {
+  Time { iend = 100 dtmax = 1e-2 }
+  Refine 6
+  GtsSurfaceFile outer.gts
+  GtsSurfaceFile inner.gts
+  AdvectionParams { scheme = none }
+  SourceViscosity {} {
+    double mu, ty, N, mumax = 1000.;
+    double m;
+
+    switch (MODEL) {
+    case 0: # Newtonian
+      mu = 1.; ty = 0.; N = 1.; break;
+    case 1: # Power-law (shear-thinning)
+      mu = 0.08; ty = 0.; N = 0.5; break;
+    case 2: # Herschel-Bulkley
+      mu = 0.0672; ty = 0.12; N = 0.5; break;
+    case 3: # Bingham
+      mu = 1.; ty = 10.; N = 1.; break;
+    }
+    if (D2 > 0.)
+      m = ty/(2.*D2) + mu*exp ((N - 1.)*log (D2));
+    else {
+      if (ty > 0. || N < 1.) m = mumax;
+      else m = N == 1. ? mu : 0.;
+    }
+    return MIN (m, mumax);
+  } {
+    # Crank-Nicholson does not converge for these cases, we need backward Euler
+    # (beta = 0.5 -> Crank-Nicholson, beta = 1 -> backward Euler)
+    beta = 1
+  }
+  GfsSurfaceBc U Dirichlet (x*x + y*y > 0.140625 ? 0. : - ay)
+  GfsSurfaceBc V Dirichlet (x*x + y*y > 0.140625 ? 0. :   ax)
+  EventStop { istep = 1 } U 1e-4 DU
+
+  OutputScalarNorm { istep = 1 } du-MODEL { v = DU }
+  OutputLocation { start = end } prof-MODEL profile
+}
+GfsBox {}
diff --git a/test/couette/couette.sh b/test/couette/couette.sh
new file mode 100644
index 0000000..3a594fa
--- /dev/null
+++ b/test/couette/couette.sh
@@ -0,0 +1,44 @@
+if ! $donotrun; then
+    shapes ellipse | transform -i --scale 1.9999 > outer.gts
+    shapes ellipse | transform > inner.gts
+    for model in 0 1 2 3; do
+	if sed "s/MODEL/$model/g" < $1 | gerris2D -; then :
+	else
+	    exit 1
+	fi
+    done
+fi
+
+if cat <<EOF | gnuplot ; then :
+set term postscript eps color lw 3 solid 20
+set output 'prof.eps'
+set xlabel 'r'
+set ylabel 'Tangential velocity'
+powerlaw(r,N)=r*((0.5/r)**(2./N) - 1.)/((0.5/0.25)**(2./N) - 1.)
+hb(r,Rl)=(r > Rl ? 0. : r*sqrt(2.)*0.12*0.12/(4.*0.0672*0.0672)*(3./4.+(Rl/r)**4/4.-(Rl/r)**2+log(Rl/r)))
+bingham(r,Rl)=(r > Rl ? 0. : r*sqrt(2.)*10./4.*((Rl/r)**2-2.*log(Rl/r)-1.))
+plot [0.25:0.5][0:0.25]powerlaw(x,1.) t "Newtonian", 'prof-0' u 2:7 w p ps 2 pt 9 t "",\
+               powerlaw(x,0.5) t "Power law", 'prof-1' u 2:7 w p ps 2 pt 9 t "",\
+               hb(x,0.4637) t "Herschel-Bulkley", 'prof-2' u 2:7 w p ps 2 pt 9 t "",\
+               bingham(x,0.34924) t "Bingham", 'prof-3' u 2:7 w p ps 2 pt 9 t ""
+EOF
+else
+   exit 1
+fi
+
+if cat <<EOF | python ; then :
+from check import *
+from sys import *
+print (Curve('prof-0',2,7) - Curve('prof-0.ref',1,2)).normi(),\
+   (Curve('prof-1',2,7) - Curve('prof-1.ref',1,2)).normi(),\
+   (Curve('prof-2',2,7) - Curve('prof-2.ref',1,2)).normi(),\
+   (Curve('prof-3',2,7) - Curve('prof-3.ref',1,2)).normi()
+if (Curve('prof-0',2,7) - Curve('prof-0.ref',1,2)).normi() > 1.8e-3 or \
+   (Curve('prof-1',2,7) - Curve('prof-1.ref',1,2)).normi() > 1.8e-3 or \
+   (Curve('prof-2',2,7) - Curve('prof-2.ref',1,2)).normi() > 3.2e-3 or \
+   (Curve('prof-3',2,7) - Curve('prof-3.ref',1,2)).normi() > 7.8e-3:
+    exit(1)
+EOF
+else
+   exit 1
+fi
diff --git a/test/couette/prof-0.ref b/test/couette/prof-0.ref
new file mode 100644
index 0000000..9c877ff
--- /dev/null
+++ b/test/couette/prof-0.ref
@@ -0,0 +1,19 @@
+0.2625 0.22996
+0.275 0.211364
+0.2875 0.194022
+0.3 0.177778
+0.3125 0.1625
+0.325 0.148077
+0.3375 0.134414
+0.35 0.121429
+0.3625 0.109052
+0.375 0.0972222
+0.3875 0.0858871
+0.4 0.075
+0.4125 0.0645202
+0.425 0.0544118
+0.4375 0.0446429
+0.45 0.0351852
+0.4625 0.0260135
+0.475 0.0171053
+0.4875 0.00844017
diff --git a/test/couette/prof-1.ref b/test/couette/prof-1.ref
new file mode 100644
index 0000000..cfab431
--- /dev/null
+++ b/test/couette/prof-1.ref
@@ -0,0 +1,19 @@
+0.2625 0.212857
+0.275 0.182017
+0.2875 0.156171
+0.3 0.134321
+0.3125 0.1157
+0.325 0.099711
+0.3375 0.0858846
+0.35 0.0738484
+0.3625 0.0633045
+0.375 0.0540123
+0.3875 0.0457767
+0.4 0.0384375
+0.4125 0.0318631
+0.425 0.0259444
+0.4375 0.0205904
+0.45 0.0157247
+0.4625 0.0112833
+0.475 0.00721169
+0.4875 0.00346374
diff --git a/test/couette/prof-2.ref b/test/couette/prof-2.ref
new file mode 100644
index 0000000..088d499
--- /dev/null
+++ b/test/couette/prof-2.ref
@@ -0,0 +1,19 @@
+0.2625 0.187282
+0.275 0.139583
+0.2875 0.103209
+0.3 0.0755254
+0.3125 0.0545424
+0.325 0.0387403
+0.3375 0.0269494
+0.35 0.0182619
+0.3625 0.0119687
+0.375 0.00751212
+0.3875 0.00445143
+0.4 0.00243654
+0.4125 0.0011882
+0.425 0.000482919
+0.4375 0.000141315
+0.45 1.90903e-05
+0.4625 1.21433e-08
+0.475 0
+0.4875 0
diff --git a/test/couette/prof-3.ref b/test/couette/prof-3.ref
new file mode 100644
index 0000000..a156d4f
--- /dev/null
+++ b/test/couette/prof-3.ref
@@ -0,0 +1,19 @@
+0.2625 0.184733
+0.275 0.131092
+0.2875 0.0879642
+0.3 0.0543616
+0.3125 0.0294426
+0.325 0.012483
+0.3375 0.00285504
+0.35 0
+0.3625 0
+0.375 0
+0.3875 0
+0.4 0
+0.4125 0
+0.425 0
+0.4375 0
+0.45 0
+0.4625 0
+0.475 0
+0.4875 0
diff --git a/test/couette/profile b/test/couette/profile
new file mode 100644
index 0000000..9898d1d
--- /dev/null
+++ b/test/couette/profile
@@ -0,0 +1,19 @@
+0.2625 0 0
+0.275 0 0
+0.2875 0 0
+0.30 0 0
+0.3125 0 0
+0.325 0 0
+0.3375 0 0
+0.35 0 0
+0.3625 0 0
+0.375 0 0
+0.3875 0 0
+0.40 0 0
+0.4125 0 0
+0.425 0 0
+0.4375 0 0
+0.45 0 0
+0.4625 0 0
+0.475 0 0
+0.4875 0 0
diff --git a/test/template.tex b/test/template.tex
index 0e159e6..a797a22 100644
--- a/test/template.tex
+++ b/test/template.tex
@@ -49,6 +49,7 @@ current stable branch of the version-controlled source code.
 \section{Navier-Stokes}
 
 \input{lid/lid.tex}
+\input{couette/couette.tex}
 
 \section{Solid boundaries}
 
diff --git a/test/tests.bib b/test/tests.bib
index 56b10d6..aeec30e 100644
--- a/test/tests.bib
+++ b/test/tests.bib
@@ -21,6 +21,14 @@
   local_url =    {almgren1.ps.gz}
 }
 
+ at Book{bird87,
+  author =	 {R. B. Bird and R. C. Armstrong and O. Hassager},
+  title = 	 {Dynamics of polymeric liquids},
+  publisher = 	 {Wiley-Interscience},
+  year = 	 1987,
+  edition =	 {second edition}
+}
+
 @PhdThesis{dupont,
   author = 	 {F. Dupont},
   title = 	 {Comparison of numerical methods for modelling ocean circulation in basins with irregular coasts},
@@ -140,3 +148,12 @@
   url =          {http://marine.rutgers.edu/po/index.php?model=test-problems&title=circle}
 }
 
+ at Article{vola2004,
+  author = 	 {D. Vola and F. Babik and J.-C Latch\'e},
+  title = 	 {On a numerical strategy to compute gravity currents of non-Newtonian fluids},
+  journal = 	 {J. Comput. Phys.},
+  year = 	 2004,
+  volume =	 201,
+  number =	 2,
+  pages =	 {397-420}
+}

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list