← Back to team overview

yade-dev team mailing list archive

[Question #692476]: Streamlined body

 

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

How to define geometry in case of flow around a cylinder?
If you set the geometry the way I do it, then the time step becomes nan.

###
def __init__(self):
		O.periodic = True
		O.cell.setBox(0.4,0.4,0.4)

		numspheres=1000
		young = 5e6
		density = 1000

		mat1 = FrictMat(young=young,poisson=0.5,frictionAngle=radians(15),density=density,label='spheremat')
		O.materials.append(mat1)
		mat2 = FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='wallmat')
		O.materials.append(mat2)

		epsilon = 1e-08
		minval = 0 + epsilon
		maxval = 0.4 - epsilon
		#wall coords, use facets for wall BC:
		v0 = Vector3(minval, minval, minval)
		v1 = Vector3(minval,minval,maxval)
		v2 = Vector3(maxval,minval,minval)
		v3 = Vector3(maxval,minval,maxval)

		v4 = Vector3(minval,maxval,minval)
		v5 = Vector3(minval,maxval,maxval)
		v6 = Vector3(maxval,maxval,minval)
		v7 = Vector3(maxval, maxval, maxval)

		lf0 = facet(vertices=[v0,v1,v2], material='wallmat')
		O.bodies.append(lf0)
		lf1 = facet(vertices=[v0,v2,v3], material='wallmat')
		O.bodies.append(lf1)

		uf0 = facet(vertices=[v4,v5,v6], material='wallmat')
		O.bodies.append(uf0)
		uf1 = facet(vertices=[v4,v6,v7], material='wallmat')
		O.bodies.append(uf1)

		ff0 = facet(vertices=[v1,v2,v6], material='wallmat')
		O.bodies.append(ff0)
		ff1 = facet(vertices=[v1,v6,v5], material='wallmat')
		O.bodies.append(ff1)

		bf0 = facet(vertices=[v0,v3,v7], material='wallmat')
		O.bodies.append(bf0)
		bf1 = facet(vertices=[v0,v7,v4], material='wallmat')
		O.bodies.append(bf1)

		######cylinder######
		cyl = Cylinder(segment=[0,0,1],radius=0.05)
		b = Body()
		b.shape = cyl
		b.mat = O.materials['wallmat']
		O.bodies.append(b)

		#spheres
		mn, mx= Vector3(minval + epsilon, minval + epsilon, minval + epsilon), Vector3(-0.06, maxval - epsilon, maxval - epsilon)
		sp = pack.SpherePack();
		sp.makeCloud(mn,mx,rMean=0.00075,rRelFuzz=0.10, num=numspheres)
		O.bodies.append([sphere(center,rad,material='spheremat') for center,rad in sp])
		sphereIDs = [b.id for b in O.bodies if type(b.shape)==Sphere]

-- 
You received this question notification because your team Yade
developers is subscribed to the question.