yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10170
[Branch ~yade-pkg/yade/git-trunk] Rev 3728: Save the interactions only between spheres into a vector.
------------------------------------------------------------
revno: 3728
committer: Donia <donia.marzougui@xxxxxxxxxxxxxxx>
timestamp: Fri 2013-10-25 09:27:55 +0200
message:
Save the interactions only between spheres into a vector.
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-21 13:11:33 +0000
+++ lib/triangulation/FlowBoundingSphere.hpp 2013-10-25 07:27:55 +0000
@@ -84,6 +84,7 @@
vector <Vector3r> deltaShearVel;
vector <Vector3r> normalV;
vector <Real> surfaceDistance;
+ vector <int> onlySpheresInteractions;
void Localize();
void Compute_Permeability();
=== modified file 'pkg/dem/FlowEngine.cpp'
--- pkg/dem/FlowEngine.cpp 2013-10-22 14:05:23 +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.deltaShearVel.clear(); flow.normalV.clear(); flow.deltaNormVel.clear(); flow.surfaceDistance.clear(); flow.onlySpheresInteractions.clear();
for ( int i=0; i< ( int ) flow.Edge_ids.size(); i++ ) {
@@ -693,6 +693,9 @@
velocity_file.close(); }
if (display_force) cout<<"force tangentielle "<<visc_f<< " force normale "<< lub_f<<endl;
+ if (!hasFictious)
+ flow.onlySpheresInteractions.push_back(i);
+
}
}
}
=== modified file 'pkg/dem/FlowEngine.hpp'
--- pkg/dem/FlowEngine.hpp 2013-10-22 14:05:23 +0000
+++ pkg/dem/FlowEngine.hpp 2013-10-25 07:27:55 +0000
@@ -105,6 +105,10 @@
return (flow->surfaceDistance[interaction]);}
TPL Real edgeSize(Solver& flow) {
return (flow->Edge_ids.size());}
+ TPL Real OSI(Solver& flow) {
+ return (flow->onlySpheresInteractions.size());}
+ TPL int onlySpheresInteractions(unsigned int interaction, Solver& flow) {
+ return (flow->onlySpheresInteractions[interaction]);}
TPL python::list getConstrictions(bool all, Solver& flow) {
vector<Real> csd=flow->getConstrictions(); python::list pycsd;
for (unsigned int k=0;k<csd.size();k++) if ((all && csd[k]!=0) || csd[k]>0) pycsd.append(csd[k]); return pycsd;}
@@ -161,6 +165,7 @@
Vector3r _normalVelocity(unsigned int interaction) {return normalVelocity(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);}
void _imposeFlux(Vector3r pos, Real flux) {return imposeFlux(pos,flux,*solver);}
unsigned int _imposePressure(Vector3r pos, Real p) {return imposePressure(pos,p,solver);}
void _setImposedPressure(unsigned int cond, Real p) {setImposedPressure(cond,p,solver);}
@@ -283,6 +288,8 @@
.def("normalVelocity",&FlowEngine::_normalVelocity,(python::arg("id_sph")),"Return the normal velocity of the interaction.")
.def("normalVect",&FlowEngine::_normalVect,(python::arg("id_sph")),"Return the normal vector between particles.")
.def("surfaceDistanceParticle",&FlowEngine::_surfaceDistanceParticle,(python::arg("interaction")),"Return the distance between particles.")
+ .def("onlySpheresInteractions",&FlowEngine::_onlySpheresInteractions,(python::arg("interaction")),"Return the id of the interaction only between spheres.")
+
.def("pressureProfile",&FlowEngine::pressureProfile,(python::arg("wallUpY"),python::arg("wallDownY")),"Measure pore pressure in 6 equally-spaced points along the height of the sample")
.def("getPorePressure",&FlowEngine::getPorePressure,(python::arg("pos")),"Measure pore pressure in position pos[0],pos[1],pos[2]")
@@ -368,7 +375,9 @@
Vector3r _normalVelocity(unsigned int id_sph) {return normalVelocity(id_sph,solver);}
Vector3r _normalVect(unsigned int id_sph) {return normalVect(id_sph,solver);}
Real _surfaceDistanceParticle(unsigned int interaction) {return surfaceDistanceParticle(interaction,solver);}
+ int _onlySpheresInteractions(unsigned int interaction) {return onlySpheresInteractions(interaction,solver);}
Real _edgeSize() {return edgeSize(solver);}
+ Real _OSI() {return OSI(solver);}
Vector3r _fluidForce(unsigned int id_sph) {return fluidForce(id_sph, solver);}
void _imposeFlux(Vector3r pos, Real flux) {return imposeFlux(pos,flux,*solver);}
@@ -425,7 +434,9 @@
.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.")
+ .def("onlySpheresInteractions",&PeriodicFlowEngine::_onlySpheresInteractions,(python::arg("interaction")),"Return the id of the interaction only between spheres.")
.def("edgeSize",&PeriodicFlowEngine::_edgeSize,"Return the number of interactions.")
+ .def("OSI",&PeriodicFlowEngine::_OSI,"Return the number of interactions only between spheres.")
// .def("imposeFlux",&FlowEngine::_imposeFlux,(python::arg("pos"),python::arg("p")),"Impose incoming flux in boundary cell of location 'pos'.")
.def("saveVtk",&PeriodicFlowEngine::saveVtk,"Save pressure field in vtk format.")