Re: [Yade-users] [Question #403736]: about O.force.addMove

2017-05-18 Thread
Question #403736 on Yade changed:
https://answers.launchpad.net/yade/+question/403736

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Thanks Jérôme Duriez, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #562171]: Why I can't get stress?

2017-03-15 Thread
Question #562171 on Yade changed:
https://answers.launchpad.net/yade/+question/562171

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Hello,what do you mean?I have added O.run() to my script.It is still the
same.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #562171]: Why I can't get stress?

2017-03-15 Thread
New question #562171 on Yade:
https://answers.launchpad.net/yade/+question/562171

I’m using PeriTriaxController to get packing with desired porosity.But when I 
used ‘triax.stress' to get average stresses ,it showed (0,0,0).And it's weird 
this script can work.So where should I change?Here is my script:
r=1.75e-05
O.periodic=True
O.cell.hSize=Matrix3(41*r,0,0,
0,41*r,0,
0,0,41*r)

O.materials.append(FrictMat(young=1.1e11,poisson=0.3,density=8900e12,frictionAngle=0,label='sphere'))
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(40*r,40*r,40*r),r,0,4000,False)
O.bodies.append([sphere(center,rad,material='sphere') for center,rad in sp])


triax
triax=PeriTriaxController(goal=(-2e4,-2e4,-2e4),stressMask=7)
Engine###
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=0.05*r),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_MindlinPhys()],
[Law2_ScGeom_MindlinPhys_HertzWithLinearShear()]
),
PyRunner(command='controlporosity()',iterPeriod=1),
triax,
NewtonIntegrator(damping=.2)
]

O.dt=PWaveTimeStep()
def controlporosity():
targateporosity=0.36
a=utils.porosity()
if ahttps://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #556997]: How to compute average contact radius

2017-03-15 Thread
Question #556997 on Yade changed:
https://answers.launchpad.net/yade/+question/556997

张文卿 confirmed that the question is solved:
Thanks Jérôme Duriez, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #556997]: How to compute average contact radius

2017-03-15 Thread
Question #556997 on Yade changed:
https://answers.launchpad.net/yade/+question/556997

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Thanks,Bruno,Jan.I have understood where I was wrong.  That helps a lot:
)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #556997]: How to compute average contact radius

2017-03-13 Thread
New question #556997 on Yade:
https://answers.launchpad.net/yade/+question/556997

I want to get avgrage contact radius to my next simulation.I have write C++ 
file of phy to get contactradius for each contact.And I have achieved it via 
python.Here is my script:
id1=[]
id2=[]
for i in O.interactions:
  id1.append(i.id1)
  id2.append(i.id2)
for k in rang (0,len(id1)):
  
