← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3729: get the shear and normal viscous stress in each interaction.

 

------------------------------------------------------------
revno: 3729
committer: Donia <donia.marzougui@xxxxxxxxxxxxxxx>
timestamp: Fri 2013-10-25 09:27:55 +0200
message:
  get the shear and normal viscous stress in each interaction.
modified:
  lib/triangulation/FlowBoundingSphere.hpp
  pkg/dem/FlowEngine.cpp
  pkg/dem/FlowEngine.hpp


--
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/FlowBoundingSphere.hpp'
--- lib/triangulation/FlowBoundingSphere.hpp	2013-10-25 07:27:55 +0000
+++ lib/triangulation/FlowBoundingSphere.hpp	2013-10-25 07:27:55 +0000
@@ -85,6 +85,8 @@
 		vector <Vector3r> normalV;
 		vector <Real> surfaceDistance;
 		vector <int> onlySpheresInteractions;
+		vector <Matrix3r> shearStressInteraction;
+		vector <Matrix3r> normalStressInteraction;
 		
 		void Localize();
 		void Compute_Permeability();

=== modified file 'pkg/dem/FlowEngine.cpp'
--- pkg/dem/FlowEngine.cpp	2013-10-25 07:27:55 +0000
+++ pkg/dem/FlowEngine.cpp	2013-10-25 07:27:55 +0000
@@ -593,7 +593,7 @@
 
 		typedef typename Solver::Tesselation Tesselation;
 		const Tesselation& Tes = flow.T[flow.currentTes];
-		flow.deltaShearVel.clear(); flow.normalV.clear(); flow.deltaNormVel.clear(); flow.surfaceDistance.clear(); flow.onlySpheresInteractions.clear();
+		flow.deltaShearVel.clear(); flow.normalV.clear(); flow.deltaNormVel.clear(); flow.surfaceDistance.clear(); flow.onlySpheresInteractions.clear(); flow.normalStressInteraction.clear(); flow.shearStressInteraction.clear();
 
 
 		for ( int i=0; i< ( int ) flow.Edge_ids.size(); i++ ) {
@@ -670,7 +670,9 @@
 				/// Compute the viscous shear stress on each particle
 				if (viscousShearBodyStress){
 					flow.viscousBodyStress[id1] += visc_f * O1C_vect.transpose()/ (4.0/3.0 *3.14* pow(r1,3));
-					flow.viscousBodyStress[id2] += (-visc_f) * O2C_vect.transpose()/ (4.0/3.0 *3.14* pow(r2,3));}
+					flow.viscousBodyStress[id2] += (-visc_f) * O2C_vect.transpose()/ (4.0/3.0 *3.14* pow(r2,3));
+					flow.shearStressInteraction.push_back(visc_f * O1O2_vect.transpose()/(4.0/3.0 *3.14* pow(r1,3)));
+				}
 			}
 
 			/// Compute the normal lubrication force applied on each particle
@@ -684,7 +686,9 @@
 			/// Compute the normal lubrication stress on each particle
 				if (viscousNormalBodyStress){
 					flow.lubBodyStress[id1] += lub_f * O1C_vect.transpose()/ (4.0/3.0 *3.14* pow(r1,3));
-					flow.lubBodyStress[id2] += (-lub_f) *O2C_vect.transpose() / (4.0/3.0 *3.14* pow(r2,3));}
+					flow.lubBodyStress[id2] += (-lub_f) *O2C_vect.transpose() / (4.0/3.0 *3.14* pow(r2,3));
+					flow.normalStressInteraction.push_back(lub_f * O1O2_vect.transpose()/(4.0/3.0 *3.14* pow(r1,3)));
+				}
 			}
 
 			if (create_file){

=== modified file 'pkg/dem/FlowEngine.hpp'
--- pkg/dem/FlowEngine.hpp	2013-10-25 07:27:55 +0000
+++ pkg/dem/FlowEngine.hpp	2013-10-25 07:27:55 +0000
@@ -99,6 +99,10 @@
 			return (flow->deltaShearVel[interaction]);}
 		TPL Vector3r normalVelocity(unsigned int interaction, Solver& flow) {
 			return (flow->deltaNormVel[interaction]);}
