← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3510: FlowEngine: discard blocked cells completely when assembling the permeability matrix

 

------------------------------------------------------------
revno: 3510
committer: Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>
timestamp: Tue 2014-10-28 16:29:05 +0100
message:
  FlowEngine: discard blocked cells completely when assembling the permeability matrix
modified:
  lib/triangulation/FlowBoundingSphereLinSolv.ipp


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'lib/triangulation/FlowBoundingSphereLinSolv.ipp'
--- lib/triangulation/FlowBoundingSphereLinSolv.ipp	2014-10-10 11:45:21 +0000
+++ lib/triangulation/FlowBoundingSphereLinSolv.ipp	2014-10-28 15:29:05 +0000
@@ -200,7 +200,9 @@
 				//Add diagonal term
 				is[T_nnz] = index;
 				js[T_nnz] = index;
-				vs[T_nnz] = (cell->info().kNorm())[0]+ (cell->info().kNorm())[1]+ (cell->info().kNorm())[2]+ (cell->info().kNorm())[3];
+				vs[T_nnz]=0;
+				for (int j=0;j<4;j++) if (!cell->neighbor(j)->info().blocked) vs[T_nnz]+= (cell->info().kNorm())[j];
+// 				vs[T_nnz] = (cell->info().kNorm())[0]+ (cell->info().kNorm())[1]+ (cell->info().kNorm())[2]+ (cell->info().kNorm())[3];
 				if (fluidBulkModulus>0) vs[T_nnz] += (1.f/(dt*fluidBulkModulus*cell->info().invVoidVolume()));
 				++T_nnz;
 			}
@@ -218,7 +220,7 @@
 						vs[T_nnz] = - (cell->info().kNorm())[j];
 						T_nnz++;
 					}
-				} else if (neighbourCell->info().Pcondition) {
+				} else if (neighbourCell->info().Pcondition && !neighbourCell->info().blocked) {
 					//ADD TO b, FIXME : use updated volume change
 					T_b[index-1]+=cell->info().kNorm()[j]*neighbourCell->info().p();
 				}
@@ -298,7 +300,7 @@
 }
 
 template<class _Tesselation, class FlowType>
-void FlowBoundingSphereLinSolv<_Tesselation,FlowType>::copyLinToCells() {for (int ii=1; ii<=ncols; ii++) {T_cells[ii]->info().p()=T_x[ii-1];} }
+void FlowBoundingSphereLinSolv<_Tesselation,FlowType>::copyLinToCells() {for (int ii=1; ii<=ncols; ii++) T_cells[ii]->info().p()=T_x[ii-1];}
 
 template<class _Tesselation, class FlowType>
 void FlowBoundingSphereLinSolv<_Tesselation,FlowType>::copyCellsToLin (Real dt)