Acontactradius=O.interactions[id1[k],id2[k]].phys.contactradius+Acontactradius
Acontactradius=Acontactradius/(len(id1)

But this script costs a lot of cpu to compute.It make my computer breakdown.So 
what if I write c++ file to get average contactradius,will it cost litter cpu?
And how can I get it by C++ file?(Ps: I have modified '_utils file'.But it 
don't work) 

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #429608]: how 'PeritriaxController' control stress on boundry

2017-01-10 Thread
Question #429608 on Yade changed:
https://answers.launchpad.net/yade/+question/429608

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Thanks Bruno Chareyre, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #432620]: How to understand getStress?

2017-01-07 Thread
New question #432620 on Yade:
https://answers.launchpad.net/yade/+question/432620

I‘m using getStress() to monitor my 'peri'.In doucumentation,it says stress is 
negative for  repulsive contact forces.So,I wanna try  if it'scorrect.I used it 
for a simple example:bouncingbubble.py.And something wierd show up.Stress 
is(nan,nan,nan,0,0,12.644,0,0,34.8838).Can anyone explain that?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #406661]: how to get average contact radius

2016-12-12 Thread
New question #406661 on Yade:
https://answers.launchpad.net/yade/+question/406661

I have simulated the process of some particles sintering.These paticles overlap 
mutually. Now I want to get average contact radius.But all I found is 
yade._utils.maxOverlapRatio . Can someone tell me how to deal with it?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #404550]: import particles to another script

2016-12-02 Thread
Question #404550 on Yade changed:
https://answers.launchpad.net/yade/+question/404550

张文卿 posted a new comment:
Thanks,Jerome.That really do me a great favor.
And I have another question.if there another way I can solve my problem?After 
generating spheres with specific porosity,I have to write another script to do 
next simulation.Because I have no ideal to simulate it with one script.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #404550]: import particles to another script

2016-12-01 Thread
New question #404550 on Yade:
https://answers.launchpad.net/yade/+question/404550

I have used triaxstresscontroller to generate particles with specific 
porosit。How can I import these particles to another script to complete next 
simulation?Thanks

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #403736]: about O.force.addMove

2016-11-04 Thread
Question #403736 on Yade changed:
https://answers.launchpad.net/yade/+question/403736

张文卿 posted a new comment:
Thank you for your answer,Jérôme.I still have a qusetion.You said using
addMove may break contact law algorithms.I think it's interesting.What
algorithm does yade use?Is that Velocity-Verlet algorithm?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #403736]: about O.force.addMove

2016-11-04 Thread
Question #403736 on Yade changed:
https://answers.launchpad.net/yade/+question/403736

张文卿 posted a new comment:
Thank you for your answer,Jérôme.I still have a qusetion.You said using
addMove may break contact law algorithms.I think it's interesting.What
algorithm does yade use?Is that Velocity-Verlet algorithm?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #403737]: about O.force.addMove

2016-11-02 Thread
New question #403737 on Yade:
https://answers.launchpad.net/yade/+question/403737

How does O.force.addMove() work? I have read C++ file :ForceContainerSerial.It  
tells me "_move[id]+=f".But I can't figure out 。Can someone explain that in 
detail


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #402988]: terminate called after throwin an instance

2016-10-18 Thread
Question #402988 on Yade changed:
https://answers.launchpad.net/yade/+question/402988

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #402658]: add displacement according to their coordinate

2016-10-13 Thread
Question #402658 on Yade changed:
https://answers.launchpad.net/yade/+question/402658

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #402988]: terminate called after throwin an instance

2016-10-13 Thread
New question #402988 on Yade:
https://answers.launchpad.net/yade/+question/402988

I creat a new law to simulate the processing of particles sintering.but when I 
simulated it turned out:
terminate called after throwing an instance of 'std::runtime_error'
  what():  Multimethods: bad virtual call (probably go/goReverse was not 
overridden with the same argument types; only fundamental types and pure 
pointers are passed by value, all other types (including shared_ptr<>) are 
passed by reference); types in the call were:
1. N5boost10shared_ptrI5IGeomEE
2. N5boost10shared_ptrI5IPhysEE
3. P11Interaction
4. N4Loki9EmptyTypeE
5. N4Loki9EmptyTypeE
6. N4Loki9EmptyTypeE
7. N4Loki9EmptyTypeE

this is my law:
class Law2_ScGeom_SinterPhys2_Sinter2: public LawFunctor{
public:
bool go(shared_ptr& _geom, shared_ptr& _phys, 
Interaction* I,Real t,Real d,Real q,Real omega,Real gamma,Real psi);
FUNCTOR2D(GenericSpheresContact,SinterPhys2);

YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Law2_ScGeom_SinterPhys2_Sinter2,LawFunctor,"Constitutive
 law for Sinter model.for another constitutive model",
,
/*ctor*/,
);
DECLARE_LOGGER;
};
REGISTER_SERIALIZABLE(Law2_ScGeom_SinterPhys2_Sinter2);

CREATE_LOGGER(Law2_ScGeom_SinterPhys2_Sinter2)

bool Law2_ScGeom_SinterPhys2_Sinter2::go(shared_ptr& _geom, 
shared_ptr& _phys, 
Interaction* I,Real t,Real d,Real 
q,Real omega,Real gamma,Real psi)
{
const Real& dt = scene->dt; 
int id1 = I->getId1(), id2 = I->getId2(); // get id body 1, get id body 
2
ScGeom* geom = static_cast(_geom.get());
SinterPhys2* phys=static_cast(_phys.get());   
Real R1=geom->radius1;
Real R2=geom->radius2;
Real uN=geom->penetrationDepth;
Real k=R1+R2-uN;/*distance between sphere1 and sphere2*/
Real p=1-5.4414*pow(R1,3)/pow(k,3);/*porosity*/
Real c=(0.5998+0.0533*psi+(-1.271+0.004144*psi)*p)*R1;
Real 
sigmaS=((-4.069+6.557*psi+0.0253*pow(psi,2))+(26.75-42.58*psi+5.986*pow(psi,2))*p+(-51.01+82.12*psi-18.56*pow(psi,2))*pow(p,2))*gamma/R1;

if(geom->penetrationDepth <= 0.0) {
return false;
}
//normal velocity//
State* de1 = Body::byId(id1,scene)->state.get();
State* de2 = Body::byId(id2,scene)->state.get();
const Vector3r shift2 = scene->isPeriodic ? 
scene->cell->intrShiftPos(I->cellDist): Vector3r::Zero(); 
const Vector3r shiftVel = scene->isPeriodic ? 
scene->cell->intrShiftVel(I->cellDist): Vector3r::Zero(); 
Vector3r incidentV = geom->getIncidentVel(de1, de2, dt, shift2, 
shiftVel, 1);   
Vector3r incidentVn = geom->normal.dot(incidentV)*geom->normal;

//normal force//
Vector3r normalForce=Vector3r::Zero();
if (uN<0) {
normalForce=Vector3r::Zero();
} else {
if (p<0) {

normalForce=3.1415926*pow(c,4)*1.3806488e-23*t*incidentVn/(8*omega*d*exp(-q/(R1*t)));
} else {

normalForce=3.1415926*pow(c,4)*1.3806488e-23*t*incidentVn/(8*omega*d*exp(-q/(R1*t)))-geom->normal*1.7861*pow(R1,2)*sigmaS/pow((1-p),0.7);
}
}
//add force//
if (!scene->isPeriodic) {
applyForceAtContactPoint(normalForce, geom->contactPoint , id1, 
de1->se3.position, id2, de2->se3.position);
} else {
scene->forces.addForce(id1,-normalForce);
scene->forces.addForce(id2,normalForce);

scene->forces.addTorque(id1,(geom->radius1-0.5*geom->penetrationDepth)* 
geom->normal.cross(normalForce));

scene->forces.addTorque(id2,(geom->radius2-0.5*geom->penetrationDepth)* 
geom->normal.cross(normalForce));
}
return true;
}

and this is my script:
 Mat=O.materials.append(SinterMat2())
O.bodies.append([
   # fixed: particle's position in space will not change (support)
   sphere(center=(0,0,0),radius=.5),
   # this particles is free, subject to dynamics
   sphere((0,0,2),.5,dynamic=False,material=Mat)
])
O.bodies[1].state.vel=(0,0,-10)

###add move#

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop([Ig2_Sphere_Sphere_ScGeom()],
  
[Ip2_SinterMat2_SinterMat2_SinterPhys2()],
[Law2_ScGeom_SinterPhys2_Sinter2()]),
NewtonIntegrator(damping=0.0, gravity=(0,0,0))
]