+		TPL Matrix3r normalStressInteraction(unsigned int interaction, Solver& flow) {
+			return (flow->normalStressInteraction[interaction]);}
+		TPL Matrix3r shearStressInteraction(unsigned int interaction, Solver& flow) {
+			return (flow->shearStressInteraction[interaction]);}
 		TPL Vector3r normalVect(unsigned int interaction, Solver& flow) {
 			return (flow->normalV[interaction]);}
 		TPL Real surfaceDistanceParticle(unsigned int interaction, Solver& flow) {
@@ -163,6 +167,8 @@
 		Vector3r 	_fluidForce(unsigned int id_sph) {return fluidForce(id_sph,solver);}
 		Vector3r 	_shearVelocity(unsigned int interaction) {return shearVelocity(interaction,solver);}
 		Vector3r 	_normalVelocity(unsigned int interaction) {return normalVelocity(interaction,solver);}
+		Matrix3r 	_normalStressInteraction(unsigned int interaction) {return normalStressInteraction(interaction,solver);}
+		Matrix3r 	_shearStressInteraction(unsigned int interaction) {return shearStressInteraction(interaction,solver);}
 		Vector3r 	_normalVect(unsigned int interaction) {return normalVect(interaction,solver);}
 		Real	 	_surfaceDistanceParticle(unsigned int interaction) {return surfaceDistanceParticle(interaction,solver);}
 		int	 	_onlySpheresInteractions(unsigned int interaction) {return onlySpheresInteractions(interaction,solver);}
@@ -371,6 +377,8 @@
 		Vector3r 	_normalLubForce(unsigned int id_sph) {return normalLubForce(id_sph,solver);}
 		Matrix3r 	_bodyShearLubStress(unsigned int id_sph) {return bodyShearLubStress(id_sph,solver);}
 		Matrix3r 	_bodyNormalLubStress(unsigned int id_sph) {return bodyNormalLubStress(id_sph,solver);}
+		Matrix3r 	_normalStressInteraction(unsigned int interaction) {return normalStressInteraction(interaction,solver);}
+		Matrix3r 	_shearStressInteraction(unsigned int interaction) {return shearStressInteraction(interaction,solver);}
 		Vector3r 	_shearVelocity(unsigned int id_sph) {return shearVelocity(id_sph,solver);}
 		Vector3r 	_normalVelocity(unsigned int id_sph) {return normalVelocity(id_sph,solver);}
 		Vector3r 	_normalVect(unsigned int id_sph) {return normalVect(id_sph,solver);}
@@ -431,6 +439,8 @@
 			.def("bodyShearLubStress",&PeriodicFlowEngine::_bodyShearLubStress,(python::arg("Id_sph")),"Return the shear lubrication stress on sphere Id_sph.")
 			.def("bodyNormalLubStress",&PeriodicFlowEngine::_bodyNormalLubStress,(python::arg("Id_sph")),"Return the normal lubrication stress on sphere Id_sph.")
 			.def("shearVelocity",&PeriodicFlowEngine::_shearVelocity,(python::arg("id_sph")),"Return the shear velocity of the interaction.")
+			.def("normalStressInteraction",&PeriodicFlowEngine::_normalStressInteraction,(python::arg("id_sph")),"Return the shear velocity of the interaction.")
+			.def("shearStressInteraction",&PeriodicFlowEngine::_shearStressInteraction,(python::arg("id_sph")),"Return the shear velocity of the interaction.")
 			.def("normalVelocity",&PeriodicFlowEngine::_normalVelocity,(python::arg("id_sph")),"Return the normal velocity of the interaction.")
 			.def("normalVect",&PeriodicFlowEngine::_normalVect,(python::arg("id_sph")),"Return the normal vector between particles.")
 			.def("surfaceDistanceParticle",&PeriodicFlowEngine::_surfaceDistanceParticle,(python::arg("interaction")),"Return the distance between particles.")