Re: [Yade-users] [Question #669006]: Pyrunner(command) problem for Triaxial simulation
Question #669006 on Yade changed: https://answers.launchpad.net/yade/+question/669006 Status: Open => Solved De zhang confirmed that the question is solved: @Robert, @Jan Stránský, Thanks! I have found the problem and comprehend the using of PyRunner and O.engines+. Thank you for your help~ Best Regards! De Zhang -- 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 #669006]: Pyrunner(command) problem for Triaxial simulation
Question #669006 on Yade changed: https://answers.launchpad.net/yade/+question/669006 De zhang gave more information on the question: Hi, I simplfy my procedure problems as following: #generation of assembly O.engines=[... ... PyRunner=(command='TraiStep()',iterPeriod=1,label='checker'), ] def TraiStep(): if StepNum == 1: PyRunner(command='WallStressGet()',iterPeriod=1) #checker.command='WallStressGet()' #get the wall stress elif StepNum == 2: PyRunner(command='WallStressGet()',iterPeriod=1) #checker.command='WallStressGet()' #get the wall stress elif StepNum == 3: ... elif StepNum == 4: StepNum=StepNum+1 elif StepNum == 5: ... O.engines=O.engines+[PyRunner(command='Confining()',iterPeriod=1)]+[PyRunner(command='AxialLoading()',iterPeriod=1)]+[PyRunner(command='addPlotData()',iterPeriod=1)] def WallStressGet(): ... def Confining(): ... def AxialLoading(): ... def addPlotData(): ... Through my try, I found that after O.engines instance # PyRunner=(command='TraiStep()') # the O.engines in StepNum 5 run for resetting? How to solve this 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 #669006]: Pyrunner(command) problem for Triaxial simulation
Question #669006 on Yade changed: https://answers.launchpad.net/yade/+question/669006 De zhang gave more information on the question: The code in last step of TraiStep(): O.engines=O.engines+[PyRunner(command='Confining()',iterPeriod=1)]+[PyRunner(command='AxialLoading()',iterPeriod=1)]+[PyRunner(command='addPlotData()',iterPeriod=1)] I want to do confining control and loading at the same time, but it seems to be another situation with loadingplate disappeared and confining stress dose not refresh when procedure come to the last StepNum. I am confused about the use of '.command=''' or O.engines+PyRunner(command='...'). Please 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 : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #669006]: Pyrunner(command) problem for Triaxial simulation
Question #669006 on Yade changed: https://answers.launchpad.net/yade/+question/669006 De zhang posted a new comment: Dear RCaulk, Thank you for your reply~ You are right that I was trying to make a cubical simulation of triaxial test. Howerver, My purpose is to work on nonsphere assembly, so the TriaxialStressController may not work as it can only deal with the contact of sphere. I found that problem of 'command=''' or O.engines+PyRunner(command='...') will cause other situations, I am doubt that wether my code of using '.command=' and 'PyRunner' were right? Best regards, De Zhang -- 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 #669006]: Pyrunner(command) problem for Triaxial simulation
Question #669006 on Yade changed: https://answers.launchpad.net/yade/+question/669006 Robert Caulk posted a new comment: Hello De zhang, I admit, I only skimmed through your code. You appear to be controlling the triaxial stresses of a cubical specimen manually through python. Am I right? Is there a reason you are not using the thoroughly tested and efficient TriaxialStressController [1]? Cheers, Robert https://github.com/yade/trunk/blob/master/examples/triax-tutorial /script-session1.py -- 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 #669006]: Pyrunner(command) problem for Triaxial simulation
Question #669006 on Yade changed: https://answers.launchpad.net/yade/+question/669006 De zhang gave more information on the question: Hi, I am confused about the implemtation of 'checker.command=''' and in the subroutine the 'O.engines=O.engines+PyRunner(command='...')', Anyone can 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 : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #669006]: Pyrunner(command) problem for Triaxial simulation
Question #669006 on Yade changed: https://answers.launchpad.net/yade/+question/669006 De zhang gave more information on the question: Hi, The last StepNum, ' O.engines=O.engines+[PyRunner(command=...)+PyRunner(command=...)] 'seem to start a new simulation that confining wall stress was nun, and loading plate disappeared! I don't know why? -- 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 #669006]: Pyrunner(command) problem for Triaxial simulation
Question #669006 on Yade changed: https://answers.launchpad.net/yade/+question/669006 De zhang posted a new comment: Hi, The program has another problem that after StepNum 3 , the loading plate disappeared, and it ran to StepNum5 , the subroutine 'Confining()' seem to be no work. Anyone can help me to solve this 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
[Yade-users] [Question #669006]: Pyrunner(command) problem for Triaxial simulation
New question #669006 on Yade: https://answers.launchpad.net/yade/+question/669006 Hi, Recently I wrote a code for traxial simulation. When I try to calculate the confining stress, I wrote a subroutine, when I use the Pyrunner(command()), it can't work. My whole code is flowing, The problem can be seen in StepNum 1 , the Wallstress still be 0 as it was set to be 0 at the beginning : # # # #This simulation for triaxial experiment of ballast which size betweeen 30cm~45cm #Friction angle for 48 degree from yade import pack,qt,plot,utils,polyhedra_utils,ymport,export,pack,timing from yade import * import numpy from pprint import pprint import random from random import uniform #from random import randint import math from math import * ## #material:ballast and loadingplate global gravel global steel gravel = FrictMat() gravel.density = 2600 #kg/m^3 gravel.young = 2e9 gravel.poisson = 0.21 # real 0.21 gravel.frictionAngle = 0.83 #rad radians(48) // change for rad math.radians(31) #gravel.strength = 200.0e0 # Pa crushable 1000MPa #gravel.IsSplitable = True #The rock real young 5.5E10 (5.5e8 also acceptable) steel = FrictMat() steel.density = 7850 #kg/m^3 steel.young = 10*gravel.young #inital steel was 10*gravel.young steel.poisson = 0.3 steel.frictionAngle = 0.55 #rad radians(31) ##next # # make circle dormetory ### bottom wall bottom_wall=utils.wall(0.00,axis=2,sense=1,material=steel) O.bodies.append(bottom_wall) bottom_wall.state.blockedDOFs='xyzXYZ' #O.bodies.append(utils.facet(vertices=((-0.6,-0.6,0),(0.6,-0.6,0),(0.6,0.6,0)),dynamic=None,fixed=True,wire=True,color=(0.15,0.15,0.15),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) #O.bodies.append(utils.facet(vertices=((-0.6,-0.6,0),(-0.6,0.6,0),(0.6,0.6,0)),dynamic=None,fixed=True,wire=True,color=(0.15,0.15,0.15),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) ### around wall// 30cm diameter// 60cm height #1#(0.15*0.866,0.15*0.5,z),(0.15*0.5,0.15*0.866,z)//id range (1,10) #2#(0.15*0.866,0.15*0.5,z),(0.15*0.866,-0.15*0.5,z)//id range (11,20) #3#(0.15*0.866,-0.15*0.5,z),(0.15*0.5,-0.15*0.866,z)//id range (21,30) ##range is left close, right open ###make four walls to test the results ==> each wall height is 0.1 ###Number for 7 walls for i in range(1,8): O.bodies.append(utils.facet(vertices=((-0.3,-0.15,0.1*(i-1)),(0.3,-0.15,0.1*(i-1)),(0.3,-0.15,0.1*i)),dynamic=None,fixed=True,wire=True,color=(0.35,0.35,0.35),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) O.bodies.append(utils.facet(vertices=((-0.3,-0.15,0.1*(i-1)),(-0.3,-0.15,0.1*i),(0.3,-0.15,0.1*i)),dynamic=None,fixed=True,wire=True,color=(0.35,0.35,0.35),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) for i in range(1,8): O.bodies.append(utils.facet(vertices=((-0.3,0.15,0.1*(i-1)),(0.3,0.15,0.1*(i-1)),(0.3,0.15,0.1*i)),dynamic=None,fixed=True,wire=True,color=(0.35,0.35,0.35),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) O.bodies.append(utils.facet(vertices=((-0.3,0.15,0.1*(i-1)),(-0.3,0.15,0.1*i),(0.3,0.15,0.1*i)),dynamic=None,fixed=True,wire=True,color=(0.35,0.35,0.35),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) for i in range(1,8): O.bodies.append(utils.facet(vertices=((-0.15,-0.3,0.1*(i-1)),(-0.15,0.3,0.1*(i-1)),(-0.15,0.3,0.1*i)),dynamic=None,fixed=True,wire=True,color=(0.35,0.35,0.35),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) O.bodies.append(utils.facet(vertices=((-0.15,-0.3,0.1*(i-1)),(-0.15,-0.3,0.1*i),(-0.15,0.3,0.1*i)),dynamic=None,fixed=True,wire=True,color=(0.35,0.35,0.35),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) for i in range(1,8): O.bodies.append(utils.facet(vertices=((0.15,-0.3,0.1*(i-1)),(0.15,0.3,0.1*(i-1)),(0.15,0.3,0.1*i)),dynamic=None,fixed=True,wire=True,color=(0.35,0.35,0.35),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) O.bodies.append(utils.facet(vertices=((0.15,-0.3,0.1*(i-1)),(0.15,-0.3,0.1*i),(0.15,0.3,0.1*i)),dynamic=None,fixed=True,wire=True,color=(0.35,0.35,0.35),highlight=False,noBound=False,material=steel,mask=1,chain=-1)) global Wall1Stressx,Wall2Stressx,Wall3Stressx,Wall4Stressx global Wall1Stressy,Wall2Stressy,Wall3Stressy,Wall4Stressy global Wall1S,Wall2S,Wall3S,Wall4S Wall1Stressx=0 Wall2Stressx=0 Wall3Stressx=0 Wall4Stressx=0 Wall1Stressy=0 Wall2Stressy=0 Wall3Stressy=0 Wall4Stressy=0 Wall1S=0 Wall2S=0 Wall3S=0 Wall4S=0 global WallStress,ConfStress,ConfDevi,MoveVel,AxiDevi,MoveAxial #stress control # Area of the confining Wall global A1,A2,A3,A4 global LoadPos,IniLoadPos,plateF,IniTime,forceA global WallStress,ConfStress,ConfDevi,MoveVel,AxiDevi,MoveAxial,AreaPlate #unit:m^2