Boundary condition of PeriodicFlowEngine

Asked by Chu

Hello,
I'd like to use PeriodicFlowEngine in my script.It use periodic boundary.I‘d like to know how PeriodicFlowEngine handle periodic boundary for the fluid part.I checked the pressure field in Paraview,but I found that the pressure field has not gradient distribution and it is irregular.Is the PeriodicFlowEngine working properly?
Thank you for any suggestions.
##########################################
O.periodic=True
O.cell.setBox(5,5,5)

from yade import pack,timing
##psd (gap--type)
psdSizes,psdCumm=[.1,0.15,0.2,1.0,1.5],[0,0.10,0.35,0.35,1.]

O.materials.append(FrictMat(young=2e8,density=2600,poisson=.3,frictionAngle=40,label='spheres'))
p=pack.SpherePack()

p.makeCloud(Vector3(0,0,0),Vector3(5,5,5),psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=6000,periodic=True)

p.toSimulation()

O.timingEnabled=True
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()],
 ),
 PeriIsoCompressor(charLen=.5,stresses=[-5e6,-1e5],doneHook="test()",maxUnbalanced=1e-3,keepProportions=True),
 ##firstly reach a sigmaiso 5e6,then restore to final sigmaiso 100kpa
        NewtonIntegrator(gravity=(0,0,0),damping=.4),
        PeriodicFlowEngine(dead=1,label="flow"),
        #PyRunner(command='O.pause()',iterPeriod=50),
        PyRunner(command='flow.saveVtk()',iterPeriod=1),
]

O.dt=PWaveTimeStep()
O.saveTmp()

def test():

    for i in O.bodies:
        if isinstance(i.shape,Sphere):
            if i.shape.radius > 0.2:
                i.state.blockedDOFs='xyzXYZ'
                i.state.vel=(0,0,0);i.state.angVel=(0,0,0)

    print '###########record Finish########## cell=', O.cell.size
    O.pause()

    O.dt=1e-4
    O.saveTmp()
    flow.dead=0
    flow.bndCondIsPressure=[1,1,0,0,0,0]
    flow.bndCondValue=[0,1000,0,0,0,0]
    flow.updateTriangulation=True
    flow.duplicateThreshold=0.7

Question information

Language:
English Edit question
Status:
Invalid
For:
archivedbychu Edit question
Assignee:
No assignee Edit question
Solved by:
Chu
Solved:
Last query:
Last reply:
Revision history for this message
Chareyre (bruno-chareyre-9) said :
#1

Hi. Yes it's working properly, I think.

Le sam. 4 mai 2019 18:22, Chu <email address hidden> a
écrit :

> New question #680627 on Yade:
> https://answers.launchpad.net/yade/+question/680627
>
> Hello,
> I'd like to use PeriodicFlowEngine in my script.It use periodic
> boundary.I‘d like to know how PeriodicFlowEngine handle periodic boundary
> for the fluid part.I checked the pressure field in Paraview,but I found
> that the pressure field has not gradient distribution and it is
> irregular.Is the PeriodicFlowEngine working properly?
> Thank you for any suggestions.
> ##########################################
> O.periodic=True
> O.cell.setBox(5,5,5)
>
> from yade import pack,timing
> ##psd (gap--type)
> psdSizes,psdCumm=[.1,0.15,0.2,1.0,1.5],[0,0.10,0.35,0.35,1.]
>
>
> O.materials.append(FrictMat(young=2e8,density=2600,poisson=.3,frictionAngle=40,label='spheres'))
> p=pack.SpherePack()
>
>
> p.makeCloud(Vector3(0,0,0),Vector3(5,5,5),psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=6000,periodic=True)
>
> p.toSimulation()
>
>
> O.timingEnabled=True
> 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()],
> ),
>
> PeriIsoCompressor(charLen=.5,stresses=[-5e6,-1e5],doneHook="test()",maxUnbalanced=1e-3,keepProportions=True),
> ##firstly reach a sigmaiso 5e6,then restore to final sigmaiso
> 100kpa
> NewtonIntegrator(gravity=(0,0,0),damping=.4),
> PeriodicFlowEngine(dead=1,label="flow"),
> #PyRunner(command='O.pause()',iterPeriod=50),
> PyRunner(command='flow.saveVtk()',iterPeriod=1),
> ]
>
>
> O.dt=PWaveTimeStep()
> O.saveTmp()
>
> def test():
>
>
> for i in O.bodies:
> if isinstance(i.shape,Sphere):
> if i.shape.radius > 0.2:
> i.state.blockedDOFs='xyzXYZ'
> i.state.vel=(0,0,0);i.state.angVel=(0,0,0)
>
> print '###########record Finish########## cell=', O.cell.size
> O.pause()
>
>
> O.dt=1e-4
> O.saveTmp()
> flow.dead=0
> flow.bndCondIsPressure=[1,1,0,0,0,0]
> flow.bndCondValue=[0,1000,0,0,0,0]
> flow.updateTriangulation=True
> flow.duplicateThreshold=0.7
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Chu (chu-1) said :
#2

Thanks Chareyre, that solved my question.

Revision history for this message
Chu (chu-1) said :
#3

it's not a good question