← Back to team overview

yade-users team mailing list archive

Re: [Question #658905]: I need to simulate uniaxial compaction

 

Question #658905 on Yade changed:
https://answers.launchpad.net/yade/+question/658905

    Status: Open => Answered

mohsen proposed the following answer:
>>Do you know how I can stop the plate (if I follow the Odeometric
approach ) when I reach to a specific porosity. I don’t use
triaxialStressController in this case. I can compact the layer but I
can’t stop the plate by target porosity criterion.

you can use:


        Por_osity=voxelPorosity(200,mn,mx)
        if Por_osity<targetPorosity:
            plate.state.vel=(0,0,0)

Be careful you should define mn and mx for each layer specifically. maxz would help to define mx:
        maxz=max([b.state.pos[2]+b.shape.radius for b in O.bodies if isinstance(b.shape,Sphere)])

>>If we resolve this, I need to know how to save and load the final position in my main triaxial script:
Saving:
# creating a list with position and radius of particles
ParticlePos=[]
for b in O.bodies:
    if isinstance(b.shape,Sphere):
        ParticlePos.append([b.state.pos,b.shape.radius])

#saving the position and radius of particles
with open(str(ParticlePos.txt","wb") as f:
    pickle.dump(ParticlePos,f)

Nw Then you have a text file with position and radius of particles
Loading:
ParticlePos=[]
with open("ParticlePos.txt","rb") as f:
    ParticlePos=pickle.load(f)


Generating spheres:

while i+1<len(ParticlePos):
    # here you can optomize your grid network
    i=i+1
    c,r=ParticlePos[i]
    s = utils.sphere(c,r,material=labelS)
    O.bodies.append(s)

>>Is it possible to compact layers by triaxial goal in one direction while all other walls are deactivated?:
I think defining a plate is easier since you need to compact several layers. But you can compact the total specimen by deactivating all of wall except the desired one.


Mohsen

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.