← Back to team overview

yade-users team mailing list archive

[Question #694409]: averagePressure() in PeriodicFlowEngine returns 'nan'

 

New question #694409 on Yade:
https://answers.launchpad.net/yade/+question/694409

Dear all,

I am trying to get pore pressure using PeriodicFlowEngine. I defined a macroscopic pressure gradient and the pressure in a given cell. When I run the script I got average pressure = nan, which I don't think is correct.

Following is my script, thank you for your any suggestions.

#############################################
O.periodic=True
O.cell.hSize=Matrix3(0.1,0,0, 0,0.1,0, 0,0,0.1)
pos_center = Vector3(0.05,0.05,0.05)
sp=pack.SpherePack()
radius=5e-3
num=sp.makeCloud((0,0,0),(.1,.1,.1),radius,.2,1000,periodic=True)
O.bodies.append([sphere(s[0],s[1]) for s in sp])

for p in [Vector3(1,0,0),Vector3(0,1,0),Vector3(0,0,1)]:
    flow=PeriodicFlowEngine()
    flow.imposePressure(pos_center,1)
    flow.gradP=p
    flow.emulateAction()
    flow.saveVtk()
    print("average pressure=",flow.averagePressure())


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