Re: [Yade-users] [Question #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Seti posted a new comment: 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 #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Seti posted a new comment: Hi Jan, Thanks for your advise. can you please send the link to [1] as well? Much appreciated, Seti -- 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 #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Seti posted a new comment: Hi Jan, Thanks for your advise. can you please send the link to [1] as well? Much appreciated, Seti -- 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 #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Status: Answered => Open Seti is still having a problem: Hi Robert, thanks for your reply, no error just below message: init done, will now run. Damaged, stopping. Compressive strength fc=691231 gnuplot 20180330T170719p8266.gnuplot Bye. here is the code: #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division from yade import plot,pack,timing import time, sys, os, copy #import matplotlib #matplotlib.rc('text',usetex=True) #matplotlib.rc('text.latex',preamble=r'\usepackage{concrete}\usepackage{euler}') """ A fairly complex script performing uniaxial tension-compression test on hyperboloid-shaped specimen. Most parameters of the model (and of the setup) can be read from table using yade-multi. After the simulation setup, tension loading is run and stresses are periodically saved for plotting as well as checked for getting below the maximum value so far. This indicates failure (see stopIfDamaged function). After failure in tension, the original setup is loaded anew and the sense of loading reversed. After failure in compression, strain-stress curves are saved via plot.saveGnuplot and we exit, giving some useful information like peak stresses in tension/compression. Running this script for the first time can take long time, as the specimen is prepared using triaxial compression. Next time, however, an attempt is made to load previously-generated packing (from /tmp/triaxPackCache.sqlite) and this expensive procedure is avoided. The specimen length can be specified, its diameter is half of the length and skirt of the hyperboloid is 4/5 of the width. The particle size is constant and can be specified using the sphereRadius parameter. The 3d display has displacement scaling applied, so that the fracture looks more spectacular. The scale is 1000 for tension and 100 for compression. """ # default parameters or from table readParamsFromTable(noTableOk=True, # unknownOk=True, young=24e9, poisson=.2, sigmaT=3.5e6, frictionAngle=atan(0.8), epsCrackOnset=1e-4, relDuctility=30, intRadius=1.5, dtSafety=.8, damping=0.4, strainRateTension=.5, strainRateCompression=.5, setSpeeds=True, # 1=tension, 2=compression (ANDed; 3=both) doModes=2, specimenLength=.15, sphereRadius=3.5e-3, # isotropic confinement (should be negative) isoPrestress=0, ) from yade.params.table import * from yade.params.table import * if 'sigmaT=3.5e6, compression' in O.tags.keys(): O.tags['id']=O.tags['id']+O.tags['sigmaT=3.5e6, compression'] # make geom; the dimensions are hard-coded here; could be in param table if desired # z-oriented hyperboloid, length 20cm, diameter 10cm, skirt 8cm # using spheres 7mm of diameter # mat1=CpmMat(young=young,frictionAngle=frictionAngle,poisson=poisson,density=4800,sigmaT=sigmaT,relDuctility=relDuctility,epsCrackOnset=epsCrackOnset,isoPrestress=isoPrestress) concreteId1=O.materials.append(mat1) #sp=pack.randomDensePack(pack.inHyperboloid((0,0,-.5*specimenLength),(0,0,.5*specimenLength),.25*specimenLength,.17*specimenLength),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',returnSpherePack=True) # sp=pack.SpherePack() pred=pack.inCylinder((0,0,0.0002),(0,0,0.3),0.05) O.bodies.append(pack.randomDensePack(pred,radius=0.007)) bb=uniaxialTestFeatures() negIds,posIds,axis,crossSectionArea=bb['negIds'],bb['posIds'],bb['axis'],bb['area'] O.dt=dtSafety*PWaveTimeStep() print 'Timestep',O.dt mm,mx=[pt[axis] for pt in aabbExtrema()] coord_25,coord_50,coord_75=mm+.25*(mx-mm),mm+.5*(mx-mm),mm+.75*(mx-mm) area_25,area_50,area_75=approxSectionArea(coord_25,axis),approxSectionArea(coord_50,axis),approxSectionArea(coord_75,axis) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius,label='is2aabb'),],verletDist=.05*sphereRadius), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius,label='ss2sc')], [Ip2_CpmMat_CpmMat_CpmPhys()], [Law2_ScGeom_CpmPhys_Cpm()], ), NewtonIntegrator(damping=damping,label='damper'), CpmStateUpdater(realPeriod=.5), UniaxialStrainer(strainRate=strainRateTension,axis=axis,asymmetry=0,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,blockDisplacements=False,blockRotations=False,setSpeeds=setSpeeds,label='strainer'), PyRunner(virtPeriod=1e-6/strainRateTension,realPeriod=1,command='addPlotData()',label='plotDataCollector',initRun=True), PyRunner(realPeriod=4,command='stopIfDamaged()',label='damageChecker'), ]
Re: [Yade-users] [Question #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Status: Needs information => Answered Jan Stránský proposed the following answer: Hi Seti, > my model will be exploded. usually this is because too high time step. Could you try with decreased (10x, 100x) time step? sigmaT (cohesion in shear) determines the maximum shear force, maybe with higher sigmaT the shear forces are too high and makes the simulation unstable.. 3) have a look at export.VTKExporter.exportContactPoints [1], You can export damage or relResidualStrength of each contact. Using paraview, you can use e.g. Cylinder glyph to visualize cracks. cheers Jan -- 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 #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Status: Open => Needs information Robert Caulk requested more information: >> my model will be exploded. >> Still not really enough information. Your model explodes without Yade throwing an error? It is odd that your simulation explodes but both Jan and I ran the script you posted without problem. >> I used again the original script and just changed it to compression as per below - it does not work, simulation stops in couple of secs >> What do you mean by "stops in a couple of secs"? No errors? No segmentation fault? Yade just stops running without throwing a single error? -- 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 #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Status: Answered => Open Seti is still having a problem: Hi Robert and Jan, Thanks so much for your replies :) >Could you be more specific than "it won't run"? Maybe you could provide details as to what happens? Is there an error? Does Yade crash? I ran your script with 1e5 and 3.5e6. It runs. my model will be exploded. >3) I would say it is a matter of postprocessing and the definition of crack. You can save interactions and display e.g. only those, whose damage is > 0.99 Your advise, does make sense to me, however not sure how should I do it? is there any existing example that you can share in this regards? I just used paraview for postprocessing - the recorded images for preliminary exercisers. >This is the second time in a couple months that someone has run into this ZeroDivisionError because they are using doModes=2. I am going to edit the script on trunk so we don't keep running into this. I need to use the compression mode I used again the original script and just changed it to compression as per below - it does not work, simulation stops in couple of secs Would you please let me know your thoughts? Thanks, Seti ### #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division from yade import plot,pack,timing import time, sys, os, copy #import matplotlib #matplotlib.rc('text',usetex=True) #matplotlib.rc('text.latex',preamble=r'\usepackage{concrete}\usepackage{euler}') """ A fairly complex script performing uniaxial tension-compression test on hyperboloid-shaped specimen. Most parameters of the model (and of the setup) can be read from table using yade-multi. After the simulation setup, tension loading is run and stresses are periodically saved for plotting as well as checked for getting below the maximum value so far. This indicates failure (see stopIfDamaged function). After failure in tension, the original setup is loaded anew and the sense of loading reversed. After failure in compression, strain-stress curves are saved via plot.saveGnuplot and we exit, giving some useful information like peak stresses in tension/compression. Running this script for the first time can take long time, as the specimen is prepared using triaxial compression. Next time, however, an attempt is made to load previously-generated packing (from /tmp/triaxPackCache.sqlite) and this expensive procedure is avoided. The specimen length can be specified, its diameter is half of the length and skirt of the hyperboloid is 4/5 of the width. The particle size is constant and can be specified using the sphereRadius parameter. The 3d display has displacement scaling applied, so that the fracture looks more spectacular. The scale is 1000 for tension and 100 for compression. """ # default parameters or from table readParamsFromTable(noTableOk=True, # unknownOk=True, young=24e9, poisson=.2, sigmaT=3.5e6, frictionAngle=atan(0.8), epsCrackOnset=1e-4, relDuctility=30, intRadius=1.5, dtSafety=.8, damping=0.4, strainRateTension=.5, strainRateCompression=.5, setSpeeds=True, # 1=tension, 2=compression (ANDed; 3=both) doModes=2, specimenLength=.15, sphereRadius=3.5e-3, # isotropic confinement (should be negative) isoPrestress=0, ) from yade.params.table import * from yade.params.table import * if 'sigmaT=3.5e6, compression' in O.tags.keys(): O.tags['id']=O.tags['id']+O.tags['sigmaT=3.5e6, compression'] # make geom; the dimensions are hard-coded here; could be in param table if desired # z-oriented hyperboloid, length 20cm, diameter 10cm, skirt 8cm # using spheres 7mm of diameter # mat1=CpmMat(young=young,frictionAngle=frictionAngle,poisson=poisson,density=4800,sigmaT=sigmaT,relDuctility=relDuctility,epsCrackOnset=epsCrackOnset,isoPrestress=isoPrestress) concreteId1=O.materials.append(mat1) #sp=pack.randomDensePack(pack.inHyperboloid((0,0,-.5*specimenLength),(0,0,.5*specimenLength),.25*specimenLength,.17*specimenLength),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',returnSpherePack=True) # sp=pack.SpherePack() pred=pack.inCylinder((0,0,0.0002),(0,0,0.3),0.05) O.bodies.append(pack.randomDensePack(pred,radius=0.007)) bb=uniaxialTestFeatures() negIds,posIds,axis,crossSectionArea=bb['negIds'],bb['posIds'],bb['axis'],bb['area'] O.dt=dtSafety*PWaveTimeStep() print 'Timestep',O.dt mm,mx=[pt[axis] for pt in aabbExtrema()] coord_25,coord_50,coord_75=mm+.25*(mx-mm),mm+.5*(mx-mm),mm+.75*(mx-mm) area_25,area_50,area_75=approxSectionArea(coord_25,axis),approxSectionArea(coord_50,axis),approxSectionArea(coord_75,axis) O.engines=[ ForceResetter(),
Re: [Yade-users] [Question #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Robert Caulk posted a new comment: LOL, I guess we worked on this at the same time and came to the same conclusions, Jan. This is the second time in a couple months that someone has run into this ZeroDivisionError because they are using doModes=2. I am going to edit the script on trunk so we don't keep running into this. -- 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 #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Jan Stránský proposed the following answer: Hi Seti, 1) please be more specific on "it wont run". I have tried your code with sigmaT=1e5 and it run.. 2) for doModes=2 (compression only), ft=0. The solution is not to compute fc/ft in this case 3) I would say it is a matter of postprocessing and the definition of crack. You can save interactions and display e.g. only those, whose damage is > 0.99 cheers Jan -- 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 #665857]: Uniaxial compresion
New question #665857 on Yade: https://answers.launchpad.net/yade/+question/665857 Hi all, I have done minor changes on CPM script - as per below : I have below question: 1- Why there is very limited range to change SigmaT inorder to run the script e.g. (1e1-1e4 )if I put 1e5 which is not a very big value for my material it wont run - 2- even when I run it in notifited range after couple of hours I face with below error - can you please help me to fix it? ZeroDivisionError Traceback (most recent call last) /usr/bin/yadedaily in () /usr/bin/yadedaily in stopIfDamaged() 199 print "Damaged, stopping." 200 ft,fc=max(sigma),min(sigma) --> 201 print 'Strengths fc=%g, ft=%g, |fc/ft|=%g'%(fc,ft,abs(fc/ft)) 202 title=O.tags['sigmaT=3.5e6, compression'] if 'sigmaT=3.5e6, compression' in O.tags.keys() else O.tags['params'] 203 print 'gnuplot',plot.saveGnuplot(O.tags['id'],title=title) ZeroDivisionError: float division by zero Damaged, stopping. 3- how I can track the crack in this script - I want to see changing the crack patern by changing material properties. Below is script: #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division from yade import plot,pack,timing, qt import time, sys, os, copy #import matplotlib #matplotlib.rc('text',usetex=True) #matplotlib.rc('text.latex',preamble=r'\usepackage{concrete}\usepackage{euler}') """ A fairly complex script performing uniaxial tension-compression test on hyperboloid-shaped specimen. Most parameters of the model (and of the setup) can be read from table using yade-multi. After the simulation setup, tension loading is run and stresses are periodically saved for plotting as well as checked for getting below the maximum value so far. This indicates failure (see stopIfDamaged function). After failure in tension, the original setup is loaded anew and the sense of loading reversed. After failure in compression, strain-stress curves are saved via plot.saveGnuplot and we exit, giving some useful information like peak stresses in tension/compression. Running this script for the first time can take long time, as the specimen is prepared using triaxial compression. Next time, however, an attempt is made to load previously-generated packing (from /tmp/triaxPackCache.sqlite) and this expensive procedure is avoided. The specimen length can be specified, its diameter is half of the length and skirt of the hyperboloid is 4/5 of the width. The particle size is constant and can be specified using the sphereRadius parameter. The 3d display has displacement scaling applied, so that the fracture looks more spectacular. The scale is 1000 for tension and 100 for compression. """ # default parameters or from table readParamsFromTable(noTableOk=True, # unknownOk=True, young=70e7, poisson=.2, sigmaT=1.1e2, frictionAngle=atan(.3), epsCrackOnset=1e-4, relDuctility=5, intRadius=1.5, dtSafety=.8, damping=0.4, strainRateTension=.1, strainRateCompression=.1, setSpeeds=True, # 1=tension, 2=compression (ANDed; 3=both) doModes=2, specimenLength=.15, sphereRadius=3.5e-3, # isotropic confinement (should be negative) isoPrestress=0, ) from yade.params.table import * if 'sigmaT=3.5e6, compression' in O.tags.keys(): O.tags['id']=O.tags['id']+O.tags['sigmaT=3.5e6, compression'] # make geom; the dimensions are hard-coded here; could be in param table if desired # z-oriented hyperboloid, length 20cm, diameter 10cm, skirt 8cm # using spheres 7mm of diameter # mat1=CpmMat(young=young,frictionAngle=frictionAngle,poisson=poisson,density=4800,sigmaT=sigmaT,relDuctility=relDuctility,epsCrackOnset=epsCrackOnset,isoPrestress=isoPrestress) concreteId1=O.materials.append(mat1) #sp=pack.randomDensePack(pack.inHyperboloid((0,0,-.5*specimenLength),(0,0,.5*specimenLength),.25*specimenLength,.17*specimenLength),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',returnSpherePack=True) # sp=pack.SpherePack() pred=pack.inCylinder((0,0,0.0002),(0,0,0.3),0.05) O.bodies.append(pack.randomDensePack(pred,radius=0.007)) #pred=pack.inCylinder((0,0,0),(0,0,0.03),0.005) #O.bodies.append(pack.randomDensePack(pred,radius=0.0005)) #pred=pack.inCylinder((0,0,0),(0,0,0.2),0.1) #sp=pack.randomDensePack(pred,radius=0.002,material=concreteId) #O.bodies.append(TS1) ## #sp=pack.randomDensePack(pack.inAlignedBox((-.25*specimenLength,-.25*specimenLength,-.5*specimenLength),(.25*specimenLength,.25*specimenLength,.5*specimenLength)),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',returnSpherePack=True) ### ###
Re: [Yade-users] [Question #665857]: Uniaxial compresion
Question #665857 on Yade changed: https://answers.launchpad.net/yade/+question/665857 Description changed to: Hi all, I have done minor changes on CPM script - as per below : I have below questions: 1- Why there is very limited range to change SigmaT inorder to run the script e.g. (1e1-1e4 )if I put 1e5 which is not a very big value for my material it wont run - 2- even when I run it in notifited range after couple of hours I face with below error - can you please help me to fix it? ZeroDivisionError Traceback (most recent call last) /usr/bin/yadedaily in () /usr/bin/yadedaily in stopIfDamaged() 199 print "Damaged, stopping." 200 ft,fc=max(sigma),min(sigma) --> 201 print 'Strengths fc=%g, ft=%g, |fc/ft|=%g'%(fc,ft,abs(fc/ft)) 202 title=O.tags['sigmaT=3.5e6, compression'] if 'sigmaT=3.5e6, compression' in O.tags.keys() else O.tags['params'] 203 print 'gnuplot',plot.saveGnuplot(O.tags['id'],title=title) ZeroDivisionError: float division by zero Damaged, stopping. 3- how I can track the crack in this script - I want to see changing the crack patern by changing material properties. Below is script: #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division from yade import plot,pack,timing, qt import time, sys, os, copy #import matplotlib #matplotlib.rc('text',usetex=True) #matplotlib.rc('text.latex',preamble=r'\usepackage{concrete}\usepackage{euler}') """ A fairly complex script performing uniaxial tension-compression test on hyperboloid-shaped specimen. Most parameters of the model (and of the setup) can be read from table using yade-multi. After the simulation setup, tension loading is run and stresses are periodically saved for plotting as well as checked for getting below the maximum value so far. This indicates failure (see stopIfDamaged function). After failure in tension, the original setup is loaded anew and the sense of loading reversed. After failure in compression, strain-stress curves are saved via plot.saveGnuplot and we exit, giving some useful information like peak stresses in tension/compression. Running this script for the first time can take long time, as the specimen is prepared using triaxial compression. Next time, however, an attempt is made to load previously-generated packing (from /tmp/triaxPackCache.sqlite) and this expensive procedure is avoided. The specimen length can be specified, its diameter is half of the length and skirt of the hyperboloid is 4/5 of the width. The particle size is constant and can be specified using the sphereRadius parameter. The 3d display has displacement scaling applied, so that the fracture looks more spectacular. The scale is 1000 for tension and 100 for compression. """ # default parameters or from table readParamsFromTable(noTableOk=True, # unknownOk=True, young=70e7, poisson=.2, sigmaT=1.1e2, frictionAngle=atan(.3), epsCrackOnset=1e-4, relDuctility=5, intRadius=1.5, dtSafety=.8, damping=0.4, strainRateTension=.1, strainRateCompression=.1, setSpeeds=True, # 1=tension, 2=compression (ANDed; 3=both) doModes=2, specimenLength=.15, sphereRadius=3.5e-3, # isotropic confinement (should be negative) isoPrestress=0, ) from yade.params.table import * if 'sigmaT=3.5e6, compression' in O.tags.keys(): O.tags['id']=O.tags['id']+O.tags['sigmaT=3.5e6, compression'] # make geom; the dimensions are hard-coded here; could be in param table if desired # z-oriented hyperboloid, length 20cm, diameter 10cm, skirt 8cm # using spheres 7mm of diameter # mat1=CpmMat(young=young,frictionAngle=frictionAngle,poisson=poisson,density=4800,sigmaT=sigmaT,relDuctility=relDuctility,epsCrackOnset=epsCrackOnset,isoPrestress=isoPrestress) concreteId1=O.materials.append(mat1) #sp=pack.randomDensePack(pack.inHyperboloid((0,0,-.5*specimenLength),(0,0,.5*specimenLength),.25*specimenLength,.17*specimenLength),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',returnSpherePack=True) # sp=pack.SpherePack() pred=pack.inCylinder((0,0,0.0002),(0,0,0.3),0.05) O.bodies.append(pack.randomDensePack(pred,radius=0.007)) #pred=pack.inCylinder((0,0,0),(0,0,0.03),0.005) #O.bodies.append(pack.randomDensePack(pred,radius=0.0005)) #pred=pack.inCylinder((0,0,0),(0,0,0.2),0.1) #sp=pack.randomDensePack(pred,radius=0.002,material=concreteId) #O.bodies.append(TS1) ## #sp=pack.randomDensePack(pack.inAlignedBox((-.25*specimenLength,-.25*specimenLength,-.5*specimenLength),(.25*specimenLength,.25*specimenLength,.5*specimenLength)),spheresInCell=2000,radius=sphereRadius,memoizeDb='/tmp/triaxPackCache.sqlite',returnSpherePack=True) ###