[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:52:49 UTC 2009
The following commit has been merged in the upstream branch:
commit 858ef57d19740bc0e4c980f11879c8f55e82ed6d
Author: Stephane Popinet <popinet at users.sf.net>
Date: Tue Oct 4 16:11:07 2005 +1000
Surface tension should work with variable density
darcs-hash:20051004061107-d4795-6314f30ae1b8c77a695864a1a01da4087f7ae042.gz
diff --git a/src/tension.c b/src/tension.c
index 2752240..e262eac 100644
--- a/src/tension.c
+++ b/src/tension.c
@@ -86,13 +86,16 @@ static void foreach_cell_tension (FttCell * cell, GfsSourceTension * s)
{
gdouble h = ftt_cell_size (cell);
FttVector nx, ny, nxy;
+ GfsSimulation * sim = gfs_object_simulation (s);
+ gdouble alpha = sim->physical_params.alpha ?
+ gfs_function_value (sim->physical_params.alpha, cell) : 1.;
gfs_youngs_normal (cell, s->g[0], &nx);
gfs_youngs_normal (cell, s->g[1], &ny);
gfs_youngs_normal (cell, s->g[2], &nxy);
- GFS_VARIABLE (cell, s->t[0]->i) = (ny.x - nxy.y)/h;
- GFS_VARIABLE (cell, s->t[1]->i) = (nx.y - nxy.x)/h;
+ GFS_VARIABLE (cell, s->t[0]->i) = alpha*(ny.x - nxy.y)/h;
+ GFS_VARIABLE (cell, s->t[1]->i) = alpha*(nx.y - nxy.x)/h;
}
static void gfs_source_tension_event (GfsEvent * event,
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list