← Back to team overview

yade-users team mailing list archive

Re: [Question #688685]: permeability - PFV

 

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

    Status: Answered => Open

Othman Sh is still having a problem:
That make sense to me. Yet when I added back the mechanical engine and
after that I had O.run() then the flow engine, I still get this:

(Triangulation does not exist. Sorry.) 
negative volume for an ordinary pore (temp warning, should still be safe)
*** stack smashing detected ***: <unknown> terminated
Aborted (core dumped)

I don't know what is missing in this code to get it run.

------------------------------------------
# -*- coding: utf-8 -*-

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


radiuscyl=.08
heightcyl=.25

dP=4e3 #Pa
visc=1e-3 #Pa.sec
density=1000 #kg/m3
g=9.81 #m/s2
O.materials.append(FrictMat(young = 5e10, poisson = 0.15,frictionAngle = atan(.2), density=1920))

############################ spheres #############################
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(.4,.4,2),rMean=0.0083,rRelFuzz=0.1)	
#### cylinder extraction 										
pred=pack.inCylinder((.3,.3,0),(.3,.3,heightcyl),radiuscyl) 						
spFilter=filterSpherePack(pred,sp,Material=Material, returnSpherePack=True)				
spFilter.toSimulation()

yade.qt.View()
Height=max(utils.aabbDim())

#Fix all particles in their positions. No deformation
for i in O.bodies:
	i.state.blockedDOFs='xyzXYZ'

########################## Engines #############################
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"),#introduced as a dead engine for the moment, see 2nd section
	GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
	NewtonIntegrator(damping=0.2)
	
]
O.dt=1e-5
O.run()

#B. Activate flow engine and set boundary conditions in order to get permeability
flow.dead=0
flow.useSolver=3
flow.viscosity=visc
flow.boundaryUseMaxMin=[1,1,1,1,1,1] 
flow.bndCondIsPressure=[0,0,0,0,1,1] #[xmin,xmax,ymin,ymax,zmin,zmax]
flow.bndCondValue=[0,0,0,0,0,dP]
flow.saveVtk()


#Permeability calculations
Q=max(flow.averageVelocity())
Permeability=abs((density*g*Q*Height)/dP)
print ("average velocity: ",Q, "Permeability: ",Permeability)

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