[Yade-users] [Question #678426]: error when reducing psdSizes in drainage-2PFV-Yuan_and_Chareyre_2017.py
New question #678426 on Yade: https://answers.launchpad.net/yade/+question/678426 Hi There, when i reducing particle size distribution in UnsaturatedEngine() or TwoPhaseFlowEngine() and run code , receiving some error and crash : WARNING! rmin>rmax. rmin=3.08144 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.78088 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.81328 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.28869 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.76467 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.88304 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.80516 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.81328 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.80516 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.88304 ,rmax=1e-10 WARNING! rmin>rmax. rmin=3.08144 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.00033 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.00033 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.78088 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.76467 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.28869 ,rmax=1e-10 WARNING! rmin>rmax. rmin=3.46775 ,rmax=1e-10 WARNING! rmin>rmax. rmin=3.46775 ,rmax=1e-10 my PSD is : psdSizes,psdCumm=[.1,0.11,0.849,0.85,1.0,1.40],[0.,0.35,0.35,0.70,.70,1.] -- 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 #678426]: error when reducing psdSizes in drainage-2PFV-Yuan_and_Chareyre_2017.py
Question #678426 on Yade changed: https://answers.launchpad.net/yade/+question/678426 Status: Needs information => Open Saeed gave more information on the question: Hello Robert Thank you I got updating yadedaily to the latest package but my problem not solved code is : import matplotlib; matplotlib.rc('axes',grid=True) from yade import pack import pylab from numpy import * utils.readParamsFromTable(seed=1,num_spheres=1000,compFricDegree = 15.0) from yade.params import table seed=table.seed num_spheres=table.num_spheres# number of spheres compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process) confiningS=-1e5 ## creat a packing with a specific particle side distribution (PSD) psdSizes,psdCumm=[.1,0.11,0.849,0.85,1.0,1.40],[0.,0.35,0.35,0.70,.70,1.] sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(10,10,10) sp.makeCloud(minCorner=mn,maxCorner=mx,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=num_spheres,seed=seed) ## create material #0, which will be used as default O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless')) ## create walls around the packing walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( internalCompaction=True, goal1=confiningS, goal2=confiningS, goal3=confiningS, max_vel=10, label="triax" ) newton=NewtonIntegrator(damping=0.4) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton ] while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001: break # ## REACH NEW EQU. STATE ### # finalFricDegree = 30 # contact friction during the deviatoric loading #We move to deviatoric loading, let us turn internal compaction off to keep particles sizes constant triax.internalCompaction=False # Change contact friction (remember that decreasing it would generate instantaneous instabilities) setContactFriction(radians(finalFricDegree)) while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.001 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001: break triax.depth0=triax.depth triax.height0=triax.height triax.width0=triax.width O.save('1kPacking.yade') #save the packing, which can be reloaded later. O.run(1000,True) ei0=-triax.strain[0];ei1=-triax.strain[1];ei2=-triax.strain[2] si0=-triax.stress(0)[0];si1=-triax.stress(2)[1];si2=-triax.stress(4)[2] from yade import plot O.engines=O.engines+[PyRunner(iterPeriod=20,command='history()',dead=1,label='recorder')] def history(): plot.addData(e11=-triax.strain[0]-ei0, e22=-triax.strain[1]-ei1, e33=-triax.strain[2]-ei2, s11=-triax.stress(0)[0]-si0, s22=-triax.stress(2)[1]-si1, s33=-triax.stress(4)[2]-si2, pc=-unsat.bndCondValue[2], sw=unsat.getSaturation(False), i=O.iter ) plot.plots={'pc':('sw',None,'e22')} plot.plot() ### ## Drainage Test under oedometer conditions ### ### ##oedometer conditions triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=0 recorder.dead=0 ##Instantiate a two-phase engine unsat=TwoPhaseFlowEngine() meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius) / 2. ##set boundary conditions, the drainage is controlled by decreasing W-phase pressure and keeping NW-phase pressure constant unsat.bndCondIsPressure=[0,0,1,1,0,0] unsat.bndCondValue=[0,0,-1e8,0,0,0] unsat.isPhaseTrapped=True #the W-phase can be disconnected from its reservoir unsat.initialization() unsat.surfaceTension = 10 ##start invasion, the data of normalized pc-sw-strain will be written into pcSwStrain.txt file=open('pcSwStrain.txt',"w") for pg in arange(1.0e-5,15.0,0.1): #increase gaz pressure at the top boundary unsat.bndCondValue=[0,0,(-1.0)
Re: [Yade-users] [Question #678426]: error when reducing psdSizes in drainage-2PFV-Yuan_and_Chareyre_2017.py
Question #678426 on Yade changed: https://answers.launchpad.net/yade/+question/678426 Status: Answered => Solved Saeed confirmed that the question is solved: Thanks Chao Yuan, 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 #678426]: error when reducing psdSizes in drainage-2PFV-Yuan_and_Chareyre_2017.py
Question #678426 on Yade changed: https://answers.launchpad.net/yade/+question/678426 Status: Solved => Open Saeed is still having a problem: Thanks Chao Yuan, that solved my question. another question after drying ends ,I want to wetting model for example to sr 50% . is it possible? -- 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 #680501]: How Can i impose gravity in Two Phase Flow Engine
New question #680501 on Yade: https://answers.launchpad.net/yade/+question/680501 Hi There, How Can i impose gravity forces in this code? --- # encoding: utf-8 # This script demonstrates a simple case of drainage simulation using the "2PFV" two-phase model implemented in UnsaturatedEngine. # The script was used to generate the result and supplementary material (video) of [1]. The only difference is the problem size (40k particles in the paper vs. 1k (default) in this version) # [1] Yuan, C., & Chareyre, B. (2017). A pore-scale method for hydromechanical coupling in deformable granular media. Computer Methods in Applied Mechanics and Engineering, 318, 1066-1079. (http://www.sciencedirect.com/science/article/pii/S0045782516307216) import matplotlib; matplotlib.rc('axes',grid=True) from yade import pack import pylab from numpy import * utils.readParamsFromTable(seed=1,num_spheres=1000,compFricDegree = 15.0) from yade.params import table seed=table.seed num_spheres=table.num_spheres# number of spheres compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process) confiningS=-1e5 ## creat a packing with a specific particle side distribution (PSD) psdSizes,psdCumm=[.599,0.6,0.849,0.85,1.0,1.40],[0.,0.35,0.35,0.70,.70,1.] sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(10,10,10) sp.makeCloud(minCorner=mn,maxCorner=mx,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=num_spheres,seed=seed) ## create material #0, which will be used as default O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless')) ## create walls around the packing walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( internalCompaction=True, goal1=confiningS, goal2=confiningS, goal3=confiningS, max_vel=10, label="triax" ) newton=NewtonIntegrator(damping=0.4) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton ] while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001: break # ## REACH NEW EQU. STATE ### # finalFricDegree = 30 # contact friction during the deviatoric loading #We move to deviatoric loading, let us turn internal compaction off to keep particles sizes constant triax.internalCompaction=False # Change contact friction (remember that decreasing it would generate instantaneous instabilities) setContactFriction(radians(finalFricDegree)) while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.001 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001: break triax.depth0=triax.depth triax.height0=triax.height triax.width0=triax.width O.save('1kPacking.yade') #save the packing, which can be reloaded later. O.run(1000,True) ei0=-triax.strain[0];ei1=-triax.strain[1];ei2=-triax.strain[2] si0=-triax.stress(0)[0];si1=-triax.stress(2)[1];si2=-triax.stress(4)[2] from yade import plot O.engines=O.engines+[PyRunner(iterPeriod=20,command='history()',dead=1,label='recorder')] def history(): plot.addData(e11=-triax.strain[0]-ei0, e22=-triax.strain[1]-ei1, e33=-triax.strain[2]-ei2, s11=-triax.stress(0)[0]-si0, s22=-triax.stress(2)[1]-si1, s33=-triax.stress(4)[2]-si2, pc=-unsat.bndCondValue[2], sw=unsat.getSaturation(False), i=O.iter ) plot.plots={'pc':('sw',None,'e22')} plot.plot() ### ## Drainage Test under oedometer conditions ### ### ##oedometer conditions triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=0 recorder.dead=0 ##Instantiate a two-phase engine unsat=TwoPhaseFlowEngine() meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius) / 2. ##set boundary conditions, the drainage is controlled by decreasing W-phase pressure and keeping NW-phase pressure constant unsat.bndCondIsPressure=[0,0,1,1,0,0] unsat.bndCondValue=[0,0,-1e8,0,0,0] unsat.isPhaseTrapped=True #the W-phase
[Yade-users] [Question #681007]: yadedaily install problem on ubuntu 16.04
New question #681007 on Yade: https://answers.launchpad.net/yade/+question/681007 hello When I install yadedaily in Ubuntu16.04,I have met some problems. When I try to install yadedaily with the command: sudo bash -c 'echo "deb http://www.yade-dem.org/packages/ xenial/" >> /etc/apt/sources.list' wget -O - http://www.yade-dem.org/packages/yadedev_pub.gpg | sudo apt-key add - sudo apt-get update sudo apt-get install yadedaily problem : Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package yadedaily -- 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 #681007]: Unable to locate package yadedaily
Question #681007 on Yade changed: https://answers.launchpad.net/yade/+question/681007 Summary changed to: Unable to locate package yadedaily -- 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 #681007]: Unable to locate package yadedaily
Question #681007 on Yade changed: https://answers.launchpad.net/yade/+question/681007 Saeed posted a new comment: Thank you for guiding me Because I had already installed on another system But unfortunately I got into trouble on the new system -- 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 #681194]: I can not get the desired porosity with my PSD
New question #681194 on Yade: https://answers.launchpad.net/yade/+question/681194 Hello All, I am trying to generate sphere packing according to a given PSD. I want to get a porosity=0.375 or e=(triax.porosity)/(1-triax.porosity)=0.6 I use num_spheres=1000 and my answer for porosity is 0.4969 I use num_spheres=5000 and my answer for porosity is 0.435 I use num_spheres=15000 and my answer for porosity is 0.411 I use num_spheres=2 and my answer for porosity is 0.4139 I use num_spheres=3 and my answer for porosity is 0.4059 I use num_spheres=4 and my answer for porosity is 0.39 I use num_spheres=5 and my answer for porosity is 0.39 I use num_spheres=6 and my answer for porosity is 0.39 How to use this psd to get the desired porosity=0.375 or e=(triax.porosity)/(1-triax.porosity)=0.6 ? = import matplotlib; matplotlib.rc('axes',grid=True) from yade import pack import pylab from numpy import * import matplotlib.pyplot as plt import math utils.readParamsFromTable(seed=1,num_spheres=1000,compFricDegree = 0.0) from yade.params import table seed=table.seed num_spheres=table.num_spheres# number of spheres compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process) confiningS=-2820 ## creat a packing with a specific particle side distribution (PSD) psdSizes,psdCumm=[0.0011,0.0012,0.0030,0.0059,0.0081,0.0111,0.0133,0.0222,0.0285,0.0371,0.0746,0.1491,0.2982,0.4224],[0.,0.22,0.29,0.36,.45,0.55,0.59,0.69,0.76,0.87,0.94,0.95,0.97,1.0] sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(2.5,2.5,2.5) sp.makeCloud(minCorner=mn,maxCorner=mx,num=num_spheres,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=False,seed=seed) sp.psd(bins=5000,mass=False) sp.toSimulation ## create material #0, which will be used as default O.materials.append(FrictMat(young=15e6,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=15e6,poisson=.4,frictionAngle=0,density=0,label='frictionless')) ## create walls around the packing walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) print 2*O.bodies[-1].shape.radius print 2*O.bodies[6].shape.radius triax=TriaxialStressController( internalCompaction=False, goal1=confiningS, goal2=confiningS, goal3=confiningS, max_vel=10, label="triax" ) newton=NewtonIntegrator(damping=0.4) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton ] O.dt=.1*PWaveTimeStep() O.dynDt=False while 1: O.run(1000, True) unb=unbalancedForce() print 'unb: ',unb,' t.p: ',triax.porosity,' n: ',porosity(),' e: ',(triax.porosity)/(1-triax.porosity),' Sigma: ',-triax.stress(3)[1] if unb<0.001 and abs(confiningS-triax.meanStress)/(-confiningS)<0.001: break print 'porosity: ',porosity() print 'triax.porosity',triax.porosity print 'e: ',(triax.porosity)/(1-triax.porosity) == -- 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 #681194]: I can not get the desired porosity with my PSD
Question #681194 on Yade changed: https://answers.launchpad.net/yade/+question/681194 Status: Needs information => Open Saeed gave more information on the question: hi Robert I increase the number of compFricDegree, but porosity (n) and Void Ratio: e=n/(1-n) increased and did not help. Without using the num_spheres in sp.makeCloud , it simulates the small interval of the psd, and the entire interval of the seeds does not coat, and a very large amount of grain is modeled, which is very long runtime. And the psd does not fully model the numbers given in psdSizes and psdCumm. Please provide a solution 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 #681991]: WARNING! rmin>rmax when running TwoPhaseFlowEngine()
New question #681991 on Yade: https://answers.launchpad.net/yade/+question/681991 Hi There, When I run the code below, I will be given the Error when arrives to > unsat.initialization() I guessed the grains out of the box, which I asked in the code to remove that grain, but the grains were not placed outside the box. Also, using the lower timestep but the problem remains. Code : ## encoding: utf-8 import matplotlib; matplotlib.rc('axes',grid=True) import matplotlib.pyplot as plt import pylab from yade import pack import numpy as np from numpy import * import math ## Define Parameters num_spheres=5000 compFricDegree=30 confiningS=-12500 RhoW=1000 RhoS=2700 youngModulus=75e6 poissonRatio=0.3 ## creat a packing with a specific particle size distribution (PSD) psdSizes=[0.0016,0.002,0.005,0.006,0.0075,0.01,0.015,0.025,0.035,0.05,0.075] #(mm) psdCumm=[0.0,0.075,0.21,0.23,0.28,0.37,0.48,0.70,0.85,0.89,1.0] #cumulative psdSizesArray=np.array(psdSizes) psdSizesMeter=psdSizesArray*0.001 #Convert the size of particles to meter sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(.0012,0.0012,0.0012) #initial box = 1.2*1.2*1.2 mm sp.makeCloud(minCorner=mn,maxCorner=mx,num=num_spheres,psdSizes=psdSizesMeter,psdCumm=psdCumm,distributeMass=False,seed=True) sp.psd(bins=150,mass=False) sp.toSimulation ## create material, which will be used as default O.materials.append(FrictMat(young=youngModulus,poisson=poissonRatio,frictionAngle=radians(compFricDegree),density=RhoS,label='spheres')) O.materials.append(FrictMat(young=youngModulus,poisson=poissonRatio,frictionAngle=0,density=0,label='frictionless')) ## create walls around the packing walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( internalCompaction=False, #external (walls) compaction , turn internal compaction off to keep particles sizes constant goal1=confiningS, goal2=confiningS, goal3=confiningS, label="triax" ) newton=NewtonIntegrator(damping=0.4) ## Engines O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton ] O.dt=.1*PWaveTimeStep() O.dynDt=False while 1: O.run(1000,True) unb=unbalancedForce() e=(triax.porosity)/(1-triax.porosity) print 'unb: ',unb,' e: ',e,' Sigma: ',-triax.stress(3)[1] if unb<0.15 and abs(confiningS-triax.meanStress)/(-confiningS)<0.015 and e<=1.05: break triax.depth0=triax.depth triax.height0=triax.height triax.width0=triax.width O.save('Pack60.yade') #save the packing, which can be reloaded later. ## Plot and Save data from yade import plot O.engines=O.engines+[PyRunner(iterPeriod=100,command='history()',dead=1,label='recorder')] X=0 def history(): plot.addData(e11=-triax.strain[0], e22=-triax.strain[1], e33=-triax.strain[2], s11=-triax.stress(0)[0],s22down=-triax.stress(2)[1],s22up=-triax.stress(3)[1],s33=-triax.stress(4)[2], sEfficient=abs(triax.stress(3)[1])+X*(unsat.bndCondValue[3]-unsat.bndCondValue[2]), pc=unsat.bndCondValue[3]-unsat.bndCondValue[2], Sr=unsat.getSaturation(False), n=triax.porosity, Vs=triax.particlesVolume, V=triax.boxVolume, Vv=triax.porosity*triax.boxVolume, Vw=unsat.getSaturation(False)*triax.porosity*triax.boxVolume, Mw=RhoW*unsat.getSaturation(False)*triax.porosity*triax.boxVolume, Ms=RhoS*triax.particlesVolume, WaterContent=((RhoW*unsat.getSaturation(False)*triax.porosity*triax.boxVolume)/(RhoS*triax.particlesVolume))*100, eV=-triax.volumetricStrain, gPP=unsat.getPorePressure((0,0,0)), up=unsat.porosity, VoidRatio=(triax.porosity)/(1-triax.porosity), meanS=triax.meanStress, xx=triax.width, yy=triax.height, zz=triax.depth, i=O.iter ) ## ## Start test ### ## triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=False ## Instantiate a two-phase engine unsat=TwoPhaseFlowEngine() meanDiameter=(O.bodies[-1].sh
Re: [Yade-users] [Question #681991]: WARNING! rmin>rmax when running TwoPhaseFlowEngine()
Question #681991 on Yade changed: https://answers.launchpad.net/yade/+question/681991 Saeed gave more information on the question: Hi there I think there is a problem with file 'TwoPhaseFlowEngine.cpp' to calculate rmin and rmax : A portion of this file (engine) that performs radius calculations is listed below: -- double TwoPhaseFlowEngine::computeMSPRcByPosRadius(const Vector3r& posA, const double& rA, const Vector3r& posB, const double& rB, const Vector3r& posC, const double& rC) { double e[3]; //edges of triangulation double g[3]; //gap radius between solid e[0] = (posB-posC).norm(); e[1] = (posC-posA).norm(); e[2] = (posB-posA).norm(); g[0] = ((e[0]-rB-rC)>0) ? 0.5*(e[0]-rB-rC):0 ; g[1] = ((e[1]-rC-rA)>0) ? 0.5*(e[1]-rC-rA):0 ; g[2] = ((e[2]-rA-rB)>0) ? 0.5*(e[2]-rA-rB):0 ; double rmin= (std::max(g[0],std::max(g[1],g[2]))==0) ? 1.0e-11:std::max(g[0],std::max(g[1],g[2])) ; double rmax= computeEffRcByPosRadius(posA, rA, posB, rB, posC, rC); if(rmin>rmax) { cerr<<"WARNING! rmin>rmax. rmin="<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 #681991]: WARNING! rmin>rmax when running TwoPhaseFlowEngine()
Question #681991 on Yade changed: https://answers.launchpad.net/yade/+question/681991 Description changed to: Hi There, When I run the code below, I will be given the Error when arrives to > unsat.initialization() I guessed the grains out of the box, which I asked in the code to remove that grain, but the grains were not placed outside the box. Also, using the lower timestep but the problem remains. Code : ## encoding: utf-8 import matplotlib; matplotlib.rc('axes',grid=True) import matplotlib.pyplot as plt import pylab from yade import pack import numpy as np from numpy import * import math ## Define Parameters num_spheres=5000 compFricDegree=30 confiningS=-12500 RhoW=1000 RhoS=2700 youngModulus=75e6 poissonRatio=0.3 ## creat a packing with a specific particle size distribution (PSD) psdSizes=[0.0016,0.002,0.005,0.006,0.0075,0.01,0.015,0.025,0.035,0.05,0.075] #(mm) psdCumm=[0.0,0.075,0.21,0.23,0.28,0.37,0.48,0.70,0.85,0.89,1.0] #cumulative psdSizesArray=np.array(psdSizes) psdSizesMeter=psdSizesArray*0.001 #Convert the size of particles to meter sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(.0012,0.0012,0.0012) #initial box = 1.2*1.2*1.2 mm sp.makeCloud(minCorner=mn,maxCorner=mx,num=num_spheres,psdSizes=psdSizesMeter,psdCumm=psdCumm,distributeMass=False,seed=True) sp.psd(bins=150,mass=False) sp.toSimulation ## create material, which will be used as default O.materials.append(FrictMat(young=youngModulus,poisson=poissonRatio,frictionAngle=radians(compFricDegree),density=RhoS,label='spheres')) O.materials.append(FrictMat(young=youngModulus,poisson=poissonRatio,frictionAngle=0,density=0,label='frictionless')) ## create walls around the packing walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( internalCompaction=False, #external (walls) compaction , turn internal compaction off to keep particles sizes constant goal1=confiningS, goal2=confiningS, goal3=confiningS, label="triax" ) newton=NewtonIntegrator(damping=0.4) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton ] O.dt=.1*PWaveTimeStep() O.dynDt=False while 1: O.run(1000,True) unb=unbalancedForce() e=(triax.porosity)/(1-triax.porosity) print 'unb: ',unb,' e: ',e,' Sigma: ',-triax.stress(3)[1] if unb<0.15 and abs(confiningS-triax.meanStress)/(-confiningS)<0.015 and e<=1.05: break ## Start test ### triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=False ## Instantiate a two-phase engine unsat=TwoPhaseFlowEngine() meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius)/2.0 ## set boundary conditions, the drainage is controlled by decreasing Water pressure and keeping air pressure constant unsat.bndCondIsPressure=[0,0,1,1,0,0] unsat.bndCondValue=[0,0,0,0,0,0] unsat.isPhaseTrapped=False unsat.defTolerance=0.05 unsat.meshUpdateInterval=200 unsat.useSolver=3 unsat.permeabilityFactor=1 unsat.updateTriangulation=True unsat.surfaceTension = 0.0728 unsat.initialization() ## Drainage for pg in arange(1.0e-5,15.0,0.125): unsat.bndCondValue=[0,0,(-1.0)*pg*unsat.surfaceTension/meanDiameter,0,0,0] unsat.invasion() unsat.computeCapillaryForce() for b in O.bodies: O.forces.setPermF(b.id, unsat.fluidForce(b.id)) while 1: O.run(1000,True) unb=unbalancedForce() Moisture=((RhoW*unsat.getSaturation(False)*triax.porosity*triax.boxVolume)/(RhoS*triax.particlesVolume))*100 print 'Drainage unb: ',unb,' e: ',(triax.porosity)/(1-triax.porosity),' w: ',Moisture,' PC: ',-unsat.bndCondValue[2] if unb<0.5: break if Moisture<18.5: break . error: WARNING! rmin>rmax. rmin=2.10136e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.75633e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.02999e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.50292e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.16551e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.67435e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.45035e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.10136e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.27934e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.02674e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.51404e-05 ,rmax=1e-10 ---
Re: [Yade-users] [Question #681991]: WARNING! rmin>rmax when running TwoPhaseFlowEngine()
Question #681991 on Yade changed: https://answers.launchpad.net/yade/+question/681991 Linked to bug: #1836450 https://bugs.launchpad.net/bugs/1836450 "WARNING! rmin>rmax when running TwoPhaseFlowEngine()" -- 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 #681991]: WARNING! rmin>rmax when running TwoPhaseFlowEngine()
Question #681991 on Yade changed: https://answers.launchpad.net/yade/+question/681991 Description changed to: Hi There, When I run the code below, I will be given the Error when arrives to > unsat.initialization() I guessed the grains out of the box, which I asked in the code to remove that grain, but the grains were not placed outside the box. Also, using the lower timestep but the problem remains. Code : ## encoding: utf-8 import matplotlib; matplotlib.rc('axes',grid=True) import matplotlib.pyplot as plt import pylab from yade import pack import numpy as np from numpy import * import math ## Define Parameters num_spheres=5000 compFricDegree=30 confiningS=-12500 RhoW=1000 RhoS=2700 youngModulus=75e6 poissonRatio=0.3 ## creat a packing with a specific particle size distribution (PSD) psdSizes=[0.0016,0.002,0.005,0.006,0.0075,0.01,0.015,0.025,0.035,0.05,0.075] #(mm) psdCumm=[0.0,0.075,0.21,0.23,0.28,0.37,0.48,0.70,0.85,0.89,1.0] #cumulative psdSizesArray=np.array(psdSizes) psdSizesMeter=psdSizesArray*0.001 #Convert the size of particles to meter sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(.0012,0.0012,0.0012) #initial box = 1.2*1.2*1.2 mm sp.makeCloud(minCorner=mn,maxCorner=mx,num=num_spheres,psdSizes=psdSizesMeter,psdCumm=psdCumm,distributeMass=False,seed=True) sp.psd(bins=150,mass=False) sp.toSimulation ## create material, which will be used as default O.materials.append(FrictMat(young=youngModulus,poisson=poissonRatio,frictionAngle=radians(compFricDegree),density=RhoS,label='spheres')) O.materials.append(FrictMat(young=youngModulus,poisson=poissonRatio,frictionAngle=0,density=0,label='frictionless')) ## create walls around the packing walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( internalCompaction=False, #external (walls) compaction , turn internal compaction off to keep particles sizes constant goal1=confiningS, goal2=confiningS, goal3=confiningS, label="triax" ) newton=NewtonIntegrator(damping=0.4) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton ] O.dt=.1*PWaveTimeStep() O.dynDt=False while 1: O.run(1000,True) unb=unbalancedForce() e=(triax.porosity)/(1-triax.porosity) print ' e: ',e,' Sigma: ',-triax.stress(3)[1] if unb<0.15 and abs(confiningS-triax.meanStress)/(-confiningS)<0.015 and e<=1.05: break ## Start test ### triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=False ## Instantiate a two-phase engine unsat=TwoPhaseFlowEngine() meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius)/2.0 ## set boundary conditions, the drainage is controlled by decreasing Water pressure and keeping air pressure constant unsat.bndCondIsPressure=[0,0,1,1,0,0] unsat.bndCondValue=[0,0,0,0,0,0] unsat.isPhaseTrapped=False unsat.defTolerance=0.05 unsat.meshUpdateInterval=200 unsat.useSolver=3 unsat.permeabilityFactor=1 unsat.updateTriangulation=True unsat.surfaceTension = 0.0728 unsat.initialization() ## Drainage for pg in arange(1.0e-5,15.0,0.125): unsat.bndCondValue=[0,0,(-1.0)*pg*unsat.surfaceTension/meanDiameter,0,0,0] unsat.invasion() unsat.computeCapillaryForce() for b in O.bodies: O.forces.setPermF(b.id, unsat.fluidForce(b.id)) while 1: O.run(1000,True) unb=unbalancedForce() Moisture=((RhoW*unsat.getSaturation(False)*triax.porosity*triax.boxVolume)/(RhoS*triax.particlesVolume))*100 print ' e: ',(triax.porosity)/(1-triax.porosity),' w: ',Moisture,' PC: ',-unsat.bndCondValue[2] if unb<0.5: break if Moisture<18.5: break . error: WARNING! rmin>rmax. rmin=2.10136e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.75633e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.02999e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.50292e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.16551e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.67435e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.45035e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.10136e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.27934e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=2.02674e-05 ,rmax=1e-10 WARNING! rmin>rmax. rmin=1.51404e-05 ,rmax=1e-10
Re: [Yade-users] [Question #681991]: WARNING! rmin>rmax when running TwoPhaseFlowEngine()
Question #681991 on Yade changed: https://answers.launchpad.net/yade/+question/681991 Saeed posted a new comment: hi Robert, Thank you for the answer you gave me I lowered the timestep to : O.dt=0.01*PWaveTimeStep() and it took a lot of time to run the code but the problem remains and warnings were shown in the terminal. Can I ignore this Warnings ? -- 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 #681991]: WARNING! rmin>rmax when running TwoPhaseFlowEngine()
Question #681991 on Yade changed: https://answers.launchpad.net/yade/+question/681991 Status: Answered => Open Saeed is still having a problem: hi Robert, Thank you for the answer you gave me I lowered the timestep to : O.dt=0.01*PWaveTimeStep() and it took a lot of time to run the code but the problem remains and warnings were shown in the terminal. Can I ignore this Warnings ? -- 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 #681991]: WARNING! rmin>rmax when running TwoPhaseFlowEngine()
Question #681991 on Yade changed: https://answers.launchpad.net/yade/+question/681991 Status: Answered => Solved Saeed confirmed that the question is solved: Thanks Chao Yuan, 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 #680501]: How Can i impose gravity in Two Phase Flow Engine
Question #680501 on Yade changed: https://answers.launchpad.net/yade/+question/680501 Status: Answered => Solved Saeed 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 #678426]: error when reducing psdSizes in drainage-2PFV-Yuan_and_Chareyre_2017.py
Question #678426 on Yade changed: https://answers.launchpad.net/yade/+question/678426 Status: Answered => Solved Saeed confirmed that the question is solved: Thanks Chao Yuan, 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 #684080]: Bug in Calculating getSaturation in TwoPhaseFlow Engine
New question #684080 on Yade: https://answers.launchpad.net/yade/+question/684080 hi there I had a problem using TwoPhaseFlow Engine The value of Saturation Degree 'getSaturation(False)' was shown properly while doing drainage,but after the dry, I close the pressure related to water in bottom of box by 'bndCondIsPressure=[0,0,0,1,0,0]' . I provide Oedometer conditions for the loading According to the formula Porosity=VolumeOfVoids/BoxVolume VoidVolumes=Porosity*BoxVolume The volume of Voids containing the air and Water. We have blocked the way out water by 'bndCondIsPressure=[0,0,0,1,0,0]' While Loading, So Volume of Water while loading is Constant. And only the volume of air in the ٰVoid decreases According to the formula DegreeOfSaturation=VolumeOfWater/VolumeOfVoids while Oedometer loading: VolumeOfWater > Constant VolumeOfVoids > Decresed So DegreeOfSaturation must be Increased but in TwoPhaseFlow Engine while loading, Degree of Saturation No changed!!! --- CODE: import matplotlib; matplotlib.rc('axes',grid=True) from yade import pack import pylab from numpy import * utils.readParamsFromTable(seed=1,num_spheres=1000,compFricDegree = 15.0) from yade.params import table seed=table.seed num_spheres=table.num_spheres compFricDegree = table.compFricDegree confiningS=-1e5 psdSizes,psdCumm=[.599,0.6,0.849,0.85,1.0,1.40],[0.,0.35,0.35,0.70,.70,1.] sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(10,10,10) sp.makeCloud(minCorner=mn,maxCorner=mx,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=num_spheres,seed=seed) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless')) walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( internalCompaction=True, goal1=confiningS, goal2=confiningS, goal3=confiningS, max_vel=10, label="triax" ) newton=NewtonIntegrator(damping=0.4) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton ] while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.01: break # ## REACH NEW EQU. STATE ### # finalFricDegree = 30 # contact friction during the deviatoric loading triax.internalCompaction=False setContactFriction(radians(finalFricDegree)) while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.01: break triax.depth0=triax.depth triax.height0=triax.height triax.width0=triax.width O.run(1000,True) ei0=-triax.strain[0];ei1=-triax.strain[1];ei2=-triax.strain[2] si0=-triax.stress(0)[0];si1=-triax.stress(2)[1];si2=-triax.stress(4)[2] from yade import plot O.engines=O.engines+[PyRunner(iterPeriod=20,command='history()',dead=1,label='recorder')] def history(): plot.addData(e11=-triax.strain[0]-ei0, e22=-triax.strain[1]-ei1, e33=-triax.strain[2]-ei2, s11=-triax.stress(0)[0]-si0, s22=-triax.stress(2)[1]-si1, s33=-triax.stress(4)[2]-si2, pc=-unsat.bndCondValue[2], sw=unsat.getSaturation(False), i=O.iter ) plot.plots={'pc':('sw',None,'e22')} plot.plot() ## ## Drainage Test under oedometer conditions ### ## triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=0 recorder.dead=0 unsat=TwoPhaseFlowEngine() meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius) / 2. unsat.bndCondIsPressure=[0,0,1,1,0,0] unsat.bndCondValue=[0,0,-1e8,0,0,0] unsat.isPhaseTrapped=True #the W-phase can be disconnected from its reservoir unsat.initialization() unsat.surfaceTension = 10 for pg in arange(1.0e-5,5.0,0.1): unsat.bndCondValue=[0,0,(-1.0)*pg*unsat.surfaceTension/meanDiameter,0,0,0] unsat.invasion() unsat.computeCapillaryForce() for b in O.bodies: O.forces.setPermF(b.id, unsat.fluidForce(b.id)) while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01: break print 'PC:',-unsat.bndCondValue[2],' Sw:',unsat.getSaturation(False),' VoidVolume:',triax.porosity*t
[Yade-users] [Question #684081]: Bug in Calculating getSaturation in TwoPhaseFlow Engine
New question #684081 on Yade: https://answers.launchpad.net/yade/+question/684081 hi there I had a problem using TwoPhaseFlow Engine The value of Saturation Degree 'getSaturation(False)' was shown properly while doing drainage,but after the dry, I close the pressure related to water in bottom of box by 'bndCondIsPressure=[0,0,0,1,0,0]' . I provide Oedometer conditions for the loading According to the formula Porosity=VolumeOfVoids/BoxVolume VoidVolumes=Porosity*BoxVolume The volume of Voids containing the air and Water. We have blocked the way out water by 'bndCondIsPressure=[0,0,0,1,0,0]' While Loading, So Volume of Water while loading is Constant. And only the volume of air in the ٰVoid decreases According to the formula DegreeOfSaturation=VolumeOfWater/VolumeOfVoids while Oedometer loading: VolumeOfWater > Constant VolumeOfVoids > Decresed So DegreeOfSaturation must be Increased but in TwoPhaseFlow Engine while loading, Degree of Saturation No changed!!! --- CODE: import matplotlib; matplotlib.rc('axes',grid=True) from yade import pack import pylab from numpy import * utils.readParamsFromTable(seed=1,num_spheres=1000,compFricDegree = 15.0) from yade.params import table seed=table.seed num_spheres=table.num_spheres compFricDegree = table.compFricDegree confiningS=-1e5 psdSizes,psdCumm=[.599,0.6,0.849,0.85,1.0,1.40],[0.,0.35,0.35,0.70,.70,1.] sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(10,10,10) sp.makeCloud(minCorner=mn,maxCorner=mx,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=num_spheres,seed=seed) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless')) walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( internalCompaction=True, goal1=confiningS, goal2=confiningS, goal3=confiningS, max_vel=10, label="triax" ) newton=NewtonIntegrator(damping=0.4) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton ] while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.01: break # ## REACH NEW EQU. STATE ### # finalFricDegree = 30 # contact friction during the deviatoric loading triax.internalCompaction=False setContactFriction(radians(finalFricDegree)) while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.01: break triax.depth0=triax.depth triax.height0=triax.height triax.width0=triax.width O.run(1000,True) ei0=-triax.strain[0];ei1=-triax.strain[1];ei2=-triax.strain[2] si0=-triax.stress(0)[0];si1=-triax.stress(2)[1];si2=-triax.stress(4)[2] from yade import plot O.engines=O.engines+[PyRunner(iterPeriod=20,command='history()',dead=1,label='recorder')] def history(): plot.addData(e11=-triax.strain[0]-ei0, e22=-triax.strain[1]-ei1, e33=-triax.strain[2]-ei2, s11=-triax.stress(0)[0]-si0, s22=-triax.stress(2)[1]-si1, s33=-triax.stress(4)[2]-si2, pc=-unsat.bndCondValue[2], sw=unsat.getSaturation(False), i=O.iter ) plot.plots={'pc':('sw',None,'e22')} plot.plot() ## ## Drainage Test under oedometer conditions ### ## triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=0 recorder.dead=0 unsat=TwoPhaseFlowEngine() meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius) / 2. unsat.bndCondIsPressure=[0,0,1,1,0,0] unsat.bndCondValue=[0,0,-1e8,0,0,0] unsat.isPhaseTrapped=True #the W-phase can be disconnected from its reservoir unsat.initialization() unsat.surfaceTension = 10 for pg in arange(1.0e-5,5.0,0.1): unsat.bndCondValue=[0,0,(-1.0)*pg*unsat.surfaceTension/meanDiameter,0,0,0] unsat.invasion() unsat.computeCapillaryForce() for b in O.bodies: O.forces.setPermF(b.id, unsat.fluidForce(b.id)) while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01: break print 'PC:',-unsat.bndCondValue[2],' Sw:',unsat.getSaturation(False),' VoidVolume:',triax.porosity*t
Re: [Yade-users] [Question #684081]: Bug in Calculating getSaturation in TwoPhaseFlow Engine
Question #684081 on Yade changed: https://answers.launchpad.net/yade/+question/684081 Description changed to: hi there I had a problem using TwoPhaseFlow Engine The value of Saturation Degree 'getSaturation(False)' was shown properly while doing drainage,but after the dry, I close the pressure related to water in bottom of box by 'bndCondIsPressure=[0,0,0,1,0,0]' . I provide Oedometer conditions for the loading According to the formula Porosity=VolumeOfVoids/BoxVolume VoidVolumes=Porosity*BoxVolume The volume of Voids containing the air and Water. We have blocked the way out water by 'bndCondIsPressure=[0,0,0,1,0,0]' While Loading, So Volume of Water while loading is Constant. And only the volume of air in the ٰVoid decreases According to the formula DegreeOfSaturation=VolumeOfWater/VolumeOfVoids while Oedometer loading: VolumeOfWater > Constant VolumeOfVoids > Decresed So DegreeOfSaturation must be Increased while loading but in TwoPhaseFlow Engine , Degree of Saturation No changed!!! --- CODE: import matplotlib; matplotlib.rc('axes',grid=True) from yade import pack import pylab from numpy import * utils.readParamsFromTable(seed=1,num_spheres=1000,compFricDegree = 15.0) from yade.params import table seed=table.seed num_spheres=table.num_spheres compFricDegree = table.compFricDegree confiningS=-1e5 psdSizes,psdCumm=[.599,0.6,0.849,0.85,1.0,1.40],[0.,0.35,0.35,0.70,.70,1.] sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(10,10,10) sp.makeCloud(minCorner=mn,maxCorner=mx,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=num_spheres,seed=seed) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless')) walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( internalCompaction=True, goal1=confiningS, goal2=confiningS, goal3=confiningS, max_vel=10, label="triax" ) newton=NewtonIntegrator(damping=0.4) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, newton ] while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.01: break # ## REACH NEW EQU. STATE ### # finalFricDegree = 30 # contact friction during the deviatoric loading triax.internalCompaction=False setContactFriction(radians(finalFricDegree)) while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.01: break triax.depth0=triax.depth triax.height0=triax.height triax.width0=triax.width O.run(1000,True) ei0=-triax.strain[0];ei1=-triax.strain[1];ei2=-triax.strain[2] si0=-triax.stress(0)[0];si1=-triax.stress(2)[1];si2=-triax.stress(4)[2] from yade import plot O.engines=O.engines+[PyRunner(iterPeriod=20,command='history()',dead=1,label='recorder')] def history(): plot.addData(e11=-triax.strain[0]-ei0, e22=-triax.strain[1]-ei1, e33=-triax.strain[2]-ei2, s11=-triax.stress(0)[0]-si0, s22=-triax.stress(2)[1]-si1, s33=-triax.stress(4)[2]-si2, pc=-unsat.bndCondValue[2], sw=unsat.getSaturation(False), i=O.iter ) plot.plots={'pc':('sw',None,'e22')} plot.plot() ## ## Drainage Test under oedometer conditions ### ## triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=0 recorder.dead=0 unsat=TwoPhaseFlowEngine() meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius) / 2. unsat.bndCondIsPressure=[0,0,1,1,0,0] unsat.bndCondValue=[0,0,-1e8,0,0,0] unsat.isPhaseTrapped=True #the W-phase can be disconnected from its reservoir unsat.initialization() unsat.surfaceTension = 10 for pg in arange(1.0e-5,5.0,0.1): unsat.bndCondValue=[0,0,(-1.0)*pg*unsat.surfaceTension/meanDiameter,0,0,0] unsat.invasion() unsat.computeCapillaryForce() for b in O.bodies: O.forces.setPermF(b.id, unsat.fluidForce(b.id)) while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01: break print 'PC:',-unsat.bndCondValue[2],' Sw:',unsat.getSaturation(False),' V
[Yade-users] [Question #684117]: Bug in Calculating getSaturation in TwoPhaseFlow Engine
New question #684117 on Yade: https://answers.launchpad.net/yade/+question/684117 hi, I had a problem using "TwoPhaseFlow Engine" in 'Yadedaily 2018.02b-290bf6a54e~xenial' and 'Yade-2019.01a'. The value of Saturation Degree 'getSaturation(False)' was shown properly while doing drainage,but after the dry completed, I close the pressure related to water in bottom of box by 'bndCondIsPressure=[0,0,0,1,0,0]' . I provide Oedometer conditions for the loading. According to the formula: Porosity=VolumeOfVoids/BoxVolume VoidVolumes=Porosity*BoxVolume The volume of Voids containing the air and Water. We have blocked the way out water by 'bndCondIsPressure=[0,0,0,1,0,0]' While Loading, So Volume of Water while loading is Constant. And only the volume of air in the ٰVoid decreases by increasing loading. According to the formula: DegreeOfSaturation=VolumeOfWater/VolumeOfVoids while Oedometer loading: VolumeOfWater > Constant VolumeOfVoids > Decresed So DegreeOfSaturation must be Increased that The same is true with the laboratory results and the literature but in TwoPhaseFlow Engine Degree of Saturation No changed while loading!!! --- CODE: import matplotlib; matplotlib.rc('axes',grid=True) from yade import pack import pylab from numpy import * compFricDegree = 30.0 confiningS=-1e5 psdSizes,psdCumm=[.599,0.6,0.849,0.85,1.0,1.40],[0.,0.35,0.35,0.70,.70,1.] sp=pack.SpherePack() mn,mx=Vector3(0,0,0),Vector3(10,10,10) sp.makeCloud(minCorner=mn,maxCorner=mx,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=1000,seed=1) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless')) walls=aabbWalls((mn,mx),thickness=0,material='frictionless') wallIds=O.bodies.append(walls) O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( internalCompaction=True, goal1=confiningS, goal2=confiningS, goal3=confiningS, max_vel=10, label="triax" ) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, NewtonIntegrator(damping=0.4,label="newton"), TwoPhaseFlowEngine(label="unsat") ] while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.01: break ## ## Drainage Test under oedometer conditions # ## triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=0 meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius) / 2. unsat.bndCondIsPressure=[0,0,1,1,0,0] unsat.bndCondValue=[0,0,-1e8,0,0,0] unsat.isPhaseTrapped=True unsat.initialization() unsat.surfaceTension = 10 for pg in arange(1.0e-5,5.0,0.1): unsat.bndCondValue=[0,0,(-1.0)*pg*unsat.surfaceTension/meanDiameter,0,0,0] unsat.invasion() unsat.computeCapillaryForce() for b in O.bodies: O.forces.setPermF(b.id, unsat.fluidForce(b.id)) while 1: O.run(1000,True) unb=unbalancedForce() if unb<0.01: break print 'Drainage:::','PC:',-unsat.bndCondValue[2],' Sw:',unsat.getSaturation(False),' VoidVolume:',triax.porosity*triax.boxVolume print '--LOADING--' ## Oedometer conditions unsat.bndCondIsPressure=[0,0,0,1,0,0] triax.stressMask=2 triax.goal1=triax.goal3=0 goalTop=triax.stress(3)[1] triax.goal2=goalTop triax.wall_bottom_activated=False loadingMatrix=[-500e3,-1000e3,-1500e3,-2000e3,-2500e3,-3000e3] for i in arange(0,len(loadingMatrix),1): triax.goal2=loadingMatrix[i] O.run(2000,True) print 'Load:',loadingMatrix[i],' Sw:',unsat.getSaturation(False),' VoidVolume:',triax.porosity*triax.boxVolume - - - end of code - The results I see is wrong: Load: -50.0 Sw: 0.268726543553 VoidVolume: 436.590507582 Load: -100.0 Sw: 0.268726543553 VoidVolume: 433.836864791 Load: -150.0 Sw: 0.268726543553 VoidVolume: 431.014178921 Load: -200.0 Sw: 0.268726543553 VoidVolume: 428.158278656 Load: -250.0 Sw: 0.268726543553 VoidVolume: 425.283191863 Load: -300.0 Sw: 0.268726543553 VoidVolume: 422.394919453 - It is observed that due to the closure of the water outlet, the volume of Voids decreased but the amount
Re: [Yade-users] [Question #684117]: Bug in Calculating getSaturation in TwoPhaseFlow Engine
Question #684117 on Yade changed: https://answers.launchpad.net/yade/+question/684117 Status: Open => Solved Saeed confirmed that the question is solved: hi there, I am adding these codes to the loading section also made no difference and degree of saturation not changed! for i in arange(0,len(loadingMatrix),1): triax.goal2=loadingMatrix[i] O.run(2000,True) unsat.invasion() unsat.computeCapillaryForce() for b in O.bodies: O.forces.setPermF(b.id, unsat.fluidForce(b.id)) print 'Load:',loadingMatrix[i],' Sw:',unsat.getSaturation(False),' VoidVolume:',triax.porosity*triax.boxVolume -- 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 #684117]: Bug in Calculating getSaturation in TwoPhaseFlow Engine
Question #684117 on Yade changed: https://answers.launchpad.net/yade/+question/684117 Saeed gave more information on the question: hi there, I am adding some codes to the loading section also made no difference and degree of saturation not changed! loadingMatrix=[-500e3,-1000e3,-1500e3,-2000e3,-2500e3,-3000e3] for i in arange(0,len(loadingMatrix),1): triax.goal2=loadingMatrix[i] O.run(2000,True) unsat.invasion() unsat.computeCapillaryForce() for b in O.bodies: O.forces.setPermF(b.id, unsat.fluidForce(b.id)) print 'Load:',loadingMatrix[i],' Sw:',unsat.getSaturation(False),' VoidVolume:',triax.porosity*triax.boxVolume -- 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 #684117]: Bug in Calculating getSaturation in TwoPhaseFlow Engine
Question #684117 on Yade changed: https://answers.launchpad.net/yade/+question/684117 Status: Solved => Open Saeed is still having a problem: hi there, I am adding these codes to the loading section also made no difference and degree of saturation not changed! for i in arange(0,len(loadingMatrix),1): triax.goal2=loadingMatrix[i] O.run(2000,True) unsat.invasion() unsat.computeCapillaryForce() for b in O.bodies: O.forces.setPermF(b.id, unsat.fluidForce(b.id)) print 'Load:',loadingMatrix[i],' Sw:',unsat.getSaturation(False),' VoidVolume:',triax.porosity*triax.boxVolume -- 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 #684117]: Bug in Calculating getSaturation in TwoPhaseFlow Engine
Question #684117 on Yade changed: https://answers.launchpad.net/yade/+question/684117 Saeed posted a new comment: Hello to all Can't anyone help me? -- 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