← Back to team overview

yade-users team mailing list archive

Re: [Question #693297]: Pore volume - FlowEngine

 

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

    Status: Solved => Open

Othman Sh is still having a problem:
Hello,

It has been a couple of weeks since the merge request mentioned in reply
#4 but the getCellInvVoidVolume function is not functioning and it
always return 0 values. I tried it using the code below.  I appreciate
any help in fixing this issue.

Thank you,
Othman

------------------------------------------------------
from yade import plot,pack, export, ymport
import numpy as np


young=1e6
compFricDegree = 3 
mn,mx=Vector3(0,0,0),Vector3(1,1,1) # corners of the initial packing

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


sp=pack.SpherePack()
sp.makeCloud(mn,mx,0.05,.2) 
sp.toSimulation(material='spheres')

yade.qt.View()

print ('porosity = ', utils.porosity())
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(dead=1,label="flow"),
	GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
	NewtonIntegrator(damping=0.2)
]


flow.dead=0
flow.useSolver=3  
flow.permeabilityFactor=1
flow.viscosity=1e-3
flow.bndCondIsPressure=[1,1,1,1,1,1] 
flow.bndCondValue=[0,0,0,0,0,10]
flow.boundaryUseMaxMin=[1,1,1,1,1,1] 
O.dt=1e-6
O.dynDt=False
flow.emulateAction()


################## Get pores volume ################## 
box=aabbExtrema()
lower_corner=box[0]
upper_corner=box[1]
mnx=lower_corner[0]
mxx=upper_corner[0]
mny=lower_corner[1]
mxy=upper_corner[1]
mnz=lower_corner[2]
mxz=upper_corner[2]
cellsHit = []
numPoints = 20
xs = np.linspace(0.95*mnx,1.05*mxx,numPoints) 
ys = np.linspace(0.95*mny,1.05*mxy,numPoints) 
zs = np.linspace(0.95*mnz,1.05*mxz,numPoints)
v = np.array([0,0,0]) 

for x,y,z in itertools.product(xs, ys, zs):
	cellId = flow.getCell(x,y,z) 
	if cellId in cellsHit: continue 	
	vv=flow.getCellInvVoidVolume(cellId)
	print(vv)

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