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

Stephane Popinet popinet at users.sf.net
Fri May 15 02:54:35 UTC 2009


The following commit has been merged in the upstream branch:
commit e48a40157c88c4fb5a54bbc555d656ab21c8c127
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Wed Sep 5 11:27:01 2007 +1000

    'kinetic' test case uses a mollified volume fraction
    
    darcs-hash:20070905012701-d4795-aa40fd94baa9b24228a40b141510ca808070e84d.gz

diff --git a/test/kinetic/kinetic.gfs b/test/kinetic/kinetic.gfs
index f509cda..3badab7 100644
--- a/test/kinetic/kinetic.gfs
+++ b/test/kinetic/kinetic.gfs
@@ -4,8 +4,9 @@
 #
 # A dense droplet moves through a lighter background fluid. The
 # kinetic energy decreases due to viscous dissipation (Figure
-# \ref{k}). A previous non-conservative discretisation of the viscous
-# tensor was causing a non-physical increase in kinetic energy.
+# \ref{k}). For these density and viscosity ratios of 1000, the
+# calculation is stable only if a "mollified" volume fraction is used
+# to compute the average density and viscosity.
 #
 # \begin{figure}[htbp]
 # \caption{\label{k}Evolution of the kinetic energy.}
@@ -23,9 +24,11 @@
     Time { end = 0.5 }
 
     Global {
-	#define rho(T) (T + 0.01*(1. - T))
-	#define level 7
-	#define radius 0.05
+        #define var(T,min,max) (CLAMP(T,0,1)*(max - min) + min)
+        #define rho(T) var(T, 0.001, 1.)
+        #define mu(T)  var(T, 1e-6, 1e-3)
+        #define level 7
+        #define radius 0.05
     }
 
     Refine level
@@ -34,20 +37,21 @@
     ApproxProjectionParams { tolerance = 1e-6 }
 
     VariableTracerVOF T
+    VariableFiltered T1 T 1
     InitFraction T (- ellipse(-0.3,0,radius,radius))
     Init {} { U = T }
 
-    PhysicalParams { alpha = 1./rho(T) }
-    SourceViscosity (1e-3*T + 1e-5*(1. - T))
+    PhysicalParams { alpha = 1./rho(T1) }
+    SourceViscosity mu(T1)
 
     AdaptVorticity { istep = 1 } { cmax = 0.3 maxlevel = level }
     AdaptGradient { istep = 1 } { cmax = 1e-3 maxlevel = level } T
 
-    OutputScalarSum { istep = 1 } k { v = Velocity2*rho(T) }
+    OutputScalarSum { istep = 1 } k { v = Velocity2*rho(T1) }
     OutputScalarSum { istep = 1 } t { v = T }
 
     EventScript { start = end } {
-	gnuplot <<EOF
+        gnuplot <<EOF
             set term postscript eps color lw 3 solid 20
             set output 'k.eps'
             set xlabel 'Time'
@@ -55,11 +59,11 @@
             set grid
             plot 'k' u 3:5 w l t ''
 EOF
-	if awk '{if ($5 > 8e-3) exit (1);}' < k ; then
-	    return 0;
-	else
-	    return $GFS_STOP;
-	fi
+        if awk '{if ($5 > 7.2e-3) exit (1);}' < k ; then
+            return 0;
+        else
+            return $GFS_STOP;
+        fi
     } 
 }
 GfsBox {}

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list