can anyone help me?Thanks.:)




-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : 

Re: [Yade-users] [Question #381111]: where is penetrationDepth?

2016-10-08 Thread
Question #38 on Yade changed:
https://answers.launchpad.net/yade/+question/38

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #402658]: add displacement according to their coordinate

2016-10-01 Thread
New question #402658 on Yade:
https://answers.launchpad.net/yade/+question/402658

At the begining of each time step, I want to add displacement to every particle 
according to their center coordinate.
just like this:for x direction,Displacement=a*x*timestep.
a is just a coefficient.
But I only find 'addMove'.Is there any way solve this problem.Thanks: )

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #381111]: where is penetrationDepth?

2016-09-04 Thread
New question #38 on Yade:
https://answers.launchpad.net/yade/+question/38

When I read c++ code of ScGeom.hpp,I find this line 
YADE_CLASS_BASE_DOC_ATTRS_INIT_COTR_PY(ScGeom,GenericsSpheresContact,((Real,penetrationDepth,NaN,(Attr::noSave|Attr::readonly),...))...).
Where is the code of defining penetrationDepth?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #364275]: sintering

2016-08-25 Thread
Question #364275 on Yade changed:
https://answers.launchpad.net/yade/+question/364275

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #344674]: find source code

2016-08-25 Thread
Question #344674 on Yade changed:
https://answers.launchpad.net/yade/+question/344674

Status: Answered => Solved

张文卿 confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #364275]: sintering

2016-08-25 Thread
New question #364275 on Yade:
https://answers.launchpad.net/yade/+question/364275

I‘d like to simulate the processs of some spheres sintering。but I don’t konw 
how to begin。Is there any examples?thank you very much。 

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #344674]: find source code

2016-08-14 Thread
New question #344674 on Yade:
https://answers.launchpad.net/yade/+question/344674

I want to understand how yade works,so I‘m ready to read souce code .But I 
cann't find the code 
of"Ig2_Sphere_Sphere_L3Geom"or"Ip2_FrictMat_FrictMat_FrictPhys"or"Law2_L3Geom_FrictPhys_ElPerfPl".Can
 someone tell me where they are?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #326649]: when "make install" , an error appears

2016-08-06 Thread
Question #326649 on Yade changed:
https://answers.launchpad.net/yade/+question/326649

张文卿 proposed the following answer:
Thank you anton ,this help me a lot。:)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #326664]: when"make" an error occures

2016-08-06 Thread
Question #326664 on Yade changed:
https://answers.launchpad.net/yade/+question/326664

张文卿 proposed the following answer:
By updating my ubantu system, I have solved this problem ,thank you :)

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp