Re: [Yade-users] [Question #295520]: Exception occured: std::bad_alloc
Question #295520 on Yade changed: https://answers.launchpad.net/yade/+question/295520 Anton Gladky proposed the following answer: You are adding bodies at each call of servoController()? Could you please check the number of bodies during the simulation? Anton 2016-06-21 18:37 GMT+02:00 Yor1 : > Question #295520 on Yade changed: > https://answers.launchpad.net/yade/+question/295520 > > Yor1 posted a new comment: > Hi Bruno, > > We have the indentation before "O" because this line is included > in the recorder servoController(). > > Best regards. > Jabrane. > > -- > 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 -- 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 #295531]: Cohesion/Moment only work with TriaxialCompressionEngine?
Question #295531 on Yade changed: https://answers.launchpad.net/yade/+question/295531 Status: Open => Needs information Jérôme Duriez requested more information: Hi, Your issue sounds rather strange to me. The data saved (by TriaxialStateRecorder() engine) in 'WallStresses' obviously should not be affected by the contact law used, or the choice of TriaxialStressController vs TriaxialCompressionEngine as a boundary controller. Apart for the (always possible) existence of a weird bug, it may also happen that your simulation is inconsistently defined when you try to include moment law in HM or "setCohesionNow" in "Cundall-Strack". In fact, please be more specific here as "setCohesionNow" is part of the "CohFrictMat" model (in terms of Ip2_CohFrictMat_CohFrictMat_CohFrictPhys -- Law2_ScGeom6D_CohFrictPhys_CohesionMoment) but is not part of the "CundallStrack" model (in terms of Ip2_FrictMat_FrictMat_FrictPhys -- Law2_ScGeom_FrictPhys_CundallStrack) In order to help us to look at your issue, a first recommendation would be to provide us with a minimal working script that is - minimal (we do not care about VTK things, particle size distribution, and so on...) - and working: it will be impossible for anyone to try your script because of sp.load('sp.txt'), for instance. ;-) Jerome -- 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 #295527]: CohFrictMat model
Question #295527 on Yade changed: https://answers.launchpad.net/yade/+question/295527 Status: Open => Answered Jérôme Duriez proposed the following answer: Hi Paula, In fact you're lucky because the CohFrictMat model is well documented from my point of view, see - https://yade- dem.org/doc/yade.wrapper.html#yade.wrapper.Ip2_CohFrictMat_CohFrictMat_CohFrictPhys - https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.CohFrictMat (whose documentation is the one that could be slightly improved, I confess) - https://yade- dem.org/doc/yade.wrapper.html#yade.wrapper.Law2_ScGeom6D_CohFrictPhys_CohesionMoment See also this recent question: https://answers.launchpad.net/yade/+question/295225 -- 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 #295531]: Cohesion/Moment only work with TriaxialCompressionEngine?
New question #295531 on Yade: https://answers.launchpad.net/yade/+question/295531 This was an issue I ran into before with the Cundall-Strack law, and I am now also seeing with Hertz-Mindlin law. If I have: triax=TriaxialStressController(...) then the "Wallstresses" file shows all stresses and porosity as "NaN" for Hertz-Mindlin, or I get a core dump for Cundall-Strack. This happens only when I set "includeMoment" to True for Hertz-Mindlin, or "setCohesionNow" to True for Cundall-Strack. It's fairly simple to get my models to run, all I have to do is to switch to : triax=TriaxialCompressionEngine(...) So is the moment law and cohesion not supported with TriaxialStressController, is it a bug, or (probably most likely) am I doing something wrong? I should add that I tested this with the latest version released last week and saw the same behavior I am pasting my Hertz-Mindlin input below for completeness. Thanks, Gary import math, os, sys from yade import plot from yade import pack ### DEFINE VARIABLES AND MATERIALS ### readParamsFromTable(krot=1.0,noTableOk=True) from yade.params.table import * desc='description' key=O.tags[desc] print key, krot os.mkdir(key) finalFricDegree=14.5 rate=-25.0 # loading rate (strain rate) damp=0.2 # damping coefficient stabilityThreshold=0.02 triaxialThreshold=0.005 young=20e9 poisson=0.33 triaxial_p = -5.0e6 sp=pack.SpherePack() sp.load('sp.txt') print "Saved Confined State Loaded" box=sp.aabb() print box print (sp.psd(bins=10)) # ### # ### DEFINE THE SCENE ### # ### O.materials.append(FrictMat(young=young, poisson=poisson, frictionAngle=radians(finalFricDegree), density=2600, label='spheres')) O.materials.append(FrictMat(young=young, poisson=poisson, frictionAngle=0, density=0, label='walls')) walls=aabbWalls(box,thickness=0,oversizeFactor=2.0,material='walls') wallIds=O.bodies.append(walls) sp.toSimulation(material='spheres') ### DEFINING ENGINES ### triax=TriaxialStressController( #replace with#TriaxialCompressionEngine(# maxMultiplier=1.005, # spheres growing factor (fast growth) finalMaxMultiplier=1.5, # spheres growing factor (slow growth) thickness = -1, stressMask = 7, internalCompaction=True, autoCompressionActivation=False, sigmaIsoCompaction=triaxial_p, sigmaLateralConfinement=triaxial_p, ) triax.goal1=triax.goal2=triax.goal3=confinement_p newton=NewtonIntegrator(damping=damp) vtkrec=VTKRecorder(recorders=['spheres','boxes','stress'],) vtkrec.fileName=key+'/'+'vtkHC' O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(krot=krot,eta=1.0)], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True,label="mindlinLaw2")], ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton, TriaxialStateRecorder(iterPeriod=100,file=key+'/'+'WallStresses'), vtkrec, ] # ###Record and plot data ### # def history(): plot.addData(e1=triax.strain[1]*-100.0, ev=-100.0*triax.volumetricStrain, pDiff=pDiff, i=O.iter) vtkrec.fileName=key+'/'+'vtkTriaxial' f=open(key+'/'+'./zout.txt', 'w+') # ### # ### APPLYING TRIAXIAL PRESSURE ### # ### triax.goal1=triax.goal2=triax.goal3=triaxial_p while 1: O.run(1000, True) unb=unbalancedForce() triDiff=abs((triax.goal1-triax.meanStress)/(triax.goal1)) print >>f,'unb:',unb,' triDiff: ',triDiff,' meanS: ',triax.meanStress,' porosity: ',triax.porosity,'pMult',triax.previousMultiplier sys.stdout.flush() if unbhttps://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 #295520]: Exception occured: std::bad_alloc
Question #295520 on Yade changed: https://answers.launchpad.net/yade/+question/295520 Yor1 posted a new comment: Hi Bruno, We have the indentation before "O" because this line is included in the recorder servoController(). Best regards. Jabrane. -- 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 #295527]: CohFrictMat model
New question #295527 on Yade: https://answers.launchpad.net/yade/+question/295527 Please please please can someone help me?, I'm using the CohFrictMat contact model and I'm trying to get a certain behavior of the material but I need to understand the CohFrictMat contact model to modify the variables of it. Thanks for all the help that you can provide. -- 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 #295520]: Exception occured: std::bad_alloc
Question #295520 on Yade changed: https://answers.launchpad.net/yade/+question/295520 Bruno Chareyre proposed the following answer: There should not be any memory cost for this function. Why is there an indentation before "O" in: ### add top box O.bodies.append(utils.box(center=(xinf-thickness+Rmean/10,3*(ysup/4)+2*Rmean,zsup/2) It could be a problem. -- 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 #295486]: Using CpmMat to simulate the hysteretic curve of concrete
Question #295486 on Yade changed: https://answers.launchpad.net/yade/+question/295486 Status: Answered => Solved liukeqi confirmed that the question is solved: Thanks Jan Stránský. It 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 #295486]: Using CpmMat to simulate the hysteretic curve of concrete
Question #295486 on Yade changed: https://answers.launchpad.net/yade/+question/295486 liukeqi posted a new comment: Thanks Jérôme Duriez. -- 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 #295520]: Exception occured: std::bad_alloc
Question #295520 on Yade changed: https://answers.launchpad.net/yade/+question/295520 Yor1 posted a new comment: Hello Bruno, I think that is a problem of memory. In the engines i think tha "PyRunner(iterPeriod=1,initRun=True,command='servoController()',label='servo')" take a lot of memory and after 1000 iterations i don't have memory. In order to preserve memory for the simulation, i think that the solution is iterPeriod must be important for example iterPeriod=100 or iterPeriod=1000. Best regards. Jabrane. -- 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 #295521]: contact-normal in Yade
Question #295521 on Yade changed: https://answers.launchpad.net/yade/+question/295521 Status: Open => Answered Bruno Chareyre proposed the following answer: >[1] Are there anything wrong in my understanding of contact normal distribution? Looking at fig.2, your maths are wrong for sure. I can't tell where exactly. Even figs.3 and 4 are weird, the extrema are like shifted by pi/4 from what is expected with vertical+horizontal walls. >[2] Or Yade has its own pattern in defining the contact normal? Not at all. Bruno -- 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 #295520]: Exception occured: std::bad_alloc
Question #295520 on Yade changed: https://answers.launchpad.net/yade/+question/295520 Status: Open => Answered Bruno Chareyre proposed the following answer: Hi, Can you compile&run a debug build and post more information here? Bruno -- 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 #295521]: contact-normal in Yade
New question #295521 on Yade: https://answers.launchpad.net/yade/+question/295521 Dear Prof. Chareyre and all users, Fabric analysis is one of the most common methods for detecting those micro-level natures of such granular materials. Recently I have tried to do it in 2D-simulation task in Yade-1.14-daily version with the simplest isotropic condition. But unfortunately, I’m lost in getting the same results as that in Ref.[1]. All the details of my simulation are in Fig.1 Fig dir: http://tinypic.com/view.php?pic=2dwhukl&s=9#.V2kZvbEs-VU After the consolidation process finished, I listed all the directional data I want to use as the following mode: # Body_Numbers, Body_Cur_P_x, Body_Cur_P_y, Body_Cur_P_z, 1, -1.28536e-01, 0.0e+00, 0.0e+00, 2, 1.28528e-01, 0.0e+00, 0.0e+00, 3, 0.0e+00, -1.28642e-01, 0.0e+00, 4, 0.0e+00, 1.28632e-01, 0.0e+00, 5, 0.0e+00, 0.0e+00, -5.0e-01, 6, 0.0e+00, 0.0e+00, 5.0e-01, 7, 1.20924e-01, 6.60472e-02, 0.0e+00, 8, -1.22713e-01, 1.02525e-01, 0.0e+00, 9, 4.91498e-02, 1.84187e-02, 0.0e+00, 10,-4.19541e-02, -3.18193e-02, 0.0e+00, . ### So,I firstly summarized the contact-normal as the vector variable and transformed it from Cartesian to polar axis (using format 1-1) but got a strange result as shown in Fig.2. All the contact-normals are not symmetrically distributed around the origin of principle axes, but most of them are located in the area of (math.pi to 3/2math.pi). Then, I respectively used the particle position and the contact-point position to execute the same process as above for ensuring that I got a correct output of those data, and plotted them in the same style as in Fig.3 and Fig.4. Now, the statistical results of the two group data show me the same trend. They are distributed axisymmetrically around the principle axes. And in the same quadrant, the number of data located in diagonal area is more than that in others, which can meet the deviatoric-shear condition. Why is only the contact normal showing the non-symmetric distribution here? [1] Are there anything wrong in my understanding of contact normal distribution? [2] Or Yade has its own pattern in defining the contact normal? Seeking your help! Ref. [1] Distribution of directional data and fabric tensors. 1984_Int.J.Eng.Sci -- 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 #295520]: Exception occured: std::bad_alloc
New question #295520 on Yade: https://answers.launchpad.net/yade/+question/295520 Hello everybody ! I try to simulate a simple shear test. I simulate the simple shear test with 40 iterations. The problem is when the simulation is between 1000 and 1100 iterations i obtained this error message: "FATAL /home/hamdi/YADE/sources/trunk/core/ThreadRunner.cpp:30 run: Exception occured: std::bad_alloc" I don't undersatand the origin of the error. Best regards! Jabrane P.S this is my script # -*- coding: utf-8 -*- O=Omega() from yade import ymport, utils, plot ## parameters definition PACKING='X1Y1Z1_1k' DAMPING=0.5 dtCOEFF=0.5 normalSTRESS=5e5 normalVEL=normalSTRESS/1e8 # 0.001 for 100kPa // optimized for normalVEL=normalSTRESS/1e8? shearVEL=1*normalVEL # try different values to ensure quasi-static conditions intR=1.263 #1.263 for X1Y1Z1_5k DENS=3000 YOUNG=50e9 FRICT=18 ALPHA=0.3 TENS=45e5 COH=45e6 iterMAX=40 OUT='shearTest_'+PACKING+'_K10_D3000_Y50e9A03F18T45e5C45e6_500kPa_shearVel1' ## Import of the sphere assembly ### material definition def sphereMat(): return JCFpmMat(type=1,density=DENS,young=YOUNG,poisson = ALPHA,frictionAngle=radians(FRICT),tensileStrength=TENS,cohesion=COH) def wallMat(): return JCFpmMat(type=0,density=DENS,young=YOUNG,frictionAngle=radians(0)) ## copy spheres from the packing into the scene O.bodies.append(ymport.text(PACKING+'.spheres',scale=1.,shift=Vector3(0,0,0),material=sphereMat)) ## preprocessing to get dimensions dim=utils.aabbExtrema() xinf=dim[0][0] xsup=dim[1][0] X=xsup-xinf yinf=dim[0][1] ysup=dim[1][1] Y=ysup-yinf zinf=dim[0][2] zsup=dim[1][2] Z=zsup-zinf ## initial surface S0=X*Z ## spheres factory R=0 Rmax=0 numSpheres=0. for o in O.bodies: if isinstance(o.shape,Sphere): o.shape.color=(0.7,0.5,0.3) numSpheres+=1 R+=o.shape.radius if o.shape.radius>Rmax: Rmax=o.shape.radius Rmean=R/numSpheres ## creation of shear box thickness=Y/100 oversizeFactor=1.3 ### loading platens O.bodies.append(utils.box(center=(xinf+X/2.,yinf-thickness+Rmean/10.,zinf+Z/2.),extents=(oversizeFactor*X/2,thickness,oversizeFactor*Z/2),material=wallMat,fixed=True)) bottomPlate=O.bodies[-1] O.bodies.append(utils.box(center=(xinf+X/2.,ysup+thickness-Rmean/10.,zinf+Z/2.),extents=(oversizeFactor*X/2,thickness,oversizeFactor*Z/2),material=wallMat,fixed=True)) topPlate=O.bodies[-1] O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intR,label='aabb'),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intR,label='ss2d3dg'),Ig2_Box_Sphere_ScGeom()], [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1,label='interactionPhys')], [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,Key=OUT,label='interactionLaw')] ), GlobalStiffnessTimeStepper(defaultDt=0.1*PWaveTimeStep(),timestepSafetyCoefficient=dtCOEFF), TranslationEngine(ids=[topPlate.id],translationAxis=(0.,-1.,0.),velocity=0.,label='yTranslation'), PyRunner(iterPeriod=1,initRun=True,command='servoController()',label='servo'), NewtonIntegrator(damping=DAMPING,gravity=(0,0,0),label='damper'), PyRunner(iterPeriod=100,initRun=True,command='dataCollector()'), ] ## Engines definition ( servoController() and dataCollector() ) shearing=False sigmaN=0 tau=0 Fs1=0 Fs2=0 Xdispl=0 px0=0 Ydispl=0 py0=topPlate.state.pos[1] prevTranslation=0 n=0 def servoController(): global px0, py0, sigmaN, n, Fn1, Fn2, shearing, butee, piston1, piston2 Fn1=abs(O.forces.f(topPlate.id)[1]) Fn2=abs(O.forces.f(bottomPlate.id)[1]) sigmaN=Fn1/(S0-2*Xdispl*Z) # necessary? #print yTranslation.velocity, sigmaN if shearing==False: if yTranslation.velocity(0.9*normalSTRESS): yTranslation.velocity=normalVEL*((normalSTRESS-sigmaN)/normalSTRESS) if shearing==False and abs((normalSTRESS-sigmaN)/normalSTRESS)<0.001 and unbalancedForce()<0.01: yTranslation.velocity=0 n+=1 if n>1000 and abs((sigmaN-normalSTRESS)/normalSTRESS)<0.001: print 'stress on joint plane = ', utils.forcesOnPlane((X/2,Y/2,Z/2),(0,1,0))/S0 ### add top box O.bodies.append(utils.box(center=(xinf-thickness+Rmean/10,3*(ysup/4)+2*Rmean,zsup/2),extents=(thickness,Y/4,oversizeFactor*Z/2),material=wallMat,fixed=True)) butee=O.bodies[-1] O.bodies.append(utils.box(center=(xsup+thickness-Rmean/10,3*(ysup/4)+2*Rmean,zsup/2),extents=(thickness,Y/4,oversizeFactor*Z/2),material=wallMat,fixed=True)) O.bodies.append(utils.box(center=(xsup/2,3*(ysup/4)+2*Rmean,zinf-thickness+Rmean/10),extents=(oversizeFactor*X/2,Y/4,thickness),material=wallMat,fixed=True,wire=True)) O.bodies.append(utils.box(center=(xsup/2,3*(ysup/4)+2*Rmean,zsup+thickness-Rmean/10),extents=(oversizeFactor*X/2,Y/4,thickness),material=wallMat,fixed=True,wire=True)) ### add bottom box O.bodies.append(utils.box(center=(xsup+thickness-R
Re: [Yade-users] [Question #295464]: Calculation of damping energy on chosen particles of a sample
Question #295464 on Yade changed: https://answers.launchpad.net/yade/+question/295464 Status: Answered => Solved Yor1 confirmed that the question is solved: Hi Jan! Thank you for the response. I got a method to choose the particle in which I want to calculate the damping energy. For the uniaxial test : i choose the particles which state.vel[0]!=0 and state.vel[2]!=0. For the shear test : i choose the particle which state.vel!=(0,0,0) Best regards. Jabrane. -- 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