Re: [Yade-users] [Question #684213]: microstrain field
Question #684213 on Yade changed: https://answers.launchpad.net/yade/+question/684213 procrastinator posted a new comment: Hi Bruno, thank you! Yong -- 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 #684213]: microstrain field
Question #684213 on Yade changed: https://answers.launchpad.net/yade/+question/684213 procrastinator posted a new comment: Hi Jan, thanks, best, yong -- 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 #684213]: microstrain field
Question #684213 on Yade changed: https://answers.launchpad.net/yade/+question/684213 Status: Answered => Solved procrastinator 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
Re: [Yade-users] [Question #684213]: microstrain field
Question #684213 on Yade changed: https://answers.launchpad.net/yade/+question/684213 Bruno Chareyre proposed the following answer: >what are the wrong average strain and true average strain printed out Hi, The true average strain is the proper volume average of local strain. The wrong one is a weighted average where the weights do not follow from a proper partition of space. Yet as you probably realize they are nearly identical. 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 #684213]: microstrain field
Question #684213 on Yade changed: https://answers.launchpad.net/yade/+question/684213 Jan Stránský posted a new comment: > So, from your answer, it means I need to create a class to contain the step (in your answer is self.i). it is one option (there are other ways, so you do not need) > can you tell me what are ... no, sorry, I don't use and don't know these features.. 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 #684213]: microstrain field
Question #684213 on Yade changed: https://answers.launchpad.net/yade/+question/684213 procrastinator posted a new comment: Hi Jan, So, from your answer, it means I need to create a class to contain the step (in your answer is self.i). By the way, can you tell me what are the wrong average strain and true average strain printed out from the screen? what the relationship between these two values and the VTK.file that we exported from the export function? thanks, Yong -- 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 #684213]: microstrain field
Question #684213 on Yade changed: https://answers.launchpad.net/yade/+question/684213 Status: Open => Answered Jan Stránský proposed the following answer: Hello, > It seems that I can just get one VTK file. > TW.defToVtk("strain.vtk") you specified only one file name, so you get only one file. Have a look at [2] for an idea how to save multiple files. Will need some modification for PyRunner, something like: ### class TWExporter: def __init__(self,base): self.base = base self.i = 0 def export(self): TW.setState(1) TW.defToVtk("strain_{:03d}.vtk".format(self.i)) self.i += 1 twExporter = TWExporter("strain") O.engines = [ ... PyRunner(...,command="twExporter.export()"), ] ### 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 #684213]: microstrain field
Question #684213 on Yade changed: https://answers.launchpad.net/yade/+question/684213 procrastinator gave more information on the question: besides, when I run the code, the terminal pop up something I can not fully understand. the messages are as follows: Triangulated Grains : 506 sym_grad_u_total_g (wrong averaged strain): 0.0425446 0.00274478 0.0282376 0.00274478 -0.211716 -0.0313596 0.0282376 -0.0313596 -0.0301356 Total volume = 1.79312e-09, grad_u = 0.0425446 -0.0116201 0.0640599 0.0171097 -0.211716 -0.0539018 -0.00758461 -0.00881733 -0.0301356 sym_grad_u (true average strain): 0.0425446 0.00274478 0.0282376 0.00274478 -0.211716 -0.0313596 0.0282376 -0.0313596 -0.0301356 Macro strain : 0 0 0 0 0 0 0 0 0 # what are the wrong average strain and true average strain? thanks, yong -- 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 #684213]: microstrain field
New question #684213 on Yade: https://answers.launchpad.net/yade/+question/684213 Hi all, I am trying to get the microstrain field. I did as the document said[1]. I want to use PyRunner command to export a series of .vtk files. It seems that I can just get one VTK file. is there someone can help me to check the ### get the strain field part ### in the MWE. from yade import pack, plot from yade import export from yade import utils compFricDegree=45.0 finalFricDegree=19.5 rate=-15 damp=0.7 target_strain = 0.15 stabilityThreshold=0.01 young=4e8 mn,mx=Vector3(0,0,0),Vector3(4e-3,8e-3,4e-3) O.materials.append(CohFrictMat(young=young,poisson=0.3,frictionAngle=radians(compFricDegree),isCohesive=False,alphaKr=0.2,alphaKtw=0,etaRoll=0.5,momentRotationLaw=True,density=2648,label='spheres')) O.materials.append(FrictMat(young=young,poisson=0.3,frictionAngle=0,density=0,label='walls')) walls=aabbWalls([mn,mx],thickness=0,material='walls') wallIds=O.bodies.append(walls) sp=pack.SpherePack() psdSizes=[0.12e-3,0.14e-3,0.16e-3,0.18e-3,0.19e-3,0.20e-3,0.22e-3,0.24e-3,0.29e-3,0.38e-3] psdCumm=[0,11.1,22.2,33.3,44.4,55.5,66.6,77.7,88.8,100] sp.makeCloud(mn,mx,psdSizes=psdSizes,psdCumm=psdCumm,num=500,distributeMass=1,seed=1) sp.toSimulation(material='spheres') O.dt=.5*PWaveTimeStep() triax=TriaxialStressController( maxMultiplier=1.0+2e5/young, finalMaxMultiplier=1.0+2e4/young, thickness=0, stressMask=7, internalCompaction=False ) newton=NewtonIntegrator(damping=damp) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm=True,always_use_moment_law=True,label='cohesiveLaw')] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.8), triax, newton, ] triax.goal1=triax.goal2=triax.goal3=-10 while 1: O.run(3000,True) unb=unbalancedForce() print 'unbalanced force: ',unb,'mean stress: ',triax.meanStress if unb target_strain: O.pause() ## get the strain field # TW=TesselationWrapper() TW.triangulate() TW.computeVolumes() TW.setState(0) #step = 0 #while -triax.strain[1]-re22< target_strain: #step = step+500 #O.run(400,True) #TW.setState(1) #TW.defToVtk("strain_"+str(step)+".vtk") O.run(100,True) TW.setState(1) def strain_export(): #O.run(100,True) TW.setState(1) TW.defToVtk("strain.vtk") # O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm=True,always_use_moment_law=True,label='cohesiveLaw')] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.8), triax, newton, PyRunner(command='stop_loading()',iterPeriod=1), PyRunner(command='strain_export()',iterPeriod=100), ] O.run(5,True) I found that there is a question is almost the same as my question[2], they use a while function to solve this problem. But I want to know how can we solve this problem by using pyrunner function. thanks. [1]https://github.com/yade/trunk/blob/master/examples/tesselationwrapper/tesselationWrapper.py [2]https://answers.launchpad.net/yade/+question/675267 best, yong -- 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