[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
s.popinet at niwa.co.nz
Fri May 15 02:52:47 UTC 2009
The following commit has been merged in the upstream branch:
commit c7ce26584581f868ea3bf083f7690a7ac825bea8
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date: Wed Oct 5 08:09:02 2005 +1000
Fix for upwinding of MAC velocities
The "lid-driven cavity" test case was broken by patch "Face boundary
conditions modified for consistent upwinding". When Dirichlet
conditions are imposed on the normal velocities, strict upwinding can
cause a violation of the solvability condition for the Poisson
equation. This patch fixes this problem by imposing the boundary
condition but only for normal MAC velocities (in effect reverting to
the old formulation in this case only).
darcs-hash:20051004220902-fbd8f-b9d71af2b2995f7ddbf6cc481f06c337f0d5998c.gz
diff --git a/src/advection.c b/src/advection.c
index 2def072..a09379a 100644
--- a/src/advection.c
+++ b/src/advection.c
@@ -516,7 +516,10 @@ void gfs_face_advected_normal_velocity (const FttCellFace * face,
if (GFS_FACE_FRACTION (face) == 0.)
return;
- GFS_FACE_NORMAL_VELOCITY_LEFT (face) = u = gfs_face_upwinded_value (face, par->upwinding, par->u);
+ GFS_FACE_NORMAL_VELOCITY_LEFT (face) = u =
+ GFS_CELL_IS_BOUNDARY (face->neighbor) ?
+ GFS_STATE (face->neighbor)->f[FTT_OPPOSITE_DIRECTION (face->d)].v :
+ gfs_face_upwinded_value (face, par->upwinding, par->u);
switch (ftt_face_type (face)) {
case FTT_FINE_FINE:
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list