yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #05751
[Branch ~yade-dev/yade/trunk] Rev 2448: 1. Fixed wrong MaxDiam determinition, when specimen consists on 1 particle.
------------------------------------------------------------
revno: 2448
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-09-27 15:36:48 +0200
message:
1. Fixed wrong MaxDiam determinition, when specimen consists on 1 particle.
2. Added maxX, maxY and maxZ parameter into outputed psd-file for geometry analyze.
modified:
pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.cpp
pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.hpp
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.cpp'
--- pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.cpp 2010-08-25 09:28:04 +0000
+++ pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.cpp 2010-09-27 13:36:48 +0000
@@ -170,6 +170,9 @@
if ((arrayIdentIds[i].id1 == specimenNumberId1) or (arrayIdentIds[i].id1 == specimenNumberId2)) {
if (arrayIdentIds[i].maxDistanceBetweenSpheres<distBetweenSpheres) {
arrayIdentIds[i].maxDistanceBetweenSpheres = distBetweenSpheres;
+ arrayIdentIds[i].maxX = abs(b1->state->pos[0] - b2->state->pos[0]) + sphere1->radius + sphere2->radius;
+ arrayIdentIds[i].maxY = abs(b1->state->pos[1] - b2->state->pos[1]) + sphere1->radius + sphere2->radius;
+ arrayIdentIds[i].maxZ = abs(b1->state->pos[2] - b2->state->pos[2]) + sphere1->radius + sphere2->radius;
break;
}
}
@@ -188,7 +191,11 @@
if (arrayIdentIds[i].id1 == specimenNumberId) {
YADE_PTR_CAST<RpmState>(b->state)->specimenMass = arrayIdentIds[i].mass; //Each particle will contain now the mass of specimen, to which it belongs to
if (arrayIdentIds[i].maxDistanceBetweenSpheres==0) {
- arrayIdentIds[i].maxDistanceBetweenSpheres=sphere->radius;
+ arrayIdentIds[i].maxDistanceBetweenSpheres=sphere->radius*2.0;
+
+ arrayIdentIds[i].maxX = sphere->radius*2.0;
+ arrayIdentIds[i].maxY = sphere->radius*2.0;
+ arrayIdentIds[i].maxZ = sphere->radius*2.0;
}
YADE_PTR_CAST<RpmState>(b->state)->specimenMaxDiam = arrayIdentIds[i].maxDistanceBetweenSpheres; //Each particle will contain now the maximal diametr of the specimen, to which it belongs to
YADE_PTR_CAST<RpmState>(b->state)->specimenVol = arrayIdentIds[i].vol; //Each particle will contain now the volume of the specimen, to which it belongs to
@@ -250,7 +257,7 @@
out<<"**********\n";
out<<"iter\ttotalMass\ttotalVol\ttotalPartNum\tnumSpec\tmatNum\n";
out<<scene->iter<<"\t"<<totalMass<<"\t"<<totalVol<<"\t"<<totalPartNum<<"\t"<<arrayIdentIds.size()<<"\t"<<materialCount.size()<<"\n\n";
- out<<"id\tmassSpec\tvolSpec\tmaxDiamSpec\tpartNum\t";
+ out<<"id\tmassSpec\tvolSpec\tmaxDiamSpec\tmaxX\tmaxY\tmaxZ\tpartNum\t";
if (materialCount.size() > 1) {
@@ -259,7 +266,7 @@
out<<"\n";
for (unsigned int i=0; i<arrayIdentIds.size(); i++) {
- out<<arrayIdentIds[i].id1<<"\t"<<arrayIdentIds[i].mass<<"\t"<<arrayIdentIds[i].vol<<"\t"<<arrayIdentIds[i].maxDistanceBetweenSpheres<<"\t"<<arrayIdentIds[i].particleNumber<<"\t";
+ out<<arrayIdentIds[i].id1<<"\t"<<arrayIdentIds[i].mass<<"\t"<<arrayIdentIds[i].vol<<"\t"<<arrayIdentIds[i].maxDistanceBetweenSpheres<<"\t"<<arrayIdentIds[i].maxX<<"\t"<<arrayIdentIds[i].maxY<<"\t"<<arrayIdentIds[i].maxZ<<"\t"<<arrayIdentIds[i].particleNumber<<"\t";
if (materialCount.size() > 1) {
//Find Material Info
for (unsigned int w=0; w<materialCount.size(); w++) {
=== modified file 'pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.hpp'
--- pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.hpp 2010-08-25 09:28:04 +0000
+++ pkg/dem/Engine/GlobalEngine/ParticleSizeDistrbutionRPMRecorder.hpp 2010-09-27 13:36:48 +0000
@@ -21,7 +21,7 @@
struct identicalIds{
int id1, id2,particleNumber;
- Real mass, vol, maxDistanceBetweenSpheres;
+ Real mass, vol, maxDistanceBetweenSpheres, maxX, maxY, maxZ;
identicalIds (int id1r, int id2r, Real massr, Real volr){
assert(id1r<id2r);
id1 = id1r;
@@ -30,6 +30,7 @@
vol = volr;
maxDistanceBetweenSpheres = 0;
particleNumber = 1;
+ maxX = 0; maxY = 0; maxZ = 0;
}
static bool sortArrayIdentIds (identicalIds i, identicalIds d) {return i.mass>d.mass;}
};