infinite K1 in FlowEngine

Asked by Chu on 2019-10-29

Hello,

I run the MWE and there are warning: infinite K1. I use regularly arranged spheres, I think maybe it is the reason.
I use Yade 20191010-2428~bf906f7~bionic1.

Thanks for your any suggestion.

############MWE#############

from yade import pack

young=1e8
compFricDegree = 30
mn,mx=Vector3(0,0,0),Vector3(3,.05,.05)

O.materials.append(FrictMat(young=young,poisson=1,frictionAngle=radians(compFricDegree),density=2500,label='spheres'))
O.materials.append(FrictMat(young=young,poisson=1,frictionAngle=0,density=0,label='walls'))
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

x = 0.005;y = 0.005;z = 0.005;r = 0.005
while x < 3:
    while y < 0.05:
        while z < 0.05:
            O.bodies.append([sphere((x,y,z),r,material='spheres')])
            z+=0.01
        y+=0.01;z = 0.005
    x+=0.01;y=0.005;z=0.005

newton=NewtonIntegrator(damping=0.2)

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()],label="iloop"
 ),
 FlowEngine(label="flow"),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
 newton
]

flow.defTolerance=0.3
flow.meshUpdateInterval=200
flow.useSolver=3
flow.permeabilityFactor=1
flow.viscosity=0.001
flow.bndCondIsPressure=[1,1,0,0,0,0]
flow.bndCondValue=[0,1,0,0,0,0]
flow.boundaryUseMaxMin=[0,0,0,0,0,0]
#O.dt=0.1e-20
#O.dynDt=False

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
2019-10-29
Last query:
2019-10-29
Last reply:
2019-10-29
Best Robert Caulk (rcaulk) said : #1

Yup. If you have a regular packing you will likely have two cells with centers on top of one another. Of course conductivity depends inversely on the distance between cell centers, and if that distance is zero, the conductivity would be infinity. Thus the warning. FlowEngine handles it by assigning an arbitrarily large value of permeability between these two cells.

If you want to get rid of the warning, you can add small random perturbations to the body locations:

for b in O.bodies:
 if isinstance(b.shape, Sphere):
  rand = np.random.uniform(-1,1)
  rand = rand*0.001+b.shape.radius
  b.state.pos = (b.state.pos[0]+rand,b.state.pos[1]+rand,b.state.pos[2]+rand)

Robert Caulk (rcaulk) said : #2

line edit:
rand*0.001*b.shape.radius

Chu (arcoubuntu) said : #3

Thanks Robert Caulk, that solved my question.