yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00561
[svn] r1459 - eudoxos
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Wed, 20 Aug 2008 11:56:49 +0200
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
------------------------------------------------------------------------
r1459 | eudoxos | 2008-08-11 11:13:25 +0200 (pon, 11 sie 2008) | 4 lines
Changed paths:
M /trunk/extra/BrefcomTestGen.cpp
M /trunk/extra/clump/Shop.cpp
M /trunk/extra/usct/UniaxialStrainControlledTest.cpp
M /trunk/pkg/dem/DataClass/InteractionGeometry/SDECLinkGeometry.hpp
M /trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4DistantSpheresContactGeometry.cpp
M /trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp
M /trunk/pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.cpp
M /trunk/pkg/dem/Engine/StandAloneEngine/CapillaryCohesiveLaw.cpp
M /trunk/pkg/dem/Engine/StandAloneEngine/CohesiveFrictionalContactLaw.cpp
M /trunk/pkg/dem/Engine/StandAloneEngine/ElasticCohesiveLaw.cpp
M /trunk/pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp
M /trunk/pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.cpp
M /trunk/pkg/dem/Engine/StandAloneEngine/VolumicContactLaw.cpp
M /trunk/pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp
M /trunk/pkg/dem/PreProcessor/DirectShearCis.cpp
M /trunk/pkg/dem/PreProcessor/Funnel.cpp
M /trunk/pkg/dem/PreProcessor/HydraulicTest.cpp
M /trunk/pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp
M /trunk/pkg/dem/PreProcessor/SDECImpactTest.cpp
M /trunk/pkg/dem/PreProcessor/SDECLinkedSpheres.cpp
M /trunk/pkg/dem/PreProcessor/SDECMovingWall.cpp
M /trunk/pkg/dem/PreProcessor/SDECSpheresPlane.cpp
M /trunk/pkg/dem/PreProcessor/SnowCreepTest.cpp
M /trunk/pkg/dem/PreProcessor/ThreePointBending.cpp
M /trunk/pkg/dem/PreProcessor/ThreePointBending.hpp
M /trunk/pkg/dem/PreProcessor/TriaxialTest.cpp
M /trunk/pkg/dem/SConscript
1. Fix all crashing preprocessors - for the price of SDECLinkedSpheres and ThreePointBending not really working - InteractingSphere2InteractingSphere4SpheresContactGoemetry only handles SpheresContactGeometry (and not SDECLinkGeometry), OTOH CohesiveContactLaw works only on SDECLinkGeometry. scripts/default-test.py passes now all preprocessors.
2. SDECLinkGeometry marked as deprecated.
------------------------------------------------------------------------
Index: pkg/dem/DataClass/InteractionGeometry/SDECLinkGeometry.hpp
===================================================================
--- pkg/dem/DataClass/InteractionGeometry/SDECLinkGeometry.hpp (revision 1458)
+++ pkg/dem/DataClass/InteractionGeometry/SDECLinkGeometry.hpp (revision 1459)
@@ -15,7 +15,8 @@
#include<yade/lib-base/yadeWm3.hpp>
#include <Wm3Quaternion.h>
-class SDECLinkGeometry : public InteractionGeometry
+
+class __attribute__((__deprecated__)) SDECLinkGeometry : public InteractionGeometry
{
public :
SDECLinkGeometry();
Index: pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4DistantSpheresContactGeometry.cpp
===================================================================
--- pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4DistantSpheresContactGeometry.cpp (revision 1458)
+++ pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4DistantSpheresContactGeometry.cpp (revision 1459)
@@ -10,7 +10,6 @@
#include"InteractingSphere2InteractingSphere4DistantSpheresContactGeometry.hpp"
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-common/InteractingSphere.hpp>
#include<yade/lib-base/yadeWm3Extra.hpp>
Index: pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp
===================================================================
--- pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp (revision 1458)
+++ pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp (revision 1459)
@@ -10,7 +10,6 @@
#include"InteractingSphere2InteractingSphere4SpheresContactGeometry.hpp"
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-common/InteractingSphere.hpp>
#include<yade/lib-base/yadeWm3Extra.hpp>
@@ -46,24 +45,6 @@
// the problem is that scm can be either SDECLinkGeometry or SpheresContactGeometry and the only way CURRENTLY
// to check this is by dynamic cast. This has to be fixed.
scm = YADE_PTR_CAST<SpheresContactGeometry>(c->interactionGeometry);
- #if 0
- // BEGIN ....... FIXME FIXME - wrong hack, to make cohesion work.
- if(! scm) // this is not SpheresContactGeometry, so it is SDECLinkGeometry, dispatcher should do this job.
- {
- shared_ptr<SDECLinkGeometry> linkGeometry = dynamic_pointer_cast<SDECLinkGeometry>(c->interactionGeometry);
- cerr << "it is SpringGeometry ???: " << c->interactionGeometry->getClassName() << endl;
- assert(linkGeometry);
- if(linkGeometry)
- {
- linkGeometry->normal = se32.position-se31.position;
- linkGeometry->normal.Normalize();
- return true;
- }
- else
- return false; // SpringGeometry !!!???????
- }
- // END
- #endif
} else scm = shared_ptr<SpheresContactGeometry>(new SpheresContactGeometry());
penetrationDepth = s1->radius+s2->radius-normal.Normalize();
scm->contactPoint = se31.position+(s1->radius-0.5*penetrationDepth)*normal;//0.5*(pt1+pt2);
Index: pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.cpp
===================================================================
--- pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.cpp (revision 1458)
+++ pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometryWater.cpp (revision 1459)
@@ -29,7 +29,6 @@
Real penetrationDepth = s1->radius+s2->radius-normal.Normalize();
shared_ptr<SpheresContactGeometry> scm;
-// shared_ptr<SDECLinkGeometry> linkGeometry;
if (c->interactionGeometry)
{
@@ -42,7 +41,6 @@
scm = shared_ptr<SpheresContactGeometry>(new SpheresContactGeometry());
- //linkGeometry = shared_ptr<SDECLinkGeometry>(new SDECLinkGeometry());
// if (penetrationDepth>0)
{
Index: pkg/dem/Engine/StandAloneEngine/VolumicContactLaw.cpp
===================================================================
--- pkg/dem/Engine/StandAloneEngine/VolumicContactLaw.cpp (revision 1458)
+++ pkg/dem/Engine/StandAloneEngine/VolumicContactLaw.cpp (revision 1459)
@@ -9,7 +9,6 @@
#include<yade/pkg-dem/BodyMacroParameters.hpp>
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/ElasticContactInteraction.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/core/Omega.hpp>
Index: pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp
===================================================================
--- pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp (revision 1458)
+++ pkg/dem/Engine/StandAloneEngine/ElasticContactLaw.cpp (revision 1459)
@@ -9,7 +9,6 @@
#include"ElasticContactLaw.hpp"
#include<yade/pkg-dem/BodyMacroParameters.hpp>
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/ElasticContactInteraction.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/core/Omega.hpp>
Index: pkg/dem/Engine/StandAloneEngine/ElasticCohesiveLaw.cpp
===================================================================
--- pkg/dem/Engine/StandAloneEngine/ElasticCohesiveLaw.cpp (revision 1458)
+++ pkg/dem/Engine/StandAloneEngine/ElasticCohesiveLaw.cpp (revision 1459)
@@ -9,8 +9,8 @@
#include "ElasticCohesiveLaw.hpp"
#include<yade/pkg-dem/BodyMacroParameters.hpp>
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
+#include<yade/pkg-dem/ElasticContactInteraction.hpp>
#include<yade/pkg-dem/SDECLinkGeometry.hpp>
-#include<yade/pkg-dem/ElasticContactInteraction.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
Index: pkg/dem/Engine/StandAloneEngine/CohesiveFrictionalContactLaw.cpp
===================================================================
--- pkg/dem/Engine/StandAloneEngine/CohesiveFrictionalContactLaw.cpp (revision 1458)
+++ pkg/dem/Engine/StandAloneEngine/CohesiveFrictionalContactLaw.cpp (revision 1459)
@@ -9,7 +9,6 @@
#include "CohesiveFrictionalContactLaw.hpp"
#include<yade/pkg-dem/CohesiveFrictionalBodyParameters.hpp>
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/CohesiveFrictionalContactInteraction.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/core/Omega.hpp>
Index: pkg/dem/Engine/StandAloneEngine/CapillaryCohesiveLaw.cpp
===================================================================
--- pkg/dem/Engine/StandAloneEngine/CapillaryCohesiveLaw.cpp (revision 1458)
+++ pkg/dem/Engine/StandAloneEngine/CapillaryCohesiveLaw.cpp (revision 1459)
@@ -134,7 +134,6 @@
SpheresContactGeometry* currentContactGeometry =
static_cast<SpheresContactGeometry*>(interaction->interactionGeometry.get());
- //SDECLinkGeometry* currentContactGeometry = static_cast<SDECLinkGeometry*>(interaction->interactionGeometry.get());
CapillaryParameters* currentContactPhysics =
static_cast<CapillaryParameters*>(interaction->interactionPhysics.get());
Index: pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.cpp
===================================================================
--- pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.cpp (revision 1458)
+++ pkg/dem/Engine/StandAloneEngine/GlobalStiffnessCounter.cpp (revision 1459)
@@ -10,7 +10,6 @@
#include<yade/pkg-dem/BodyMacroParameters.hpp>
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/ElasticContactInteraction.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/core/Omega.hpp>
@@ -76,17 +75,6 @@
}
-// shared_ptr<SDECLinkGeometry> geom3=dynamic_pointer_cast<SDECLinkGeometry>(contact->interactionGeometry);
-// shared_ptr<SDECLinkPhysics> phys3=dynamic_pointer_cast<SDECLinkPhysics>(contact->interactionPhysics);
-// if(geom3 && phys3){
-// Real fn=phys3->normalForce.Length();
-// if(fn==0) return false;
-// normal=geom3->normal;
-// radius1=geom3->radius1; radius2=geom3->radius2;
-// kn=phys3->kn; ks=phys3->ks;
-// return true;
-// }
-//
// shared_ptr<SpheresContactGeometry> geom2=dynamic_pointer_cast<SpheresContactGeometry>(contact->interactionGeometry);
// shared_ptr<BrefcomContact> phys2=dynamic_pointer_cast<BrefcomContact>(contact->interactionPhysics);
// if(geom2 && phys2){
Index: pkg/dem/PreProcessor/SnowCreepTest.cpp
===================================================================
--- pkg/dem/PreProcessor/SnowCreepTest.cpp (revision 1458)
+++ pkg/dem/PreProcessor/SnowCreepTest.cpp (revision 1459)
@@ -15,7 +15,6 @@
#include<yade/pkg-dem/CohesiveFrictionalContactLaw.hpp>
#include<yade/pkg-dem/CohesiveFrictionalRelationships.hpp>
#include<yade/pkg-dem/CohesiveFrictionalBodyParameters.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/pkg-dem/GlobalStiffnessCounter.hpp>
#include<yade/pkg-dem/GlobalStiffnessTimeStepper.hpp>
Index: pkg/dem/PreProcessor/ThreePointBending.cpp
===================================================================
--- pkg/dem/PreProcessor/ThreePointBending.cpp (revision 1458)
+++ pkg/dem/PreProcessor/ThreePointBending.cpp (revision 1459)
@@ -17,7 +17,7 @@
#include<yade/pkg-dem/ElasticCohesiveLaw.hpp>
#include<yade/pkg-dem/MacroMicroElasticRelationships.hpp>
#include<yade/pkg-dem/BodyMacroParameters.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
+#include<yade/pkg-dem/SpheresContactGeometry.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/pkg-dem/ElasticCriterionTimeStepper.hpp>
@@ -39,7 +39,6 @@
#include<yade/pkg-common/PhysicalActionApplier.hpp>
#include<yade/pkg-common/CundallNonViscousDamping.hpp>
#include<yade/pkg-common/CundallNonViscousDamping.hpp>
-#include<yade/pkg-common/GravityEngines.hpp>
#include<yade/pkg-common/InteractionGeometryMetaEngine.hpp>
#include<yade/pkg-common/InteractionPhysicsMetaEngine.hpp>
@@ -60,15 +59,14 @@
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/convenience.hpp>
+#include<yade/extra/Shop.hpp>
+
ThreePointBending::ThreePointBending () : FileGenerator()
{
- yadeFileWithSpheres ="./someFileFromTriaxial.yade";
- gravity = Vector3r(0,-9.81,0);
+ yadeFileWithSpheres ="";
- supportDepth = 10;
- pistonWidth = 5;
- pistonVelocity = 0.1;
+ pistonVelocity = 1.;
dampingForce = 0.2;
dampingMomentum = 0.2;
@@ -103,10 +101,7 @@
FileGenerator::registerAttributes();
REGISTER_ATTRIBUTE(yadeFileWithSpheres);
- REGISTER_ATTRIBUTE(gravity);
- REGISTER_ATTRIBUTE(pistonWidth);
- REGISTER_ATTRIBUTE(supportDepth);
REGISTER_ATTRIBUTE(pistonVelocity);
REGISTER_ATTRIBUTE(dampingForce);
REGISTER_ATTRIBUTE(dampingMomentum);
@@ -137,89 +132,43 @@
rootBody->physicalActions = shared_ptr<PhysicalActionContainer>(new PhysicalActionVectorVector);
rootBody->bodies = shared_ptr<BodyContainer>(new BodyRedirectionVector);
-/////////////////////////////////////
-/////////////////////////////////////
- // load file
-
- shared_ptr<MetaBody> metaBodyWithSpheres;
+ Vector3r min(10000,10000,10000),max(-10000,-10000,-10000);
- if ( yadeFileWithSpheres.size()!=0
- && filesystem::exists(yadeFileWithSpheres)
- && (filesystem::extension(yadeFileWithSpheres)==".xml" || filesystem::extension(yadeFileWithSpheres)==".yade"))
- {
- try
- {
- if(filesystem::extension(yadeFileWithSpheres)==".xml")
- IOFormatManager::loadFromFile("XMLFormatManager",yadeFileWithSpheres,"rootBody",metaBodyWithSpheres);
+ // load simulation file, extract spheres and use those
+ if (yadeFileWithSpheres.size()!=0){
+ shared_ptr<MetaBody> metaBodyWithSpheres;
+ IOFormatManager::loadFromFile("XMLFormatManager",yadeFileWithSpheres,"rootBody",metaBodyWithSpheres);
+ assert(metaBodyWithSpheres->getClassName()=="MetaBody");
- else if(filesystem::extension(yadeFileWithSpheres)==".yade" )
- IOFormatManager::loadFromFile("BINFormatManager",yadeFileWithSpheres,"rootBody",metaBodyWithSpheres);
+ FOREACH(shared_ptr<Body> b, *metaBodyWithSpheres->bodies){
+ if(b->geometricalModel->getClassName()!="Sphere") continue;
+ min = componentMinVector(min,b->physicalParameters->se3.position - static_cast<Sphere*>(b->geometricalModel.get())->radius * Vector3r(1,1,1));
+ max = componentMaxVector(max,b->physicalParameters->se3.position + static_cast<Sphere*>(b->geometricalModel.get())->radius * Vector3r(1,1,1));
+ BodyMacroParameters* bm = dynamic_cast<BodyMacroParameters*>(b->physicalParameters.get());
+ if(!bm) {message="Error: spheres don't use BodyMacroParameters for physical parameters"; return false;}
+ bm->young = sphereYoungModulus;
+ bm->poisson = spherePoissonRatio;
+ bm->frictionAngle = sphereFrictionDeg * Mathr::PI/180.0;
+ bm->mass /= 1000.0; // ???!
- if( metaBodyWithSpheres->getClassName() != "MetaBody"){ message="Error: cannot load the file that should contain spheres"; return false; }
- }
- catch(SerializableError& e)
- {
- message="Error: cannot load the file that should contain spheres"; return false;
+ rootBody->bodies->insert(b);
}
- catch(yadeError& e)
- {
- message="Error: cannot load the file that should contain spheres"; return false;
- }
}
- else { message="Error: cannot load the file that should contain spheres"; return false; }
-/////////////////////////////////////
- Vector3r min(10000,10000,10000),max(-10000,-10000,-10000);
- {// calc min/max
- BodyContainer::iterator bi = metaBodyWithSpheres->bodies->begin();
- BodyContainer::iterator biEnd = metaBodyWithSpheres->bodies->end();
- for( ; bi!=biEnd ; ++bi )
- {
- if((*bi)->geometricalModel->getClassName() == "Sphere" )
- {
- shared_ptr<Body> b = *bi;
- min = componentMinVector(min,b->physicalParameters->se3.position - static_cast<Sphere*>(b->geometricalModel.get())->radius * Vector3r(1,1,1));
- max = componentMaxVector(max,b->physicalParameters->se3.position + static_cast<Sphere*>(b->geometricalModel.get())->radius * Vector3r(1,1,1));
-
- BodyMacroParameters* bm = dynamic_cast<BodyMacroParameters*>(b->physicalParameters.get());
- if(!bm) {message="Error: spheres don't use BodyMacroParameters for physical parameters"; return false;}
-
- bm->young = sphereYoungModulus;
- bm->poisson = spherePoissonRatio;
- bm->frictionAngle = sphereFrictionDeg * Mathr::PI/180.0;
- bm->mass /= 1000.0; // FIXME !!!
+ // generate specimen
+ else{
+ Real radius=1; int xxSup=2, yySup=10, zzSup=2;
+ min=Vector3r(-radius,-radius,-radius); max=Vector3r(radius*(2*xxSup-1),radius*(2*yySup-1),radius*(2*zzSup-1));
+ for(int xx=0; xx<xxSup; xx++){
+ for(int yy=0; yy<yySup; yy++){
+ for(int zz=0; zz<zzSup; zz++){
+ shared_ptr<Body> b=Shop::sphere(Vector3r(xx*2*radius,yy*2*radius,zz*2*radius),radius);
+ rootBody->bodies->insert(b);
+ }
}
}
}
-////////////////////////////////////
-
- shared_ptr<Body> piston;
- shared_ptr<Body> supportBox1;
- shared_ptr<Body> supportBox2;
- createBox(piston, Vector3r( (max[0]+min[0])*0.5 , max[1] + (max[0]-min[0])*0.5 , (max[2]+min[2])*0.5 ), Vector3r( (max[0]-min[0])*0.5, (max[0]-min[0])*0.5 , pistonWidth ));
- createBox(supportBox1, Vector3r( (max[0]+min[0])*0.5 , min[1] - (max[0]-min[0])*0.5 , min[2] - (max[0]-min[0])*0.5 + supportDepth ), Vector3r( (max[0]-min[0])*0.5, (max[0]-min[0])*0.5 , (max[0]-min[0])*0.5 ));
- createBox(supportBox2, Vector3r( (max[0]+min[0])*0.5 , min[1] - (max[0]-min[0])*0.5 , max[2] + (max[0]-min[0])*0.5 - supportDepth ), Vector3r( (max[0]-min[0])*0.5, (max[0]-min[0])*0.5 , (max[0]-min[0])*0.5 ));
-
- rootBody->bodies->insert(piston);
- rootBody->bodies->insert(supportBox1);
- rootBody->bodies->insert(supportBox2);
-
/////////////////////////////////////
-
- {// insert Spheres
- BodyContainer::iterator bi = metaBodyWithSpheres->bodies->begin();
- BodyContainer::iterator biEnd = metaBodyWithSpheres->bodies->end();
- for( ; bi!=biEnd ; ++bi )
- {
- if((*bi)->geometricalModel->getClassName() == "Sphere" )
- {
- shared_ptr<Body> b = *bi;
- rootBody->bodies->insert(b);
- }
- }
- }
-
-/////////////////////////////////////
rootBody->persistentInteractions->clear();
@@ -229,11 +178,7 @@
BodyContainer::iterator biEnd = rootBody->bodies->end();
BodyContainer::iterator bi2;
- ++bi; // skips piston
- ++bi; // skips supportBox1
- ++bi; // skips supportBox2
-
-
+ Real interactionFactor=1.1;
for( ; bi!=biEnd ; ++bi )
{
bodyA =*bi;
@@ -248,10 +193,10 @@
shared_ptr<InteractingSphere> as = YADE_PTR_CAST<InteractingSphere>(bodyA->interactingGeometry);
shared_ptr<InteractingSphere> bs = YADE_PTR_CAST<InteractingSphere>(bodyB->interactingGeometry);
- if ((a->se3.position - b->se3.position).Length() < (as->radius + bs->radius))
+ if ((a->se3.position-b->se3.position).Length() < interactionFactor*(as->radius+bs->radius))
{
shared_ptr<Interaction> link(new Interaction( bodyA->getId() , bodyB->getId() ));
- shared_ptr<SDECLinkGeometry> geometry(new SDECLinkGeometry);
+ shared_ptr<SpheresContactGeometry> geometry(new SpheresContactGeometry);
shared_ptr<SDECLinkPhysics> physics(new SDECLinkPhysics);
geometry->radius1 = as->radius - fabs(as->radius - bs->radius)*0.5;
@@ -273,10 +218,40 @@
}
}
}
+
+ // specimen supports
+ shared_ptr<Body> piston;
+ shared_ptr<Body> supportBox1;
+ shared_ptr<Body> supportBox2;
+
+ Real dimX=max[0]-min[0], dimY=max[1]-min[1], dimZ=max[2]-min[2];
+ Vector3r center=.5*(max+min);
+
+ createBox(piston,
+ Vector3r(center[0],center[1],max[2]+.5*dimZ),
+ Vector3r(.75*dimX,.05*dimY,.5*dimZ));
+ createBox(supportBox1,
+ Vector3r(center[0],min[1],min[2]-.5*dimZ),
+ Vector3r(.5*dimX,.1*dimY,.5*dimZ));
+ createBox(supportBox2,
+ Vector3r(center[0],max[1],min[2]-.5*dimZ),
+ Vector3r(.5*dimX,.1*dimY,.5*dimZ));
+
+ rootBody->bodies->insert(piston);
+ rootBody->bodies->insert(supportBox1);
+ rootBody->bodies->insert(supportBox2);
+
+ FOREACH(const shared_ptr<Engine>& e, rootBody->engines){
+ if(e->getClassName()!="TranslationEngine") continue;
+ shared_ptr<TranslationEngine> te=YADE_PTR_CAST<TranslationEngine>(e);
+ te->subscribedBodies.clear(); te->subscribedBodies.push_back(piston->getId());
+ }
+
message="total number of permament links created: "
+ lexical_cast<string>(rootBody->persistentInteractions->size())
- + "\nWARNING: link bonds are nearly working, but the formulas are waiting for total rewrite!";
+ + "\nWARNING: link bonds are nearly working, but the formulas are waiting for total rewrite!"+
+ +"\nWARNING: The results are meaningless, since ElasticCohesiveLaw works only with (unused) SDECLinkGeometry.";
return true;
}
@@ -289,9 +264,6 @@
shared_ptr<Box> gBox(new Box);
shared_ptr<InteractingBox> iBox(new InteractingBox);
- Quaternionr q;
- q.FromAxisAngle( Vector3r(0,0,1),0);
-
body->isDynamic = false;
physics->angularVelocity = Vector3r(0,0,0);
@@ -302,9 +274,7 @@
, physics->mass*(extents[0]*extents[0]+extents[2]*extents[2])/3
, physics->mass*(extents[1]*extents[1]+extents[0]*extents[0])/3
);
-// physics->mass = 0;
-// physics->inertia = Vector3r(0,0,0);
- physics->se3 = Se3r(position,q);
+ physics->se3 = Se3r(position,Quaternionr::IDENTITY);
physics->young = sphereYoungModulus;
physics->poisson = spherePoissonRatio;
physics->frictionAngle = sphereFrictionDeg * Mathr::PI/180.0;
@@ -345,9 +315,6 @@
boundingVolumeDispatcher->add("InteractingBox2AABB");
boundingVolumeDispatcher->add("MetaInteractingGeometry2AABB");
- shared_ptr<GravityEngine> gravityCondition(new GravityEngine);
- gravityCondition->gravity = gravity;
-
shared_ptr<CundallNonViscousForceDamping> actionForceDamping(new CundallNonViscousForceDamping);
actionForceDamping->damping = dampingForce;
shared_ptr<CundallNonViscousMomentumDamping> actionMomentumDamping(new CundallNonViscousMomentumDamping);
@@ -372,8 +339,8 @@
// moving wall
shared_ptr<TranslationEngine> kinematic = shared_ptr<TranslationEngine>(new TranslationEngine);
kinematic->velocity = pistonVelocity;
- kinematic->translationAxis = Vector3r(0,-1,0);
- kinematic->subscribedBodies.push_back(0);
+ kinematic->translationAxis = Vector3r(0,0,-1);
+ // subscribed bodies will be initialized later
shared_ptr<ElasticContactLaw> constitutiveLaw(new ElasticContactLaw);
constitutiveLaw->sdecGroupMask = 55;
@@ -392,7 +359,6 @@
rootBody->engines.push_back(interactionPhysicsDispatcher);
rootBody->engines.push_back(constitutiveLaw);
rootBody->engines.push_back(constitutiveLaw2);
- rootBody->engines.push_back(gravityCondition);
rootBody->engines.push_back(actionDampingDispatcher);
rootBody->engines.push_back(applyActionDispatcher);
rootBody->engines.push_back(positionIntegrator);
Index: pkg/dem/PreProcessor/ThreePointBending.hpp
===================================================================
--- pkg/dem/PreProcessor/ThreePointBending.hpp (revision 1458)
+++ pkg/dem/PreProcessor/ThreePointBending.hpp (revision 1459)
@@ -18,11 +18,8 @@
{
private :
std::string yadeFileWithSpheres;
- Vector3r gravity;
- Real supportDepth
- ,pistonWidth
- ,pistonVelocity
+ Real pistonVelocity
,dampingForce
,dampingMomentum
Index: pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp
===================================================================
--- pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp (revision 1458)
+++ pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp (revision 1459)
@@ -15,7 +15,6 @@
#include<yade/pkg-dem/ElasticContactLaw.hpp>
#include<yade/pkg-dem/SimpleElasticRelationships.hpp>
#include<yade/pkg-dem/BodyMacroParameters.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/pkg-dem/GlobalStiffnessCounter.hpp>
#include<yade/pkg-dem/GlobalStiffnessTimeStepper.hpp>
Index: pkg/dem/PreProcessor/SDECMovingWall.cpp
===================================================================
--- pkg/dem/PreProcessor/SDECMovingWall.cpp (revision 1458)
+++ pkg/dem/PreProcessor/SDECMovingWall.cpp (revision 1459)
@@ -12,7 +12,6 @@
#include<yade/pkg-dem/BodyMacroParameters.hpp>
#include<yade/pkg-dem/ElasticContactLaw.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/MacroMicroElasticRelationships.hpp>
#include<yade/pkg-dem/ElasticCriterionTimeStepper.hpp>
#include<yade/pkg-dem/PositionOrientationRecorder.hpp>
Index: pkg/dem/PreProcessor/SDECSpheresPlane.cpp
===================================================================
--- pkg/dem/PreProcessor/SDECSpheresPlane.cpp (revision 1458)
+++ pkg/dem/PreProcessor/SDECSpheresPlane.cpp (revision 1459)
@@ -13,7 +13,6 @@
#include<yade/pkg-dem/BodyMacroParameters.hpp>
#include<yade/pkg-dem/ElasticContactLaw.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/MacroMicroElasticRelationships.hpp>
#include<yade/pkg-dem/ElasticCriterionTimeStepper.hpp>
#include<yade/pkg-dem/PositionOrientationRecorder.hpp>
Index: pkg/dem/PreProcessor/DirectShearCis.cpp
===================================================================
--- pkg/dem/PreProcessor/DirectShearCis.cpp (revision 1458)
+++ pkg/dem/PreProcessor/DirectShearCis.cpp (revision 1459)
@@ -17,7 +17,6 @@
#include <yade/pkg-dem/BodyMacroParameters.hpp>
#include <yade/pkg-dem/ElasticContactLaw.hpp>
-#include <yade/pkg-dem/SDECLinkGeometry.hpp>
#include <yade/pkg-dem/MacroMicroElasticRelationships.hpp>
#include <yade/pkg-dem/SimpleElasticRelationships.hpp>
#include <yade/pkg-dem/ElasticCriterionTimeStepper.hpp>
Index: pkg/dem/PreProcessor/SDECLinkedSpheres.cpp
===================================================================
--- pkg/dem/PreProcessor/SDECLinkedSpheres.cpp (revision 1458)
+++ pkg/dem/PreProcessor/SDECLinkedSpheres.cpp (revision 1459)
@@ -19,8 +19,8 @@
#include<yade/pkg-dem/ElasticCohesiveLaw.hpp>
#include<yade/pkg-dem/MacroMicroElasticRelationships.hpp>
#include<yade/pkg-dem/BodyMacroParameters.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
+#include<yade/pkg-dem/SpheresContactGeometry.hpp>
#include<yade/pkg-dem/ElasticCriterionTimeStepper.hpp>
@@ -188,7 +188,7 @@
if ((a->se3.position - b->se3.position).Length() < (as->radius + bs->radius))
{
shared_ptr<Interaction> link(new Interaction( bodyA->getId() , bodyB->getId() ));
- shared_ptr<SDECLinkGeometry> geometry(new SDECLinkGeometry);
+ shared_ptr<SpheresContactGeometry> geometry(new SpheresContactGeometry);
shared_ptr<SDECLinkPhysics> physics(new SDECLinkPhysics);
geometry->radius1 = as->radius - fabs(as->radius - bs->radius)*0.5;
@@ -213,7 +213,8 @@
message="total number of permament links created: "
+ lexical_cast<string>(rootBody->persistentInteractions->size())
- + "\nWARNING: link bonds are nearly working, but the formulas are waiting for total rewrite!";
+ + "\nWARNING: link bonds are nearly working, but the formulas are waiting for total rewrite!"
+ +"\nWARNING: interactions will not generate any force since we use SpheresContactGeometry instead of SDECLinkGeometry now.";
return true;
}
Index: pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp
===================================================================
--- pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp (revision 1458)
+++ pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp (revision 1459)
@@ -15,7 +15,6 @@
#include<yade/pkg-dem/CohesiveFrictionalContactLaw.hpp>
#include<yade/pkg-dem/CohesiveFrictionalRelationships.hpp>
#include<yade/pkg-dem/CohesiveFrictionalBodyParameters.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/pkg-dem/GlobalStiffnessCounter.hpp>
#include<yade/pkg-dem/GlobalStiffnessTimeStepper.hpp>
Index: pkg/dem/PreProcessor/SDECImpactTest.cpp
===================================================================
--- pkg/dem/PreProcessor/SDECImpactTest.cpp (revision 1458)
+++ pkg/dem/PreProcessor/SDECImpactTest.cpp (revision 1459)
@@ -13,7 +13,6 @@
#include<yade/pkg-dem/ElasticContactLaw.hpp>
#include<yade/pkg-dem/MacroMicroElasticRelationships.hpp>
#include<yade/pkg-dem/BodyMacroParameters.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/pkg-dem/ElasticCriterionTimeStepper.hpp>
Index: pkg/dem/PreProcessor/TriaxialTest.cpp
===================================================================
--- pkg/dem/PreProcessor/TriaxialTest.cpp (revision 1458)
+++ pkg/dem/PreProcessor/TriaxialTest.cpp (revision 1459)
@@ -19,7 +19,6 @@
#include<yade/pkg-dem/ElasticCohesiveLaw.hpp>
#include<yade/pkg-dem/SimpleElasticRelationships.hpp>
#include<yade/pkg-dem/BodyMacroParameters.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/pkg-dem/GlobalStiffnessCounter.hpp>
#include<yade/pkg-dem/GlobalStiffnessTimeStepper.hpp>
Index: pkg/dem/PreProcessor/HydraulicTest.cpp
===================================================================
--- pkg/dem/PreProcessor/HydraulicTest.cpp (revision 1458)
+++ pkg/dem/PreProcessor/HydraulicTest.cpp (revision 1459)
@@ -15,7 +15,6 @@
#include<yade/pkg-dem/CohesiveFrictionalContactLaw.hpp>
#include<yade/pkg-dem/CohesiveFrictionalRelationships.hpp>
#include<yade/pkg-dem/BodyMacroParameters.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/pkg-dem/ElasticCriterionTimeStepper.hpp>
#include<yade/pkg-dem/PositionOrientationRecorder.hpp>
Index: pkg/dem/PreProcessor/Funnel.cpp
===================================================================
--- pkg/dem/PreProcessor/Funnel.cpp (revision 1458)
+++ pkg/dem/PreProcessor/Funnel.cpp (revision 1459)
@@ -10,7 +10,6 @@
#include<yade/pkg-dem/BodyMacroParameters.hpp>
#include<yade/pkg-dem/ElasticContactLaw.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
#include<yade/pkg-dem/MacroMicroElasticRelationships.hpp>
#include<yade/pkg-dem/ElasticCriterionTimeStepper.hpp>
Index: pkg/dem/SConscript
===================================================================
--- pkg/dem/SConscript (revision 1458)
+++ pkg/dem/SConscript (revision 1459)
@@ -510,6 +510,7 @@
'MetaInteractingGeometry',
'GravityEngines',
'yade-serialization',
+ 'SpheresContactGeometry',
'yade-base',
'PhysicalActionContainerInitializer',
@@ -791,6 +792,7 @@
'GravityEngines',
'yade-serialization',
'yade-base',
+ 'Shop',
'PhysicalActionContainerInitializer',
'PhysicalActionContainerReseter',
Index: extra/clump/Shop.cpp
===================================================================
--- extra/clump/Shop.cpp (revision 1458)
+++ extra/clump/Shop.cpp (revision 1459)
@@ -65,8 +65,6 @@
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
#include<yade/pkg-dem/ElasticContactInteraction.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
-#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/lib-opengl/OpenGLWrapper.hpp>
#include<yade/lib-QGLViewer/qglviewer.h>
Index: extra/BrefcomTestGen.cpp
===================================================================
--- extra/BrefcomTestGen.cpp (revision 1458)
+++ extra/BrefcomTestGen.cpp (revision 1459)
@@ -62,8 +62,6 @@
#include<yade/pkg-dem/SpheresContactGeometry.hpp>
#include<yade/pkg-dem/ElasticContactInteraction.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
-#include<yade/pkg-dem/SDECLinkPhysics.hpp>
*/
@@ -98,7 +96,7 @@
shared_ptr<InteractionPhysicsMetaEngine> iphysDispatcher(new InteractionPhysicsMetaEngine);
shared_ptr<BrefcomMakeContact> bmc(new BrefcomMakeContact);
- bmc->cohesiveThresholdIter=-1; bmc->G_over_E=1; bmc->expBending=1; bmc->xiShear=.8; bmc->sigmaT=3e9; bmc->neverDamage=true; bmc->epsCrackOnset=1e-4; bmc->relDuctility=5;
+ bmc->cohesiveThresholdIter=-1; bmc->G_over_E=1; bmc->expBending=1; bmc->xiShear=.8; bmc->sigmaT=3e9; bmc->neverDamage=true; bmc->epsCrackOnset=1e-4; bmc->relDuctility=5; bmc->transStrainCoeff=.5;
//bmc->calibratedEpsFracture=.5; /* arbitrary, but large enough */
iphysDispatcher->add(bmc);
rootBody->engines.push_back(iphysDispatcher);
Index: extra/usct/UniaxialStrainControlledTest.cpp
===================================================================
--- extra/usct/UniaxialStrainControlledTest.cpp (revision 1458)
+++ extra/usct/UniaxialStrainControlledTest.cpp (revision 1459)
@@ -5,8 +5,6 @@
#include<yade/pkg-common/Box.hpp>
#include<yade/pkg-common/InteractingBox.hpp>
#include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-dem/SDECLinkGeometry.hpp>
-#include<yade/pkg-dem/SDECLinkPhysics.hpp>
#include<yade/extra/Brefcom.hpp>
#include<boost/foreach.hpp>