Periodic flow and permeability

Asked by Jibril Coulibaly on 2019-11-08

Dear Yade community,

I am trying to perform the seemingly simple computation of the permeability of a periodic assembly using the PFV module. From that previous question (https://answers.launchpad.net/yade/+question/662105), I gather that I need to define a macroscopic pressure gradient, as well as to fix the pressure in a given cell.

Trying to do so, Yade complains "setCellPImposed" and "setCellPressure" being out of range with max value 0 and returns wrong values for my boundary flows. Following is my input script, I would very much appreciate your help on figuring this out:

###############################################
from yade import pack,Vector3

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

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*radius),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
 NewtonIntegrator(damping=0.),
 PeriodicFlowEngine(dead=0,label="flow")
]

O.dt=0.1e-8
O.dynDt=False

flow.defTolerance=0.3
flow.meshUpdateInterval=300
flow.useSolver=0 # Solver >0 not supported for PBC
flow.permeabilityFactor=1
flow.viscosity=1
flow.gradP=Vector3(1,0,0)
flow.setCellPImposed(0,True)
flow.setCellPressure(0,0)

O.run(1,1)
Qin = flow.getBoundaryFlux(0)
Qout = flow.getBoundaryFlux(1)
print("Qin=",Qin," Qout=",Qout)
###############################################

Thank you,
Jibril B. Coulibaly

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2019-11-09
Last reply:
2019-11-25
Robert Caulk (rcaulk) said : #1

Hello Jibril,

I'm not sure you'll find solace in my answer, but a quick review of your post lead me to these two points:

1st point: In the MWE you present, you are indexing cells before a triangulation is created. FlowEngine builds the triangulation during the first time step that it is active. So it would be necessary to make a step (O.run(1,1)) before assigning pressures. Alternatively, you could use flow.emulateAction()[1] to create the triangulation without running a mechanical timestep.

2nd point:
># Solver >0 not supported for PBC

Should not be true for yadedaily versions and compiled trunk versions.

Cheers,

Robert

[1]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.PeriodicFlowEngine.emulateAction

Hello Robert,

Thank you very much for your help and prompt answer.
I am running Yade 2018.02b that I installed running "sudo apt-get install yade", that must be why I do not have access to "solver>0".

Regarding the building of the triangulation, moving the "O.run(1,1)" before assigning pressures indeed stops the error. However, it still yields zero boundary flux, so I must be missing a piece of the setup still.

I tried running a second time using "O.run(1,1)" after assigning the pressures, hoping it would run the system with the properly assigned pressures but I get a segmentation fault instead.

I appreciate your guidance,
Jibril B. Coulibaly

Launchpad Janitor (janitor) said : #3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Robert Caulk (rcaulk) said : #4

Setting to answered to avoid launchpad janitor from deleting thread.

Hi,
A periodic problem has no boundaries and therefore "flow.getBoundaryFlux(1)" is meaningless (Body #1 is not a boundary anyway).
What you want is "flow.averageVelocity()".

In order to impose pressure at (x,y,z) coordinates you need flow.imposePressure(). Better avoid playing with mesh elements directly since they change all the time.
Cheers
Bruno

Can you help with this problem?

Provide an answer of your own, or ask Jibril Coulibaly for more information if necessary.

To post a message you must log in.